Skip to content

Config button UI edits#79

Open
shvaich wants to merge 14 commits into
Alexdoru:masterfrom
shvaich:config_button_ui_edits
Open

Config button UI edits#79
shvaich wants to merge 14 commits into
Alexdoru:masterfrom
shvaich:config_button_ui_edits

Conversation

@shvaich

@shvaich shvaich commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Added some helper methods to ConfigGuiButton to centerlize code.

Added a method to ConfigGuiButton that must be implemented by inheritors for better comment trimming and "content" positioning (this also fixed a bug in comment trimming for ColorGuiButton).

Added an overridable method to get the "left padding" for drawing name and comment, to allow inheritors to control it (mostly done for custom elements created by other devs).

Made some small UI changes (shortened the veritcal gap between name and comment, filling the slider track that comes before the slider button).

Note: this branch does have small conflicts with hud_screen_edit branch which I can easily resolve

Before Example:
2026-07-19_03 47 34

After Example:
2026-07-19_04 00 19

@shvaich

shvaich commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

I just noticed that this might be behind your current master branch

@shvaich

shvaich commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

merged branch master ito config_button_ui_edits

@shvaich

shvaich commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

This are changes I want to make on this branch but haven't yet

UI Changes

These are UI changes I think you should add if you find preferable like me

Your no-comment edgecases:

צילום מסך 2026-07-20 210525 צילום מסך 2026-07-20 210624

My no-comment edgecases:

צילום מסך 2026-07-20 210755

Your long-comment edgecases:

צילום מסך 2026-07-20 212049 צילום מסך 2026-07-20 212036

My long-comment edgecases:

צילום מסך 2026-07-20 213836

ConfigUIElement Extra Control

These features offer more control over ConfigUIElements, for you and other developers
I think you should definitely add these.

1. Allow ConfigUIElements to send hovering text to the ConfigGuiScreen

צילום מסך 2026-07-20 201422

2. Allow each ConfigUIElement to control it's own top and bottom margin
Margin is the space outside of the border
The margin values will replace using ELEMENT_GAP in ConfigGuiScreen
These are just examples of HOW this CAN be used, NOT HOW IT SHOULD BE USED!
In each of these examples I'm editing the margin values of BooleanGuiButton so they would be noticable

Example: Top Margin and Bottom Margin are the same. (ideal)

2026-07-20_20 01 39

Example: Different Top Margin and Bottom Margin. (should only be used in specific cases if at all, but the option should remain available)
(In this image BooleanGuiButton has a bigger Bottom Margin than Top Margin)

2026-07-20_20 02 16

By default each ConfigUIElement will have Margin Top of 2px and Margin Bottom of 2px so visually everything will look the same as it does in your config right now

I really recommend adding this. You don't ever have to touch it but it should be there as an option for other devs.
This could also be useful in the future if you want certain elements to have different margins.
Example: Give each SubCategoryHeader a bit more Top Margin for a bit more seperation between the starts and ends of subcategories

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.

1 participant