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

    bright-gpu-74537

    06/03/2020, 9:48 PM
    what did it look like (i mean the xml) before when it didnt work with widths/heights
  • u

    user

    06/03/2020, 9:48 PM
    width at 100%
  • u

    user

    06/03/2020, 9:49 PM
    on a vbox set at percentWidth = 16
  • b

    bright-gpu-74537

    06/03/2020, 9:49 PM
    yeah, exactly, if you are making a custom composite component out of existing components, then you dont really need behaviors because they are all set up for you in haxeui-core
  • u

    user

    06/03/2020, 9:49 PM
    getter/setter working too!
  • b

    bright-gpu-74537

    06/03/2020, 9:49 PM
    🙂
  • b

    bright-gpu-74537

    06/03/2020, 9:50 PM
    not sure if you are using a module.xml but you can also expose that to haxeui so you can use it in xml also
  • u

    user

    06/03/2020, 9:50 PM
    yes, module.xml
  • u

    user

    06/03/2020, 9:52 PM
    is working
  • u

    user

    06/03/2020, 9:53 PM
    ok, so it was the height=100% with bugged it
  • u

    user

    06/03/2020, 9:53 PM
    but I don't know why
  • u

    user

    06/03/2020, 9:53 PM
    .error { font-size: 14px; color: red; font-style: italic; } .hint { font-size: 14px; font-style: italic; }
  • u

    user

    06/03/2020, 9:53 PM
    this doesn't work
  • u

    user

    06/03/2020, 9:53 PM
    remove the height="100%" and everything will be fine
  • b

    bright-gpu-74537

    06/03/2020, 9:53 PM
    ok, so when you use @:build it creates a wrapper component around your custom component
  • b

    bright-gpu-74537

    06/03/2020, 9:53 PM
    eg:
  • b

    bright-gpu-74537

    06/03/2020, 9:54 PM
    Copy code
    <vbox>
        <button />
    </vbox>
  • u

    user

    06/03/2020, 9:55 PM
    yes it's why I have @:build(haxe.ui.macros.ComponentMacros.build("assets/ui/moduletextfield.xml")) class ModuleTextField extends VBox { public var tfText(get, set):String; private function get_tfText():String { return hint.text; } private function set_tfText(value:String):String { hint.text = value; return value; } public function new() { super(); percentWidth=16; } }
  • b

    bright-gpu-74537

    06/03/2020, 9:55 PM
    Copy code
    @:build(...)
    MyComponent extends HBox {
    }
  • b

    bright-gpu-74537

    06/03/2020, 9:55 PM
    this is "essentially" like having:
  • u

    user

    06/03/2020, 9:55 PM
    but without height anywhere, it seems it's lost
  • b

    bright-gpu-74537

    06/03/2020, 9:55 PM
    Copy code
    <hbox>
        <vbox>
            <button />
        </vbox>
    </hbox>
  • b

    bright-gpu-74537

    06/03/2020, 9:56 PM
    so when you use % heights, you are "essentially" saying:
  • b

    bright-gpu-74537

    06/03/2020, 9:56 PM
    Copy code
    <hbox>
        <vbox width="100%">
            <button />
        </vbox>
    </hbox>
  • b

    bright-gpu-74537

    06/03/2020, 9:56 PM
    in which case haxeui is like "100%" of what??
  • b

    bright-gpu-74537

    06/03/2020, 9:56 PM
    so
  • u

    user

    06/03/2020, 9:56 PM
    yes, it's the talk we already had
  • u

    user

    06/03/2020, 9:56 PM
    I find it strange...
  • u

    user

    06/03/2020, 9:56 PM
    it's not 0
  • u

    user

    06/03/2020, 9:57 PM
    but what it is..?
1...257258259...1687Latest