I'm a newbie coding in general, and thus can't seem to know where to customize the hovering state of the save slot buttons.
My idea is to have a thin frame surround the slot button:
I am aware that style_prefix "slot" in the original sample of The Question is in charge of that hovering but I just can't seem to find that particular style anywhere. Inside my code, it displays a blue line on the left side of the slot buttons: Here's my code:
Code: Select all
screen file_slots(title):
default page_name_value = FilePageNameInputValue(pattern=_("Page {}"), auto=_("Automatic saves"), quick=_("Quick saves"))
use game_menu(title):
fixed:
## This ensures the input will get the enter event before any of the
## buttons do.
order_reverse True
## The grid of file slots.
grid gui.file_slot_cols gui.file_slot_rows:
style_prefix "slot"
xsize 800
xalign 0.5
yalign 0.3
spacing 50
for i in range(gui.file_slot_cols * gui.file_slot_rows):
$ slot = i + 1
button:
xsize 423
ysize 243
action FileAction(slot)
add "gui/saveslot_image.png"
vbox:
add FileScreenshot(slot) xalign 0.5 size(423,243)
text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("empty slot")):
xalign 1.0
size 25
key "save_delete" action FileDelete(slot)
## Buttons to access other pages.
vbox:
xalign 0.95
yalign 0.3
spacing 30
textbutton _("^") action FilePagePrevious()
if config.has_autosave:
textbutton _("{#auto_page}Auto") action FilePage("auto")
if config.has_quicksave:
textbutton _("{#quick_page}Quick") action FilePage("quick")
## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 6):
textbutton "[page]" action FilePage(page)
textbutton _("v") action FilePageNext()
style page_label is gui_label
style page_label_text is gui_label_text
style page_button is gui_button
style page_button_text is gui_button_text
style slot_button is gui_button
style slot_button_text is gui_button_text
style slot_time_text is slot_button_text
style slot_name_text is slot_button_text
style page_label:
xpadding 75
ypadding 5
style page_label_text:
text_align 0.5
layout "subtitle"
hover_color gui.hover_color
size 25
style page_button:
properties gui.button_properties("page_button")
style page_button_text:
properties gui.button_text_properties("page_button")
style slot_button:
properties gui.button_properties("slot_button")
style slot_button_text:
properties gui.button_text_properties("slot_button")
What should I do?
I'd be eternally grateful !