Page 1 of 1
[Rseding91] [0.13.5] GUI elements display width problem ?
Posted: Thu Jun 30, 2016 5:50 pm
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 (179.05 KiB) Viewed 4171 times
Re: [0.13] GUI elements display width problem ?
Posted: Sun Jul 03, 2016 4:20 pm
by binbinhfr
any idea why GUI elements (labels & buttons at least) have a width problem between 0.12 and 0.13 ?
Re: [0.13] GUI elements display width problem ?
Posted: Sun Jul 03, 2016 9:13 pm
by binbinhfr
I have precisions with a simple test on a simple GUI :
- bug-display2.jpg (19.14 KiB) Viewed 4126 times
- bug-display3.jpg (20.78 KiB) Viewed 4126 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.
Re: [0.13.4] GUI elements display width problem ?
Posted: Tue Jul 05, 2016 3:58 pm
by binbinhfr
problem still here in 0.13.4
Re: [0.13.5] GUI elements display width problem ?
Posted: Wed Jul 06, 2016 1:34 pm
by Rseding91
Please post the mod, save file (100x100 limited map) and steps to reproduce the issue.
Re: [0.13.5] GUI elements display width problem ?
Posted: Wed Jul 06, 2016 3:16 pm
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.
- bug-display4.jpg (18.05 KiB) Viewed 4060 times
Re: [Rseding91] [0.13.5] GUI elements display width problem ?
Posted: Wed Jul 06, 2016 7:13 pm
by Rseding91
Fixed for 0.13.7.