Page 1 of 1
shortcuts style
Posted: Fri Mar 01, 2019 2:49 pm
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
Re: shortcuts style
Posted: Fri Mar 01, 2019 4:39 pm
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
}
},
Re: shortcuts style
Posted: Fri Mar 01, 2019 6:23 pm
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"}
},
},