Quick Button style

This commit is contained in:
Nutbuster 2021-07-02 09:38:20 +10:00
parent f6a92b7f65
commit 8d1fe9056e
2 changed files with 8 additions and 6 deletions

View File

@ -56,7 +56,6 @@ define gui.interface_text_color = '#ffffff'
define gui.default_outline = '#000'
define gui.name_outline = '#000000dd'
define gui.quick_button_text_color = '#000000dd'
## Fonts and Font Sizes ########################################################

View File

@ -241,16 +241,16 @@ style choice_button_text is default:
## menus.
screen quick_button(filename, label, function):
button:
xmaximum 80
ymaximum 72
action function
fixed:
add filename xalign 0.5 yalign 0.5 zoom 1
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 22 color gui.quick_button_text_color
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 22 style "quick_button_text"
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
# Reuse the same image and keep things 'neat'.
# Reuse the same image string and keep things 'neat'.
screen quick_buttons(filename, label_functions):
for l_f in label_functions:
use quick_button(filename, l_f[0], l_f[1])
@ -306,7 +306,10 @@ style quick_button:
properties gui.button_properties("quick_button")
style quick_button_text:
properties gui.button_text_properties("quick_button")
#properties gui.button_text_properties("quick_button")
color gui.selected_color
hover_color gui.hover_color
selected_color gui.accent_color
################################################################################
@ -1548,7 +1551,7 @@ screen quick_button(filename, label, function):
action function
fixed:
add filename xalign 0.5 yalign 0.5 zoom 1.75
text label xalign 0.5 yalign 0.5 size 42 color gui.quick_button_text_color
text label xalign 0.5 yalign 0.5 size 42 style "quick_button_text"
screen quick_menu():
variant "small"