How do I also 'color' the first table entry?

Place to get help with not working mods / modding interface.
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

How do I also 'color' the first table entry?

Post by MrDoomah »

So deriving from the "browse_games_table_style" I have created the following table style:

Code: Select all

data.raw["gui-style"].default.row_table_style = 
    {
      type = "table_style",
      cell_padding = 5,
      horizontal_spacing=0,
      vertical_spacing=0,
      odd_row_graphical_set =
      {
        type = "composition",
        filename = "__core__/graphics/gui.png",
        priority = "extra-high-no-scale",
        corner_size = {3, 3},
        position = {8, 0}
      },
      even_row_graphical_set =
      {
        type = "composition",
        filename = "__core__/graphics/gui.png",
        priority = "extra-high-no-scale",
        corner_size = {3, 3},
        position = {8, 0}
      }
    }
However, when using it in game, it doesn't fill in the first row:
Naamloos.png
Naamloos.png (1.8 MiB) Viewed 1021 times
What do I do wrong?
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: How do I also 'color' the first table entry?

Post by aubergine18 »

That's possibly a bug - can you upload a small test mod that isolates the issue?

Also, does `even_row_graphical_set` work? I've never seem it in any of the docs or any of the base game style prototypes.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: How do I also 'color' the first table entry?

Post by MrDoomah »

aubergine18 wrote:
Also, does `even_row_graphical_set` work? I've never seem it in any of the docs or any of the base game style prototypes.
Yes it does, removing that part will make every other row not have a graphic just like the first set. 'row_graphical_set' and 'graphical_set' on their own do nothing as far as I can see.

I've used it in my mod: What is it used for? Version 1.1.0 is using this in the search bar.
Post Reply

Return to “Modding help”