https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • try adding `-D ABI=-MD`
    b

    bright-gpu-74537

    04/02/2023, 11:40 AM
    try adding
    -D ABI=-MD
  • well that solves that, except the app now just shows a blank window
    i

    icy-zebra-52882

    04/02/2023, 11:43 AM
    well that solves that, except the app now just shows a blank window
  • https://plzlookat.mystupid.pictures/uIQbNnfRpm.png
    i

    icy-zebra-52882

    04/02/2023, 11:43 AM

    https://plzlookat.mystupid.pictures/uIQbNnfRpm.png▾

  • and something is defo supposed to show? You have pulled latest for all haxeui libs (and hxWidgets)?
    b

    bright-gpu-74537

    04/02/2023, 11:44 AM
    and something is defo supposed to show? You have pulled latest for all haxeui libs (and hxWidgets)?
  • the fact its created a window means its working
    b

    bright-gpu-74537

    04/02/2023, 11:44 AM
    the fact its created a window means its working
  • yeah it shows up on HTML5 build
    i

    icy-zebra-52882

    04/02/2023, 11:44 AM
    yeah it shows up on HTML5 build
  • I'll make a GH repo for it a sec
    i

    icy-zebra-52882

    04/02/2023, 11:44 AM
    I'll make a GH repo for it a sec
  • same
    b

    bright-gpu-74537

    04/02/2023, 11:50 AM
    same
  • b

    bright-gpu-74537

    04/02/2023, 11:50 AM

    https://cdn.discordapp.com/attachments/565569107701923852/1092053444308783114/image.png▾

  • thats a good thing 🙂
    b

    bright-gpu-74537

    04/02/2023, 11:50 AM
    thats a good thing 🙂
  • two ready's
    b

    bright-gpu-74537

    04/02/2023, 11:54 AM
    two ready's
  • b

    bright-gpu-74537

    04/02/2023, 11:54 AM

    https://cdn.discordapp.com/attachments/565569107701923852/1092054521762558124/image.png▾

  • oh god how did that happen
    i

    icy-zebra-52882

    04/02/2023, 11:54 AM
    oh god how did that happen
  • ¯\_(ツ)_/¯
    b

    bright-gpu-74537

    04/02/2023, 11:54 AM
    ¯\_(ツ)_/¯
  • and how did HTML5 build work anyway <:thonk:533013422204256276>
    i

    icy-zebra-52882

    04/02/2023, 11:55 AM
    and how did HTML5 build work anyway
  • html5 app.ready is super uninvolved, so it likely just calls the callback right away
    b

    bright-gpu-74537

    04/02/2023, 11:55 AM
    html5 app.ready is super uninvolved, so it likely just calls the callback right away
  • <@385014891750096896> there's a bug with TreeView class that still hasn't been fixed https://github.com/haxeui/haxeui-flixel/issues/29
    r

    ripe-apple-72114

    04/02/2023, 11:58 AM
    @bright-gpu-74537 there's a bug with TreeView class that still hasn't been fixed https://github.com/haxeui/haxeui-flixel/issues/29
  • nice, thanks for the warning
    i

    icy-zebra-52882

    04/02/2023, 12:00 PM
    nice, thanks for the warning
  • ill make one
    r

    ripe-apple-72114

    04/02/2023, 12:02 PM
    ill make one
  • Hi, Ian. I'am trying to implement my own GUI library and I faced with a problem, so I want to ask you for advice How do you handle layouts? I split my code to tree traversal multiple times, at the first I calculate the width and the height, at second I calculate positions. There are not to many ways to handle a tree, so I suppose you did something like this solution too. How do you handle size calculations in layouts? - their sizes may be a) absolute (there are not need to special handling), b) relative to children (so you need to calculate children sizes first), c) relative to parent (so you need to calculate parent size first). How do you handle b) and c)? In my library I traversal from child to parent with `depth-first LRN` algorithm, for the current component it records their absolute size to `State` if it has an absolute size (usually regular components with known size such as `text`, `button`, ...) or if it is a layout and size of the children already calculated. Then layouts (row, col, ...) (still for the current component) calculates and records children size relative to it (if child specify that their size is relative to parent). For c) there are no special case, because at the moment it will be already calculated at the previous step So I illustrate a problem at the two examples below In my library the first example calculated without problem, but algorithm broke for the second case, because size of the nested component (with styleNames="test3") calculated in the nested component (with styleNames="test2") but their size is unknown - its size will be calculated in outer component (with styleNames="test1"). So how do you travel through the tree to avoid this problem? Do you recalculate tree and propagate sizes to a children in multiple steps after you see relative to parent size or you do it something else?
    b

    blue-lock-94355

    04/02/2023, 12:09 PM
    Hi, Ian. I'am trying to implement my own GUI library and I faced with a problem, so I want to ask you for advice How do you handle layouts? I split my code to tree traversal multiple times, at the first I calculate the width and the height, at second I calculate positions. There are not to many ways to handle a tree, so I suppose you did something like this solution too. How do you handle size calculations in layouts? - their sizes may be a) absolute (there are not need to special handling), b) relative to children (so you need to calculate children sizes first), c) relative to parent (so you need to calculate parent size first). How do you handle b) and c)? In my library I traversal from child to parent with
    depth-first LRN
    algorithm, for the current component it records their absolute size to
    State
    if it has an absolute size (usually regular components with known size such as
    text
    ,
    button
    , ...) or if it is a layout and size of the children already calculated. Then layouts (row, col, ...) (still for the current component) calculates and records children size relative to it (if child specify that their size is relative to parent). For c) there are no special case, because at the moment it will be already calculated at the previous step So I illustrate a problem at the two examples below In my library the first example calculated without problem, but algorithm broke for the second case, because size of the nested component (with styleNames="test3") calculated in the nested component (with styleNames="test2") but their size is unknown - its size will be calculated in outer component (with styleNames="test1"). So how do you travel through the tree to avoid this problem? Do you recalculate tree and propagate sizes to a children in multiple steps after you see relative to parent size or you do it something else?
  • ```html <vbox style="padding:15px;width:100%;height:100%;spacing:20px;"> <style> * { border: 0px solid black; padding: 0; } .test1 { background-color: green; } .test2 { background-color: yellow; } .test3 { background-color: purple; } </style> <!-- example 1 --> <box styleNames="test1" width="100px" height="100px" > <box styleNames="test2" width="60%"> <box styleNames="test3" width="30px" height="30px" /> </box> </box> <!-- example 2 --> <box styleNames="test1" width="100px" height="100px" > <box styleNames="test2" width="50%" height="50%"> <box styleNames="test3" width="90%" height="90%" /> </box> </box> </vbox> ```
    b

    blue-lock-94355

    04/02/2023, 12:09 PM
    Copy code
    html
    <vbox style="padding:15px;width:100%;height:100%;spacing:20px;">
        <style>
            * {
                border: 0px solid black;
                padding: 0;
            }
    
            .test1 {
                background-color: green;
            }
            .test2 {
                background-color: yellow;
            }
            .test3 {
                background-color: purple;
            }
        </style>
    
        <!-- example 1 -->
        <box styleNames="test1" width="100px" height="100px" >
            <box styleNames="test2" width="60%">
                <box styleNames="test3" width="30px" height="30px" />
            </box>
        </box>
    
        <!-- example 2 -->
        <box styleNames="test1" width="100px" height="100px" >
            <box styleNames="test2" width="50%" height="50%">
                <box styleNames="test3" width="90%" height="90%" />
            </box>
        </box>
    </vbox>
  • actually, in your second example is that even needed? test1 would be 100x100, test2 is easily calculated as 50x50, and that means that test3 is easily calculated also as 45x45
    b

    bright-gpu-74537

    04/02/2023, 12:16 PM
    actually, in your second example is that even needed? test1 would be 100x100, test2 is easily calculated as 50x50, and that means that test3 is easily calculated also as 45x45
  • in haxeui once you set test2 to 50x50, it wll also invalidate its parent, which in this case (i think) means it will skip it since its already being validatd
    b

    bright-gpu-74537

    04/02/2023, 12:17 PM
    in haxeui once you set test2 to 50x50, it wll also invalidate its parent, which in this case (i think) means it will skip it since its already being validatd
  • how do you implement this `before`?
    b

    blue-lock-94355

    04/02/2023, 12:17 PM
    how do you implement this
    before
    ?
  • <@385014891750096896> https://www.newgrounds.com/dump/download/3168b4b259834b65ce0b9f7f07956769 also uploaded the source to newgrounds dump because discord's 8mb lol
    r

    ripe-apple-72114

    04/02/2023, 12:18 PM
    @bright-gpu-74537 https://www.newgrounds.com/dump/download/3168b4b259834b65ce0b9f7f07956769 also uploaded the source to newgrounds dump because discord's 8mb lol
  • okay, I think I understood, thanks!
    b

    blue-lock-94355

    04/02/2023, 12:23 PM
    okay, I think I understood, thanks!
  • yeah, same 🙂
    b

    blue-lock-94355

    04/02/2023, 12:24 PM
    yeah, same 🙂
  • b

    bright-gpu-74537

    04/02/2023, 12:33 PM

    https://cdn.discordapp.com/attachments/565569107701923852/1092064364430905434/treeview-flixel.gif▾

  • nice
    r

    ripe-apple-72114

    04/02/2023, 12:37 PM
    nice
  • also thanks
    r

    ripe-apple-72114

    04/02/2023, 12:37 PM
    also thanks
1...161216131614...1687Latest