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

    late-engine-8731

    01/26/2023, 10:29 PM
    (btw, you can drop the
    null, 0
    from that
    add_child
    call, that one is fixed as well)
  • e

    elegant-twilight-61392

    01/26/2023, 10:29 PM
    yeah i saw, just forgot to actually do that lol
  • a

    ambitious-knife-25690

    01/26/2023, 10:42 PM
    niceeee
  • b

    billowy-waiter-28954

    01/26/2023, 10:44 PM
    @ambitious-knife-25690 Text left aligned:
    Copy code
    haxe
    text.align = LEFT;
    text.anchorX = 0;
    text.x = 0;
    text.fitWidth = parentWidth;
    right:
    Copy code
    haxe
    text.align = RIGHT;
    text.anchorX = 1;
    text.x = parentWidth;
    text.fitWidth = parentWidth;
    center:
    Copy code
    haxe
    text.align = CENTER;
    text.anchorX = 0.5;
    text.x = parentWidth * 0.5;
    text.fitWidth = parentWidth;
  • e

    elegant-twilight-61392

    01/26/2023, 10:49 PM
    i cant tell whats happening with colors right now lmao
  • h

    hallowed-ocean-84954

    01/26/2023, 10:49 PM
    Rgba vs argb ?
  • a

    ambitious-knife-25690

    01/26/2023, 10:50 PM
    yeah, colours threw me as well 😂
  • e

    elegant-twilight-61392

    01/26/2023, 10:50 PM
    so the
    backgroundColor
    property is HaxeUI's
    Color
    abstract, but godot has its own color class thats represented by a abstract in haxe too
  • a

    ambitious-knife-25690

    01/26/2023, 10:50 PM
    oo thanks i'll check!
  • a

    ambitious-knife-25690

    01/26/2023, 10:51 PM
    backgroundColor is an Int
  • e

    elegant-twilight-61392

    01/26/2023, 10:51 PM
    well its
    abstract Color(Int)
  • a

    ambitious-knife-25690

    01/26/2023, 10:51 PM
    I'd be surprised if it couldn't translate to to godot's color abstract without a need for conversion
  • e

    elegant-twilight-61392

    01/26/2023, 10:52 PM
    i have to do something to it obviously
  • a

    ambitious-knife-25690

    01/26/2023, 10:53 PM
    is it
    godot.variant.Color
    ?
  • e

    elegant-twilight-61392

    01/26/2023, 10:53 PM
    thats what the draw functions take
  • a

    ambitious-knife-25690

    01/26/2023, 10:53 PM
    okay yeah, it looks like it takes rgba
  • a

    ambitious-knife-25690

    01/26/2023, 10:53 PM
    and haxeui operates with rgb by default
  • a

    ambitious-knife-25690

    01/26/2023, 10:54 PM
    Copy code
    hx
    var alpha = 0x000000FF;
    var color = style.backgroundColor | alpha;
  • e

    elegant-twilight-61392

    01/26/2023, 10:59 PM
    Color.hex(style.backgroundColor | 0x000000FF)
    doesnt seem to work 🤔
  • e

    elegant-twilight-61392

    01/26/2023, 11:00 PM
    wait what
  • e

    elegant-twilight-61392

    01/26/2023, 11:00 PM
    i think the colors are inverted now
  • a

    ambitious-knife-25690

    01/26/2023, 11:05 PM
    try it in reverse
  • a

    ambitious-knife-25690

    01/26/2023, 11:05 PM
    Copy code
    alpha = 0xFF000000;
  • a

    ambitious-knife-25690

    01/26/2023, 11:14 PM
    ahhh thank you!
  • e

    elegant-twilight-61392

    01/26/2023, 11:24 PM
    haxeui seems to drop the alpha part which is fine i guess
  • e

    elegant-twilight-61392

    01/26/2023, 11:27 PM
    the 2nd trace is supposed to be
    (r, g, b, a)
  • a

    ambitious-knife-25690

    01/26/2023, 11:33 PM
    yeah, doing this will add it
  • a

    ambitious-knife-25690

    01/27/2023, 12:13 AM
    omg finally 😭
  • e

    elegant-twilight-61392

    01/27/2023, 12:19 AM
    this took way too long
  • e

    elegant-twilight-61392

    01/27/2023, 12:25 AM
    i just discovered something very cool that it can do
1...142514261427...1687Latest