Although I have some specific question, alternative solutions are welcome too.
What I am tryigng to do is to make no rectangular shaped map, for example hexagon map.
What i want to happen is that when i click on one of the hexagon tiless, I would like to get that hexagon to highlight and then be able to operate on that (ie. move character on that hexagon tile, attack another hexagon tile etc.)
My idea for solution so far have been to use brushes to draw all the tiles, and then make all those tiles into buttons.
However, seems I am having problem with that solution. For there can be some other things on top of those tiles. Say for example a Dragon could be so big, that it would expand on several tiles.
I was hoping there to be a way to make a layer button in such way, that it would never be hidden. That even if there would be for example that fragon layer on top of that hexagon tile layer, the hexagon tile would still react to it being clicked, even it would be done by clicking on top of dragon actually.
Specific question is: Is there a way to do layer buttons in such way, that even if they get under other layers, they would still react as long as your mouse is over the area where that layerbutton is under at?
If you can give me other solutions on how to make non rectangle shaped tiles, say hexagon, or for example semi 3D tiles, tips on making those are welcomed as well. As so far only way I have figured out on how to make them would be to use layers that will be made into buttons.
Lousy solution would be to make bunch of simple buttons, but those would always be restricted to rectangle areas, and therefore not optimal.
trying to make hexagon map with buttons
Re: trying to make hexagon map with buttons
I think, in this case you should forget about handling game tiles as buttons. Just draw the game map, then handle and react to mouse input by yourself. You just need to figure out some fairly simple formula's for converting the screen coords to map coords.
Re: trying to make hexagon map with buttons
Would it not be easier to have certain objects' simply occupy more than 1 square?
Dragon 4 squares
Spider 2 squares
Small house 4 squares
Medium house 8 squares
Large house 16 squares
etc etc
Dragon 4 squares
Spider 2 squares
Small house 4 squares
Medium house 8 squares
Large house 16 squares
etc etc
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
Re: trying to make hexagon map with buttons
@DJRikki
Otherwise yes, but what I am after is that I am hoping to make some semi 3D graphics.
In that case it could be that theres a large dragon at x10, y10, and then theres a small goblin at x10, y9, which means that in semi 3D, the dragon would be in front of the goblin, and since dragon might be so big, goblin might either not be seeable at all, or is only barely seeable.
Making it especially hard to click on mobile phone environments.
Otherwise yes, but what I am after is that I am hoping to make some semi 3D graphics.
In that case it could be that theres a large dragon at x10, y10, and then theres a small goblin at x10, y9, which means that in semi 3D, the dragon would be in front of the goblin, and since dragon might be so big, goblin might either not be seeable at all, or is only barely seeable.
Making it especially hard to click on mobile phone environments.