I tried to make a map-editor for rpg-games...
It is possible to choose tiles and the map is made similar to this:
Code: Select all
ScrollAreaGadget(0, 0,0,416,416,3840,3840,16)
Createimage(0,3840,3840)
StartDrawing(ImageOutput())
Box(0,0,3840,3840,RGB(0,0,0))
StopDrawing()
ImageGadget(1,0,0,3840,3840,ImageID())
CloseGadgetList()
If I wanted to click somewhere in the map to place a tile there, what do I have to do?
If there was only an image, I could use the position of the mouse, but the image is in the scrollareagadget.
Is there any function or another way to find out on which position of an image someone clicked with the mouse or a way to find out, how far the scrollarea has scrolled?
If not, how could I realize the editor then (only in theory) ?
(Another question:
is there any way to rezise a scrollareagadget without creating it new?)

