Page 1 of 1

dark_rounded_button ignores filename

Posted: Fri Mar 27, 2020 8:56 am
by Optera
dark_rounded_button seems to ignore filename and always use default_tileset

Code: Select all

data.raw["gui-style"]["default"].dark_rounded_button.default_graphical_set =
{
  base = {
    filename = "__ClassicGUI__/graphics/gui-new.png",
    border = 4,
    position = {2, 738},
    size = 76
  },
  shadow =
  {
    filename = "__ClassicGUI__/graphics/gui-new.png",
    position = {378, 103},
    corner_size = 16,
    top_outer_border_shift = 4,
    bottom_outer_border_shift = -4,
    left_outer_border_shift = 4,
    right_outer_border_shift = -4,
    draw_type = "outer"
  }
}

For comparison, this style works just fine

Code: Select all

data.raw["gui-style"]["default"].CGUI_slot_button.default_graphical_set =
{
  base = {
    filename = "__ClassicGUI__/graphics/gui-new.png",
    border = 3,
    position = {0, 424},
    size = 80,
  }
}
Should this not be a bug, please tell me how to redirect dark_rounded_button without replacing the whole tileset.

Re: dark_rounded_button ignores filename

Posted: Fri Mar 27, 2020 10:20 am
by posila
I can't reproduce.
I downloaded ClassicGUI mod, tinted its gui-new.png pink in graphics editor (I didn't use runtime tint) and a button with style derived from dark_rounded_button was affected.
did-not-reproduce.png
did-not-reproduce.png (39.67 KiB) Viewed 1162 times

Re: dark_rounded_button ignores filename

Posted: Fri Mar 27, 2020 11:10 am
by Optera
In this mod I had to use a workaround of setting default_tileset = "__ClassicGUI__/graphics/gui-new.png"

Remove that line and set CGUI_slot_button and dark_rounded_button using the snippets in op to the modified tileset.

The result is CGUI_slot_button is redirected to __ClassicGUI__ as expected, dark_rounded_button remains using __core__
2020-03-27-12-13-34-2794155.png
2020-03-27-12-13-34-2794155.png (561.18 KiB) Viewed 1149 times

Re: dark_rounded_button ignores filename

Posted: Fri Mar 27, 2020 11:13 am
by posila
Second attemp to reproduce - I replaced data.lua in the mod by the code you posted.
repro-attempt-2.png
repro-attempt-2.png (9.1 KiB) Viewed 1149 times

Re: dark_rounded_button ignores filename

Posted: Fri Mar 27, 2020 11:18 am
by Optera
Ah, so dark rounded_button is the background for train schedule and not for items in crafting?

I found that style by offset, no other style seemed to point to it. Which style is used for crafting, quickbar and selecting signals in combinators?

Re: dark_rounded_button ignores filename

Posted: Fri Mar 27, 2020 11:23 am
by posila
Optera wrote: Fri Mar 27, 2020 11:18 am Ah, so dark rounded_button is the background for train schedule and not for items in crafting?

I found that style by offset, no other style seemed to point to it. Which style is used for crafting, quickbar and selecting signals in combinators?
Oh, I see. Well, NaB.

Crafting menu uses CGUI_filter_slot_button ... use Ctrl + F6 to enable inspection tooltip to discover what style does an element use.

Re: dark_rounded_button ignores filename

Posted: Fri Mar 27, 2020 11:29 am
by Optera
Yes ebck (error between chair and keyboard)
Thanks for pointing me to the correct style.