shortcuts style

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

shortcuts style

Post by LuziferSenpai »

Hey,

why are there only a few colors and then default what is grey?

Why is there no RGB support and a support for no style?

Can we pls get that?

Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: shortcuts style

Post by SyncViews »

It looks like they are in style.lua. I didn't try yet however if adding a new style there with the same naming convention works. If it doesn't, then letting that work I think is a reasonable solution.

Code: Select all

    shortcut_bar_button_blue = ...
    shortcut_bar_button_red = ...
    shortcut_bar_button_green =
    {
      type = "button_style",
      parent = "shortcut_bar_button",
      default_graphical_set =
      {
        base = {position = {431, 48}, corner_size = 8},
        shadow = default_dirt
      },
      hovered_graphical_set =
      {
        base = {position = {448, 48}, corner_size = 8},
        shadow = default_dirt,
        glow = default_glow({110, 164, 104, 127}, 0.5)
      },
      clicked_graphical_set =
      {
        base = {position = {465, 48}, corner_size = 8},
        shadow = default_dirt
      }
    },

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: shortcuts style

Post by LuziferSenpai »

SyncViews wrote:
Fri Mar 01, 2019 4:39 pm
It looks like they are in style.lua. I didn't try yet however if adding a new style there with the same naming convention works. If it doesn't, then letting that work I think is a reasonable solution.

Code: Select all

    shortcut_bar_button_blue = ...
    shortcut_bar_button_red = ...
    shortcut_bar_button_green =
    {
      type = "button_style",
      parent = "shortcut_bar_button",
      default_graphical_set =
      {
        base = {position = {431, 48}, corner_size = 8},
        shadow = default_dirt
      },
      hovered_graphical_set =
      {
        base = {position = {448, 48}, corner_size = 8},
        shadow = default_dirt,
        glow = default_glow({110, 164, 104, 127}, 0.5)
      },
      clicked_graphical_set =
      {
        base = {position = {465, 48}, corner_size = 8},
        shadow = default_dirt
      }
    },
That is not what I mean, that is just adding a Button, but the Part that makes that useable in a prototype is not softcoded.

Code: Select all

{
    type = "shortcut",
    name = "give-blueprint",
    order = "b[blueprints]-e[blueprint]",
    action = "create-blueprint-item",
    localised_name = {"item-name.blueprint"},
    technology_to_unlock = "construction-robotics",
    item_to_create = "blueprint",
    style = "blue", -- This Part
    icon =
    {
        filename = "__base__/graphics/icons/shortcut-toolbar/new-blueprint-x32-white.png",
        priority = "extra-high-no-scale",
        size = 32,
        scale = 1,
        flags = {"icon"}
    },
    small_icon =
    {
        filename = "__base__/graphics/icons/shortcut-toolbar/new-blueprint-x24.png",
        priority = "extra-high-no-scale",
        size = 24,
        scale = 1,
        flags = {"icon"}
    },
    disabled_small_icon =
    {
        filename = "__base__/graphics/icons/shortcut-toolbar/new-blueprint-x24-white.png",
        priority = "extra-high-no-scale",
        size = 24,
        scale = 1,
        flags = {"icon"}
   },
},
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

Post Reply

Return to “Modding interface requests”