mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-02-02 06:46:34 +01:00
Re touch up doc and placeholder textbuttons
This commit is contained in:
parent
a5c223cb1b
commit
fa2cbd7137
1 changed files with 30 additions and 16 deletions
|
@ -26,8 +26,7 @@ init python:
|
||||||
return im.FactorScale(fname, scale, scale, False)
|
return im.FactorScale(fname, scale, scale, False)
|
||||||
|
|
||||||
# Reads /images/cgs dir for all image files
|
# Reads /images/cgs dir for all image files
|
||||||
# Populates g:Gallery and galleryItems
|
# Populates galleryItems
|
||||||
# Appends extra spaces at the end
|
|
||||||
# () -> None
|
# () -> None
|
||||||
def loadGallery():
|
def loadGallery():
|
||||||
|
|
||||||
|
@ -72,12 +71,11 @@ Basically Gallery Object has terrible defaults, so I just wrote my own stuff
|
||||||
screen cg_gallery(__yoffset = 0):
|
screen cg_gallery(__yoffset = 0):
|
||||||
|
|
||||||
style_prefix "game_menu"
|
style_prefix "game_menu"
|
||||||
|
|
||||||
if main_menu:
|
if main_menu:
|
||||||
add gui.game_menu_background
|
key "game_menu" action ShowMenu("main_menu")
|
||||||
#add gui.main_menu_background
|
|
||||||
else:
|
add gui.main_menu_background
|
||||||
add gui.game_menu_background
|
add gui.game_menu_background
|
||||||
|
|
||||||
python:
|
python:
|
||||||
items = len(galleryItems)
|
items = len(galleryItems)
|
||||||
|
@ -88,22 +86,21 @@ screen cg_gallery(__yoffset = 0):
|
||||||
tag menu
|
tag menu
|
||||||
frame:
|
frame:
|
||||||
style "game_menu_outer_frame"
|
style "game_menu_outer_frame"
|
||||||
if main_menu:
|
|
||||||
key "game_menu" action ShowMenu("main_menu")
|
|
||||||
viewport:
|
viewport:
|
||||||
yinitial __yoffset
|
yinitial __yoffset
|
||||||
xalign 0.5
|
|
||||||
scrollbars "vertical"
|
scrollbars "vertical"
|
||||||
mousewheel True
|
mousewheel True
|
||||||
draggable True
|
draggable True
|
||||||
pagekeys True
|
pagekeys True
|
||||||
add Color("#000")
|
xpos 440
|
||||||
|
|
||||||
grid GALLERY_COLS galleryRows:
|
grid GALLERY_COLS galleryRows:
|
||||||
for item in galleryItems:
|
for item in galleryItems:
|
||||||
$ item_counter += 1
|
python:
|
||||||
$ yoffset = item_counter / 3 * PREFERRED_HEIGHT * 1.15
|
item_counter += 1
|
||||||
$ yoffset = int( yoffset + (PREFERRED_HEIGHT * 1.15))
|
yoffset = item_counter / 3 * PREFERRED_HEIGHT * 1.15
|
||||||
|
yoffset = int( yoffset + (PREFERRED_HEIGHT * 1.15))
|
||||||
# should properly fix with actual margin difference but good enough or the actual position
|
# should properly fix with actual margin difference but good enough or the actual position
|
||||||
|
|
||||||
use flag_button(item, yoffset)
|
use flag_button(item, yoffset)
|
||||||
|
@ -111,12 +108,29 @@ screen cg_gallery(__yoffset = 0):
|
||||||
for i in range(0, extraSpaces):
|
for i in range(0, extraSpaces):
|
||||||
null height 20
|
null height 20
|
||||||
|
|
||||||
|
vbox:
|
||||||
|
style_prefix "navigation"
|
||||||
|
xpos gui.notMM_navigation_xpos
|
||||||
|
yalign 0.5
|
||||||
|
|
||||||
|
spacing gui.navigation_spacing
|
||||||
|
|
||||||
|
textbutton _("CG")
|
||||||
|
textbutton _("NotForKids!")
|
||||||
|
textbutton _("Animations")
|
||||||
|
textbutton _("Return") action Return()
|
||||||
|
|
||||||
|
if _in_replay:
|
||||||
|
textbutton _("End Replay") action EndReplay(confirm=True)
|
||||||
|
elif not main_menu:
|
||||||
|
textbutton _("Main Menu") action MainMenu()
|
||||||
|
|
||||||
label "Gallery"
|
label "Gallery"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if/else for buttons
|
if/else flow control & extra parameters for Buttons
|
||||||
"""
|
"""
|
||||||
screen flag_button(item, yoffset):
|
screen flag_button(item, yoffset):
|
||||||
python:
|
python:
|
||||||
|
@ -136,7 +150,7 @@ screen flag_button(item, yoffset):
|
||||||
add NOT_UNLOCKED_COVER
|
add NOT_UNLOCKED_COVER
|
||||||
|
|
||||||
"""
|
"""
|
||||||
view_image, loads the image in fullscreen with viewport control
|
view_image, Loads the image in fullscreen with viewport control.
|
||||||
"""
|
"""
|
||||||
screen view_image(fn, origin):
|
screen view_image(fn, origin):
|
||||||
tag menu
|
tag menu
|
||||||
|
|
Loading…
Reference in a new issue