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

    ambitious-knife-25690

    02/03/2023, 1:29 PM
    the colours are contextual enough where i think the intention would fit in most applications/uses
  • b

    bright-gpu-74537

    02/03/2023, 1:30 PM
    yeah, i think that is pretty accurate
  • b

    bright-gpu-74537

    02/03/2023, 1:30 PM
    and ive used these colours in the validators too... so thats already arguably going against my "coloured" rule
  • h

    helpful-oxygen-79589

    02/03/2023, 8:59 PM
    hi! i was wondering if anyone would know how i could possibly implement the ColorPicker Component into a flixel Game im making
  • b

    bright-gpu-74537

    02/03/2023, 8:59 PM
    doesnt it already work?
  • b

    bright-gpu-74537

    02/03/2023, 8:59 PM
    oh... ... ... no canvas on haxeui-flixel yet
  • h

    helpful-oxygen-79589

    02/03/2023, 9:00 PM
    oh oke
  • b

    bright-gpu-74537

    02/03/2023, 9:00 PM
    doesnt seem like it should be hard though... kha is also missing iirc (and wx)
  • h

    helpful-oxygen-79589

    02/03/2023, 9:01 PM
    ok ill look a bit into it to see if i can implement it from haxeui-core
  • b

    bright-gpu-74537

    02/03/2023, 9:01 PM
    that'd be ideal, ofc, its "quite" simple... series of draw commands (cached or otherwise)
  • b

    bright-gpu-74537

    02/03/2023, 9:02 PM
    i guess the question is does flixel expose "line", or "circle"... or, for colour picker, "setPixels"
  • b

    bright-gpu-74537

    02/03/2023, 9:04 PM
    https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/backend/ComponentGraphicsBase.hx
  • b

    bright-gpu-74537

    02/03/2023, 9:04 PM
    Copy code
    // base graphics class, does nothing except cache draw commands - some backends dont need (or want) caching, which which case the impl will simply not call super
  • h

    helpful-oxygen-79589

    02/03/2023, 9:04 PM
    i think it would most likely be the setPixels method on BitmapData
  • b

    bright-gpu-74537

    02/03/2023, 9:05 PM
    agreed, and i guess one bitmap per canvas - i think that makes sense
  • h

    helpful-oxygen-79589

    02/03/2023, 9:05 PM
    you can also access this using FlxSprite.pixels.setPixels as i believe the pixels variable is a BitmapData (?)
  • h

    helpful-oxygen-79589

    02/03/2023, 9:05 PM
    ill check rn
  • h

    helpful-oxygen-79589

    02/03/2023, 9:05 PM
    yup
  • b

    bright-gpu-74537

    02/03/2023, 9:05 PM
    the "proof" is that you can play an animated gif via "Animation"
  • b

    bright-gpu-74537

    02/03/2023, 9:06 PM
    or, as you are after, the colour picker
  • h

    helpful-oxygen-79589

    02/03/2023, 9:06 PM
    yeah
  • b

    bright-gpu-74537

    02/03/2023, 9:07 PM
    they both involve setting bitmap data (in essence)
  • h

    helpful-oxygen-79589

    02/03/2023, 9:07 PM
    ill have to take a look at the colorPicker code
  • h

    helpful-oxygen-79589

    02/03/2023, 9:07 PM
    im pretty sure it uses the xml bridge right
  • b

    bright-gpu-74537

    02/03/2023, 9:08 PM
    i think its the wrong angle, i would look at the canvas code... if you get that working you get gif animation, colour gradients, etc, etc
  • h

    helpful-oxygen-79589

    02/03/2023, 9:09 PM
    oh ok
  • h

    helpful-oxygen-79589

    02/03/2023, 9:09 PM
    ill take a look at that
  • b

    bright-gpu-74537

    02/03/2023, 9:09 PM
    setpixels specifically
  • b

    bright-gpu-74537

    02/03/2023, 9:09 PM
    the rest (primitives) you can ignore for now (i would say)
  • b

    bright-gpu-74537

    02/03/2023, 9:12 PM
    https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/components/ColorPicker.hx#L256
1...146014611462...1687Latest