[Rseding91] [0.13.5] GUI elements display width problem ?

This subforum contains all the issues which we already resolved.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

[Rseding91] [0.13.5] GUI elements display width problem ?

Post by binbinhfr »

Hi,

between 0.12 and 0.13 I did not change anything in my mods interface, but those using interface with GUI elements have graphical problems with the width of the elements. See on this example of my SpaceBook mod, where you can see labels and buttons overlapping. In 0.12, the rendering was normal.

EDIT : You can see a more simple example in the post below.
EDIT : same problem under 0.13.5
bug-display.jpg
bug-display.jpg (179.05 KiB) Viewed 4172 times
Last edited by binbinhfr on Tue Jul 05, 2016 6:20 pm, edited 3 times in total.
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [0.13] GUI elements display width problem ?

Post by binbinhfr »

any idea why GUI elements (labels & buttons at least) have a width problem between 0.12 and 0.13 ?
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [0.13] GUI elements display width problem ?

Post by binbinhfr »

I have precisions with a simple test on a simple GUI :
bug-display2.jpg
bug-display2.jpg (19.14 KiB) Viewed 4127 times
bug-display3.jpg
bug-display3.jpg (20.78 KiB) Viewed 4127 times
this GUI is created with default style except the label style, which font size changes from the default :

Code: Select all

		gui1 = player.gui.left.add({type = "frame", name = "frm_quassu", caption = "QA", direction = "horizontal", style = "frame_style"})
		gui1 = gui1.add({type = "flow", name = "flw_quassu", direction = "vertical", style = "flow_style"})
		gui1.add({type = "label", name = "lbl_quassu_tit", caption = "very large text auha zdui aizduh iuah diuha zdiu azd", style = "quassu_label_style"})				
		gui2 = gui1.add({type = "frame", name = "frm_quassu_count", direction = "vertical", style = "frame_style"})
		gui2.add({type = "label", name = "lbl_quassu_nb", caption = "very large text auha zdui aizduh iuah diuha zdiu azd", style = "quassu_label_style"})				
		gui2.add({type = "label", name = "lbl_quassu_nb2", caption = "very large text auha zdui aizduh iuah diuha zdiu azd", style = "quassu_label_style"})				
		gui2.add({type = "button", name = "but_quassu_count_rst", caption = "reset", style = "quassu_button_style"})

Code: Select all

data:extend(
	{
		{
			type = "font",
			name = "quassu_font",
			from = "default",
			size = 14 -- 14 is default, 15 is bugging
		}
  }
)

local default_gui = data.raw["gui-style"].default

default_gui.quassu_label_style =
{
	type="label_style",
	parent="label_style",
	font="quassu_font",
}
In the first screencopy, the font size is 14 (as default) and verything looks fine,
in the second screencopy, the font size is 15 and the frame does not autosize correctly.

Same problem with button font as far as I can see.
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [0.13.4] GUI elements display width problem ?

Post by binbinhfr »

problem still here in 0.13.4
My mods on the Factorio Mod Portal :geek:
Rseding91
Factorio Staff
Factorio Staff
Posts: 14289
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.5] GUI elements display width problem ?

Post by Rseding91 »

Please post the mod, save file (100x100 limited map) and steps to reproduce the issue.
If you want to get ahold of me I'm almost always on Discord.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [0.13.5] GUI elements display width problem ?

Post by binbinhfr »

Here is a simple mod that triggers the bug under 0.13.X
Use any new map to show it.

The problem comes from the fact that I increase the size of the font in my label.
And the auto resize does not work.
BugDisplay_0.0.1.zip
(1.11 KiB) Downloaded 188 times
bug-display4.jpg
bug-display4.jpg (18.05 KiB) Viewed 4061 times
My mods on the Factorio Mod Portal :geek:
Rseding91
Factorio Staff
Factorio Staff
Posts: 14289
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.13.5] GUI elements display width problem ?

Post by Rseding91 »

Fixed for 0.13.7.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”