Skip to content

Commit 759a934

Browse files
committed
Cancel direction linking to duplex link to each other.
1 parent ea7c061 commit 759a934

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Assets/JCSUnity/Scripts/GUI/Dialogue/JCS_DialogueSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ private void SelectBtnActive(int index, bool act)
903903
selectBtn.gameObject.SetActive(act);
904904

905905
if (selectBtn.ButtonSelection != null)
906-
selectBtn.ButtonSelection.Skip = !act;
906+
selectBtn.ButtonSelection.SetSkip(!act);
907907
}
908908
/// <summary>
909909
///

Assets/JCSUnity/Scripts/GUI/JCS_Button.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public virtual void JCS_ButtonClick()
221221
/// Use this to enable and disable the button.
222222
/// </summary>
223223
/// <param name="act"></param>
224-
public virtual void SetInteractable(bool act)
224+
public virtual void SetInteractable(bool act, bool fromSelection)
225225
{
226226
mInteractable = act;
227227

@@ -240,10 +240,17 @@ public virtual void SetInteractable(bool act)
240240
{
241241
mImage.color = mNotInteractColor;
242242
}
243+
244+
if (!fromSelection && mButtonSelection != null)
245+
mButtonSelection.SetSkip(!mInteractable, true);
246+
}
247+
public virtual void SetInteractable(bool act)
248+
{
249+
SetInteractable(act, false);
243250
}
244251
public virtual void SetInteractable()
245252
{
246-
SetInteractable(mInteractable);
253+
SetInteractable(mInteractable, false);
247254
}
248255

249256
//----------------------

0 commit comments

Comments
 (0)