rguistyler
rguistyler copied to clipboard
Button BORDER_WIDTH is not being saved into rgs file
rGuiStyler may not be saving the button border width to the rgs file. After loading the style and making sure that guiStyleLoaded is true, GuiGetStyle(BUTTON, BORDER_WIDTH) always returns 2 even though it was set to 1 and saved.
I think the issue is related to raygui lazy initialization that overwrites button border width. How are you loading the new gui style?
GuiLoadStyle("./asset/gui_style/gui_style.rgs"); in the main function after I raylib InitWindow, before entering the main loop
@ssoher I updated raygui, now it should work as expected, please, could you try it?
Thank you @raysan5
- Opened my style to make sure button width is 1, it shows up as 2. Made it 1 and save. Closed rGuiStyler, re-opened, opened the same style file and button border width is reset back to 2 again.
- Pulled the latest raygui commit (https://github.com/raysan5/raygui/commit/e3f67f3c02300bf927a343d767d51b9b1ffe41a9) built my application, borders load up as 2.
I feel it has something to do with rGuiStyle serialization code but it's just a guess, didn't look at the code myself.