So this is my image map everything work fine:
$ select = renpy.imagemap("00map.png", "00map glow.png", [
(2, 188, 93, 366, "Slave City"),
(344, 317, 498, 452, "Milkypolis"),
(298, 15, 421, 99, "Hideout"),
(889, 151, 1007, 334, "Market Square"),
])
But what if I want to show the name of location in the bottom of the screen? for exampe when I move to Milkypolis it write down Milkypolis....
Thanks...
Imagemap - show naame
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.
- Evildumdum
- Regular
- Posts: 191
- Joined: Sun Jan 18, 2015 8:49 am
- Projects: ApoclypseZ
- Contact:
Re: Imagemap - show naame
hmmm, all i can say is that an imagemap is a very old and inefficient way of going about things. I suggest you look up screens.
"If at first you don't succeed, try hitting it with a shoe."
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: Imagemap - show naame
Well, you can use renpy.notify()
https://www.renpy.org/doc/html/other.html#renpy.notify
https://www.renpy.org/doc/html/screen_s ... tml#notify
https://www.renpy.org/doc/html/other.html#renpy.notify
https://www.renpy.org/doc/html/screen_s ... tml#notify
Code: Select all
$ select = renpy.imagemap("00map.png", "00map glow.png", [
(2, 188, 93, 366, "Slave City"),
(344, 317, 498, 452, "Milkypolis"),
(298, 15, 421, 99, "Hideout"),
(889, 151, 1007, 334, "Market Square"),
])
if select=="Slave City":
$ renpy.notify("Slave City")
"..."
if select=="Milkypolis":
$ renpy.notify("Milkypolis")
"..."
### etc...
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: Imagemap - show naame
But as @Evildumdum says, it will optimal use the screen version of imagemap
https://www.renpy.org/doc/html/screens. ... statements
It will open new opportunities, for example Tooltip()
https://www.renpy.org/doc/html/screen_a ... l#tooltips
https://www.renpy.org/doc/html/screens. ... statements
It will open new opportunities, for example Tooltip()
https://www.renpy.org/doc/html/screen_a ... l#tooltips
Code: Select all
screen demo_imagemap:
default mytt = Tooltip("")
imagemap:
ground "00map.png"
hover "00map glow.png"
hotspot (2, 188, 91, 178) action Return("Slave City") hovered mytt.Action("Slave City")
hotspot (344, 317, 154, 135) action Return("Milkypolis") hovered mytt.Action("Milkypolis")
hotspot (298, 15, 123, 84) action Return("Hideout") hovered mytt.Action("Hideout")
hotspot (889, 151, 118, 183) action Return("Market Square") hovered mytt.Action("Market Square")
text mytt.value align(.5, .01) size 27 color "#f0f" underline True italic True
label start:
call screen demo_imagemap
if _return=="Slave City":
"..."
if _return=="Milkypolis":
"..."
### etc...
Who is online
Users browsing this forum: No registered users