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

    best-agent-85158

    07/20/2022, 8:20 PM
    niceee
  • b

    bright-gpu-74537

    07/20/2022, 8:21 PM
    it needs to be on your classpath, but yeah, where your lib source is will be in your classpath
  • b

    best-agent-85158

    07/20/2022, 8:21 PM
    you mean in the same dir as the source code? like i can put it in
    src/modules/moudule.xml
    ?
  • b

    bright-gpu-74537

    07/20/2022, 8:23 PM
    yeah, anywhere on the classpath will be fine, haxeui will recursively look for modules and as soon as it finds one will return (for that classpath entry)
  • b

    bright-gpu-74537

    07/20/2022, 8:24 PM
    so having two modules.xml on your one lib classpath will mean only one will get located, but you can have mutiple modules for each classpath entry (like, one for haxeui-core, one for a theme, one for your project and one for some other lib, etc, etc)
  • b

    bright-gpu-74537

    07/20/2022, 8:26 PM
    a good way to test if you've put it in the right place (its hard to put it in the wrong place really) is, create a module.xml somewhere (like src, or some subfolder of it) with:
  • b

    bright-gpu-74537

    07/20/2022, 8:27 PM
    Copy code
    xml
    <module>
        <themes>
            <global>
                <style>
                    .button { background-color: red; }
                </style>
             </global>
         </themes>
    </module>
  • b

    bright-gpu-74537

    07/20/2022, 8:27 PM
    if the buttons of your app dont turn red, haxeui probably hasnt found the module
  • p

    purple-businessperson-14467

    07/20/2022, 9:18 PM
    Ok. I was gonna try and hack in a JS onblur for fun, but a haxeui focus event would be better. Probably easier if its already 80% there anyways. Thank you sir
  • b

    bright-gpu-74537

    07/21/2022, 7:11 AM
    so actually, its all already there: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/events/FocusEvent.hx#L4-L5
  • b

    bright-gpu-74537

    07/21/2022, 7:12 AM
    i wonder if the names "focus" and "blur" are better though... i mean:
    Copy code
    haxe
    myInteractive.onFocusIn = ...
    myInteractive.onFocusOut = ...
    vs
    Copy code
    haxe
    myInteractive.onFocus = ...
    myInteractive.onBlue = ...
    šŸ¤”
  • p

    purple-businessperson-14467

    07/21/2022, 3:40 PM
    I'll look into it further I am receiving: haxe.ui.components.TextField has no field onFocusIn
  • p

    purple-businessperson-14467

    07/21/2022, 4:30 PM
    The builder lets you add "onfocus", "onblur" but they dont appear to do anything. http://haxeui.org/builder/?mcvebs I see the focus_in and focus_out events go through TextField's private onFocusChange but I dont see how to get the event externally
  • b

    bright-gpu-74537

    07/21/2022, 5:14 PM
    ok, so i think there is no "shortcut" for the events, which means (in code) you'd have to go the addEventListener route
  • b

    bright-gpu-74537

    07/21/2022, 5:15 PM
    the reason why it works (as in compiles) in the builder is because it uses xml, which basically adds an event listener for "blur", but of course that doesnt even trigger
  • p

    purple-businessperson-14467

    07/21/2022, 5:27 PM
    I didnt see an addEventListener for TextField so I used textField.registerEvent(FocusEvent.FOCUS_OUT, (e)->{trace("Boom");}); Which seemed to work...with 1 issue: When you click outside of the textfield it loses the caret but the textfield still appears to retain focus style, though it doesnt accept key entree, until you click on another interactiveobject
  • b

    bright-gpu-74537

    07/21/2022, 5:27 PM
    ok, ill check it out (i meant registerEvent, my bad)
  • p

    purple-businessperson-14467

    07/21/2022, 5:37 PM
    TextField.onFocusChange doesnt fire unless clicking on a different interactiveobject Maybe I should add a global event that just captures all non interactiveobject clicks?
  • b

    bright-gpu-74537

    07/21/2022, 5:38 PM
    sounds like a work around for something that should "just work" tbh
  • p

    purple-businessperson-14467

    07/21/2022, 5:42 PM
    well, yes/no. Its a feature? In discord you click away from the message box and you can still enter text. If you look at basic html forms (https://www.w3schools.com/html/html_forms.asp) and you click away then you cant enter text. I require the second but the feature seems ok?
  • p

    purple-businessperson-14467

    07/21/2022, 5:42 PM
    I prefer the loss of focus
  • p

    purple-businessperson-14467

    07/21/2022, 5:45 PM
    Right now HaxeUI is right in the middle. It apears to keep focus, the focus event doesnt fire, but you cant enter text. I have not tried other than html5 target but I assume they are the same
  • r

    refined-cat-44047

    07/22/2022, 3:10 AM
    Anyone have any up-to-date examples for HaxeUI working with Flixel? Using
    haxeui-flixel
    backend
  • h

    hallowed-ocean-84954

    07/22/2022, 4:53 AM
    Yeah. It's not very extensive as UIs go but my metaball editor does this and it uses git versions of stuff
  • h

    hallowed-ocean-84954

    07/22/2022, 4:56 AM
    @refined-cat-44047
  • h

    hallowed-ocean-84954

    07/22/2022, 4:57 AM
    There isn't any instruction on how to use it to edit metaballs yet I'm afraid but I am planning to add some soon
  • b

    bright-gpu-74537

    07/22/2022, 6:34 AM
    what kinda of example do you mean? Project setup etc?
  • r

    refined-cat-44047

    07/22/2022, 9:19 AM
    that is great. Yeah, mostly project setup. Just need something to go off to get me started. That Metaball repo looks perfect. Has all the parts I am looking for, and how it works in with Flixel. Cheers!
  • f

    full-journalist-82607

    07/22/2022, 5:31 PM
    Hmm it seems that optionbox cannot add classes dynamically
  • f

    full-journalist-82607

    07/22/2022, 5:32 PM
    Copy code
    <vbox>
        <style>
    .correct .label {
        font-bold: true;
    }
    </style>
        <optionbox text="Check Me!" styleNames="correct" />
        <optionbox text="Check Me!" onchange="this.text='checked'; this.addClass('correct');" />
        <button text="Click Me!" onclick="this.addClass('correct');" />
    </vbox>
1...117911801181...1687Latest