Implement SMODS.GUI.scrollbar and SMODS.GUI.dropdown_select#1253
Open
ThunderEdge73 wants to merge 16 commits intoSteamodded:mainfrom
Open
Implement SMODS.GUI.scrollbar and SMODS.GUI.dropdown_select#1253ThunderEdge73 wants to merge 16 commits intoSteamodded:mainfrom
ThunderEdge73 wants to merge 16 commits intoSteamodded:mainfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Author
|
I need to polish this some more |
Author
|
Now I feel confident enough in the contents of this PR, feel free to let me know if anything needs to be changed |
Member
|
Amazing work! Tested it and everything works very smooth. Some small suggestions for options that came up when testing:
|
Author
Author
|
Also, I was trying to adjust the math for the scrolling velocity, but the math wasn't cooperating with me tonight - I'll address the scrolling tomorrow, when I am less tired. |
Author
|
The scrolling stuff should be aok now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

SMODS.GUI.scrollbarandSMODS.GUI.dropdown_selectThis PR adds
SMODS.GUI.scrollbar(args), a function that returns a UI node that can be scrolled. It can optionally be linked to anSMODS.UIScrollBoxinargs.scroll_collision_objto automatically handle scrolling that object. Otherwise, it will updateargs.ref_table[args.ref_value]based on the scrollbar's progress. Finer control over the specific UI node type returned is possible viaargs.ui_type. This also addsSMODS.GUI.dropdown_select, a cleaner way to select an option from a list.Why not use
create_sliderinstead ofSMODS.GUI.scrollbar?create_slidercreates a slider that also has a numeric display next to it by default, whereasSMODS.GUI.scrollbardoes not. Furthermore,create_sliderdoes not support mouse scrollwheel inputs, butSMODS.GUI.scrollbardoes.SMODS.GUI.scrollbaralso has a knob to indicate more clearly that it can be dragged and scrolled, much like how it is on websites.Examples
For
SMODS.GUI.scrollbar(args):2026-03-11_19-10-40.mp4
For
SMODS.GUI.dropdown_select(args):2026-03-11_19-10-54.mp4
Additional Info: