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
Update RmlUI to master #2027
Update RmlUI to master #2027
Conversation
wow wow wow wow |
Spotted:
|
Once people have reviewed it, I will squash the broken commits |
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.
For the squashing may I suggest 1 commit with the minimum needed to compile, and 1 with everything else. That way we could at least see the non-trivial changes, without creating a large amount of semi-broken commits.
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.
LGTM (goes for unvanquished_src.dpkdir as well)
Yeah, I will only squash enough that it compiles and loads without errors. |
The following changes compile and generally work, but are buggy. Below are the squashed changes: rmlui: Update srclists code doesn't compile rmlui: Rml::Core -> Rml:: sed -i 's/Rml::Core/Rml/g' `grep -r Rml::Core | cut -d: -f1 | sort -u` rmlui: Fix srclists rmlui: Fix GetIntrinsicDimensions args rmlui: Rename Rml::Controls -> Rml:: rmlui: Rename RmlUi/Controls -> RmlUi/Core rmlui: Rename RmlUi/Core/Lua -> RmlUi/Lua rmlui: Remove nonexistent Rmlui/Lua/Controls.h rmlui: A bunch of other API upgrades and fixes that I forget rmlui: Don't initialize rmlui twice rmlui: Rename progresbar -> progress to be consistent with RmlUI thanks @illwieckz
Now it properly remembers your old value.
If we start with regenerationInterval == 0, it leads to a divide by zero because the we won't set regenerationInterval to interval because it's guarded by an "else if".
For example, if I run rocket menu_main reload, It will only reload that file. Say menu_main.rml contains <link type="text/rcss" href="/ui/shared/basics.rcss" />, and I edit basics.rcss, any changes to basics.rcss will not be reflected in the reload. Given that this is a developer focused command and there really isn't a huge performance penalty for this, I think it is a safe change.
GCC7 has a bunch of warnings that fail under -Werror with rmlui on master like: : error: ‘Rml::Style::InheritedValues::line_height_inherit_type’ is too small to hold all values of ‘enum Rml::Style::LineHeight::InheritType’ [-Werror]
The old code naively just set the value of the form to the value of the cvar and hoped RmlUi would do something intelligent if the value set didn't mask any of the options. However, RmlUi will simply select the last value if it doesn't match any of the values. This is not what we want, so if be smarter by checking the values of all the options, if none of them match, dynamically add a new option for the current value.
This always sets the value, even when it hasn't changed, or sets it to the wrong value.
c9f4e23
to
9b31997
Compare
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.
LGTM.
No longer buggy 😄 Thanks for all your testing!