imagebutton:
xalign or xpos
yalign or ypos
idle "images/TempName.png"
hover "images/TempName2.png"
action Call("yoour_label")
The picture i got have 5 locations how con i make five buttons on one picture?imagemaps are out of date you want to use imagebutton instead
Python:imagebutton: xalign or xpos yalign or ypos idle "images/TempName.png" hover "images/TempName2.png" action Call("yoour_label")
You can do it with Hotspot feature.The picture i got have 5 locations how con i make five buttons on one picture?
Thank you so much that helped me alotYou can do it with Hotspot feature.
i'll grab your images just for example if you don't mind.
Hotspot logic:
(x, y, width, height)
You can easily get X and Y from image location picker
Shift + D in your renpy project
select image location picker
search the image name in this case jabridnahmed2.png
Pose your mouse not in the center
something like red circle(with each area you want work like buttons):
click for copy X and Y
play with width and height values until area is fully visible.
replace action NullAction() with your code.
View attachment 2378754
Code:
label start:
screen mapscreen:
imagemap:
ground "map_menu.png" ##BG Image
idle "jabridinahmed3.png" ##ABOVE Image
hover im.MatrixColor("jabridinahmed3.png", im.matrix.brightness(0.3)) ##HOVER IMAGE/CUSTOMS
hotspot (114, 885,400,200) action NullAction()
hotspot (618, 338,400,200) action NullAction()
hotspot (218, 424,400,200) action NullAction()
hotspot (416, 687,440,200) action NullAction()
hotspot (840, 716,400,200) action NullAction()
call screen mapscreen
return
View attachment 2378746
thank you so much you did better job than i didSo a little time this weekend, I created this test example of the map...
You must be registered to see the links
(63.0 MB)
The link is to a playable RenPy game that could be considered a demo. It can be downloaded and played. The source code is viewable there.
My method was this...
Create a 1920x1080 image to use as the background image...
View attachment 2386099
Then cut-out just the central areas of the map (to use eventually as imagebuttons)
View attachment 2386103
Divide the map zones into separate images (to be used as the idle parts of the imagebuttons)
View attachment 2386109 View attachment 2386110 View attachment 2386112 View attachment 2386111 View attachment 2386108
Create copies of the idle images... change the color to be more yellow... then add the titles for each zone (80% opacity).
View attachment 2386116 View attachment 2386117 View attachment 2386119 View attachment 2386118 View attachment 2386115
Then write the test script to use these images (1 background + 5 idle button images + 5 hover images)
You don't have permission to view the spoiler content. Log in or register now.
thank you so much you did better job than i did
imagebutton
before. If it had only been my own creations, it'd have looked awful.[...] its 10000000 times easier to line image maps up exactly on top of something [...]