-
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
vgui: Reworked inheritance #1722
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.
So checkbox does not really inherit, but roleimage does, right?
gamemodes/terrortown/gamemode/client/cl_vskin/vgui/dcheckboxlabel_ttt2.lua
Show resolved
Hide resolved
Checkbox is still a gmod based element that therefore can't inherit from our code. The checkboxlabel, which includes a checkbox, inherits from our button same as role image |
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.
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:
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.