- Feb 2, 2018
- 923
- 3,925
Hello fellow travelers,
To figure out with the gallery, I've been enchanting, going on a crusade and stuff like that only to stop when I took an arrow to the knee. And that arrow is this thing going on and on (I've posted the code underneath the screenshot).
Le code du la vie de dios:
I've cut down to one image to test if anything will change but it doesn't =))
#CG Gallery
Le Problemas:
The problem is, even though I've cut down to one image source, it still displays in full screen, the image 1 of 2 locked.
If I put a button and image it will still display like this in full screen.
Can anyone help me with this "arrow" into the knee so I could resume my great adventurer career? )
To figure out with the gallery, I've been enchanting, going on a crusade and stuff like that only to stop when I took an arrow to the knee. And that arrow is this thing going on and on (I've posted the code underneath the screenshot).
Le code du la vie de dios:
I've cut down to one image to test if anything will change but it doesn't =))
#CG Gallery
Code:
init-1:
image bg sc01 = "gallery/Memory_curch.jpg"
init python:
#Galleries settings - start
#list the CG gallery images here:
gallery_cg_items = ["bg sc01"]
#how many rows and columns in the gallery screens?
gal_rows = 5
gal_cols = 5
#thumbnail size in pixels:
thumbnail_x = 75
thumbnail_y = 75
#the setting above will work well with 4:3 screen ratio. Make sure to adjust it, if your are using 16:9 (such as 267x150) or something else.
#Galleries settings - end
gal_cells = gal_rows * gal_cols
g_cg = Gallery()
for gal_item in gallery_cg_items:
g_cg.button(gal_item + " butt")
g_cg.image(gal_item)
g_cg.unlock(gal_item)
g_cg.transition = fade
cg_page=0
init +1 python:
#Here we create the thumbnails. We use a special "locked" image for CGs to prevent spoilers.
for gal_item in gallery_cg_items:
renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y))
screen cg_gallery():
#tag menu
#use game_menu(_("Image Gallery"), scroll="viewport"):
#background "bg3.jpg"
modal True
frame:
background "bg3.jpg"
#frame:
grid gal_cols gal_rows:
spacing 35
$ i = 0
$ next_cg_page = cg_page + 1
if next_cg_page > int(len(gallery_cg_items)/gal_cells):
$ next_cg_page = 0
for gal_item in gallery_cg_items:
$ i += 1
if i <= (cg_page+1)*gal_cells and i>cg_page*gal_cells:
add g_cg.make_button(gal_item + " butt", gal_item + " butt", im.Scale("gallery/gallery_locked.png", thumbnail_x, thumbnail_y), xalign=0.5, yalign=0.5, idle_border=None, background=None, bottom_margin=0)
for j in range(i, (cg_page+1)*gal_cells): #we need this to fully fill the grid
null
hbox:
if len(gallery_cg_items)>gal_cells:
textbutton _("Next Page") action [SetVariable('cg_page', next_cg_page), ShowMenu("cg_gallery")]
xalign 0.1
yalign 1.0
#frame:
#xpos 20
#ypos 20
imagebutton:
xalign 0.0
yalign 1.0
idle "gui/back_button_idle.png"
hover "gui/back_button_hover.png"
action Hide( "cg_gallery" )
The problem is, even though I've cut down to one image source, it still displays in full screen, the image 1 of 2 locked.
If I put a button and image it will still display like this in full screen.
Can anyone help me with this "arrow" into the knee so I could resume my great adventurer career? )