Need help with something.. kind of advanced?
Posted: Thu Apr 05, 2012 7:12 am
EDIT: I have found a way =) But Im going to keep this post up incase I learn any other methods
Hi everyone. I've been working on a window system for about .. OMG lol, it felt like an hour but its been about 4 O_o maybe.. anyways, its like 3:08 AM and I didn't even realize it lol
Anyways my issue is:
I've created the window system as said, one that uses only 1 canvas, heres a screenshot.
This is all being done through 1 canvas. I have hotsopts, where you can type a simple line to create them, but what I need to know is:
How can I go about making an event where say, if you CLICKED on that hotspot, like for example
new event -> mousedown -> script editor
I've given each hotspot a user index, as well as the widnows to maintain multiple windows. it works using arrays, so I store the X and Y of the created windows, and the created choice thingies as well, this is because I have a function called sendTo(offsetx, offsety, windowindex) and a sendToHotspot the same, and those work, it allows you to send an object to the same position as the windows or the hotspot.
Also, I have a lag-prevention system, that prevents the windows from constantly updating unless they need to, this maintains framerate.
So anyone have any idea how I can determine if a "hotspot" was clicked? I'd like to release this.
Hi everyone. I've been working on a window system for about .. OMG lol, it felt like an hour but its been about 4 O_o maybe.. anyways, its like 3:08 AM and I didn't even realize it lol
Anyways my issue is:
I've created the window system as said, one that uses only 1 canvas, heres a screenshot.
This is all being done through 1 canvas. I have hotsopts, where you can type a simple line to create them, but what I need to know is:
How can I go about making an event where say, if you CLICKED on that hotspot, like for example
new event -> mousedown -> script editor
- Code: Select all
if(spotClick[hotspot_index])
{
//
}
I've given each hotspot a user index, as well as the widnows to maintain multiple windows. it works using arrays, so I store the X and Y of the created windows, and the created choice thingies as well, this is because I have a function called sendTo(offsetx, offsety, windowindex) and a sendToHotspot the same, and those work, it allows you to send an object to the same position as the windows or the hotspot.
Also, I have a lag-prevention system, that prevents the windows from constantly updating unless they need to, this maintains framerate.
So anyone have any idea how I can determine if a "hotspot" was clicked? I'd like to release this.