Reimplement Inventory for new GUI, bug fixes

This commit is contained in:
LoafyLemon 2024-08-07 18:37:07 +01:00
parent a48125b3bc
commit d2e7d294d5
8 changed files with 415 additions and 404 deletions

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

Binary file not shown.

View File

@ -399,6 +399,18 @@ style navigation_tabs_button_text is who:
yalign 0.5 yalign 0.5
selected_xoffset 15 selected_xoffset 15
style navigation_tabs_button_special is navigation_tabs_button:
ysize 35
left_padding 15
right_padding 30
selected_right_padding 50
background Frame(Transform(Image("gui/creamy_pumpkin_pie/book/book_tab.png", oversample=4), matrixcolor=HueMatrix(90.0)), 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_special_text is navigation_tabs_button_text
style navigation_subtabs_vbox: style navigation_subtabs_vbox:
xfill True xfill True
xanchor 1.0 xanchor 1.0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -515,14 +515,19 @@ label quidditch_guide_book:
nar "Quidditch - One of the most popular sports in the wizarding world is a team based sport played on broomsticks..." nar "Quidditch - One of the most popular sports in the wizarding world is a team based sport played on broomsticks..."
nar "Two opposing teams with seven people making up each team go up against each other..." nar "Two opposing teams with seven people making up each team go up against each other..."
nar "The game is played using four balls... One quaffle, two bludgers and one snitch.\nThe beginning of the match is signalled by the quaffle being thrown into the air by the referee..." nar "The game is played using four balls... One quaffle, two bludgers and one snitch."
nar "The beginning of the match is signalled by the quaffle being thrown into the air by the referee..."
nar "Quidditch, unlike many other sports is played on an oval shaped pitch with a scoring area on each end..." nar "Quidditch, unlike many other sports is played on an oval shaped pitch with a scoring area on each end..."
nar "Much like other sports, you're not allowed to go outside the boundary lines with the quaffle or you'd have to hand it over to the opposing team..." nar "Much like other sports, you're not allowed to go outside the boundary lines with the quaffle or you'd have to hand it over to the opposing team..."
nar "When the game is set in motion each player takes their assigned positions.\nThere's three chasers, two beaters, one keeper and one seeker..." nar "When the game is set in motion each player takes their assigned positions."
nar "The chasers purpose is to score the Quaffle. Beaters on the other hand is to hit them with the bludgers as to knock the ball out of their grasp... The keeper blocks the goal and the seeker needs to catch the snitch." nar "There's three chasers, two beaters, one keeper and one seeker..."
nar "As most injuries are easily remedied through magical means there's nothing to stop a player from knocking into one another as to get a hold of the Quaffle. Distraction tactics are also common even during official matches..." nar "The chasers purpose is to score the Quaffle. Beaters on the other hand is to hit them with the bludgers as to knock the ball out of their grasp..."
nar "The keeper blocks the goal and the seeker needs to catch the snitch."
nar "As most injuries are easily remedied through magical means there's nothing to stop a player from knocking into one another as to get a hold of the Quaffle."
nar "Distraction tactics are also common even during official matches..."
nar "The way scoring is done is when the chaser has a hold of the quaffle they need to get to the opponent's side of the pitch and score it by getting it through a hoop..." nar "The way scoring is done is when the chaser has a hold of the quaffle they need to get to the opponent's side of the pitch and score it by getting it through a hoop..."
nar "The winning team is decided once the snitch is caught which is worth 150 points to the team of which seeker caught it. Therefore a match could technically go on forever... The longest Quidditch match went on for about 3 months..." nar "The winning team is decided once the snitch is caught which is worth 150 points to the team of which seeker caught it. Therefore a match could technically go on forever..."
nar "The longest Quidditch match went on for about 3 months..."
call book_end call book_end

View File

@ -13,7 +13,7 @@ init python:
return self.items return self.items
def get_instances_of_type(self, type): def get_instances_of_type(self, type):
return [x for x in self.get_instances() if x.type == type] return sorted([x for x in self.get_instances() if x.type == type], key=lambda y: natsort_key(y.name))
class Item(object): class Item(object):
def __init__(self, id, type, name, price=0, desc="", unlocked=True, func=None, label=None, limit=100, image="default", givable=False, currency="gold", caption="use", owned=0, infinite=False, give_label=None, usable_on=[]): def __init__(self, id, type, name, price=0, desc="", unlocked=True, func=None, label=None, limit=100, image="default", givable=False, currency="gold", caption="use", owned=0, infinite=False, give_label=None, usable_on=[]):

View File

@ -33,7 +33,7 @@ init python:
def crop_image_zoom(path, xsize, ysize, grayscale=False): def crop_image_zoom(path, xsize, ysize, grayscale=False):
x, y, w, h = crop_whitespace(path) x, y, w, h = crop_whitespace(path)
matrix = SaturationMatrix(0) if grayscale else None matrix = SaturationMatrix(0)*BrightnessMatrix(-0.25)*OpacityMatrix(0.5) if grayscale else None
sprite = Image(path) sprite = Image(path)
return Transform(sprite, crop=(x, y, w, h), xsize=xsize, ysize=ysize, fit="contain", matrixcolor=matrix, subpixel=True) return Transform(sprite, crop=(x, y, w, h), xsize=xsize, ysize=ysize, fit="contain", matrixcolor=matrix, subpixel=True)

View File

@ -134,7 +134,7 @@ style loading_trivia_text:
size 24 size 24
layeredimage loading: layeredimage loading:
always "gui_fade" # always "gui_fade"
always Text("Loading", style="loading_text"): always Text("Loading", style="loading_text"):
align (0.5, 0.35) align (0.5, 0.35)
always "loading_spinner" always "loading_spinner"
@ -221,7 +221,7 @@ label _wardrobe:
screen wardrobe(xx, yy): screen wardrobe(xx, yy):
tag wardrobe tag wardrobe
zorder 24 zorder 24
add "gui_fade" # add "gui_fade"
if renpy.mobile: if renpy.mobile:
use close_button_background use close_button_background