Scrollbars

This commit is contained in:
LoafyLemon 2024-11-09 14:29:32 +00:00
parent ff6fcc1ba0
commit f9c38e2b15
6 changed files with 40 additions and 19 deletions

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

Binary file not shown.

Binary file not shown.

View File

@ -211,18 +211,28 @@ image scrollbar_horizontal_selected_hover_bar = "scrollbar_horizontal_hover_bar"
image scrollbar_horizontal_insensitive_bar = "scrollbar_horizontal_idle_bar" image scrollbar_horizontal_insensitive_bar = "scrollbar_horizontal_idle_bar"
image scrollbar_horizontal_selected_insensitive_bar = "scrollbar_horizontal_idle_bar" image scrollbar_horizontal_selected_insensitive_bar = "scrollbar_horizontal_idle_bar"
image scrollbar_vertical_idle_thumb = "gui/scrollbar/horizontal_idle_bar.png" #Solid("#3d3535") image scrollbar_vertical_idle_thumb = Frame(Image("gui/creamy_pumpkin_pie/scrollbar_vertical_idle_thumb.png", oversample=4), 0, 20)
image scrollbar_vertical_insensitive_thumb = "gui/scrollbar/horizontal_idle_bar.png" image scrollbar_vertical_hover_thumb = At(Frame(Image("gui/creamy_pumpkin_pie/scrollbar_vertical_idle_thumb.png", oversample=4), 0, 20), scrollbar_vertical_thumb_hover)
image scrollbar_vertical_selected_idle_thumb = "scrollbar_vertical_idle_thumb" # image scrollbar_vertical_insensitive_thumb = "scrollbar_vertical_idle_thumb"
image scrollbar_vertical_selected_insensitive_thumb = "scrollbar_vertical_idle_thumb" # image scrollbar_vertical_selected_idle_thumb = "scrollbar_vertical_idle_thumb"
image scrollbar_vertical_hover_thumb = image_hover("gui/scrollbar/horizontal_idle_bar.png") #Solid("#3d3535") # image scrollbar_vertical_selected_insensitive_thumb = "scrollbar_vertical_idle_thumb"
image scrollbar_vertical_selected_hover_thumb = "scrollbar_vertical_hover_thumb" # image scrollbar_vertical_hover_thumb = image_hover("scrollbar_vertical_idle_thumb")
image scrollbar_vertical_idle_bar = Solid("#726363") # image scrollbar_vertical_selected_hover_thumb = "scrollbar_vertical_hover_thumb"
image scrollbar_vertical_selected_idle_bar = "scrollbar_vertical_idle_bar" image scrollbar_vertical_idle_bar = Frame(Image("gui/creamy_pumpkin_pie/scrollbar_vertical_idle_bar.png", oversample=4), 0, 40)
image scrollbar_vertical_hover_bar = Solid("#726363") # image scrollbar_vertical_selected_idle_bar = "scrollbar_vertical_idle_bar"
image scrollbar_vertical_selected_hover_bar = "scrollbar_vertical_hover_bar" # image scrollbar_vertical_hover_bar = "scrollbar_vertical_idle_bar"
image scrollbar_vertical_insensitive_bar = "scrollbar_vertical_idle_bar" # image scrollbar_vertical_selected_hover_bar = "scrollbar_vertical_hover_bar"
image scrollbar_vertical_selected_insensitive_bar = "scrollbar_horizontal_idle_bar" # image scrollbar_vertical_insensitive_bar = "scrollbar_vertical_idle_bar"
# image scrollbar_vertical_selected_insensitive_bar = "scrollbar_vertical_idle_bar"
transform scrollbar_vertical_thumb_hover:
subpixel True
yzoom 1.0
yanchor 0.5
easein 0.2 yzoom 1.1
easeout 0.2 yzoom 1.0
pause 1
repeat

View File

@ -78,9 +78,14 @@ style scrollbar:
style vscrollbar: style vscrollbar:
unscrollable gui.unscrollable unscrollable gui.unscrollable
xsize gui.scrollbar_size xsize 22
base_bar Frame("scrollbar_vertical_[prefix_]bar", gui.slider_borders, tile=gui.slider_tile) xmargin 4
thumb Frame("scrollbar_vertical_[prefix_]thumb", gui.slider_borders, tile=gui.slider_tile) base_bar "scrollbar_vertical_idle_bar"
thumb "scrollbar_vertical_idle_thumb"
hover_thumb "scrollbar_vertical_hover_thumb"
thumb_offset 4
top_gutter 27
bottom_gutter 27
hover_sound "sounds/qubodup-hover1.ogg" hover_sound "sounds/qubodup-hover1.ogg"
activate_sound "sounds/qubodup-click2.ogg" activate_sound "sounds/qubodup-click2.ogg"
mouse "button" mouse "button"

View File

@ -30,7 +30,7 @@ screen say(who, what, side_doll=None, side_image=None, icon=None):
if not is_game_menu(): if not is_game_menu():
# Allows dialogues to function inside interface elements # Allows dialogues to function inside interface elements
# add "gui_fade_bottom" add "gui_fade_bottom"
use invisible_button(Return(), keysym="dismiss") use invisible_button(Return(), keysym="dismiss")
if states.settings.interface_hidden: if states.settings.interface_hidden:

View File

@ -486,7 +486,7 @@ screen wardrobe():
# Outfit List # Outfit List
vpgrid: vpgrid:
cols 5 cols 5
spacing 5 spacing 4
mousewheel True mousewheel True
scrollbars "vertical" scrollbars "vertical"
@ -541,8 +541,8 @@ screen wardrobe():
vpgrid: vpgrid:
cols 5 cols 5
ysize 399 ysize 399
xspacing 5 xspacing 4
yspacing 5 yspacing 4
mousewheel True mousewheel True
scrollbars "vertical" scrollbars "vertical"
for item in character.wardrobe[selected_category][selected_subcategory]: for item in character.wardrobe[selected_category][selected_subcategory]: