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

Rolelayering: Show Role Enable Status #1715

Merged
merged 17 commits into from
Jan 19, 2025
Merged

Rolelayering: Show Role Enable Status #1715

merged 17 commits into from
Jan 19, 2025

Conversation

TimGoll
Copy link
Member

@TimGoll TimGoll commented Jan 14, 2025

Fixes #1700 by showing the enable status of a role.

Also adds the functionality to quickly enable/disable the role right from the role layering menu.

Looks like this:
image

@TimGoll TimGoll added the type/enhancement Enhancement or simple change to existing functionality label Jan 14, 2025
@TimGoll
Copy link
Member Author

TimGoll commented Jan 15, 2025

image

Slowly making progress with the inheritance. But it is a bit painful

@TimGoll
Copy link
Member Author

TimGoll commented Jan 19, 2025

Got it working. Will finish this PR once #1722 is merged

TimGoll added a commit that referenced this pull request Jan 19, 2025
This PR adds no new code or new functionality, it only moves code around
in files so that everything that inherits from buttons can use (server)
convars. Therefore the code from the ttt2 checkboxlabel was moved to
button. This caused this change to track the underlying button in those
labels:


![image](https://github.com/user-attachments/assets/afeef60e-1d7d-4b66-b44f-15f4ec827ce8)

Moreover I added our tooltip code from the panel to the label as well,
as both of these are a starting point for the inheritance that can't be
merged.

I'd appreaciate a quick merge so that #1715 can be finished.

Also note, that there are MANY things that could be further improved by
improving the inheritance. This only tackles a small part of that.
@TimGoll TimGoll marked this pull request as ready for review January 19, 2025 16:09
@TimGoll
Copy link
Member Author

TimGoll commented Jan 19, 2025

@nike4613 Maybe you want to take a quick look on this as well

@TimGoll TimGoll added this to the v0.14.1b milestone Jan 19, 2025
@nike4613
Copy link
Contributor

nike4613 commented Jan 19, 2025

Is the visual appearance still the same as in the OP? If so, I might suggest only showing an extra icon when it's disabled, and dimming the role icon in that case as well. Not sure how I feel about the grayscale form of the icons.

@TimGoll
Copy link
Member Author

TimGoll commented Jan 19, 2025

Is the visual appearance still the same as in the OP? If so, I might suggest only showing an extra icon when it's disabled, and dimming the role icon in that case as well.

I'm confused, the role icon is dimmed in the image in the OP?

(yes, I updated the screenshot)

@nike4613
Copy link
Contributor

I personally would prefer keeping the coloration (though with dimming/darkening/whatever) as opposed to completely removing it here. I quite like the way that the dimmed icons look over in #1714 even without the extra overlay clarifying that they're disabled.

@TimGoll
Copy link
Member Author

TimGoll commented Jan 19, 2025

I personally would prefer keeping the coloration (though with dimming/darkening/whatever) as opposed to completely removing it here. I quite like the way that the dimmed icons look over in #1714 even without the extra overlay clarifying that they're disabled.

I tried that at first, but I didn't like it because it wasn't that clear on first glace. For your usecase I see the reason why you'd like that though. You use the role-image element to show if a role was selected or not - am I right?

We should probably extend the role image then a bit. Since a gray version with a red border probably doesn't make too much sense for your use-case? I'm not sure.

I'll merge this PR for now, but I'm open to add more to this for your UI. Personally, I think the design language I chose here is better for this specific use case, but not for yours.

@TimGoll TimGoll merged commit 8f43543 into master Jan 19, 2025
5 checks passed
@TimGoll TimGoll deleted the rolelayer-enable-status branch January 19, 2025 16:18
@Histalek Histalek mentioned this pull request Jan 19, 2025
3 tasks
@TimGoll TimGoll restored the rolelayer-enable-status branch January 19, 2025 16:55
@TimGoll TimGoll deleted the rolelayer-enable-status branch January 19, 2025 16:57
Histalek pushed a commit to WardenPotato/TTT2 that referenced this pull request Jan 31, 2025
This PR adds no new code or new functionality, it only moves code around
in files so that everything that inherits from buttons can use (server)
convars. Therefore the code from the ttt2 checkboxlabel was moved to
button. This caused this change to track the underlying button in those
labels:


![image](https://github.com/user-attachments/assets/afeef60e-1d7d-4b66-b44f-15f4ec827ce8)

Moreover I added our tooltip code from the panel to the label as well,
as both of these are a starting point for the inheritance that can't be
merged.

I'd appreaciate a quick merge so that TTT-2#1715 can be finished.

Also note, that there are MANY things that could be further improved by
improving the inheritance. This only tackles a small part of that.
Histalek pushed a commit to WardenPotato/TTT2 that referenced this pull request Jan 31, 2025
Fixes TTT-2#1700 by showing the enable status of a role.

Also adds the functionality to quickly enable/disable the role right
from the role layering menu.

Looks like this:

![image](https://github.com/user-attachments/assets/ff1bbf59-2c31-420c-a146-6b547a5014cf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement or simple change to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Role Layering Menu
3 participants