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

    bright-gpu-74537

    05/22/2019, 5:00 PM
    wonder if its something to do with how the assets are loaded for the buttons
  • b

    bright-gpu-74537

    05/22/2019, 5:00 PM
    maybe the load too soon or something in the flash player
  • q

    quick-king-64105

    05/22/2019, 5:00 PM
    Is it properly hooked into the same asset manager as the rest of Flixel? Or doing its own thing?
  • q

    quick-king-64105

    05/22/2019, 5:01 PM
    Or do I even know what I'm talking about enough to make a coherent question?
  • b

    bright-gpu-74537

    05/22/2019, 5:01 PM
    it can do either / both... not sure how the flixel backend is wired up though
  • q

    quick-king-64105

    05/22/2019, 5:01 PM
    Think that's literally AssetManager.
  • b

    bright-gpu-74537

    05/22/2019, 5:02 PM
    i can confirm the same on flash
  • b

    brave-kangaroo-30399

    05/22/2019, 5:02 PM
    Every item could just be a FlxGroup, but then I’d need to implement position and all that again
  • b

    brave-kangaroo-30399

    05/22/2019, 5:02 PM
    It would be lighter weight than sprite group, but eh
  • q

    quick-king-64105

    05/22/2019, 5:03 PM
    I want to have a witty response to that, but I'm too tired >.<
  • q

    quick-king-64105

    05/22/2019, 5:04 PM
    Yeah, okay.
  • q

    quick-king-64105

    05/22/2019, 5:04 PM
    As far as I know, it's
    OpenFL.Assets
    by the time you get to me writing code.
  • q

    quick-king-64105

    05/22/2019, 5:04 PM
    Some files I have to parse the hard way are accessed via that.
  • q

    quick-king-64105

    05/22/2019, 5:05 PM
    Digging into what that really means under the hood is beyond my capability.
  • q

    quick-king-64105

    05/22/2019, 5:05 PM
    As to what haxeui-flixel is doing, specifically... MSGhero?
  • b

    bright-gpu-74537

    05/22/2019, 5:08 PM
    these are the functions that are being used for the inbuilt default theme:
  • b

    bright-gpu-74537

    05/22/2019, 5:08 PM
    Copy code
    haxe
        override function getImageFromHaxeResource(resourceId:String, callback:String->ImageInfo->Void):Void {
            trace(resourceId);
            var bytes = Resource.getBytes(resourceId);
            imageFromBytes(bytes, callback.bind(resourceId));
        }
        
        public override function imageFromBytes(bytes:Bytes, callback:ImageInfo->Void):Void {
            
            var ba:ByteArray = ByteConverter.fromHaxeBytes(bytes);
            
            var loader:Loader = new Loader();
            
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e) {
                
                if (loader.content != null) {
                    var frame = FlxImageFrame.fromImage(cast(loader.content, Bitmap).bitmapData).frame;
                    frame.parent.persist = true; // these two booleans will screw up the UI unless changed from the default values
                    frame.parent.destroyOnNoUse = false;
                    callback( { data : frame, width : Std.int(frame.sourceSize.x), height : Std.int(frame.sourceSize.y) } );
                }
            });
            
            loader.loadBytes(ba);
        }
  • b

    bright-gpu-74537

    05/22/2019, 5:08 PM
    i guess the simplest method might be to stop that and have them as flixel resources
  • b

    bright-gpu-74537

    05/22/2019, 5:08 PM
    havent tried that though
  • q

    quick-king-64105

    05/22/2019, 5:10 PM
    Merchaza!
  • q

    quick-king-64105

    05/22/2019, 5:11 PM
    I can't fathom doing that over just making them be part of Flixel's asset store.
  • b

    bitter-family-72722

    05/22/2019, 5:11 PM
    I was about to say "Unity has an asset store, but Flixel doesn't"...
  • b

    bright-gpu-74537

    05/22/2019, 5:11 PM
    well, that function is useful... sometimes you want to have assets in haxeui-core that are used by all the backends
  • q

    quick-king-64105

    05/22/2019, 5:12 PM
    Gama, I assume you knew what I meant XD Because I needs me them asset flips. Gotta' flip em all... and the tables they're presented on.
  • q

    quick-king-64105

    05/22/2019, 5:12 PM
    Ian, that much makes sense; is there not some way to just append to Flixel's asset listing?
  • q

    quick-king-64105

    05/22/2019, 5:13 PM
    I have to say this may qualify as the most architecturally insane project I've seen in a minute, at least to wrap my head around.
  • b

    bitter-family-72722

    05/22/2019, 5:14 PM
    do you know whether that would even fix anything at this point though?
  • q

    quick-king-64105

    05/22/2019, 5:14 PM
    I don't. Nor do I wish to waste the time of busy people. Nor am I capable of doing so to test it, as far as I'm aware.
  • b

    bitter-family-72722

    05/22/2019, 5:14 PM
    cast(loader.content, Bitmap).bitmapData
    would be nicer as
    (cast loader.content : Bitmap).bitmapData
    btw
  • b

    brave-kangaroo-30399

    05/22/2019, 5:45 PM
    Bleh
1...333435...1687Latest