Implement help screen, tweak text sizes, fix in_context func

This commit is contained in:
LoafyLemon 2024-06-18 19:46:57 +01:00
parent 4706519a63
commit 50869dd97c
5 changed files with 212 additions and 114 deletions

View File

@ -61,7 +61,6 @@ init python in gui:
renpy.store.disable_game_menu()
renpy.choice_for_skipping()
renpy.pause(0.001) # Give renderer the chance to catch up with transitions
renpy.store.screenshot.capture()
renpy.call_in_new_context("gui_init_context", label, *args, **kwargs)

File diff suppressed because it is too large Load Diff

View File

@ -62,16 +62,11 @@ style history_entry:
hover_background Fixed("#C69D65", Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 8, 20, 8, tile=False))
style history_text_what is navigation_text:
# color "#fff"
# outlines [(1, "#000000", 1, 1)]
# hinting "bytecode"
size 10
size 16
style history_text_who is navigation_text:
# color "#EA8E61"
# outlines [(1, "#000000", 1, 1)]
hinting "auto"
font gui.bold_font
size 12
size 16
define gui.history_allow_tags = ("number", "unicode", "color")

View File

@ -194,11 +194,12 @@ screen navigation():
textbutton _("Save") action [SetLocalVariable("subcategory", None), SetLocalVariable("category", "save")] selected (category=="save") at navigation_tabs
textbutton _("Load") action [SetLocalVariable("subcategory", None), SetLocalVariable("category", "load")] selected (category=="load") at navigation_tabs
textbutton _("Settings") action [SetLocalVariable("subcategory", "general"), SetLocalVariable("category", "settings")] at navigation_tabs
textbutton _("Main Menu") action MainMenu() at navigation_tabs
textbutton _("History") action [SetLocalVariable("subcategory", None), SetLocalVariable("category", "history")] selected (category=="history") at navigation_tabs
textbutton _("Help") action [SetLocalVariable("subcategory", "tutorials"), SetLocalVariable("category", "help")] selected (category=="help") at navigation_tabs
null height 35
textbutton _("Return") action [SetScreenVariable("navigation_last_frame_atl", navigation_last_frame_hide), SetScreenVariable("navigation_atl", navigation_hide), SetScreenVariable("navigation_exit", True)] keysym "game_menu" activate_sound "sounds/bookclose.ogg" at navigation_tabs
null height 35
textbutton _("History") action [SetLocalVariable("subcategory", None), SetLocalVariable("category", "history")] selected (category=="history") at navigation_tabs
textbutton _("Main Menu") action MainMenu() at navigation_tabs
textbutton _("Credits") action Show("credits") at navigation_tabs
if category == "save":
@ -246,6 +247,17 @@ screen navigation():
use settings_general
elif category == "history":
use history
elif category == "help":
vbox:
style_prefix "navigation_subtabs"
textbutton _("Tutorials") action SetLocalVariable("subcategory", "tutorials") at navigation_tabs
textbutton _("Controls") action SetLocalVariable("subcategory", "controls") at navigation_tabs
if subcategory == "tutorials":
use help_tutorials
elif subcategory == "controls":
use help_controls
transform navigation_tabs:
subpixel True

View File

@ -19,12 +19,12 @@ init python:
return True
return tutorial_dict[entry][2]
label tutorial(entry):
if not tutorial_is_done(entry):
label tutorial(entry, force=False):
if not tutorial_is_done(entry) or force:
$ tutorial_dict[entry][2] = True
play sound "sounds/pop01.ogg"
$ renpy.music.set_volume(0.5, 3.0)
call screen modal_popup(tutorial_dict[entry][0], tutorial_dict[entry][1], f"interface/tutorials/{entry}.webp", "Okay")
$ renpy.music.set_volume(1.0, 3.0)
$ enable_game_menu()
return
return