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

    ambitious-knife-25690

    04/17/2023, 12:23 AM

    https://cdn.discordapp.com/attachments/565569107701923852/1097316264269070356/image.png▾

  • a

    ambitious-knife-25690

    04/17/2023, 12:23 AM
    just a body and a footer, the dialog "box" can contain anything you want
  • a

    ambitious-knife-25690

    04/17/2023, 12:25 AM
    there's a trick! 😄
  • a

    ambitious-knife-25690

    04/17/2023, 12:25 AM
    dialog.addClass("no-title");
  • a

    ambitious-knife-25690

    04/17/2023, 12:25 AM
    there's probably a similar thing for footer
  • h

    helpful-boots-41914

    04/17/2023, 12:28 AM
    Okay gotcha, I am still looking into this however and I'm not able to replicate the effect of the dialog. But what I want is for the dialog to not be closable manually . . . Basically I need an overlay and a dialog really isn't an overlay but has some similar features. It should be easy but I'm experiencing some oddities
  • h

    helpful-boots-41914

    04/17/2023, 12:29 AM
    Like, wouldn't you expect this to make the screen black??
    Copy code
    haxe
    var modal:Component = new Component();
    modal.percentHeight = modal.percentWidth = 100;
    modal.backgroundColor = ColorUtil.parseColor("black");
    HaxeUIApp.instance.addComponent(modal);
  • a

    ambitious-knife-25690

    04/17/2023, 12:30 AM
    what does it produce?
  • a

    ambitious-knife-25690

    04/17/2023, 12:30 AM
    does it work on the builder?
  • h

    helpful-boots-41914

    04/17/2023, 12:31 AM
    Actually even weirder on the builder
  • a

    ambitious-knife-25690

    04/17/2023, 12:31 AM
    what might be happening there is an incorrect color int from colorutil and kha
  • h

    helpful-boots-41914

    04/17/2023, 12:32 AM
    Well I just am trying to figure out how to duplicate the modal effect and all it is is a component with a background color and opacity added to the screen.
  • h

    helpful-boots-41914

    04/17/2023, 12:33 AM
    It works on Kha (the modal part of things) but trying to replicate it isn't
  • a

    ambitious-knife-25690

    04/17/2023, 12:34 AM
    Copy code
    _overlay.id = "modal-background";
                    _overlay.addClass("modal-background");
  • a

    ambitious-knife-25690

    04/17/2023, 12:34 AM
    ian's implementation has this
  • a

    ambitious-knife-25690

    04/17/2023, 12:34 AM
    might be some special css he has somewhere
  • h

    helpful-boots-41914

    04/17/2023, 12:34 AM
    I looked at the css for modal-background it's exactly what I'm doing lol
  • a

    ambitious-knife-25690

    04/17/2023, 12:34 AM
    oh lol
  • h

    helpful-boots-41914

    04/17/2023, 12:53 AM
    Got it working this way. Apparently needed to use
    Screen
    and change how I got colors.
    Copy code
    haxe
    var modal:Component = new Component();
    modal.percentHeight = modal.percentWidth = 100;
    modal.backgroundColor = haxe.ui.util.Color.fromString("whitesmoke");
    modal.opacity = 0.65;
    Screen.instance.addComponent(modal);
  • h

    helpful-boots-41914

    04/17/2023, 5:35 AM
    (however not sure why it took me adding it to the screen to get this affect)
  • b

    bright-gpu-74537

    04/17/2023, 6:06 AM
    where were you adding it before?
  • h

    helpful-boots-41914

    04/17/2023, 6:41 AM
    I was adding it anywhere that made sense... Like in the same container, to the app instance, it just wasn't working
  • b

    bright-gpu-74537

    04/17/2023, 6:57 AM
    certainly should have worked, i do something similar quite often to sort of "lock" a form, or a list, etc
  • b

    bright-gpu-74537

    04/17/2023, 7:06 AM
    http://haxeui.org/builder/?331787cc
  • b

    bright-gpu-74537

    04/17/2023, 7:06 AM
    seems fine
  • h

    helpful-boots-41914

    04/17/2023, 7:39 AM
    Right, that works on the builder which I think I found was the case too, but not in kha. I'll have a test when I wake up tomorrow
  • b

    bright-gpu-74537

    04/17/2023, 7:42 AM
    oh, its a kha issue specifically?
  • b

    bright-gpu-74537

    04/17/2023, 7:53 AM

    https://cdn.discordapp.com/attachments/565569107701923852/1097429531612164156/kha-overlay.gif▾

  • b

    bright-gpu-74537

    04/17/2023, 7:53 AM
    ... kha
  • b

    bright-gpu-74537

    04/17/2023, 7:53 AM
    ¯\_(ツ)_/¯
1...163716381639...1687Latest