1
0

Merge pull request #10 from Deadlock989/master

Fix styles
This commit is contained in:
Wyrrrd
2020-11-22 19:27:09 +00:00
committed by GitHub
2 changed files with 867 additions and 894 deletions
+5 -5
View File
@@ -359,7 +359,7 @@ local function create_display_gui(player, selected)
local content_frame = frame.add { local content_frame = frame.add {
type = "frame", type = "frame",
name = "inner-frame", name = "inner-frame",
style = "display_deep_frame", style = "display_inside_frame",
direction = "vertical", direction = "vertical",
} }
content_frame.style.top_margin = 8 content_frame.style.top_margin = 8
@@ -469,15 +469,15 @@ local function set_up_display_from_ghost(entity,tags)
end end
end end
local function reset_globals() -- local function reset_globals()
global.translations = nil -- global.translations = nil
end -- end
------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------
-- event handlers -- event handlers
script.on_configuration_changed(reset_globals) -- script.on_configuration_changed(reset_globals)
script.on_event(defines.events.on_gui_closed, gui_close) script.on_event(defines.events.on_gui_closed, gui_close)
script.on_event(defines.events.on_gui_click, gui_click) script.on_event(defines.events.on_gui_click, gui_click)
script.on_event(defines.events.on_player_mined_entity, event_raised_destroy, get_display_event_filter()) script.on_event(defines.events.on_player_mined_entity, event_raised_destroy, get_display_event_filter())
+5 -32
View File
@@ -158,11 +158,11 @@ add_styles({
left_padding = 10, left_padding = 10,
right_padding = 10, right_padding = 10,
top_padding = 8, top_padding = 8,
graphical_set = data.raw["gui-style"]["default"]["tabbed_pane"]["tab_content_frame"].graphical_set,
type = "frame_style", type = "frame_style",
graphical_set = data.raw["gui-style"]["default"]["filter_tabbed_pane"]["tab_content_frame"].graphical_set,
}, },
type = "tabbed_pane_style", type = "tabbed_pane_style",
parent = "tabbed_pane", parent = "filter_tabbed_pane",
width = 420, width = 420,
}, },
display_tab = { display_tab = {
@@ -185,9 +185,9 @@ add_styles({
horizontal_align = "center", horizontal_align = "center",
}, },
}, },
display_deep_frame = { display_inside_frame = {
type = "frame_style", type = "frame_style",
parent = "inside_deep_frame", parent = "inside_shallow_frame",
vertical_flow_style = { vertical_flow_style = {
type = "vertical_flow_style", type = "vertical_flow_style",
vertical_spacing = 0, vertical_spacing = 0,
@@ -196,34 +196,7 @@ add_styles({
}, },
display_tab_deep_frame = { display_tab_deep_frame = {
type = "frame_style", type = "frame_style",
parent = "subpanel_inset_frame", parent = "slot_button_deep_frame",
vertical_flow_style = {
type = "vertical_flow_style",
vertical_spacing = 0,
padding = 0,
},
graphical_set = {
base = {
center = {
position = {42,8},
size = {1,1},
},
corner_size = 8,
draw_type = "outer",
position = {85,0},
},
shadow = data.raw["gui-style"]["default"]["inside_deep_frame"].graphical_set.shadow,
},
background_graphical_set = {
corner_size = 8,
overall_tiling_horizontal_padding = 5,
overall_tiling_horizontal_size = 30,
overall_tiling_horizontal_spacing = 10,
overall_tiling_vertical_padding = 5,
overall_tiling_vertical_size = 30,
overall_tiling_vertical_spacing = 10,
position = { 282, 17 },
},
}, },
display_buttons = { display_buttons = {
type = "table_style", type = "table_style",