Implement new choice menu
This commit is contained in:
parent
b6091a839d
commit
18b1b271bb
BIN
game/gui/creamy_pumpkin_pie/choice.png
(Stored with Git LFS)
Normal file
BIN
game/gui/creamy_pumpkin_pie/choice.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
game/gui/creamy_pumpkin_pie/choice_arrow.png
(Stored with Git LFS)
Normal file
BIN
game/gui/creamy_pumpkin_pie/choice_arrow.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
game/gui/creamy_pumpkin_pie/choice_bar_empty.png
(Stored with Git LFS)
Normal file
BIN
game/gui/creamy_pumpkin_pie/choice_bar_empty.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
game/gui/creamy_pumpkin_pie/choice_bar_full.png
(Stored with Git LFS)
Normal file
BIN
game/gui/creamy_pumpkin_pie/choice_bar_full.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
game/gui/creamy_pumpkin_pie/fade_bottom.png
(Stored with Git LFS)
Normal file
BIN
game/gui/creamy_pumpkin_pie/fade_bottom.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
game/gui/creamy_pumpkin_pie/fade_top.png
(Stored with Git LFS)
Normal file
BIN
game/gui/creamy_pumpkin_pie/fade_top.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -349,23 +349,16 @@ init -1 python:
|
||||
def menu_hints(queue, filter):
|
||||
filtered_queue = queue.list_filtered() if filter is False else queue.list_filtered(filter)
|
||||
total_applicable = len(filtered_queue)
|
||||
total_events = len(queue.queue)
|
||||
# total_events = len(queue.queue)
|
||||
completed = 0
|
||||
icons = []
|
||||
|
||||
for ev in filtered_queue:
|
||||
if ev.completed:
|
||||
icons.append(f"interface/icons/small/heart_red.webp")
|
||||
completed += 1
|
||||
elif ev.completed_failed:
|
||||
icons.append(f"interface/icons/small/heart_black.webp")
|
||||
completed += 1
|
||||
else:
|
||||
icons.append(f"interface/icons/small/heart_empty.webp")
|
||||
|
||||
hints = f" {completed}/{total_applicable}/{total_events}"
|
||||
|
||||
return (hints, icons)
|
||||
return (completed, total_applicable)
|
||||
|
||||
l = []
|
||||
|
||||
@ -373,11 +366,7 @@ init -1 python:
|
||||
if isinstance(queue, str):
|
||||
queue = getattr(store, queue)
|
||||
|
||||
hints, icons = menu_hints(queue, filter)
|
||||
title = f"-{title}-"
|
||||
|
||||
if config.developer:
|
||||
title += hints
|
||||
progress = menu_hints(queue, filter)
|
||||
|
||||
if ( ev := queue.next()) and ev.requirements_met():
|
||||
action = queue
|
||||
@ -391,7 +380,7 @@ init -1 python:
|
||||
if action in ("disabled", "noncompliant"):
|
||||
_kwargs["style"] = "disabled"
|
||||
elif report_progress:
|
||||
_kwargs = {"progress": icons}
|
||||
_kwargs = {"progress": progress}
|
||||
|
||||
location = renpy.game.context().current
|
||||
choice = ui.ChoiceReturn(title, action, location, kwargs=_kwargs)
|
||||
|
@ -52,11 +52,11 @@
|
||||
|
||||
# style prompt_text is gui_text
|
||||
|
||||
# style bar:
|
||||
# unscrollable gui.unscrollable
|
||||
# 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)
|
||||
style bar:
|
||||
unscrollable gui.unscrollable
|
||||
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)
|
||||
|
||||
# style vbar:
|
||||
# unscrollable gui.unscrollable
|
||||
@ -119,12 +119,9 @@
|
||||
# style imagemap:
|
||||
# activate_sound "sounds/qubodup-click2.ogg"
|
||||
|
||||
# style button:
|
||||
# activate_sound "sounds/qubodup-click2.ogg"
|
||||
# hover_sound "sounds/qubodup-hover1.ogg"
|
||||
# insensitive_background "#463b3be6"
|
||||
# selected_background "#766a6ae6"
|
||||
# padding (5, 5, 5, 5)
|
||||
style button:
|
||||
activate_sound "sounds/qubodup-click2.ogg"
|
||||
hover_sound "sounds/qubodup-hover1.ogg"
|
||||
|
||||
# style dark_button:
|
||||
# background "#5d5151e6"
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user