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

    bright-gpu-74537

    02/28/2023, 4:25 PM
    yeah, its working if you give it a width, but not if you dont, which should be "the size of the text"... i think ceramic has some default size (openfl does too)
  • a

    ambitious-knife-25690

    02/28/2023, 4:56 PM
    nice 😄
  • a

    ambitious-knife-25690

    02/28/2023, 4:57 PM
    not sure if the way i did it is good tho
  • a

    ambitious-knife-25690

    02/28/2023, 4:57 PM
    if there's no _width, i set the text to fit the width of the parentComponent._width
  • a

    ambitious-knife-25690

    02/28/2023, 4:57 PM
    Copy code
    hx
    if (_width == null) {
      var parentWidth = @:privateAccess parentComponent._width;
      visual.fitWidth = parentWidth;
    }
  • a

    ambitious-knife-25690

    02/28/2023, 4:58 PM
    is there a public alternative?
  • b

    bright-gpu-74537

    02/28/2023, 4:58 PM
    thats not right, and its gonna have weird effects... if no width is specified ceramic should tell you the full width of the string... im sure there is a way to stop ceramic saying "ill default to 150" or whatever it is
  • a

    ambitious-knife-25690

    02/28/2023, 4:59 PM
    oh, there may be!
  • a

    ambitious-knife-25690

    02/28/2023, 5:00 PM
    yeah, looks like there is lol
  • a

    ambitious-knife-25690

    02/28/2023, 5:00 PM
    I rolled with old code, that I guess was left for experimenting with the same issue
  • b

    bright-gpu-74537

    02/28/2023, 5:00 PM
    looks good... no all the UI bits should stop that cramped thing
  • a

    ambitious-knife-25690

    02/28/2023, 5:20 PM
    much nicer
  • a

    ambitious-knife-25690

    02/28/2023, 5:35 PM
    found an issue with the text change
  • a

    ambitious-knife-25690

    02/28/2023, 5:36 PM
    what's the solution to something like this
  • a

    ambitious-knife-25690

    02/28/2023, 5:36 PM
    where there's no supplied width but I need to tell ceramic a max width to measure the text against
  • b

    bright-gpu-74537

    02/28/2023, 5:37 PM
    there will be a width supplied in that case... thats set to 100% presumably
  • b

    bright-gpu-74537

    02/28/2023, 5:37 PM
    which means _width will be set
  • a

    ambitious-knife-25690

    02/28/2023, 5:37 PM
    ah yes, this is set to 100%
  • a

    ambitious-knife-25690

    02/28/2023, 5:38 PM
    so is this working as intended?
  • b

    bright-gpu-74537

    02/28/2023, 5:38 PM
    nope, doesnt look to be... looks like it should be wrapping
  • a

    ambitious-knife-25690

    02/28/2023, 5:38 PM
    i'm guessing ceramic can't wrap the text without a known width
  • a

    ambitious-knife-25690

    02/28/2023, 5:39 PM
    ohh... i know what i need to do here
  • b

    bright-gpu-74537

    02/28/2023, 5:39 PM
    nothing will be able to wrap the text without a width
  • b

    bright-gpu-74537

    02/28/2023, 5:39 PM
    width will be needed to know where to wrap text (on any framework)
  • a

    ambitious-knife-25690

    02/28/2023, 5:40 PM
    there we go
  • b

    bright-gpu-74537

    02/28/2023, 5:40 PM
    and buttons still single line etc?
  • a

    ambitious-knife-25690

    02/28/2023, 5:41 PM
    yep
  • a

    ambitious-knife-25690

    02/28/2023, 5:41 PM
    everything remains functional
  • b

    bright-gpu-74537

    02/28/2023, 5:41 PM
    perfect... job done.. 👌
  • a

    ambitious-knife-25690

    02/28/2023, 5:41 PM
    the notification fade clearly works now as well
1...155315541555...1687Latest