I am using an imagemap for the file save slots/screenshots & for the file page numbers. However, when I put in the imagemap for the file save slots, the original file page numbers from the default renpy UI stopped working, and I'm having trouble getting it to work with the new image map.
It should be noted that the numbers on the top and the numbers on the bottom are the same type of menus - the ones on the top are my image map design & the ones on the bottom are the default from the RenPy standard UI interface. I left the default one to try to figure out the best way to code the new one & to copy code from it. I will delete it once I can figure out how to get the new one working.
Here is the bit of code I'm using for the file page numbers:
Code: Select all
hotspot (273, 1135, 38, 21) action FilePagePrevious()
hotspot (977, 1135, 38, 21) action FilePageNext()
hotspot (358, 1135, 65, 32) action FilePage(1)
hotspot (463, 1135, 65, 32) action FilePage(2)
hotspot (566, 1135, 65, 32) action FilePage(3)
hotspot (671, 1135, 65, 32) action FilePage(4)
hotspot (777, 1135, 65, 32) action FilePage(5)
hotspot (883, 1135, 65, 32) action FilePage(6)
Code: Select all
screen save():
tag menu
use file_slots(_("Save"))
add "gui/save-menu-title.png"
imagemap:
ground "gui/saveload-boxes-idle.png"
hover "gui/saveload-boxes-hover.png"
selected_idle "gui/saveload-boxes-hover.png"
hotspot (137, 234, 315, 192) clicked FileSave(1):
use load_save_slot(number=1)
hotspot (495, 234, 315, 192) clicked FileSave(2):
use load_save_slot(number=2)
hotspot (851, 234, 315, 192) clicked FileSave(3):
use load_save_slot(number=3)
hotspot (136, 456, 315, 192) clicked FileSave(4):
use load_save_slot(number=4)
hotspot (494, 456, 315, 192) clicked FileSave(5):
use load_save_slot(number=5)
hotspot (851, 456, 315, 192) clicked FileSave(6):
use load_save_slot(number=6)
hotspot (273, 1135, 38, 21) action FilePagePrevious()
hotspot (977, 1135, 38, 21) action FilePageNext()
hotspot (358, 1135, 65, 32) action FilePage(1)
hotspot (463, 1135, 65, 32) action FilePage(2)
hotspot (566, 1135, 65, 32) action FilePage(3)
hotspot (671, 1135, 65, 32) action FilePage(4)
hotspot (777, 1135, 65, 32) action FilePage(5)
hotspot (883, 1135, 65, 32) action FilePage(6)
screen load():
tag menu
use file_slots(_("Load"))
add "gui/load-menu-title.png"
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 page name, which can be edited by clicking on a button.
button:
style "page_label"
key_events True
xalign 0.5
action page_name_value.Toggle()
## Buttons to access other pages.
hbox:
style_prefix "page"
xalign 0.5
yalign 1.0
spacing gui.page_spacing
textbutton _("<") action FilePagePrevious()
if config.has_autosave:
textbutton _("{#auto_page}A") action FilePage("auto")
if config.has_quicksave:
textbutton _("{#quick_page}Q") action FilePage("quick")
## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 10):
textbutton "[page]" action FilePage(page)
textbutton _(">") 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 50
ypadding 3
style page_label_text:
text_align 0.5
layout "subtitle"
hover_color gui.hover_color
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")
screen load_save_slot:
$ file_text = "% 2s. %s\n%s" % (
FileSlotName(number, 3),
FileTime(number, empty=_("Empty Slot")),
FileSaveName(number))
add FileScreenshot(number) xpos 20 ypos 13
init -2 python:
config.thumbnail_width = 261
config.thumbnail_height = 147