How do I Set Different XY Values on ImageMaps?
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.
- Mikomi
- Veteran
- Posts: 324
- Joined: Tue Jun 24, 2014 11:45 pm
- Completed: That Which Binds Us, Enamored Risks, Alice in Stardom
- Projects: Asterism, Magicanna
- Organization: Crystal Game Works
- itch: CrystalGameWorks
- Contact:
How do I Set Different XY Values on ImageMaps?
So, I've ran into a problem. I have no clue how to set different x align and y align values for the various buttons on an image map. Here's a screenshot of my code so far.
- Attachments
-
- uuuggh.PNG
- (8.25 KiB) Not downloaded yet
Re: How do I Set Different XY Values on ImageMaps?
Why are the buttons in an hbox? I also find that xalign/yalign is trickier to use for fine positioning than xpos/ypos, although ymmv.
Btw, imagebuttons and imagemaps are different. Depending on what you want to do with this screen, you may find an imagemap easier to set up.
Btw, imagebuttons and imagemaps are different. Depending on what you want to do with this screen, you may find an imagemap easier to set up.
- Mikomi
- Veteran
- Posts: 324
- Joined: Tue Jun 24, 2014 11:45 pm
- Completed: That Which Binds Us, Enamored Risks, Alice in Stardom
- Projects: Asterism, Magicanna
- Organization: Crystal Game Works
- itch: CrystalGameWorks
- Contact:
Re: How do I Set Different XY Values on ImageMaps?
Well, the person who taught me this used hbox, so I used it too. I had the first one aligned perfectly but once I put in the second xalign and yalign by the second one it threw them both off center.philat wrote:Why are the buttons in an hbox? I also find that xalign/yalign is trickier to use for fine positioning than xpos/ypos, although ymmv.
Btw, imagebuttons and imagemaps are different. Depending on what you want to do with this screen, you may find an imagemap easier to set up.
The person who taught me this told me this was imagemaps.
Re: How do I Set Different XY Values on ImageMaps?
An hbox wants to force its children to be side by side horizontally. When you attempt to mess with that, it won't react very nicely.
I recommend that you use an imagemap; pretty sure be easier for a renpy beginner. http://lemmasoft.renai.us/forums/viewto ... 51&t=14237
I recommend that you use an imagemap; pretty sure be easier for a renpy beginner. http://lemmasoft.renai.us/forums/viewto ... 51&t=14237
- Mikomi
- Veteran
- Posts: 324
- Joined: Tue Jun 24, 2014 11:45 pm
- Completed: That Which Binds Us, Enamored Risks, Alice in Stardom
- Projects: Asterism, Magicanna
- Organization: Crystal Game Works
- itch: CrystalGameWorks
- Contact:
Re: How do I Set Different XY Values on ImageMaps?
You're kinda confusing me- you keep saying imagemaps would be easier, but haven't told me what I was doing. Was I taught wrong, or is the code I showed an imagemap?philat wrote:An hbox wants to force its children to be side by side horizontally. When you attempt to mess with that, it won't react very nicely.
I recommend that you use an imagemap; pretty sure be easier for a renpy beginner. http://lemmasoft.renai.us/forums/viewto ... 51&t=14237
I'm sorry if I sound like a newbie, I'm really not.
Re: How do I Set Different XY Values on ImageMaps?
You were taught wrong.
As I said before, the code you posted uses imageBUTTONS. The topic I linked you to shows how to use an imageMAP. The primary difference is that with the imagemap, instead of positioning each hotspot manually you designate hotspots in relation to a fixed image (the hotspots are easy to find using the image location picker in the dev tools, which you can bring up using shift+d), so that your specific problem -- positioning hotspots -- mostly goes away. There are other things that imagebuttons are better for, but they generally require more effort than an imagemap, which is why I recommended one over the other.
On the other hand, if you would rather position each element separately, you could also just get rid of the hbox. Literally, delete the hbox, un-indent your imagebuttons and it will probably work.
As I said before, the code you posted uses imageBUTTONS. The topic I linked you to shows how to use an imageMAP. The primary difference is that with the imagemap, instead of positioning each hotspot manually you designate hotspots in relation to a fixed image (the hotspots are easy to find using the image location picker in the dev tools, which you can bring up using shift+d), so that your specific problem -- positioning hotspots -- mostly goes away. There are other things that imagebuttons are better for, but they generally require more effort than an imagemap, which is why I recommended one over the other.
On the other hand, if you would rather position each element separately, you could also just get rid of the hbox. Literally, delete the hbox, un-indent your imagebuttons and it will probably work.
Who is online
Users browsing this forum: Bing [Bot], nyeowmi


