mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-03-05 15:05:57 +02:00
Merge pull request #1060 from grilledham/0.18.27-fix
Update gui styles for 0.18.27
This commit is contained in:
commit
041c95def5
@ -4,8 +4,8 @@ local Event = require 'utils.event'
|
|||||||
local Settings = require 'utils.redmew_settings'
|
local Settings = require 'utils.redmew_settings'
|
||||||
local Color = require 'resources.color_presets'
|
local Color = require 'resources.color_presets'
|
||||||
|
|
||||||
local enabled_style = 'green_slot_button'
|
local enabled_style = 'working_weapon_button'
|
||||||
local disabled_style = 'red_slot_button'
|
local disabled_style = 'not_working_weapon_button'
|
||||||
|
|
||||||
local style_map = {[true] = enabled_style, [false] = disabled_style}
|
local style_map = {[true] = enabled_style, [false] = disabled_style}
|
||||||
local enabled_locale_map = {[true] = {'common.enabled'}, [false] = {'common.disabled'}}
|
local enabled_locale_map = {[true] = {'common.enabled'}, [false] = {'common.disabled'}}
|
||||||
@ -52,7 +52,7 @@ local function toggle_main_frame(event)
|
|||||||
Gui.destroy(frame)
|
Gui.destroy(frame)
|
||||||
main_button.style = 'icon_button'
|
main_button.style = 'icon_button'
|
||||||
else
|
else
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -373,7 +373,7 @@ local function toggle(event)
|
|||||||
|
|
||||||
main_button.style = 'icon_button'
|
main_button.style = 'icon_button'
|
||||||
else
|
else
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -611,7 +611,7 @@ local function draw_main_frame(center, player)
|
|||||||
|
|
||||||
line_bar(frame)
|
line_bar(frame)
|
||||||
|
|
||||||
local content = frame.add {type = 'frame', direction = 'vertical', style = 'image_frame'}
|
local content = frame.add {type = 'frame', direction = 'vertical', style = 'inside_shallow_frame'}
|
||||||
local content_style = content.style
|
local content_style = content.style
|
||||||
content_style.horizontally_stretchable = true
|
content_style.horizontally_stretchable = true
|
||||||
content_style.vertically_stretchable = true
|
content_style.vertically_stretchable = true
|
||||||
@ -673,7 +673,7 @@ local function toggle(event)
|
|||||||
if main_frame then
|
if main_frame then
|
||||||
close_main_frame(main_frame, player)
|
close_main_frame(main_frame, player)
|
||||||
else
|
else
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -149,7 +149,7 @@ local function toggle(event)
|
|||||||
Gui.destroy(main_frame)
|
Gui.destroy(main_frame)
|
||||||
main_button.style = 'icon_button'
|
main_button.style = 'icon_button'
|
||||||
else
|
else
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -648,7 +648,7 @@ local function toggle(event)
|
|||||||
remove_main_frame(main_frame, player)
|
remove_main_frame(main_frame, player)
|
||||||
main_button.style = 'icon_button'
|
main_button.style = 'icon_button'
|
||||||
else
|
else
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -441,7 +441,7 @@ local function toggle(event)
|
|||||||
else
|
else
|
||||||
draw_main_frame(left, event.player)
|
draw_main_frame(left, event.player)
|
||||||
|
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -187,7 +187,7 @@ local function toggle(event)
|
|||||||
else
|
else
|
||||||
draw_main_frame(center, player)
|
draw_main_frame(center, player)
|
||||||
|
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -149,7 +149,7 @@ Gui.on_click(
|
|||||||
if not frame then
|
if not frame then
|
||||||
score_show(top)
|
score_show(top)
|
||||||
|
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -319,7 +319,7 @@ local function toggle(event)
|
|||||||
else
|
else
|
||||||
draw_main_frame(event.player)
|
draw_main_frame(event.player)
|
||||||
|
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -457,7 +457,7 @@ local function toggle(event)
|
|||||||
else
|
else
|
||||||
draw_main_frame(left, player)
|
draw_main_frame(left, player)
|
||||||
|
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
@ -508,7 +508,7 @@ function Experience.toggle(event)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
main_button.style = 'selected_slot_button'
|
main_button.style = 'slot_sized_button'
|
||||||
local style = main_button.style
|
local style = main_button.style
|
||||||
style.width = 38
|
style.width = 38
|
||||||
style.height = 38
|
style.height = 38
|
||||||
|
Loading…
x
Reference in New Issue
Block a user