Skip to content
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

Closed
wants to merge 6 commits into from

Conversation

Protofunk
Copy link
Contributor

@Protofunk Protofunk commented Sep 17, 2024

Changes zitten in: UIButtonLogic.cs, SunInspector.prefab en SunSettingsPanel.prefab

Copy link
Contributor

@mvriel mvriel left a 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

@mvriel
Copy link
Contributor

mvriel commented Oct 1, 2024

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

@mvriel
Copy link
Contributor

mvriel commented Oct 3, 2024

Merge conflict resolved; ik wacht op de feature branch build

@mvriel mvriel mentioned this pull request Oct 3, 2024
@mvriel
Copy link
Contributor

mvriel commented Oct 4, 2024

Er zit iets in deze feature branch wat leidt tot errors gerelateerd aam, wat lijkt, jslib referenties?
image
image

Dit moet eerst uitgezocht worden want dat betekent dat de huidige branch niet gemerged kan worden

@TomSimons TomSimons mentioned this pull request Oct 8, 2024
@mvriel mvriel requested review from mvriel and bozmir October 10, 2024 08:34
@mvriel
Copy link
Contributor

mvriel commented Oct 10, 2024

Closed, is door #284 vervangen

@mvriel mvriel closed this Oct 10, 2024
if (Icon != null)
{
Icon.color = DisabledTextColor;
}
}
Copy link
Contributor

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;
}
Copy link
Contributor

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();
Copy link
Contributor

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

@TomSimons TomSimons deleted the fix/Zonnestand_UI branch October 17, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants