Hi,
i was enjoying working more or less flawlessly in my project (not a game). Since its an utility and it doesnt have to eat resources as a game while not being used, i opted for waitEvent instead of pollEvent.
However working on workspace navigation i ended up with a "oh shit" situation.
I planned using both mouse-near-borders and arrow keys to navigate on the working zone in case it is bigger than the window.
And yeah i cant do that with waitEvent, because once the mouse gets to the border and the event triggers once, everything stops.
Indeed thinking later about that, programs like paint and paint.net, event notepad++ have keyboard navigation based on operating system simulated key repetition when the arrow is being held; which i could pretty much do as well.
The point is, is there any workaround you can suggest me to have it work with mouse-near-borders, like in rts games?
My only idea now was putting all the draw part in a function, and have my main loop looking like that (i know its ugly)
if waitEvent(event)
{
//stuff happens
switch(event)
{
case mouse on border:
while pollEvent(tmp_event)
if mouse on border
move screen
draw()
else
break out of poll event
case other events:
}
draw();
}