Page 1 of 1
[0.11.3][kovarex] Exit unclickable when toggling some mods
Posted: Thu Nov 27, 2014 4:31 pm
by FishSandwich
Enabling/Disabling certain mods that stretch the UI causes the Exit button to become unclickable.
Note: Hitting esc can exit the window.
Edit: Some extra info, this only happens in window mode and only when you have the window maximized.
Re: [0.11.3] Exit unclickable when enabling/disabling some m
Posted: Fri Nov 28, 2014 8:56 am
by bobingabout
Is that stretching the window sideways?
I thought the game was supposed to automatically split lines of text in that GUI to 2 or more lines if it was too long, or is that only for the description?
Re: [0.11.3] Exit unclickable when enabling/disabling some m
Posted: Fri Nov 28, 2014 3:03 pm
by kovarex
I was not able to reproduce this one, I download the same mod, and the window always updated correctly, could you give me exact step by step way to do this?
Re: [0.11.3][kovarex] Exit unclickable when toggling some mo
Posted: Fri Nov 28, 2014 4:17 pm
by FishSandwich
Sure,
Start the game in widowed mode.
Maximise the window.
Choose the mod and toggle on/off.
I can reproduce it 100% of the time.
Edit: If it helps, the screen resolution when maximized is 1592x834. I'm guessing it may be something to do with this, as it doesn't happen when running the game fullscreen or unmaxed in windowed mode.
Re: [0.11.3][kovarex] Exit unclickable when toggling some mo
Posted: Thu Jan 15, 2015 2:25 pm
by kovarex
No I can't still see it, I tried to change the resolution, but it still works the same. I have also now idea, how could enabling/disabling change anything, it just changes the one line text from enabled to disabled, nothing else.
I guess it has something to do with magic ...
Re: [0.11.3][kovarex] Exit unclickable when toggling some mo
Posted: Thu Jan 15, 2015 2:56 pm
by FishSandwich
Okay, this is a very strange bug, but I believe I've found the cause of it.
In the info.json, there is this line:
Code: Select all
"dependencies": ["base >= 0.11.1", "? roadworks", "? DyTech-Core", "? DyTech-Warfare", "? DyTech-Metallurgy" ]
Notice there is a space between the last ", and the closing bracket. When I removed that space, the behaviour went back to normal, so it's:
Code: Select all
"dependencies": ["base >= 0.11.1", "? roadworks", "? DyTech-Core", "? DyTech-Warfare", "? DyTech-Metallurgy"]
I'm guessing the space is tricking the UI into thinking there is going to be another dependency, so makes a new line for it. But then when invoking the toggle button, the UI is realising there isn't meant to be a new line there, and removes it, but forgets to move the OK button.
Re: [0.11.3][kovarex] Exit unclickable when toggling some mo
Posted: Thu Jan 15, 2015 3:50 pm
by kovarex
FishSandwich wrote:Okay, this is a very strange bug, but I believe I've found the cause of it.
In the info.json, there is this line:
Code: Select all
"dependencies": ["base >= 0.11.1", "? roadworks", "? DyTech-Core", "? DyTech-Warfare", "? DyTech-Metallurgy" ]
Notice there is a space between the last ", and the closing bracket. When I removed that space, the behaviour went back to normal, so it's:
Code: Select all
"dependencies": ["base >= 0.11.1", "? roadworks", "? DyTech-Core", "? DyTech-Warfare", "? DyTech-Metallurgy"]
I'm guessing the space is tricking the UI into thinking there is going to be another dependency, so makes a new line for it. But then when invoking the toggle button, the UI is realising there isn't meant to be a new line there, and removes it, but forgets to move the OK button.
Hm, that would be really really strange magic. The contents of the line are parsed as json. The whitespace shouldn't really matter, are you really 100% sure it is related to the space and not something else?
(I tried it to be sure, but no difference)
Re: [0.11.3][kovarex] Exit unclickable when toggling some mo
Posted: Thu Jan 15, 2015 4:05 pm
by FishSandwich
I'm sure, removing the space fixes it. Putting the space back breaks it again.
This bug gets weirder and weirder, I tried to put spaces into the json of other mods to see if it had the same effect, and it doesn't. I also tried other versions of the RSO mod(I tried 1.0.5 and 1.0.6) and it does not affect those.. only 1.0.3
I think the best thing to do is leave this in 1/0 magic and try to forget about it, it's getting too weird.
Re: [0.11.3][kovarex] Exit unclickable when toggling some mo
Posted: Thu Jan 15, 2015 5:07 pm
by kovarex
Ok, so I did some more testing (I tried exactly the 1.0.3 version of rso), and I was able to finally reproduce it.
Once I'v reproduced it, I was able to fix it quite quickly.
So it is fixed for 0.11.12 Thanks for the cooperation.
Re: [0.11.3][kovarex] Exit unclickable when toggling some mo
Posted: Thu Jan 15, 2015 5:15 pm
by FishSandwich
What was causing it?
Re: [0.11.3][kovarex] Exit unclickable when toggling some mo
Posted: Thu Jan 15, 2015 5:18 pm
by kovarex
It had nothing to do with the space (I believe).
The problem was down deep in the gui library, it had incorrect calculation of the frame content height, so our little optimisation of not updating the frame size when the size didn't change was not working in this special case.