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

    bright-gpu-74537

    05/08/2020, 7:31 PM
    actually, im not sure what you mean now, the item renderers have a background color (in the default theme) not the listview
  • b

    bright-gpu-74537

    05/08/2020, 7:35 PM
    http://haxeui.org/builder/?tnnkbk
  • b

    bright-gpu-74537

    05/08/2020, 7:35 PM
    ?
  • b

    brave-kangaroo-30399

    05/08/2020, 9:30 PM
    Ohhhhhhh I guess I was seeing the item renderer boxes
  • b

    brave-kangaroo-30399

    05/08/2020, 9:31 PM
    I'll have to look at it again, and I forgot how to access them via css as well, so that example helps
  • b

    bright-gpu-74537

    05/10/2020, 11:45 AM
    done... ... i think!
  • b

    bright-gpu-74537

    05/10/2020, 11:48 AM
    ... .. nope... missed some... so tired of looking at it now 😄
  • c

    clever-oil-61353

    05/10/2020, 1:37 PM
    Looks great.
  • w

    wide-greece-63479

    05/11/2020, 3:35 PM
    Hello again! What's the current state of TreeViews?
  • w

    wide-greece-63479

    05/11/2020, 3:36 PM
    The TreeView used in Kode Garden, is that one compatible with current HaxeUI?
  • b

    bright-gpu-74537

    05/11/2020, 5:09 PM
    @User - currently there isnt any "official" treeview in haxeui-core, i have one that ive been using:
  • b

    bright-gpu-74537

    05/11/2020, 5:10 PM
    but its not in haxeui-core because its pretty basic (you have to populate it via code and it doesnt use item renderers). Ive been meaning to do it properly, but just havent had the time
  • b

    bright-gpu-74537

    05/11/2020, 5:11 PM
    the one in kodegarden probably still works, but this one is better (even though there is alot of room for improvement), so ive extracted it and added it to a blank project with a little example of use:
  • b

    bright-gpu-74537

    05/11/2020, 5:13 PM
    for now that will have to do im afraid... ... ... and ofc, no native counterpart as of yet 🙂
  • w

    wide-greece-63479

    05/11/2020, 7:27 PM
    Ah, thanks! 🙂
  • f

    fast-rain-20339

    05/12/2020, 9:27 AM
    Hi @User, Haxe UI looks great 🙂 I'm starting a UI heavy project and hopefully I can use it. I'm using Kha and have the template project building, but can't change the font from Arial (in xml). I've tried
    fontName
    , which it seems the default styling uses, and also
    font-family
    and
    @font-face
    , but none seem to work. I've got
    Roboto.ttf
    in /assets/.
  • b

    bright-gpu-74537

    05/12/2020, 9:44 AM
    funnily enough i was just looking at font handling (but not for haxeui-kha)... i cant remember exactly how they work in kha, but ill have a play and get back to you
  • f

    fast-rain-20339

    05/12/2020, 9:45 AM
    That'd be awesome, thanks 👍
  • c

    clever-oil-61353

    05/12/2020, 9:45 AM
    i was about to attempt to help lol
  • b

    bright-gpu-74537

    05/12/2020, 9:45 AM
    ... ... go for it! Im not going to look at it till later anyway, as im in meetings fairly solidly today
  • c

    clever-oil-61353

    05/12/2020, 9:46 AM
    saw where you had helped someone with this..... " Ok, thanks for the project, i think the issue is the name in the css font-family... it should be font-name... eg: .label { /* NOTE: this will change all labels */ font-name: "assets/fonts/hack.ttf"; }"
  • c

    clever-oil-61353

    05/12/2020, 9:46 AM
    https://github.com/haxeui/haxeui-flixel/issues/14
  • f

    fast-rain-20339

    05/12/2020, 9:46 AM
    I'll try that, cheers
  • b

    bright-gpu-74537

    05/12/2020, 9:47 AM
    cool - let us know if it doesnt work... since that is flixel (not kha)... you may also need to package up your font, either as haxe resources or however kha does it
  • b

    bright-gpu-74537

    05/12/2020, 9:48 AM
    (either would work fyi - haxeui can handle haxe resources or framework "native" resources - at least that should be the case)
  • b

    bright-gpu-74537

    05/12/2020, 9:50 AM
    ok, so looking briefly at haxeui-kha assetsimpl:
  • b

    bright-gpu-74537

    05/12/2020, 9:50 AM
    Copy code
    haxe
        private override function getFontInternal(resourceId:String, callback:FontInfo->Void):Void {
            var font = Assets.fonts.get(resourceId);
            if (font != null) {
                callback({ data: font });
            } else {
                callback(null);            
            }
        }
    
        private override function getFontFromHaxeResource(resourceId:String, callback:String->FontInfo->Void) {
            var bytes:Bytes = Resource.getBytes(resourceId);
            var fontInfo = {
                data: Font.fromBytes(bytes)
            }
            callback(resourceId, fontInfo);
        }
  • b

    bright-gpu-74537

    05/12/2020, 9:51 AM
    so it either needs to be a haxe resource (either manually using --resource my.ttf@bob.tff) or using a module.xml, or using kha assets so its exists in "Assets.fonts"
  • f

    fast-rain-20339

    05/12/2020, 9:51 AM
    Ah, so it is
    font-name
    but asset packaging is still an issue. I noticed
    font-name: "styles/default/arial.ttf";
    here https://github.com/haxeui/haxeui-kha/blob/5205dea3d98ed91790e7a8f11b7b637c289ab6fb/haxe/ui/backend/kha/_module/styles/default/main.css#L2. There is a
    droid_sans.ttf
    in that folder, if I put
    font-name: "styles/default/droid_sans.ttf";
    in my code is changes the font to droid_sans.
  • f

    fast-rain-20339

    05/12/2020, 9:52 AM
    Hm alright thanks
1...205206207...1687Latest