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

    billowy-waiter-28954

    03/01/2023, 9:21 AM
    The methods that change those properties are just shorthands, like
    pos(x, y);
    to set
    x
    and
    y
    etc...
  • b

    bright-gpu-74537

    03/01/2023, 9:21 AM
    sure, but i guess you would need to refer to the docs to understand "why my visual is still there after i
    remove
    it".. but i get it though, i mean, you might also what to remove a visual and not hide it... (though i guess that would be more rare? πŸ€” )
  • b

    billowy-waiter-28954

    03/01/2023, 9:21 AM
    But yeah I have been hesitating about disabling visuals with no parents
  • b

    billowy-waiter-28954

    03/01/2023, 9:22 AM
    I need to see what would be the implications to that, and would still need to keep a define around to use previous behaviour, if I do this change.
  • b

    billowy-waiter-28954

    03/01/2023, 9:23 AM
    Put it another way add()/remove()/children is a hierarchy thing, not a visibility thing. They are unrelated
  • b

    billowy-waiter-28954

    03/01/2023, 9:23 AM
    A visual is visible by default, regardless of where it is in hierarchy, that's the idea
  • b

    billowy-waiter-28954

    03/01/2023, 9:24 AM
    But I'm not 100% sΓ»re it's the best behaviour, idk. Maybe it's ok. At least it's been working for me so far
  • b

    bright-gpu-74537

    03/01/2023, 9:25 AM
    yeah, i suppose it make sense when you put it like that, and its fine if you "know", just not sure its what 99% of people would expect (without looking at docs)
  • b

    bright-gpu-74537

    03/01/2023, 9:25 AM
    not that it matters, now we "know"... so the solution is simple enough
  • b

    billowy-waiter-28954

    03/01/2023, 9:26 AM
    Anyway that's something I have been wondering about, regarding haxe API, without being able to take a definitive decision πŸ˜…
  • b

    bright-gpu-74537

    03/01/2023, 9:28 AM
    i think the problem with automatically deactivating orphaned visuals is that 1% of the time when you didnt want it to happen.. that could be a pain then to work around
  • b

    bright-gpu-74537

    03/01/2023, 9:28 AM
    but, im now wonder if it is EVER desired behaviour?
  • b

    bright-gpu-74537

    03/01/2023, 9:29 AM
    like for instance, in your own code, have you ever .remove'd something and NOT set .active=false directly after?
  • b

    billowy-waiter-28954

    03/01/2023, 9:41 AM
    Well a hierarchy has to start somewhere
  • b

    billowy-waiter-28954

    03/01/2023, 9:42 AM
    so a visual without parent is just the root of a visual hierarchy
  • b

    billowy-waiter-28954

    03/01/2023, 9:42 AM
    Scenes don't have parent, so technically they are visual without parent that are hierarchy roots
  • b

    billowy-waiter-28954

    03/01/2023, 9:43 AM
    Displaying a visual without parent is also the most efficient option performance wise
  • b

    bright-gpu-74537

    03/01/2023, 9:51 AM
    @full-journalist-82607 :
  • b

    bright-gpu-74537

    03/01/2023, 9:51 AM
    🀣
  • f

    full-journalist-82607

    03/01/2023, 9:53 AM
    lol I felt inspired !
  • b

    bright-gpu-74537

    03/01/2023, 9:54 AM
    they are funny, didnt notice them the first time around πŸ˜„
  • f

    full-journalist-82607

    03/01/2023, 9:56 AM
    It makes me think of this blog post I read https://ironicsans.substack.com/p/the-strangest-computer-manual-ever
  • b

    bright-gpu-74537

    03/01/2023, 9:59 AM
    ha, thats funny also
  • b

    bright-gpu-74537

    03/01/2023, 10:20 AM
    @full-journalist-82607 - https://github.com/haxeui/haxeui-guides/blob/master/001-Guides/004-Styling.md made a few tiny edits... lemme know if its not clear, or not "right" πŸ™‚
  • f

    full-journalist-82607

    03/01/2023, 10:36 AM
    No, they are great. I 'll try to use the same formatting next time πŸ™‚
  • a

    ambitious-knife-25690

    03/01/2023, 12:42 PM
    ah okay, that's cool. I switched things to this
  • a

    ambitious-knife-25690

    03/01/2023, 12:43 PM
    I do get why you're doing it this way now tho so thanks for explaining!
  • s

    salmon-knife-33932

    03/01/2023, 3:29 PM
    HI guys, I'm brand new to haxeui, i started last week and I already love it ❀️ Well i got a question about my actual app (cf image.png) The
    TableView
    table (id: table) you see in the screenshot is bound directly to a datasource:
    table.dataSource = ArrayDataSource.fromArray(mySource);
    I am using an Item Renderer to display a property of my source data (
    has_stream
    ) as a checkbox:
    Copy code
    <item-renderer verticalAlign="center">
      <checkbox id="has_stream" />
    </item-renderer>
    That's cool but actually I'd like to display an icon instead, let's say icons/green.png if has_stream == true else
    red.png
    . Is it possible to do it directly in the .xml view without changing my source structure? By doing some sort of binding expression? Otherwise the only solution I see is to make a wrapper structure (
    IDataItem
    ..) And wrap my mySource data to the wrapper and then bind the data directly but I find it heavy... Thanks you
  • a

    ambitious-knife-25690

    03/01/2023, 4:34 PM
    the syntax from a haxeui css pov is
    Copy code
    hx
    .checkbox .checkbox-value:selected {
        icon: "image.png";
    }
  • a

    ambitious-knife-25690

    03/01/2023, 4:35 PM
    here's a custom theme you can look at as a reference
1...156015611562...1687Latest