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

    melodic-advantage-23638

    01/26/2023, 1:32 AM
    Then?
  • a

    ambitious-knife-25690

    01/26/2023, 1:33 AM
    most of haxeui's implementation (for ceramic anyway, and most of the backends) is like 5-6 files 😅 so tuning "new" obvious things aint a big task
  • e

    elegant-twilight-61392

    01/26/2023, 1:38 AM
    its not the efficiency of the solution im concerned about. it just seems like an overly complex way to do it that would require a lot of effort when there is probably a simpler way to solve the issue
  • a

    ambitious-knife-25690

    01/26/2023, 1:40 AM
    i'm browsing through the docs and it looks like you can just override
    _Draw
    ?
  • m

    melodic-advantage-23638

    01/26/2023, 1:40 AM
    @elegant-twilight-61392 I would do the drawing in Godot's _draw function
  • e

    elegant-twilight-61392

    01/26/2023, 1:41 AM
    yeah i can override _draw on the node, but its godot itself that calls it. how does it know what it needs to draw?
  • e

    elegant-twilight-61392

    01/26/2023, 1:41 AM
    maybe im overthinking things again
  • a

    ambitious-knife-25690

    01/26/2023, 1:42 AM
    well, all haxeui components will be a canvasitem right?
  • m

    melodic-advantage-23638

    01/26/2023, 1:42 AM
    Your ComponentImpl should derive from ComponentSurface which can be a typedef to thr node
  • a

    ambitious-knife-25690

    01/26/2023, 1:43 AM
    When your canvasitem/componentimpl is added to the stage haxeui does all the rest of the stuff
  • m

    melodic-advantage-23638

    01/26/2023, 1:43 AM
    You should be able to override the Godot draw function within ComponentImpl and have it render itself based on the style
  • e

    elegant-twilight-61392

    01/26/2023, 1:43 AM
    well it cant just be a typedef because haxeui (tries) extending it to add a
    _ready
    field (among lots of other things) and godot nodes have a
    _ready
    method
  • a

    ambitious-knife-25690

    01/26/2023, 1:43 AM
    iirc there was a conflict so overiding draw is an issue
  • m

    melodic-advantage-23638

    01/26/2023, 1:45 AM
    Okay so you'll need to add your own class that acts as a proxy
  • a

    ambitious-knife-25690

    01/26/2023, 1:45 AM
    try not to think about things, do as you think they should be and validate your thoughts
  • a

    ambitious-knife-25690

    01/26/2023, 1:46 AM
    i did something similar, trying to think how haxeui would communicate and was getting confused
  • a

    ambitious-knife-25690

    01/26/2023, 1:47 AM
    As for rendering, iirc, you said that you'll be adding canvasItem's to a godot scene - right?
  • e

    elegant-twilight-61392

    01/26/2023, 1:47 AM
    itll add canvasitems to the godot scene tree
  • m

    melodic-advantage-23638

    01/26/2023, 1:48 AM
    Is there a way to receive a signal when a canvas item's draw function is being called?
  • e

    elegant-twilight-61392

    01/26/2023, 1:48 AM
    i think only `Node`s can receive a signal
  • m

    melodic-advantage-23638

    01/26/2023, 1:49 AM
    Can you create a class that derives from CanvasItem and create it instead of CanvasItem
  • m

    melodic-advantage-23638

    01/26/2023, 1:49 AM
    And override its draw function
  • a

    ambitious-knife-25690

    01/26/2023, 1:50 AM
    nah, the inheritance tree would still have a conflict
  • e

    elegant-twilight-61392

    01/26/2023, 1:51 AM
    the haxeui component cant literally be a godot node
  • a

    ambitious-knife-25690

    01/26/2023, 1:51 AM
    it can
  • m

    melodic-advantage-23638

    01/26/2023, 1:51 AM
    Yeah I know that's not what I mean
  • e

    elegant-twilight-61392

    01/26/2023, 1:51 AM
    well it can, but not easily
  • a

    ambitious-knife-25690

    01/26/2023, 1:52 AM
    define easily?
  • e

    elegant-twilight-61392

    01/26/2023, 1:52 AM
    .
  • m

    melodic-advantage-23638

    01/26/2023, 1:52 AM
    I mean you are creating a canvasitem as a property of ComponentImpl right?
1...141314141415...1687Latest