[0.11.3][kovarex] Exit unclickable when toggling some mods

This subforum contains all the issues which we already resolved.
Post Reply
FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

[0.11.3][kovarex] Exit unclickable when toggling some mods

Post by FishSandwich »

Enabling/Disabling certain mods that stretch the UI causes the Exit button to become unclickable.
PIC
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.
Last edited by FishSandwich on Fri Nov 28, 2014 2:52 pm, edited 1 time in total.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.11.3] Exit unclickable when enabling/disabling some m

Post 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?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.3] Exit unclickable when enabling/disabling some m

Post 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?

FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: [0.11.3][kovarex] Exit unclickable when toggling some mo

Post 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.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.3][kovarex] Exit unclickable when toggling some mo

Post 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 ...

FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: [0.11.3][kovarex] Exit unclickable when toggling some mo

Post 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.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.3][kovarex] Exit unclickable when toggling some mo

Post 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)

FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: [0.11.3][kovarex] Exit unclickable when toggling some mo

Post 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.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.3][kovarex] Exit unclickable when toggling some mo

Post 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.

FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: [0.11.3][kovarex] Exit unclickable when toggling some mo

Post by FishSandwich »

What was causing it?

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.3][kovarex] Exit unclickable when toggling some mo

Post 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.

Post Reply

Return to “Resolved Problems and Bugs”