https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    09/12/2019, 11:17 AM
    "new" site... not really new, just a few new bits and the rest sort of mashed together from the way-back-when-machine
  • l

    loud-salesclerk-7438

    09/12/2019, 12:05 PM
    it looks nice! I like the playground area, although it won't compile code from Components section (missing Logger)
  • l

    loud-salesclerk-7438

    09/12/2019, 12:07 PM
    also some actual pictures of HaxeUI running on different platforms would probably be useful... maybe an image slider that shows the same dialog on Windows, MacOSX, Linux, HTML5, etc
  • l

    loud-salesclerk-7438

    09/12/2019, 12:09 PM
    most people will probably not realise that you can actually put HaxeUI on a barrel in Kha (or is it armory?) 🙂
  • b

    bright-gpu-74537

    09/12/2019, 1:43 PM
    yeah, thats a good point about showing the same thing on different platforms / backends
  • b

    bright-gpu-74537

    09/12/2019, 1:45 PM
    I can add a fake logger to the playground... better idea i guess would be to remove the logger from the components section... it isnt needed / really used, and i had thought that people would be copying and pasting between the two
  • l

    loud-salesclerk-7438

    09/12/2019, 1:53 PM
    maybe a
    Play
    button to open a component xml in playground could be useful
  • l

    loud-salesclerk-7438

    09/12/2019, 1:59 PM
    and the logger could log events to browser console
  • m

    magnificent-caravan-75149

    09/12/2019, 3:08 PM
    Thanks Ian, the new API screens are much better. I wasn't sure the AnimationEvent would work. My code looks so much better than when I was using Tween to animate the splash screen.
  • b

    bright-gpu-74537

    09/12/2019, 3:09 PM
    great! glad to hear it! what "api screens" do you mean?
  • b

    bright-gpu-74537

    09/12/2019, 3:10 PM
    you mean these: http://haxeui.org/api/haxe/ui/components/Button.html
  • b

    bright-gpu-74537

    09/12/2019, 3:10 PM
    ?
  • m

    magnificent-caravan-75149

    09/12/2019, 4:11 PM
    yes, the new pages are very easy to navigate.
  • m

    magnificent-caravan-75149

    09/12/2019, 4:15 PM
    So the AnimationEvent.END triggers the first run thru. I then use componentAnimation.run to restart the animation and the event does not trigger again. Do I need to reset the event or is componentAnimation.run the wrong thing to use for css animations?
  • m

    magnificent-caravan-75149

    09/12/2019, 4:16 PM
    ,,, image.registerEvent(AnimationEvent.END, function(_){ if (state==0) { state = 1; image.resource = "images_kodetech"; image.resizeComponent(10.0,10.0); image.componentAnimation.run(); trace("Anim end, state ", state); } else if (state==1) { trace("State = 1"); } else { trace("State: ", state); }; });
  • b

    bright-gpu-74537

    09/12/2019, 4:23 PM
    does the actual animation run again?
  • m

    magnificent-caravan-75149

    09/12/2019, 4:25 PM
    yes works great the second time
  • m

    magnificent-caravan-75149

    09/12/2019, 4:26 PM
    the state variable is changed to 1 but the trace doesn't show up a gain
  • b

    bright-gpu-74537

    09/12/2019, 4:26 PM
    so i dont think you should be calling run yourself... in fact, i might make that private, however your use case seems valid... how are you firing off the animation the first time? By adding a style?
  • m

    magnificent-caravan-75149

    09/12/2019, 4:28 PM
    yes, I addClass('fade') to the image as you had suggested to me. That fires off the animation the first time. I tried removeClass and swapClass but could not get to animation to run again
  • m

    magnificent-caravan-75149

    09/12/2019, 4:29 PM
    I suppose I could make a new css class and add that to fire it off again
  • b

    bright-gpu-74537

    09/12/2019, 4:31 PM
    removing and adding it again was what i was just about to suggest, that should defo work...
  • b

    bright-gpu-74537

    09/12/2019, 4:32 PM
    although, i also think its valid to want to just do "componentAnimation.foo" to get it to run again
  • b

    bright-gpu-74537

    09/12/2019, 4:32 PM
    do you have a minimal example?
  • b

    bright-gpu-74537

    09/12/2019, 4:32 PM
    add/remove/swap not working sounds like a bug
  • m

    magnificent-caravan-75149

    09/12/2019, 4:34 PM
    it works if you add a different class
  • m

    magnificent-caravan-75149

    09/12/2019, 4:35 PM
    let me try swap
  • m

    magnificent-caravan-75149

    09/12/2019, 4:37 PM
    nope swap doesn't work. this does
  • m

    magnificent-caravan-75149

    09/12/2019, 4:37 PM
    ''' if (state==0) { state = 1; image.resource = "images_kodetech"; image.removeClass('fade'); trace("Anim end, state ", state); image.addClass('fadeOut'); } else if (state==1) { trace("State = 1"); } else { trace("State: ", state); };
  • m

    magnificent-caravan-75149

    09/12/2019, 4:39 PM
    event handler fires off again
1...105106107...1687Latest