-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Button UI Logic to block items when non interactable #256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik zie hier een potentieel performance probleem, zeker als er meer en meer buttons komen. Dat ben ik graag voor
…pt to be more efficient
Shit, ik had deze eerst moeten reviewen voordat ik het verplaatsen van de Sun Assets mergde.. ik kan de merge conflicts resolven zodra ik weer achter mijn IDE zit |
Merge conflict resolved; ik wacht op de feature branch build |
Closed, is door #284 vervangen |
if (Icon != null) | ||
{ | ||
Icon.color = DisabledTextColor; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dit stuk lijk je 2 keer te gebruiken ook in pointerup, kan je misschien gewoon een method maken zoals,
private void EnableButton()
{
bool interactable = button.interactable;
Color color = interactable ? BaseTextColor : DisabledTextColor;
if (ButtonText != null)
{
ButtonText.overrideColorTags = true;
ButtonText.color = color;
}
if (Icon != null)
{
Icon.color = color;
}
}
if (Icon != null) | ||
{ | ||
Icon.color = BaseTextColor; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ook hier even method maken EnableButton() en in start en pointerup uitvoeren
button.GetComponent<UIButtonLogic>().Disable_Button(); | ||
} | ||
else { | ||
button.GetComponent<UIButtonLogic>().Enable_Button(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kan je UIButtonLogic class scope cachen. GetComponent is zwaar
Changes zitten in: UIButtonLogic.cs, SunInspector.prefab en SunSettingsPanel.prefab