#exult@irc.freenode.net logs for 10 Oct 2016 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage

[00:25:50] --> Rottingbeef has joined #exult
[01:56:54] --> DominusExult has joined #exult
[01:56:54] <-- DominusExult has left IRC (Changing host)
[01:56:54] --> DominusExult has joined #exult
[01:56:54] --- ChanServ gives channel operator status to DominusExult
[02:00:51] <-- Dominus has left IRC (Ping timeout: 248 seconds)
[02:00:51] --- DominusExult is now known as Dominus
[02:40:05] <-- Marzo has left IRC (Ping timeout: 250 seconds)
[08:48:39] <-- Lightkey has left IRC (Ping timeout: 240 seconds)
[08:49:43] --> Shozan has joined #exult
[08:50:27] --> Epictrope has joined #exult
[08:54:27] <-- SHODAN has left IRC (*.net *.split)
[08:54:28] <-- Epitrope has left IRC (*.net *.split)
[09:02:29] --> Lightkey has joined #exult
[11:44:11] --- Shozan is now known as SHODAN
[12:55:54] <Dominus> wjp, I'm testing of adding a left-long-click pathfind to the iOS port and wanted to add a sprite effect when the left mouse is clicked for a certain time. but I can't wrap my head around adding a timer that starts as soon as you hold down the button
[12:56:01] <Dominus> this is the patch http://pastebin.com/vGPP2s2i
[12:56:56] <Dominus> If I add the "gwin->get_effects()->add_effect(new Sprites_effect(18, t, 0, 0, 0, 0));" to the left mouse button up event I do get the sprite effect when I release the mlouse
[13:22:05] <wjp> not sure if we already have any infrastructure to handle that
[13:22:28] <wjp> we may not have any existing timer-driven user interface elements
[13:22:47] <wjp> (there's of course a timing component in double clicks, but that's still driven by actual events)
[13:42:06] <Dominus> That's not the answer I was hoping for :)
[13:42:39] <Dominus> Thanks, if all else fails, it will only sprite on mouse up ;)
[13:45:03] <wjp> it shouldn't be too hard, but I don't have the Exult code infrastructure very clear in my mind anymore
[13:49:35] <wjp> one relatively un-invasive way would be using code such as https://wiki.libsdl.org/SDL_AddTimer to create a custom event, and then do the effect when you get that custom event
[13:49:58] <wjp> (and of course cancelling it properly if you release the mouse early)
[13:53:21] <Dominus> That looks familiar, we might have that in the shortcut bar code. Thanks for the pointer
[13:53:47] <wjp> that code is too new for me to know I think... *cough*
[14:00:11] * Dominus online petitions for wjp to get more involved again :)
[14:02:53] <Dominus> yup, there it is at https://github.com/exult/exult/blob/master/gumps/ShortcutBar_gump.cc#L368
[14:30:37] <wjp> the other timing related event handling is in exult.cc; look for 'ticks > show_items_time'
[14:30:53] <wjp> that checks if enough time has passed after a click to stop waiting for a double click
[14:50:59] <Dominus> can't apply either ways. it's over my head again.
[22:31:17] --> Marzo has joined #exult