Skip to content

Instantly share code, notes, and snippets.

@xavi-mat
Created July 5, 2023 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xavi-mat/b6a19ab325d8e2cabc00646c420bbdc5 to your computer and use it in GitHub Desktop.
Save xavi-mat/b6a19ab325d8e2cabc00646c420bbdc5 to your computer and use it in GitHub Desktop.
Configurar el quick_menu en screens.rpy
## Pantalla de menú rápido #####################################################
##
## El menú rápido se presenta en el juego para ofrecer fácil acceso a los menus
## externos al juego.
transform parriba:
yoffset 12
on hover:
easein 0.3 yoffset 0
on idle:
easeout 0.3 yoffset 12
screen quick_menu():
## Asegura que esto aparezca en la parte superior de otras pantallas.
zorder 100
if quick_menu:
hbox:
style_prefix "quick"
xalign 0.5
yalign 1.0
# textbutton _("Atrás") action Rollback()
# textbutton _("Historial") action ShowMenu('history')
# textbutton _("Saltar") action Skip() alternate Skip(fast=True, confirm=True)
# textbutton _("Auto") action Preference("auto-forward", "toggle")
# textbutton _("Guardar") action ShowMenu('save')
# textbutton _("Guardar R.") action QuickSave()
# textbutton _("Cargar R.") action QuickLoad()
# textbutton _("Prefs.") action ShowMenu('preferences')
spacing 40
imagebutton auto "gui/icons/back_%s.png" action Rollback() at parriba
imagebutton auto "gui/icons/history_%s.png" action ShowMenu('history') at parriba
imagebutton auto "gui/icons/skip_%s.png" action Skip() alternate Skip(fast=True, confirm=True) at parriba
imagebutton auto "gui/icons/auto_%s.png" action Preference("auto-forward", "toggle") at parriba
vbox:
xalign 0.9
yalign 1.0
imagebutton auto "gui/icons/save_%s.png" action ShowMenu('save')
imagebutton auto "gui/icons/quicksave_%s.png" action QuickSave()
imagebutton auto "gui/icons/quickload_%s.png" action QuickLoad()
imagebutton auto "gui/icons/prefs_%s.png" action ShowMenu('preferences')
## Este código asegura que la pantalla 'quick_menu' se muestra en el juego,
## mientras el jugador no haya escondido explícitamente la interfaz.
init python:
config.overlay_screens.append("quick_menu")
default quick_menu = True
style quick_button is default
style quick_button_text is button_text
style quick_button:
properties gui.button_properties("quick_button")
style quick_button_text:
properties gui.button_text_properties("quick_button")
size 20
hover_color "#FF4444"
idle_color "#00FF00"
insensitive_color "#8888FF"
selected_hover_color "#FFFFFF"
selected_idle_color "#FFCCCC"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment