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

    most-caravan-45834

    05/24/2020, 12:37 AM
    script:
    Copy code
    haxe
    // Loading tmx file list
            {
                var files: Array<String> = FileSystem.readDirectory(tilemapPath);
    
                for(file in files)
                {
                    var path: Path = new Path(file);
    
                    if(path.ext == "tmx")
                    {
                        tilemapProperty.dataSource.add({
                            value: file
                        });
                    }
                }
            }
  • m

    most-caravan-45834

    05/24/2020, 12:37 AM
    This works fine:
    Copy code
    xml
    <?xml version="1.0" encoding="utf-8" ?>
    <vbox>
        <property-grid width="250" height="300">
            <property-group text="Primary Group">
                <property id="map_id" label="ID" />
                <property id="tilemap" label="Tile Map" type="list">
                    <data>
                        <item value="Item 1" />
                    </data>
                </property>
            </property-group>
        </property-grid>
    </vbox>
  • m

    most-caravan-45834

    05/24/2020, 12:38 AM
    This doesn't work:
    Copy code
    xml
    <?xml version="1.0" encoding="utf-8" ?>
    <vbox>
        <property-grid width="250" height="300">
            <property-group text="Primary Group">
                <property id="map_id" label="ID" />
                <property id="tilemap" label="Tile Map" type="list">
                    <data>
                    </data>
                </property>
            </property-group>
        </property-grid>
    </vbox>
  • m

    most-caravan-45834

    05/24/2020, 12:38 AM
    And this doesn't work as well:
    Copy code
    xml
    <?xml version="1.0" encoding="utf-8" ?>
    <vbox>
        <property-grid width="250" height="300">
            <property-group text="Primary Group">
                <property id="map_id" label="ID" />
                <property id="tilemap" label="Tile Map" type="list">
                </property>
            </property-group>
        </property-grid>
    </vbox>
  • m

    most-caravan-45834

    05/24/2020, 12:41 AM
    I'm working around that now but adding a "empty" option directly in the xml. Maybe it makes sense to have at least one, since one options must be selected at all times...
  • c

    clever-oil-61353

    05/24/2020, 3:10 AM
    @User Found this that explained the @build question earlier.......
  • b

    bright-gpu-74537

    05/24/2020, 7:56 AM
    so there are some issues with the property grid, i can get the property though
  • b

    bright-gpu-74537

    05/24/2020, 7:56 AM
    but i cant set any of the values (which looking at the code make sense :/ )
  • b

    bright-gpu-74537

    05/24/2020, 7:58 AM
    none of these work:
  • b

    bright-gpu-74537

    05/24/2020, 7:58 AM
    Copy code
    haxe
            stringProp.value = "New Value";
            boolProp.value = false;
            intProp.value = 102;
            listProp.dataSource = ArrayDataSource.fromArray([{value: "Item A"}, {value: "Item B"}, {value: "Item C"}]);
  • b

    bright-gpu-74537

    05/24/2020, 7:58 AM
    ... whoops! 😄
  • c

    clever-oil-61353

    05/24/2020, 8:07 AM
    lol, well, at least now you know
  • b

    bright-gpu-74537

    05/24/2020, 8:08 AM
    indeed
  • c

    clever-oil-61353

    05/24/2020, 8:13 AM
    been driving myself nuts trying to get ace editor working in haxeui textarea components..... think i'm close to having it figured out.... been another good learning experience.
  • c

    clever-oil-61353

    05/24/2020, 8:14 AM
    that reminds me, forgot to try something with xml
  • b

    bright-gpu-74537

    05/24/2020, 8:15 AM
    "getting ace editor to work with textarea components"
  • b

    bright-gpu-74537

    05/24/2020, 8:16 AM
    why not just wrap up ace editor into a custom component (like i did with the monaco editor)
  • c

    clever-oil-61353

    05/24/2020, 8:19 AM
    i did take a look through that.... i just couldnt quite figure out how you did it.
  • c

    clever-oil-61353

    05/24/2020, 8:22 AM
    i started using that custom component example you sent me , to work on getting it working with ace. i think i'm overlooking something. going to do some simple styling in xml, and then go from there with it and see where i get.
  • b

    bright-gpu-74537

    05/24/2020, 8:25 AM
    yeah, that custom component example is exactly the way to create a custom component out of ace (or monaco), its the same concept, just instead of the canvas and a fake external lib, its the ace lib and whatever the container is that ace uses (html by the sounds of things)
  • b

    bright-gpu-74537

    05/24/2020, 8:26 AM
    briefly looking at the ace docs it looks like is enough
  • c

    clever-oil-61353

    05/24/2020, 8:27 AM
    yeah, <div can be used for ace
  • c

    clever-oil-61353

    05/24/2020, 8:28 AM
    div....... pre....... or textarea..... i believe are the three different ways of it
  • b

    bright-gpu-74537

    05/24/2020, 8:30 AM
    OK, well, either way, the concept of the custom component with the canvas still applies... the difference being (if you want) is that if you want to use a div you can just use the custom components
    .element
    property (which is a div) rather than having to create an element (like the example did with the canvas element)
  • c

    clever-oil-61353

    05/24/2020, 8:31 AM
    nice, that sounds good to me.
  • f

    fast-rain-20339

    05/24/2020, 9:34 AM
    Heyo Ian, I finally figured out why Linux/Kha wasn't loading resources. You have to run the kha build from the folder the executable is in - no modifications to source, checkout Roboto on linux 😄
  • f

    fast-rain-20339

    05/24/2020, 9:34 AM
    Thanks so much for your help awhile ago, I'm very excited about this project.
  • c

    clever-oil-61353

    05/24/2020, 9:36 AM
    awesome
  • c

    clever-oil-61353

    05/24/2020, 9:36 AM
    good to know
  • b

    bright-gpu-74537

    05/24/2020, 9:49 AM
    good stuff...
1...229230231...1687Latest