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

    magnificent-caravan-75149

    08/10/2019, 4:45 PM
    background-size css parameter doesn't seem to be working. is there another way to size a background image for a vbox?
  • u

    user

    08/10/2019, 7:40 PM
    Depends on the backend and how you wrote it. Could you share the xml that you tried ?
  • b

    bright-gpu-74537

    08/11/2019, 9:17 AM
    @limited-advantage-32748 - just looked at your issue again... You should be using the class
    HorizontalSlider
    (rather than
    Slider
    )... that implements the functions... that said, it would be nice maybe to somehow be able to use
    Slider
    also... ill have a think, but the "fix" is to use the "Horizontal" or "Vertical" variants of classes (Slider, Scroll, Progress, Range) - ill have a think about the making this a little more sensible
  • b

    bright-gpu-74537

    08/11/2019, 9:18 AM
    (having seperate classes is needed though, mainly for native counterparts where often they are totally different widget classes)
  • b

    bright-gpu-74537

    08/11/2019, 9:19 AM
    @magnificent-caravan-75149 - i dont think there is a background image size in haxeui... but i think there is something else... just looking now
  • b

    bright-gpu-74537

    08/11/2019, 9:20 AM
    try:
  • b

    bright-gpu-74537

    08/11/2019, 9:20 AM
    background-image-repeat: stretch
  • b

    bright-gpu-74537

    08/11/2019, 9:21 AM
    adding size probably makes sense... i mean, you can either repeat or stretch... but say you wanted 75% or s 800px... ... well, that doesnt look like its supported...
  • b

    bright-gpu-74537

    08/11/2019, 9:21 AM
    there is a workaround (use an Image) but probably adding a background image size prop makes sense also
  • b

    bright-gpu-74537

    08/11/2019, 9:22 AM
    workaround:
  • b

    bright-gpu-74537

    08/11/2019, 9:22 AM
    Copy code
    xml
    <box width="..." height="...">
        <image width="100%" height="100%>
        <vbox>
            <button text="The rest of my UI" />
        </vbox>
    </box>
  • b

    bright-gpu-74537

    08/11/2019, 9:23 AM
    not ideal, but if you are looking for non 100% background (ie, not
    background-image-repeat: stretch
    ) then this should work until size is added
  • l

    limited-advantage-32748

    08/11/2019, 2:01 PM
    @bright-gpu-74537 at the time of when I brought it up, the horizontal slider wasn’t available as I didn’t see a class. I’ll double check that
  • l

    limited-advantage-32748

    08/11/2019, 3:06 PM
    What the hell, now it's telling me the class exists
  • l

    limited-advantage-32748

    08/11/2019, 3:07 PM
    I hate libraries sometimes
  • l

    limited-advantage-32748

    08/11/2019, 3:07 PM
    Sorry for the trouble man
  • m

    magnificent-caravan-75149

    08/11/2019, 6:16 PM
    @bright-gpu-74537 that worked great...
  • m

    magnificent-caravan-75149

    08/11/2019, 6:18 PM
    @bright-gpu-74537 is Opacity working for components? I would like to tween a splash image fading it in and out.
  • b

    bitter-family-72722

    08/11/2019, 7:57 PM
    https://community.haxe.org/t/uhh-what-happened-to-the-haxeui-web-site/1957
  • b

    bright-gpu-74537

    08/12/2019, 6:50 AM
    thanks @bitter-family-72722 - replied there and created a post on the forum
  • b

    bright-gpu-74537

    08/12/2019, 7:15 AM
    @magnificent-caravan-75149 -
    opacity
    and
    background-opacity
    should work... are they not for you? What backend?
  • b

    bright-gpu-74537

    08/12/2019, 7:15 AM
    you can do the animation yourself if you want, or, you could use css animations also, something like:
  • b

    bright-gpu-74537

    08/12/2019, 7:15 AM
    Copy code
    xml
        <style>
            @keyframes fade {
                0% {
                    opacity: 0;
                }
                100% {
                    opacity: 1;
                }
            }
            
            #ex1.fadeIn {
                animation: fade 0.5s ease 0s 1;
            }
            
            #ex1.fadeOut {
                animation: fade 0.5s ease 0s 1 reverse backwards;
            }
            
        </style>
        
        <image id="ex1" resource="haxeui-core/styles/default/haxeui.png" style="opacity: 0;" />
        <button text="fadeIn" onclick="ex1.swapClass('fadeIn', 'fadeOut')" />
        <button text="fadeOut" onclick="ex1.swapClass('fadeOut', 'fadeIn')" />
  • b

    bright-gpu-74537

    08/12/2019, 7:16 AM
    (note i just added the
    swapClass
    call, so you'll need latest master, but you could do the same anyway with
    addClass
    &
    removeClass
    )
  • b

    bright-gpu-74537

    08/12/2019, 7:53 AM
    so this hanging of the haxe 3 compiler is strange... it doesnt happen on some backends
  • b

    bright-gpu-74537

    08/12/2019, 8:07 AM
    https://pastebin.com/4HmyLxR8
  • b

    bright-gpu-74537

    08/12/2019, 8:45 AM
    ok, well, ive tracked it down to where its coming from... now to work out a fix
  • b

    bright-gpu-74537

    08/12/2019, 9:46 AM
    @loud-salesclerk-7438 - your issue (https://github.com/haxeui/haxeui-core/issues/288) should be fixed, can you let me know if that did indeed solve it
  • b

    bright-gpu-74537

    08/12/2019, 9:46 AM
    its more of a work around than a fix, but will suffice for now until i get some more time... long story short "@:xml" metadata caused issues in haxe 3 😦
  • h

    handsome-television-62908

    08/12/2019, 9:57 AM
    @bright-gpu-74537 hey man! The heaps back-end doesn't work with HashLink yet, does it?
1...939495...1687Latest