Main Menu and generally images

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
jory014
Regular
Posts: 80
Joined: Fri Mar 18, 2011 6:13 am
Projects: Confidant From Darkness (VN), Stand By Me (NaNoRenO 2013)
Organization: CHILL Brigade
Location: Manila, Philippines
Contact:

Main Menu and generally images

#1 Post by jory014 » Thu Dec 22, 2011 12:38 pm

As the title states I have questions regarding the two.

First of all,is images in general... what is the standard size? 800x600 or 1024x768?

then in regards to the main menu, how can i properly customize it.
As of now I am using the ui function for the main menu, and was successful so far...however it seems to act weird on me like whenever i hover, the button suddenly go small?? and then suddenly after I click one (for example preferences) then go back to the main menu, the customized buttons are gone and it reverts back to the usual generic buttons according to themes...

So, I was wondering if there was something wrong with my codes??

label main_menu:

scene mainmenu

$ ui.vbox(xpos=0.83, ypos=0.25)
$ ui.imagebutton("startgame.png", "startgame1.png", clicked=ui.returns("start"))
$ ui.imagebutton("loadgame.png", "loadgame1.png", clicked=ui.returns("load"))
$ ui.imagebutton("preferences.png", "preferences1.png", clicked=ui.returns("prefs"))
$ ui.imagebutton("quit.png", "quit1.png", clicked=ui.returns("quit"))
$ ui.close()


$ result = ui.interact()

if result == "start":
hide mainmenu

$ renpy.jump_out_of_context("start")


if result == "load":
jump load_screen

if result == "prefs":
jump preferences_screen

if result == "quit":
$ renpy.quit()

return


Thanks so much :D
"We're Cute and Cool, while Chilling- CHILL Brigade-"

W.I.P:
-A Confidant From Darkness
http://lemmasoft.renai.us/forums/viewto ... t=11427url
-~Stand By Me~
http://lemmasoft.renai.us/forums/viewto ... 50&t=19784

Team Site:
-CHILL Brigade]
http://chillbrigade14.wix.com/chill-brigade

User avatar
manga_otaku
Veteran
Posts: 413
Joined: Fri May 20, 2011 1:27 pm
Completed: [KN] Saving Project: Blind? (Part One)
Contact:

Re: Main Menu and generally images

#2 Post by manga_otaku » Thu Dec 22, 2011 12:55 pm

I think standard size is 800x600, but some on Bassnovel are 640x400 as well.
I'm not sure about the second issue though since I've never seem to come across an issue with that code...
Projects:
WIP|[KN] Day Of Reckoning|
Completed|[KN] Saving Project Blind: Part One|[KN] Saving Project Blind: Part Two|[KN] Saving Project Blind: Final Part|
Is available to help with proof-reading (Grammar freak...) Maybe voice-acting in the near future x]

User avatar
Spiky Caterpillar
Veteran
Posts: 252
Joined: Fri Nov 14, 2008 7:59 pm
Completed: Lots.
Projects: Black Closet
Organization: Slipshod
Location: Behind you.
Contact:

Re: Main Menu and generally images

#3 Post by Spiky Caterpillar » Thu Dec 22, 2011 1:13 pm

Recent versions of Ren'Py define the built-in screens in screens.rpy; most likely, what's happening is that you're going from a custom main menu to a stock preferences screen, and the preferences screen is calling the main_menu screen when you leave it instead of the label; for best results, change the screens instead of overriding the main_menu label.

As for the imagebuttons changing size - are the hovered and non-hovered .pngs the same size in pixels?
Nom nom nom nom nom LEAVES.

User avatar
jory014
Regular
Posts: 80
Joined: Fri Mar 18, 2011 6:13 am
Projects: Confidant From Darkness (VN), Stand By Me (NaNoRenO 2013)
Organization: CHILL Brigade
Location: Manila, Philippines
Contact:

Re: Main Menu and generally images

#4 Post by jory014 » Fri Dec 23, 2011 9:16 pm

I see, thanks @manga_otaku and @spiky caterpillar!!!

I'll try makign the images 800x600 and change the labels...

But does it fix the problem when I hover? The buttons are all 65x65 in size but
Not pixel though???
"We're Cute and Cool, while Chilling- CHILL Brigade-"

W.I.P:
-A Confidant From Darkness
http://lemmasoft.renai.us/forums/viewto ... t=11427url
-~Stand By Me~
http://lemmasoft.renai.us/forums/viewto ... 50&t=19784

Team Site:
-CHILL Brigade]
http://chillbrigade14.wix.com/chill-brigade

Post Reply

Who is online

Users browsing this forum: Ace94, Google [Bot], Imperf3kt