Code: Select all
g_cg.image("#000", gal_item)
Code: Select all
g_cg.image(im.Composite((1280, 720), (0,0), "black.jpg", (200,200), ImageReference(gal_item)))
Code: Select all
g_cg.image("#000", gal_item)
Code: Select all
g_cg.image(im.Composite((1280, 720), (0,0), "black.jpg", (200,200), ImageReference(gal_item)))
Code: Select all
I'm sorry, but an uncaught exception occurred.
While executing init code:
File "game/gallery.rpy", line 7, in script
File "game/gallery.rpy", line 41, in python
Exception: Expected an image, but got a general displayable.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\Users\Seven\Downloads\renpy-6.17.1-sdk\renpy\execution.py", line 294, in run
node.execute()
File "C:\Users\Seven\Downloads\renpy-6.17.1-sdk\renpy\ast.py", line 732, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Users\Seven\Downloads\renpy-6.17.1-sdk\renpy\python.py", line 1358, in py_exec_bytecode
exec bytecode in globals, locals
File "game/gallery.rpy", line 41, in <module>
g_cg.image(im.Composite((1024, 768), (0,0), "black.jpg", (200,200), ImageReference(gal_item)))
File "C:\Users\Seven\Downloads\renpy-6.17.1-sdk\renpy\display\im.py", line 596, in __init__
self.images = [ image(i) for i in args[1::2] ]
File "C:\Users\Seven\Downloads\renpy-6.17.1-sdk\renpy\display\im.py", line 1534, in image
return image(arg.target, loose=loose, **properties)
File "C:\Users\Seven\Downloads\renpy-6.17.1-sdk\renpy\display\im.py", line 1549, in image
raise Exception("Expected an image, but got a general displayable.")
Exception: Expected an image, but got a general displayable.
Windows-7-6.1.7601-SP1
Ren'Py 6.17.1.309
Code: Select all
g_cg.image(LiveComposite((1280, 720), (0,0), "#000", (200,200), gal_item))
Code: Select all
I'm sorry, but an uncaught exception occurred.
While executing init code:
File "game/screens.rpy", line 646, in script
File "game/screens.rpy", line 649, in python
Exception: Expected an image, but got a general displayable.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\Users\Mam\Downloads\Fish\Renpy\renpy\execution.py", line 294, in run
node.execute()
File "C:\Users\Mam\Downloads\Fish\Renpy\renpy\ast.py", line 732, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Users\Mam\Downloads\Fish\Renpy\renpy\python.py", line 1382, in py_exec_bytecode
exec bytecode in globals, locals
File "game/screens.rpy", line 649, in <module>
renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y))
File "C:\Users\Mam\Downloads\Fish\Renpy\renpy\display\im.py", line 643, in __init__
im = image(im)
File "C:\Users\Mam\Downloads\Fish\Renpy\renpy\display\im.py", line 1536, in image
return image(arg.target, loose=loose, **properties)
File "C:\Users\Mam\Downloads\Fish\Renpy\renpy\display\im.py", line 1551, in image
raise Exception("Expected an image, but got a general displayable.")
Exception: Expected an image, but got a general displayable.
Windows-7-6.1.7601-SP1
Ren'Py 6.17.4.409
Code: Select all
################################################################
init python:
#Galleries settings - start
#list the CG gallery images here:
gallery_cg_items = ["apartment", "arcade"]
#how many rows and columns in the gallery screens?
gal_rows = 3
gal_cols = 3
#thumbnail size in pixels:
thumbnail_x = 267
thumbnail_y = 150
#the setting above (267x150) will work well with 16:9 screen ratio. Make sure to adjust it, if your are using 4:3 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 create a grayscale thumbnail image for BGs, but 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 navigation
frame background None xpos 10:
grid gal_rows gal_cols:
ypos 10
$ 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 + " png", im.Scale("gallocked.png", thumbnail_x, thumbnail_y), xalign=0.5, yalign=0.5, idle_border=None, background=None, bottom_margin=24)
for j in range(i, (cg_page+1)*gal_cells): #we need this to fully fill the grid
null
frame:
yalign 0.97
vbox:
if len(gallery_cg_items)>gal_cells:
textbutton _("Next Page") action [SetVariable('cg_page', next_cg_page), ShowMenu("cg_gallery")]
Code: Select all
init +1 python:
#Here we create the thumbnails. We create a grayscale thumbnail image for BGs, but 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))
Code: Select all
init +1 python:
renpy.image ("apartment butt", im.Scale("apartment.jpg", thumbnail_x, thumbnail_y))
renpy.image ("arcade butt", im.Scale("arcade.jpg", thumbnail_x, thumbnail_y))
Users browsing this forum: No registered users