-
Notifications
You must be signed in to change notification settings - Fork 81
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
Conversation
Got it working. Will finish this PR once #1722 is merged |
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.
@nike4613 Maybe you want to take a quick look on this as well |
|
I'm confused, the role icon is dimmed in the image in the OP? (yes, I updated the screenshot) |
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. |
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.
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)
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](https://private-user-images.githubusercontent.com/13639408/404677140-ff1bbf59-2c31-420c-a146-6b547a5014cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1Njc2OTQsIm5iZiI6MTczOTU2NzM5NCwicGF0aCI6Ii8xMzYzOTQwOC80MDQ2NzcxNDAtZmYxYmJmNTktMmMzMS00MjBjLWExNDYtNmI1NDdhNTAxNGNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIxMDk1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThhOTgyZTI4NDg5MmZjYTk1YjVlOWIzZDYzNGRlOTJkMDdiMTA1NTRiZmUyNzU0NGIyN2NlMzExMTVmZTY2NzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.P6a7f1TE7cQLi9MFMNFf8vscQU2M0GIYrwbQR64j5s0)