mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 17:26:20 +01:00
Merge pull request 'Jsonify the hard-coded cg_paths in gallery' (#202) from nutbuster/SnootGame:Patch88 into Patch8
Reviewed-on: https://git.snootgame.xyz/Cavemanon/SnootGame/pulls/202
This commit is contained in:
commit
fd42302875
2 changed files with 32 additions and 25 deletions
|
@ -13,14 +13,7 @@ init 2 python:
|
|||
DEFAULT_HEIGHT_SCALE_RATIO = round(float(PREFERRED_HEIGHT) / float(1080), 4)
|
||||
NOT_UNLOCKED_COVER = im.FactorScale("gui/gallery/unlocked_cg_button_cover.png", DEFAULT_WIDTH_SCALE_RATIO, DEFAULT_HEIGHT_SCALE_RATIO)
|
||||
ACCEPTED_EXTENSIONS = ["jpg", "png", "webm"]
|
||||
CG_PATHS = [
|
||||
#CG doesn't really make sense
|
||||
{ 'path': "images/cgs/", 'name': "CG", 'eval': None },
|
||||
{ 'path': "images/animations/", 'name': "Animations", 'eval': None },
|
||||
{ 'path': "images/NotForKids!/", 'name': "Lewd",
|
||||
'eval': 'persistent.lewd == True'
|
||||
}
|
||||
]
|
||||
CG_PATHS = []
|
||||
#path: folder, name: shows up in gallery, eval: runs eval() on string
|
||||
|
||||
"""
|
||||
|
@ -90,26 +83,11 @@ init 2 python:
|
|||
return
|
||||
|
||||
# Call to loading the gallery
|
||||
loadGallery()
|
||||
#loadGallery()
|
||||
#renpy.start_predict_screen("cg_gallery")
|
||||
|
||||
#sort
|
||||
|
||||
|
||||
# hard code the webm because renpy is really dumb and doesn't add Movies properly until much later
|
||||
fang_webm = 'fang thumb'
|
||||
|
||||
webm_rcg = Fixed(Color("#000"), Text("Fang", size=280, xalign=0.5, yalign=0.5), xsize=1920)
|
||||
renpy.seen_label('fang_movie')
|
||||
gallery_dic['Animations'] = [{
|
||||
"item": 'fang tail',
|
||||
"fn": 'images/animations/fang tail.webm',
|
||||
"cg": cg_('images/backgrounds/garden.jpg', None, 1920),
|
||||
"ext": 'webm',
|
||||
"wh": [1920, 1080]
|
||||
}]
|
||||
renpy.image("fang tail", Movie(loop=True,play='images/animations/fang tail.webm')) # Since we are hard-coding might as well.
|
||||
|
||||
#for zooming in and out
|
||||
zoom_arr = [0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0, 1.125, 1.25, 1.5, 1.75, 2.0]
|
||||
|
||||
|
@ -166,7 +144,7 @@ init 2 python:
|
|||
"wh": image_dimensions
|
||||
}
|
||||
gallery_dic[tab_name].append(item)
|
||||
else: #folders
|
||||
elif 'folders' in x.keys(): #folders
|
||||
for str in list_img:
|
||||
for cp in x['folders']:
|
||||
for ext in ACCEPTED_EXTENSIONS:
|
||||
|
@ -182,6 +160,19 @@ init 2 python:
|
|||
|
||||
jsonloadandpop()
|
||||
|
||||
# hard code the webm because renpy is really dumb and doesn't add Movies properly until much later
|
||||
fang_webm = 'fang thumb'
|
||||
|
||||
webm_rcg = Fixed(Color("#000"), Text("Fang", size=280, xalign=0.5, yalign=0.5), xsize=1920)
|
||||
renpy.seen_label('fang_movie')
|
||||
gallery_dic['Animations'] = [{
|
||||
"item": 'fang tail',
|
||||
"fn": 'fang tail',
|
||||
"cg": cg_('images/backgrounds/garden.jpg', None, 1920),
|
||||
"ext": 'webm',
|
||||
"wh": [1920, 1080]
|
||||
}]
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,21 @@
|
|||
{
|
||||
"tabs":[
|
||||
{
|
||||
"tab_name": "CG",
|
||||
"folders": [
|
||||
"images/cgs/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tab_name": "Animations"
|
||||
},
|
||||
{
|
||||
"tab_name": "Lewd",
|
||||
"eval": "persistent.lewd == True",
|
||||
"folders": [
|
||||
"images/NotForKids!/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tab_name": "Full body Fang",
|
||||
"items": [
|
||||
|
|
Loading…
Reference in a new issue