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

    clever-yak-82528

    01/22/2023, 9:37 AM
    guess haxe-rs is gonna have at least one more use too
  • b

    bright-gpu-74537

    01/22/2023, 10:14 AM
    @full-journalist-82607 - btw, i think im going to go a slightly different direction in the "USER_SUBMIT" stuff (although obviously i appreciate the PRs) - your wx PR is especially useful since i didnt realise we'd need a different constructor flag - but for composites, i think we can do it all in core TextField... that way all (composite) backends benefit without changes
  • f

    full-journalist-82607

    01/22/2023, 10:18 AM
    It is indeed simpler 🙂 I knew you had some thing in mind as weren't pulling my PRs 😉
  • b

    bright-gpu-74537

    01/22/2023, 10:19 AM
    heh heh, well, tbh, i hadnt even thought fully about it, but when i saw the PRs (for composites) i thought "hmmm, core can do this"... but the wx PR was defo enlightening... I think for wx we'll just always pass that flag... i mean, i cant see any reason why not
  • b

    bright-gpu-74537

    01/22/2023, 10:19 AM
    oh, yeah, you already have done that
  • b

    bright-gpu-74537

    01/22/2023, 10:21 AM
    OK, so actually, i got it wrong, you dont need to pass anything special into the native control constructor?
  • b

    bright-gpu-74537

    01/22/2023, 10:21 AM
    sorry, yeah we do
  • b

    bright-gpu-74537

    01/22/2023, 10:21 AM
    style |= TextCtrlStyle.PROCESS_ENTER;
  • b

    bright-gpu-74537

    01/22/2023, 10:22 AM
    not the constructor, but yeah, not reading properly 🙂
  • f

    full-journalist-82607

    01/22/2023, 10:22 AM
    Haha, it's still morning !
  • b

    bright-gpu-74537

    01/22/2023, 10:22 AM
    indeed 😄
  • f

    full-journalist-82607

    01/22/2023, 10:23 AM
    Yeah, just saw you acceptet the pop menu PR 🙂
  • b

    bright-gpu-74537

    01/22/2023, 10:24 AM
    yeah, and the user submit one for wx... that one will need to be handled by the backend since its quite specific to wx
  • f

    full-journalist-82607

    01/22/2023, 10:26 AM
    I'll leave you to work on ... forms ? Hmm, nice 🎁
  • b

    bright-gpu-74537

    01/22/2023, 10:27 AM
    yeah, well, im working on the submit now.. the idea being you can do:
    Copy code
    xml
        <form onUserSubmit="...">
            <label text="Username" />
            <textfield />
            <label text="Password" />
            <textfield />
        </form>
  • b

    bright-gpu-74537

    01/22/2023, 10:28 AM
    simple stuff, but something ive personally wired up manually like 20 times in the past
  • f

    full-journalist-82607

    01/22/2023, 10:29 AM
    Yeah this will be quite useful. I think I'll use them as you as soon as you commit it lol
  • b

    bright-gpu-74537

    01/22/2023, 10:30 AM
    im also thinking to go back to "SUBMIT" also, i defo like it more, and as !billy said, the "user" part is inferred... if we need to change it, so be it.. but i defo think submit is nicer
  • b

    bright-gpu-74537

    01/22/2023, 10:30 AM
    ill let it sink in, wont make any changes until "morning brain" wears off 😄
  • f

    full-journalist-82607

    01/22/2023, 10:31 AM
    Only half an hour left and your brain will be functional !
  • b

    bright-gpu-74537

    01/22/2023, 10:44 AM
    already liking it 🙂
  • b

    bright-gpu-74537

    01/22/2023, 10:44 AM
    Copy code
    haxe
    @:xml('
        <form>
            <label text="Username" verticalAlign="center" />
            <textfield id="username" />
            <label text="Password" verticalAlign="center" />
            <textfield id="password" />
        </form>
    ')
    class MyForm extends Form {
        public override function validateForm(fn:Bool -> Void) {
            var invalidFields = [];
            if (username.text == "") {
                invalidFields.push(username);
            }
            if (password.text == "") {
                invalidFields.push(password);
            }
            for (f in invalidFields) {
                f.shake().flash();
            }
            fn(invalidFields.length == 0);
        }
    }
  • b

    bright-gpu-74537

    01/22/2023, 11:41 AM
    easy 🙂
  • b

    bright-gpu-74537

    01/22/2023, 11:43 AM
    ... and now the important question, which looks better / more correct for a "default" button:
  • b

    bright-gpu-74537

    01/22/2023, 11:44 AM
    or
  • b

    bright-gpu-74537

    01/22/2023, 11:45 AM
    ... ... ... im torn
  • p

    powerful-morning-89

    01/22/2023, 11:46 AM
    I'd say the second one, because it's more visible that there's something special about it?
  • b

    bright-gpu-74537

    01/22/2023, 11:47 AM
    yeah, i think i agree... i just worry that its a little too obvious? I try not to add too much colour to the default theme so its a little more flexible... dunno
  • p

    powerful-morning-89

    01/22/2023, 11:48 AM
    Hmm, looks like windows just does a blue border and leaves the blue fill for hovering over a button.
  • p

    powerful-morning-89

    01/22/2023, 11:49 AM
    (And with "windows" I mean whatever thing they're using for the Explorer UI nowadays)
1...139513961397...1687Latest