dark_rounded_button ignores filename

Bugs that are actually features.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

dark_rounded_button ignores filename

Post 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.
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: dark_rounded_button ignores filename

Post 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 1160 times
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: dark_rounded_button ignores filename

Post 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 1147 times
Last edited by Optera on Fri Mar 27, 2020 11:15 am, edited 1 time in total.
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: dark_rounded_button ignores filename

Post 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 1147 times
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: dark_rounded_button ignores filename

Post 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?
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: dark_rounded_button ignores filename

Post 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.
Attachments
CGUI_filter_slot_button.jpg
CGUI_filter_slot_button.jpg (95.89 KiB) Viewed 1141 times
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: dark_rounded_button ignores filename

Post by Optera »

Yes ebck (error between chair and keyboard)
Thanks for pointing me to the correct style.
Post Reply

Return to “Not a bug”