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

    quick-king-64105

    08/07/2020, 11:21 AM
    ¯\_(ツ)_/¯
  • q

    quick-king-64105

    08/07/2020, 11:21 AM
    Compilation was fine when I updated all my haxelibs, ran the same as I expected given project state.
  • q

    quick-king-64105

    08/07/2020, 11:21 AM
    Must be doing something right 😄
  • q

    quick-king-64105

    08/07/2020, 11:22 AM
    But EOL is end of year, so... I mean, I'm literally only compiling to flash at this point because it's what the host supports. And they're overdue for HTML5 and have plenty of people starting to get annoyed with them 🙃
  • b

    bright-gpu-74537

    08/07/2020, 11:30 AM
    btw, here is the same functionality above but wrapped into a custom component, which i think is much neater 🙂
  • b

    bright-gpu-74537

    08/07/2020, 11:30 AM
    Copy code
    haxe
    @:build(haxe.ui.macros.ComponentMacros.build("assets/my-inventory.xml"))
    class MyInventory extends VBox {
        public function new() {
            super();
        }
        
        @:bind(add, MouseEvent.CLICK)
        private function onAdd(e) {
            lv.dataSource.add({ itemName: "some item #" + Std.random(100) });
        }
        
        @:bind(lv, ItemEvent.COMPONENT_EVENT)
        private function onItemEvent(e:ItemEvent) {
            if (e.source.id == "dropButton") {
                var itemToRemove = lv.dataSource.get(e.itemIndex);
                lv.dataSource.remove(itemToRemove);
            } else if (e.source.id == "useButton") {
                Toolkit.messageBox("Use: " + lv.dataSource.get(e.itemIndex).itemName, "Use me!", MessageBoxType.TYPE_INFO);
            }
        }
    }
  • q

    quick-king-64105

    08/07/2020, 11:30 AM
    the binds look for... elements matching that with ID?
  • q

    quick-king-64105

    08/07/2020, 11:31 AM
    And then the second is just event for the bind.
  • b

    bright-gpu-74537

    08/07/2020, 11:31 AM
    well, macro builds code to link up the listener to that function
  • q

    quick-king-64105

    08/07/2020, 11:32 AM
    You and your secret voodoo magic 😈
  • b

    bright-gpu-74537

    08/07/2020, 11:32 AM
    you get other nice things when using a custom component too, like items with ids becoming typed member vars of the class (ie, no more "findComponent")
  • q

    quick-king-64105

    08/07/2020, 11:32 AM
    Any specific way that sort of class needs defined or can it just be somewhere on my classpath?
  • b

    bright-gpu-74537

    08/07/2020, 11:33 AM
    anywhere on your class path is fine, its a normal class, except it needs the @:build macro ofc
  • q

    quick-king-64105

    08/07/2020, 11:33 AM
    nods
  • q

    quick-king-64105

    08/07/2020, 11:33 AM
    --> notices haxeui-heaps OWO WHAT DIS
  • q

    quick-king-64105

    08/07/2020, 11:34 AM
    I may or may not be tired of fighting with flixel for one lifetime
  • q

    quick-king-64105

    08/07/2020, 11:34 AM
    also using castledb, and that editor is being merged into the heaps edtior
  • b

    bright-gpu-74537

    08/07/2020, 11:35 AM
    well, if you dont use any flixel specific features while prototyping you could probably test out any backend you want
  • b

    bright-gpu-74537

    08/07/2020, 11:35 AM
    ie, if its "pure" haxeui then you arent limited to a framework
  • q

    quick-king-64105

    08/07/2020, 11:43 AM
    ¯\_(ツ)_/¯
  • q

    quick-king-64105

    08/07/2020, 11:43 AM
    Part of the appeal of HaxeUI is having some mobility in chiefly UI driven experiences.
  • q

    quick-king-64105

    08/07/2020, 11:43 AM
    When you're writing a text adventure game, it's almost entirely on the UI XD
  • q

    quick-king-64105

    08/07/2020, 11:44 AM
    I think all Flixel is handling is build, scenes/states, and a bit of the input handling code at the end of the day.
  • q

    quick-king-64105

    08/07/2020, 11:45 AM
    However, I also have other things, and that's when things get complicated and out of the scope of what you're likely to have any reason to help anyone with. Like a top-down zelda-like game. It'd be absurd to expect help from the UI lib's dev on the entire engine. At the same time, I do eventually have to decide where I'm throwing that if I want to actually work on it.
  • q

    quick-king-64105

    08/07/2020, 11:45 AM
    So yeah, that's way out of scope at the end of the day for me to really even address here XD
  • b

    bright-gpu-74537

    08/07/2020, 11:46 AM
    well, you can always ask questions, there are plenty of game devs around this discord (im not a game dev by any stretch of the imagination)
  • q

    quick-king-64105

    08/07/2020, 11:47 AM
    ... I had no intention of offending you. I really was just observing that an entire game engine is beyond the scope of a GUI library. 😦
  • b

    bright-gpu-74537

    08/07/2020, 11:48 AM
    im not offended in the slightest... 🙂
  • b

    bright-gpu-74537

    08/07/2020, 11:49 AM
    simply pointing out that when it comes to "game stuff" im certainly not a "go to guy" 😄
  • b

    blue-musician-14601

    08/08/2020, 1:46 PM
    Wondeirng if haxe-ui can be used with the heaps framework?
1...336337338...1687Latest