xela wrote:
Code: Select all
screen calendar_overlay:
hbox:
$renpy.show("cal " + calendar.moonphase)
$renpy.show("cal " + calendar.month)
$renpy.show("cal " + calendar.weekday)
$renpy.show("cal " + calendar.game_day)
return
Might be a
bad joke on my part but whoever thought you to use screen language like this should be decapitated.
Ah, well, I guess I should have expected it to be pretty awful-- I originally tried to just add the images because I did that in a different part of my code, but it didn't work. So I tried to use show, but that didn't work, so I found someone doing this and thought maybe I had to do that to get the show command to work in a screen? Hahaha... .___.
daikiraikimi wrote:
I have made overlapping images for each day of the week, month, and the numbers 01 through 31 so that I can display my images. Each image is defined like so:
xela wrote:You will have to position everything yourself, I'll just throw everything from top to bottom in the top right corner of the screen. You named your files poorly by the way... but there is nothing that cannot be fixed with code.
Code: Select all
screen calendar:
python:
if calendar.day < 10:
day_img = "".join(["cal 0", calenday.day, ".png"])
else:
day_img = "".join(["cal ", calendar.day, ".png"])
month_img = "".join(["cal ", calendar.month, ".png"])
dotw_img = "".join(["cal ", calendar.weekday, ".png"])
moon_img = "".join(["cal ", calendar.moonphase, ".png"])
vbox:
align(1.0, 0)
spacing 10
add day_img
add month_img
add dotw_img
add moon_img
Images do not have to be defined, you've wasted your time I am afraid. This should be the only code you'll require, if you just put your images in separate folders like day/week/month and had windows or whatever OS you're running batch name them 1 - 31, 1 - 7, 1 - 12, you could have saved yourself even more time.
I also hadn't originally defined all those images, but when I got the "image undefined" message I thought I had to. I actually originally tried to use this bit of code made by leon, which automatically defines the images for me:
Code: Select all
init python hide:
for file in renpy.list_files():
if file.startswith('bg') and file.endswith('.jpg'):
name = file.replace('BG/','').replace('/', ' ').replace('.jpg','')
renpy.image(name, Image(file))
(Well, I didn't define them at all, then I tried to use that to define them so I didn't have to type it all out.) But I've been pretty unsuccessful at using this code to define any images other than bg images for some reason. Just doesn't work.
In any case, thank you again for helping me out-- however, after deleting my image definitions and replacing my butchered code for yours I'm still getting the image undefined message?
Is there something else I need to do? I looked at other folks having undefined image issues, but wasn't able to find the same errors they had.
[EDIT]
Oh, this is interesting. When I try to show the calendar_testing screen I also get an undefined image, even though there are no images in that screen-- only text. Curious.
[EDIT]
Okay, I commented out the calendar_testing screen and then renamed a working screen to calendar_testing just to see if it would show up and it does not. Still gets image undefined. Not entirely sure what's going on, but it must be a problem somewhere else in the code...?