Imagemap menus are broken in Ren'Py 6.17.3
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.
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.
- mugenjohncel
- Hentai Poofter
- Posts: 2121
- Joined: Sat Feb 04, 2006 11:13 pm
- Organization: Studio Mugenjohncel
- Location: Philippines
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
OK, everyone... download this and try this in your local Ren'py copies and tell us if the problem is duplicated in this one...
http://lemmasoft.renai.us/forums/downlo ... p?id=19888
This one is tested and working properly (at least in my case) in Ren'Py 6.17.3
"POOF" (Disappears)
http://lemmasoft.renai.us/forums/downlo ... p?id=19888
This one is tested and working properly (at least in my case) in Ren'Py 6.17.3
"POOF" (Disappears)
- quacksapup
- Regular
- Posts: 48
- Joined: Fri Jan 04, 2013 3:43 pm
- Projects: "Heartbeat" (In Progress)
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
I didn't run into any problems with this. Unless you intentionally had it skip the main menu...mugenjohncel wrote:OK, everyone... download this and try this in your local Ren'py copies and tell us if the problem is duplicated in this one...
http://lemmasoft.renai.us/forums/downlo ... p?id=19888
"POOF" (Disappears)
Last edited by quacksapup on Sun Mar 30, 2014 10:21 pm, edited 1 time in total.
Re: Imagemap menus are broken in Ren'Py 6.17.3
I took a look at your code and found that you're using the new-style imagemap syntax.
You see, I'm still using the old-style syntax:
You see, I'm still using the old-style syntax:
Code: Select all
## This file contains imagemaps for
## the title and menu screens.
init -2 python:
layout.imagemap_main_menu(
"GameImages/MenuScreens/USKV-TitleScreen.png",
"GameImages/MenuScreens/USKV-TitleScreen(2).png",
[
(320, 240, 480, 280, "Start Game"),
(320, 280, 480, 320, "Load Game"),
(320, 320, 480, 360, "Preferences"),
(320, 360, 480, 400, "Quit")
])
layout.imagemap_preferences(
"GameImages/MenuScreens/USKV-Preferences-ground.png",
"GameImages/MenuScreens/USKV-Preferences-idle.png",
"GameImages/MenuScreens/USKV-Preferences-hover.png",
"GameImages/MenuScreens/USKV-Preferences-selected_idle.png",
"GameImages/MenuScreens/USKV-Preferences-selected_hover.png",
[
(40, 120, 160, 140, "Window"),
(40, 140, 160, 160, "Fullscreen"),
(240, 120, 360, 140, "All"),
(240, 140, 360, 160, "None"),
(440, 120, 560, 140, "Seen Messages"),
(440, 140, 560, 160, "All Messages"),
(640, 120, 760, 140, "Stop Skipping"),
(640, 140, 760, 160, "Keep Skipping"),
(95, 255, 225, 265, "Music Volume"),
(335, 255, 465, 265, "Sound Volume"),
(95, 375, 225, 385, "Text Speed"),
(335, 375, 465, 385, "Auto-Forward Time"),
(560, 200, 720, 240, "Return"),
(560, 240, 720, 280, "Preferences"),
(560, 360, 720, 400, "Main Menu"),
(560, 400, 720, 440, "Quit")
])
layout.imagemap_load_save(
"GameImages/MenuScreens/USKV-SaveLoad-ground.png",
"GameImages/MenuScreens/USKV-SaveLoad-idle.png",
"GameImages/MenuScreens/USKV-SaveLoad-hover.png",
"GameImages/MenuScreens/USKV-SaveLoad-selected_idle.png",
"GameImages/MenuScreens/USKV-SaveLoad-selected_hover.png",
[
(80, 80, 280, 160, "slot_0"),
(80, 200, 280, 280, "slot_1"),
(80, 320, 280, 400, "slot_2"),
(80, 440, 280, 520, "slot_3"),
(360, 80, 560, 160, "slot_4"),
(360, 200, 560, 280, "slot_5"),
(360, 320, 560, 400, "slot_6"),
(360, 440, 560, 520, "slot_7"),
(600, 160, 760, 200, "Return"),
(600, 240, 760, 280, "Save Game"),
(600, 280, 760, 320, "Load Game"),
(600, 360, 760, 400, "Quit")
])
layout.imagemap_yesno_prompt(
"GameImages/MenuScreens/USKV-YesNo-ground.png",
"GameImages/MenuScreens/USKV-YesNo-idle.png",
"GameImages/MenuScreens/USKV-YesNo-hover.png",
[
(280, 240, 320, 280, "Yes"),
(480, 240, 520, 280, "No")
],
{
layout.ARE_YOU_SURE: Fixed(Text(u"Are you sure?", xalign=0.5, yalign=0.5, size=20),
xanchor=0, yanchor=0, xpos=80, ypos=80, xmaximum=640, ymaximum=120),
layout.DELETE_SAVE: Fixed(Text(u"Are you sure you want to delete this save?", xalign=0.5, yalign=0.5, size=20),
xanchor=0, yanchor=0, xpos=80, ypos=80, xmaximum=640, ymaximum=120),
layout.OVERWRITE_SAVE: Fixed(Text(u"Are you sure you want to overwrite your save?", xalign=0.5, yalign=0.5, size=20),
xanchor=0, yanchor=0, xpos=80, ypos=80, xmaximum=640, ymaximum=120),
layout.LOADING: Fixed(Text(u"Loading will lose unsaved progress.\nAre you sure you want to do this?", xalign=0.5, yalign=0.5, size=20),
xanchor=0, yanchor=0, xpos=80, ypos=80, xmaximum=640, ymaximum=120),
layout.QUIT: Fixed(Text(u"Are you sure you want to quit?", xalign=0.5, yalign=0.5, size=20),
xanchor=0, yanchor=0, xpos=80, ypos=80, xmaximum=640, ymaximum=120),
layout.MAIN_MENU: Fixed(Text(u"Are you sure you want to return to the main menu?\nThis will lose unsaved progress.", xalign=0.5, yalign=0.5, size=20),
xanchor=0, yanchor=0, xpos=80, ypos=80, xmaximum=640, ymaximum=120)
})
config.disable_thumbnails = True
style.file_picker_text_window.xalign = 0.5
style.file_picker_text_window.yalign = 0.5
Jitteh Dawn --- A VN by Ivlivs
Re: Imagemap menus are broken in Ren'Py 6.17.3
I should be able to convert it into the new-style syntax easily enough, but how do you change the messages for "ARE_YOU_SURE", etc. and such?
Jitteh Dawn --- A VN by Ivlivs
- quacksapup
- Regular
- Posts: 48
- Joined: Fri Jan 04, 2013 3:43 pm
- Projects: "Heartbeat" (In Progress)
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
I was using the old style, which was giving me the glitchy stuff you were experiencing as well. But when I converted to the new style, I got random, floating bars. And my coding looks correct... So. I'm thinking it's an update glitch with 6.17.3. Maybe you'll have better luck?Ivlivs wrote:I took a look at your code and found that you're using the new-style imagemap syntax.
You see, I'm still using the old-style syntax
I.e.:
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
Paste your code.quacksapup wrote:I was using the old style, which was giving me the glitchy stuff you were experiencing as well. But when I converted to the new style, I got random, floating bars. And my coding looks correct... So. I'm thinking it's an update glitch with 6.17.3. Maybe you'll have better luck?Ivlivs wrote:I took a look at your code and found that you're using the new-style imagemap syntax.
You see, I'm still using the old-style syntax
- quacksapup
- Regular
- Posts: 48
- Joined: Fri Jan 04, 2013 3:43 pm
- Projects: "Heartbeat" (In Progress)
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
See if this helps:Ivlivs wrote:I should be able to convert it into the new-style syntax easily enough, but how do you change the messages for "ARE_YOU_SURE", etc. and such?
http://www.renpy.org/wiki/renpy/doc/ref ... sno_prompt
- quacksapup
- Regular
- Posts: 48
- Joined: Fri Jan 04, 2013 3:43 pm
- Projects: "Heartbeat" (In Progress)
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
Got it.Asceai wrote:Paste your code.quacksapup wrote:I was using the old style, which was giving me the glitchy stuff you were experiencing as well. But when I converted to the new style, I got random, floating bars. And my coding looks correct... So. I'm thinking it's an update glitch with 6.17.3. Maybe you'll have better luck?Ivlivs wrote:I took a look at your code and found that you're using the new-style imagemap syntax.
You see, I'm still using the old-style syntax
My old code:
(It worked perfectly before the update.)
Code: Select all
screen main_menu:
tag menu
window:
style "mm_root"
imagemap:
ground "HB_MM/Heartbeat MM1_a.png"
hover "HB_MM/Heartbeat MM1_b.png"
hotspot (133, 92, 87, 176) action Start() hover_sound "sfx/beep-29.mp3" activate_sound "sfx/beep-25.mp3"
hotspot (266, 303, 68, 148) action ShowMenu("load") hover_sound "sfx/beep-29.mp3" activate_sound "sfx/beep-25.mp3"
hotspot (939, 291, 68, 163) action ShowMenu("preferences") hover_sound "sfx/beep-29.mp3" activate_sound "sfx/beep-25.mp3"
hotspot (1043, 105, 79, 147) action Quit(confirm=True) hover_sound "sfx/beep-29.mp3" activate_sound "sfx/beep-25.mp3"
(I followed the cookbook. Let me know if I misunderstood anything.)
Code: Select all
screen main_menu:
tag menu
init -2 python:
layout.imagemap_main_menu(
"HB_MM/Heartbeat MM1_a.png",
"HB_MM/Heartbeat MM1_b.png",
[ (133, 92, 87, 176, "Start Game"),
(266, 303, 68, 148, "Load Game"),
(939, 291, 68, 163, "Preferences"),
(1043, 105, 79, 147, "Quit") ],
variant = 'locked'
)
layout.imagemap_main_menu(
"HB_MM/Heartbeat MM1_a.png",
"HB_MM/Heartbeat MM1_b.png",
[
(133, 92, 87, 176, "Start Game"),
(266, 303, 68, 148, "Load Game"),
(939, 291, 68, 163, "Preferences"),
(669, 298, 50, 26, "Extras"),
(1043, 105, 79, 147, "Quit"),
],
variant = 'unlocked'
)
label main_menu:
if persistent.extra_unlocked:
$ _main_menu_variant = 'unlocked'
else:
$ _main_menu_variant = 'locked'
jump main_menu_screen
Re: Imagemap menus are broken in Ren'Py 6.17.3
I already know that. But how do you do it to make it conform to the new style? Do you just use layout.imagemap_yesno_prompt just to change the prompts, without defining any images?quacksapup wrote:See if this helps:Ivlivs wrote:I should be able to convert it into the new-style syntax easily enough, but how do you change the messages for "ARE_YOU_SURE", etc. and such?
http://www.renpy.org/wiki/renpy/doc/ref ... sno_prompt
Jitteh Dawn --- A VN by Ivlivs
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
Your old code is new-style and your new code is old-style.. did you get them switched around, or did you actually move from new-style to old-style?quacksapup wrote:Got it.Asceai wrote:Paste your code.
Anyway, with the new-style code there, all I could really suggest is supplying an idle image (use the existing ground image as the idle image) and see if that works. I recall just supplying ground and hover images could result in some weird things happening.
Re: Imagemap menus are broken in Ren'Py 6.17.3
To quacksapup:
The one in the cookbook is the old-style syntax. You see, the bolded numbers in (133, 92, 87, 176) don't denote the size of the clickable area -- instead, they state the location on the screen where the clickable area ends.
In old-style syntax, (133, 92, 87, 176) means "the clickable area begins at location (133, 92) and ends at location (87, 176)."
In new-style syntax, (133, 92, 87, 176) means "the clickable area begins at location (133, 92) and is 87 pixels long and 176 pixels high."
Hope this helps.
The one in the cookbook is the old-style syntax. You see, the bolded numbers in (133, 92, 87, 176) don't denote the size of the clickable area -- instead, they state the location on the screen where the clickable area ends.
In old-style syntax, (133, 92, 87, 176) means "the clickable area begins at location (133, 92) and ends at location (87, 176)."
In new-style syntax, (133, 92, 87, 176) means "the clickable area begins at location (133, 92) and is 87 pixels long and 176 pixels high."
Hope this helps.
Jitteh Dawn --- A VN by Ivlivs
- quacksapup
- Regular
- Posts: 48
- Joined: Fri Jan 04, 2013 3:43 pm
- Projects: "Heartbeat" (In Progress)
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
.-. Oh. Okay. No, I've always used the new style and when it became glitchy I went to the cookbook and thought the old version was the new version for 6.17.3..... yep. *is noob*Asceai wrote:Your old code is new-style and your new code is old-style.. did you get them switched around, or did you actually move from new-style to old-style?quacksapup wrote:Got it.Asceai wrote:Paste your code.
Anyway, with the new-style code there, all I could really suggest is supplying an idle image (use the existing ground image as the idle image) and see if that works. I recall just supplying ground and hover images could result in some weird things happening.
Allow me to stare at my code again.
- quacksapup
- Regular
- Posts: 48
- Joined: Fri Jan 04, 2013 3:43 pm
- Projects: "Heartbeat" (In Progress)
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
I went back to the new style, and now the main menu is skipped entirely.
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
The
at the top of the wiki should probably be in 72-point font. The problem is that when you google for pretty much anything renpy-related, you get the wiki, not the documentation. I think a great deal of confusion can be attributed to this.Warning: This wiki is very out of date. We leave it up because some things are only documented here, but for more modern information, see the new documentation and cookbook forum.
- quacksapup
- Regular
- Posts: 48
- Joined: Fri Jan 04, 2013 3:43 pm
- Projects: "Heartbeat" (In Progress)
- Contact:
Re: Imagemap menus are broken in Ren'Py 6.17.3
Does anyone know why my main menu was skipped after I went back to the new-style imagemap code? When I loaded Mugen's GUI, it also skipped his main menu. Is this just me? Did anyone else try the GUI?
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot]