From 40686cf24535d441b3f8b8a30b1632e4dc3065ad Mon Sep 17 00:00:00 2001 From: nutbuster Date: Sat, 3 Jul 2021 15:30:39 +1000 Subject: [PATCH] Adjust Input prompt around OSK --- game/gui.rpy | 4 ++++ game/screens.rpy | 11 +++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/game/gui.rpy b/game/gui.rpy index d67f37a..410225d 100644 --- a/game/gui.rpy +++ b/game/gui.rpy @@ -155,6 +155,7 @@ define gui.dialogue_width = 1460 ## aligned, 0.5 for centered, and 1.0 for right-aligned. define gui.dialogue_text_xalign = 0.0 +define gui.input_yoffset = 0 ## Buttons ##################################################################### ## @@ -489,4 +490,7 @@ init python: gui.nvl_button_xpos = 30 + ## Input, OSK, very specific + if renpy.variant("small") or renpy.variant("touch"): + gui.input_yoffset = -625 diff --git a/game/screens.rpy b/game/screens.rpy index d92e211..2093c90 100644 --- a/game/screens.rpy +++ b/game/screens.rpy @@ -176,12 +176,13 @@ screen input(prompt): style_prefix "input" window: - + add Image("gui/textbox_no_hitch.png", xalign=0.5, yalign=1.0, yoffset=gui.input_yoffset) #for mobile OSK vbox: xalign gui.dialogue_text_xalign xpos gui.dialogue_xpos xsize gui.dialogue_width ypos gui.dialogue_ypos + yoffset gui.input_yoffset #for mobile OSK text prompt style "input_prompt" input id "input" @@ -425,12 +426,6 @@ screen main_menu(): [ "Help & About", ShowMenu("extras") ], \ [ "Quit", Quit(confirm=not main_menu) ] \ ] ) - #imagebutton auto "gui/button/menubuttons/startbutton_%s.png" action Start() - #imagebutton auto "gui/button/menubuttons/loadbutton_%s.png" action ShowMenu("load") - #imagebutton auto "gui/button/menubuttons/optionsbutton_%s.png" action ShowMenu("preferences") - #imagebutton auto "gui/button/menubuttons/helpbutton_%s.png" action ShowMenu("extras") - #imagebutton auto "gui/button/menubuttons/quitbutton_%s.png" action Quit(confirm=not main_menu) - # if gui.show_name: # @@ -788,7 +783,7 @@ screen file_slots(title, flag=False): add FileScreenshot(slot) xalign 0.5 - text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("empty slot")): + text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("Empty Slot")): style "slot_time_text" text FileSaveName(slot):