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

    bright-gpu-74537

    06/18/2019, 10:05 PM
    heres a working example:
  • b

    bright-gpu-74537

    06/18/2019, 10:05 PM
    Copy code
    xml
        <scrollview width="300" height="100" contentWidth="100%">
            <hbox continuous="true" width="100%">
                <button text="Button 1" />
                <button text="Button 2" />
                <button text="Button 3" />
                <button text="Button 4" />
                <button text="Button 5" />
                <button text="Button 6" />
                <button text="Button 7" />
                <button text="Button 8" />
                <button text="Button 9" />
                <button text="Button 10" />
                <button text="Button 11" />
                <button text="Button 12" />
                <button text="Button 13" />
                <button text="Button 14" />
                <button text="Button 15" />
            </hbox>
        </scrollview>
  • b

    bright-gpu-74537

    06/18/2019, 10:06 PM
    @sparse-table-35282
  • f

    fierce-restaurant-45913

    06/18/2019, 11:22 PM
    @bright-gpu-74537 i have this error with my customUI component``` C:/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/Macros.hx:270: characters 20-35 : Not enough arguments, expected newsFormType:Int, allNews:ftp.AllNews, news:Null src/scene/customUI/NewsForm.hx:21: lines 21-117 : Defined in this class```
  • b

    bright-gpu-74537

    06/18/2019, 11:27 PM
    generally haxeui components dont have constructor params... it makes it harder / impossible to use from xml
  • b

    bright-gpu-74537

    06/18/2019, 11:27 PM
    you could probably give them default values, and it should work
  • f

    fierce-restaurant-45913

    06/18/2019, 11:30 PM
    yeah it work 😃
  • f

    fierce-restaurant-45913

    06/19/2019, 7:49 AM
    when you write a class image XD
  • b

    bright-gpu-74537

    06/19/2019, 8:09 AM
    :/
  • b

    bright-gpu-74537

    06/19/2019, 8:09 AM
    defo something wrong there! 😄
  • b

    bright-gpu-74537

    06/19/2019, 8:09 AM
    code? 😃
  • f

    fierce-restaurant-45913

    06/19/2019, 8:54 AM
    Copy code
    .image {
        width: 100%;
        height: 100%;
        resource: "http://cdn.pixabay.com/photo/2016/03/31/19/13/icon-1294806_960_720.png";
    }
  • f

    fierce-restaurant-45913

    06/19/2019, 8:55 AM
    i think when you alter image class it apply to all image include messagebox image scrollbar icon...
  • b

    bright-gpu-74537

    06/19/2019, 9:06 AM
    yeah, so you need to understand something about haxeui css:
  • b

    bright-gpu-74537

    06/19/2019, 9:06 AM
    .image does apply to all images
  • b

    bright-gpu-74537

    06/19/2019, 9:06 AM
    its the name of the class
  • b

    bright-gpu-74537

    06/19/2019, 9:06 AM
    so if you do
    .button { background-color: red }
    then all buttons will be red
  • b

    bright-gpu-74537

    06/19/2019, 9:07 AM
    its the same as if you did
    Button { background-color: red }
  • b

    bright-gpu-74537

    06/19/2019, 9:08 AM
    in fact, each component (essentially in its constructor) adds
    addClass(Type.getClassName(Type.getClass(this).toLowerCase())
  • b

    bright-gpu-74537

    06/19/2019, 9:10 AM
    so, you can either give your image an id ("#myImage { ... }") or a style name (".mystyle { }") or refer to it by location somehow (".vbox .hbox #something .button .image {}" - just a silly example)
  • b

    bright-gpu-74537

    06/19/2019, 9:11 AM
    you can be specific too: "Button.myStyle", "Image#myId"
  • f

    fierce-restaurant-45913

    06/19/2019, 9:12 AM
    yeah i already fixed that but i find it funny
  • b

    bright-gpu-74537

    06/19/2019, 9:13 AM
    sure, but not much you can do about it... i mean, thats CSS... ... if you do in "normal" web css: "img { width: 100%, height: 100%}" then you'll get similar strange results
  • s

    sparse-table-35282

    06/19/2019, 1:27 PM
    @bright-gpu-74537 changed my VBox/ScrollView/HBox to be an absolute and I'm in business!
  • b

    bright-gpu-74537

    06/19/2019, 1:31 PM
    cool - you should still be able to use an absolute in a scrollview
  • s

    sparse-table-35282

    06/19/2019, 1:42 PM
    I shouldn't need it at this time, but I'll keep that in mind 😃
  • s

    sparse-table-35282

    06/19/2019, 1:43 PM
    Now I just need to figure out why my placeholder text doesn't disappear when I click in the text field
  • s

    sparse-table-35282

    06/19/2019, 1:44 PM
    works in my kha example, but not my main app
  • s

    sparse-table-35282

    06/19/2019, 1:44 PM
    that's a problem I can live with though
  • b

    bright-gpu-74537

    06/19/2019, 1:49 PM
    fair enough... open an issue if you can, always good to get things squared away - but sounds like its not a show stopper for you so... ... great 😃
1...697071...1687Latest