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

    full-journalist-82607

    01/30/2023, 3:55 PM
    It's for my quizeditor, it works for every type of card except for one where it crashes.
  • b

    bright-gpu-74537

    01/30/2023, 3:58 PM
    disableInteractivity is an internal call isnt it? Not sure you should be calling it directly...
  • b

    bright-gpu-74537

    01/30/2023, 3:58 PM
    maybe its not internal... cant remember now
  • b

    bright-gpu-74537

    01/30/2023, 3:59 PM
    and whats "the one" where it crashes?
  • f

    full-journalist-82607

    01/30/2023, 4:01 PM
    One moment, I clean everything, push the changes and give you an example file
  • f

    full-journalist-82607

    01/30/2023, 4:28 PM
    Done . For example you put dog food for the two questions. Saying this . It's not really important for me anymore ( but maybe is a deeper problem ?) , before I didn't want to use disabled ( because I wanted to use my own styling) , but now it's okay for me. (disabled = true actually seems to work) It's in Match Card ( ands call removeInteractivity at the end which calls disable Interactivity), you need to open the player drag the file inside it slect the tag UNTAGGED.
  • f

    full-journalist-82607

    01/30/2023, 4:36 PM
    Ok, so need it to explore it now, I feel I may have something
  • f

    full-journalist-82607

    01/30/2023, 4:46 PM
    Ok I think it was because the component was removed from the parent. 99 % sure I need to make a minimal case but I'm going to take a break instead 🙂
  • b

    bumpy-engineer-49082

    01/30/2023, 6:45 PM
    Is there a way to run html from file in HaxeUI(or another lib)?
  • b

    bright-gpu-74537

    01/30/2023, 6:56 PM
    you mean like an embedded browser?
  • b

    bumpy-engineer-49082

    01/30/2023, 7:56 PM
    No, like it just takes an .html file from game folder as input and renders it.
  • e

    elegant-twilight-61392

    01/30/2023, 7:57 PM
    haxeui xml is not html
  • e

    elegant-twilight-61392

    01/30/2023, 7:57 PM
    you could try to manually parse it and turn it into haxeui stuff
  • e

    elegant-twilight-61392

    01/30/2023, 7:58 PM
    also you wouldnt be able to use js (easily) unless you are targeting js
  • f

    full-journalist-82607

    01/30/2023, 7:59 PM
    What will be in your .html file ?
  • m

    most-caravan-45834

    01/30/2023, 8:34 PM
    I'm not sure I understand exactly how to manipulate lists in code. Is there a way to rename one of the items?
  • a

    ambitious-knife-25690

    01/30/2023, 8:37 PM
    I think it would be similar to the way you manipulate specific rows of a table
  • a

    ambitious-knife-25690

    01/30/2023, 8:37 PM
    by index
  • m

    most-caravan-45834

    01/30/2023, 8:43 PM
    I can get a reference to an item with
    Copy code
    haxe
    var item = animationList.dataSource.get(animationList.selectedIndex);
    But changing the reference doesn't actually change whatever the list is using. It's a copy of the internal content it seems.
  • m

    most-caravan-45834

    01/30/2023, 8:43 PM
    dataSource gives me clear means for adding and removing stuff, but not mutating stuff in place
  • m

    most-caravan-45834

    01/30/2023, 8:44 PM
    I want the order to stay the same and also for the selected item to remain the same as well
  • f

    full-journalist-82607

    01/30/2023, 8:45 PM
    you can then use update dataSource.update(animationList.selectedIndex, {text : "nexw text", icon:"new icon" })
  • b

    bumpy-engineer-49082

    01/30/2023, 8:45 PM
    A page, which I want to be customizable. User can replace this file with his own to change the view.
  • m

    most-caravan-45834

    01/30/2023, 8:45 PM
    Testing that
  • f

    full-journalist-82607

    01/30/2023, 8:45 PM
    or dataSource.update(animationList.selectedIndex, "new text") if it's a simple version
  • m

    most-caravan-45834

    01/30/2023, 8:46 PM
    It just works... thanks
  • f

    full-journalist-82607

    01/30/2023, 8:46 PM
    so it's basically like a haxeui xml file ?
  • b

    bumpy-engineer-49082

    01/30/2023, 8:46 PM
    //Haxe Virtual Machine for HTML5 and CSS class HaxeVM { //Declare variables var html:String; var css:String; //Constructor to initialize the variables public function new(html:String, css:String) { this.html = html; this.css = css; } //Function to parse the HTML and CSS code into a DOM tree public function parse():Void { //Create a DOM tree from the HTML code var domTree = haxe.xml.Parser.parse(html); //Parse the CSS code into a stylesheet object var styleSheet = haxe.css.StyleSheet.create(css); //Apply the stylesheet to the DOM tree styleSheet.apply(domTree); } //Function to render the DOM tree as an HTML page public function render():Void { //Render the DOM tree as an HTML page using haxe's html library var htmlPage = haxe.html.XmlTools.toHtml(domTree); //Print out the rendered HTML page trace(htmlPage); } //Function to execute all of our functions in order public function execute():Void { //Parse our HTML and CSS code into a DOM tree parse(); //Render our DOM tree as an HTML page render(); } }
  • b

    bumpy-engineer-49082

    01/30/2023, 8:47 PM
    That's what chatgpt gave me, but I don't have knowledge to change it the exact way.
  • b

    bumpy-engineer-49082

    01/30/2023, 8:48 PM
    No, js isn't meant to work.
1...144914501451...1687Latest