Implement history screen and sliders, add sounds

This commit is contained in:
LoafyLemon 2024-06-17 19:25:20 +01:00
parent af76d839a1
commit c9db632d6b
5 changed files with 103 additions and 56 deletions

BIN
game/gui/creamy_pumpkin_pie/book/book_vslider.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
game/gui/creamy_pumpkin_pie/book/book_vslider_thumb.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -57,6 +57,8 @@ style bar:
ysize gui.scrollbar_size
base_bar Frame("scrollbar_horizontal_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile)
thumb Frame("scrollbar_horizontal_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile)
hover_sound "sounds/qubodup-hover1.ogg"
activate_sound "sounds/qubodup-click2.ogg"
# style vbar:
# unscrollable gui.unscrollable
@ -69,12 +71,16 @@ style scrollbar:
ysize gui.scrollbar_size
base_bar Frame("scrollbar_horizontal_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile)
thumb Frame("scrollbar_horizontal_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile)
hover_sound "sounds/qubodup-hover1.ogg"
activate_sound "sounds/qubodup-click2.ogg"
style vscrollbar:
unscrollable gui.unscrollable
xsize gui.scrollbar_size
base_bar Frame("scrollbar_vertical_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile)
thumb Frame("scrollbar_vertical_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile)
hover_sound "sounds/qubodup-hover1.ogg"
activate_sound "sounds/qubodup-click2.ogg"
# style dark_vscrollbar:
# unscrollable gui.unscrollable

File diff suppressed because it is too large Load Diff

View File

@ -174,6 +174,8 @@ screen navigation():
default page_right_atl = None
default page_left_atl = None
on "show" action Play("sound", "sounds/bookopen.ogg")
add last_frame at navigation_last_frame_atl
# add "gui_fade_both" at gui_fade
@ -194,8 +196,9 @@ screen navigation():
textbutton _("Settings") action [SetLocalVariable("subcategory", "general"), SetLocalVariable("category", "settings")] at navigation_tabs
textbutton _("Main Menu") action MainMenu() 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" at navigation_tabs
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 _("Credits") action Show("credits") at navigation_tabs
if category == "save":
@ -241,6 +244,8 @@ screen navigation():
use settings_display
elif subcategory == "general":
use settings_general
elif category == "history":
use history
transform navigation_tabs:
subpixel True
@ -315,6 +320,7 @@ style navigation_tabs_button:
background Frame(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), 0, 0, 80, 0, tile=False)
selected_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), matrixcolor=HueMatrix(180.0)), 0, 0, 80, 0, tile=False)
insensitive_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), matrixcolor=SaturationMatrix(0.0)), 0, 0, 80, 0, tile=False)
activate_sound "sounds/pageflip.ogg"
style navigation_tabs_button_text is who:
color "#ffffff"
@ -340,6 +346,7 @@ style navigation_subtabs_button:
background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), xzoom=-1), 80, 0, 0, 0, tile=False)
selected_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), xzoom=-1, matrixcolor=HueMatrix(180.0)), 80, 0, 0, 0, tile=False)
insensitive_background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), xzoom=-1, matrixcolor=SaturationMatrix(0.0)), 80, 0, 0, 0, tile=False)
activate_sound "sounds/pageflip.ogg"
style navigation_subtabs_button_text is navigation_tabs_button_text:
selected_xoffset -15
@ -412,7 +419,7 @@ style navigation_radio_button_text is navigation_text:
first_indent 24
insensitive_color "#704F3280"
style navigation_slider is empty:
style navigation_slider:
xalign 0.5
xmaximum 300
ysize 20
@ -421,14 +428,22 @@ style navigation_slider is empty:
thumb Image("gui/creamy_pumpkin_pie/book/book_slider_thumb.png", oversample=4)
thumb_offset 16
style navigation_bar is empty:
style navigation_vscrollbar:
xalign 0.5
xsize 20
base_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_vslider.png", oversample=4), 8, 40, 8, 40, tile=False)
thumb Image("gui/creamy_pumpkin_pie/book/book_vslider_thumb.png", oversample=4)
thumb_offset 1
style navigation_bar:
xalign 0.5
xmaximum 300
ysize 20
left_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_full.png", oversample=4), tile=False)
right_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_empty.png", oversample=4), tile=False)
hover_right_bar Fixed(Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 4, 20, 4, tile=False), Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_empty.png", oversample=4), tile=False))
hover_left_bar Fixed(Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 4, 20, 4, tile=False), Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_full.png", oversample=4), tile=False))
left_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_full.png", oversample=4), 40, 8, 40, 8, tile=False)
right_bar Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_empty.png", oversample=4), 40, 8, 40, 8, tile=False)
hover_right_bar Fixed(Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 4, 20, 4, tile=False), Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_empty.png", oversample=4), 40, 8, 40, 8, tile=False))
hover_left_bar Fixed(Frame(Image("gui/creamy_pumpkin_pie/book/book_select.png", oversample=4), 20, 4, 20, 4, tile=False), Frame(Image("gui/creamy_pumpkin_pie/book/book_bar_full.png", oversample=4), 40, 8, 40, 8, tile=False))
thumb None
style navigation_note:
padding (6, 4)
@ -440,4 +455,4 @@ image doodle_letter = Image("gui/creamy_pumpkin_pie/book/book_doodles_letter.png
image doodle_owl = Image("gui/creamy_pumpkin_pie/book/book_doodles_owl.png", oversample=4)
image doodle_panties = Image("gui/creamy_pumpkin_pie/book/book_doodles_panties.png", oversample=4)
image doodle_snitch = Image("gui/creamy_pumpkin_pie/book/book_doodles_snitch.png", oversample=4)
image doodle_glasses = Image("gui/creamy_pumpkin_pie/book/book_doodles_glasses.png", oversample=4)
image doodle_glasses = Image("gui/creamy_pumpkin_pie/book/book_doodles_glasses.png", oversample=4)