https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • I was mostly curious - no comments and most of what I get from a discord search seems to concern flixel
    f

    few-pizza-8232

    04/02/2023, 9:06 PM
    I was mostly curious - no comments and most of what I get from a discord search seems to concern flixel
  • the reason its abstracted is because you can also (doesnt exist currently) a controller input source, or remote input source, etc
    b

    bright-gpu-74537

    04/02/2023, 9:06 PM
    the reason its abstracted is because you can also (doesnt exist currently) a controller input source, or remote input source, etc
  • Oh cool, I'll keep that in mind
    f

    few-pizza-8232

    04/02/2023, 9:06 PM
    Oh cool, I'll keep that in mind
  • well, tbh, the point is that you dont need to concern yourself with any of it... thats handled by core... the backend is just responsible for a) drawing boxes and b) letting core know when certain user input happens
    b

    bright-gpu-74537

    04/02/2023, 9:07 PM
    well, tbh, the point is that you dont need to concern yourself with any of it... thats handled by core... the backend is just responsible for a) drawing boxes and b) letting core know when certain user input happens
  • I don't need to concern myself *today* but it's good to know there's an entry point for that kind of thing if I want to concern myself down the line
    f

    few-pizza-8232

    04/02/2023, 9:08 PM
    I don't need to concern myself today but it's good to know there's an entry point for that kind of thing if I want to concern myself down the line
  • gotcha, yeah, the idea is certainly to be flexible
    b

    bright-gpu-74537

    04/02/2023, 9:08 PM
    gotcha, yeah, the idea is certainly to be flexible
  • in fact, all the tabbing and "up down" to select items in lists, dismiss dialogs etc, is all (effectively) from this line: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/module.xml#L295-L297
    b

    bright-gpu-74537

    04/02/2023, 9:09 PM
    in fact, all the tabbing and "up down" to select items in lists, dismiss dialogs etc, is all (effectively) from this line: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/module.xml#L295-L297
  • that takes keys and interprets them as "actions" and then components respond to actions... where the actions come from is essentially irrelevant (to the component)
    b

    bright-gpu-74537

    04/02/2023, 9:10 PM
    that takes keys and interprets them as "actions" and then components respond to actions... where the actions come from is essentially irrelevant (to the component)
  • So if I wanted to, say, set up my own hotkeys, or modifier keys, I could add another `IActionInputSource` implementing class in my own `module.xml`, and either pass new strings around as `ActionType` or "extend" the abstract with file shadowing?
    f

    few-pizza-8232

    04/02/2023, 9:19 PM
    So if I wanted to, say, set up my own hotkeys, or modifier keys, I could add another
    IActionInputSource
    implementing class in my own
    module.xml
    , and either pass new strings around as
    ActionType
    or "extend" the abstract with file shadowing?
  • i guess so, though components will only react to a specific set of actions, eg: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/containers/ListView.hx#L285-L315
    b

    bright-gpu-74537

    04/02/2023, 9:20 PM
    i guess so, though components will only react to a specific set of actions, eg: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/containers/ListView.hx#L285-L315
  • but if you wanted to make "X" mean "up" to a component, then yeah, you could just dispatch the appropriate action to the component (however you went about it)
    b

    bright-gpu-74537

    04/02/2023, 9:20 PM
    but if you wanted to make "X" mean "up" to a component, then yeah, you could just dispatch the appropriate action to the component (however you went about it)
  • Right - not thinking about trying to wire new buttons to existing stuff but program-contextual functions
    f

    few-pizza-8232

    04/02/2023, 9:22 PM
    Right - not thinking about trying to wire new buttons to existing stuff but program-contextual functions
  • My main project right now is graphics tooling, and as I get further into the actual drawing-y bits I suspect I'll be wanting like a dedicated "snap" modifier for example
    f

    few-pizza-8232

    04/02/2023, 9:23 PM
    My main project right now is graphics tooling, and as I get further into the actual drawing-y bits I suspect I'll be wanting like a dedicated "snap" modifier for example
  • right so you mean like "ctrl-g" means "snap" or something?
    b

    bright-gpu-74537

    04/02/2023, 9:23 PM
    right so you mean like "ctrl-g" means "snap" or something?
  • Or even "alt" or 'shift" means snap-enable until released
    f

    few-pizza-8232

    04/02/2023, 9:24 PM
    Or even "alt" or 'shift" means snap-enable until released
  • right, im not sure that fits into actions... i would just listen to screen keyboard events (which we've established arent linked up with kha)
    b

    bright-gpu-74537

    04/02/2023, 9:24 PM
    right, im not sure that fits into actions... i would just listen to screen keyboard events (which we've established arent linked up with kha)
  • you defo _could_ extend actions and have "alt" mean "snap", but it seems like alot of effort
    b

    bright-gpu-74537

    04/02/2023, 9:25 PM
    you defo could extend actions and have "alt" mean "snap", but it seems like alot of effort
  • Oh, you're saying that actions (as processed by `ActionManager` ) only matter to components?
    f

    few-pizza-8232

    04/02/2023, 9:25 PM
    Oh, you're saying that actions (as processed by
    ActionManager
    ) only matter to components?
  • 100%
    b

    bright-gpu-74537

    04/02/2023, 9:26 PM
    100%
  • action manager gets fed actions (from an action source), it then dispatches them to focused components
    b

    bright-gpu-74537

    04/02/2023, 9:26 PM
    action manager gets fed actions (from an action source), it then dispatches them to focused components
  • Focused components, that's the bit I was missing
    f

    few-pizza-8232

    04/02/2023, 9:26 PM
    Focused components, that's the bit I was missing
  • I mean, still useful if I want an "immediately snap the focused control" hotkey
    f

    few-pizza-8232

    04/02/2023, 9:26 PM
    I mean, still useful if I want an "immediately snap the focused control" hotkey
  • true, btw, at some point soon(ish - tm), i want a core sub system that will work with "shortcuts", like "ctrl+s" calls some function... i guess "alt" or "shift" fall into that category
    b

    bright-gpu-74537

    04/02/2023, 9:28 PM
    true, btw, at some point soon(ish - tm), i want a core sub system that will work with "shortcuts", like "ctrl+s" calls some function... i guess "alt" or "shift" fall into that category
  • but as i mentioned, none of that is relevant to the backend, core will work that out based on callbacks from the backed (keypresses)
    b

    bright-gpu-74537

    04/02/2023, 9:28 PM
    but as i mentioned, none of that is relevant to the backend, core will work that out based on callbacks from the backed (keypresses)
  • yep
    f

    few-pizza-8232

    04/02/2023, 9:29 PM
    yep
  • shortcuts sound like a nice addition - don't think it'd be too much trouble to build my own version in my own program (once screen events are wired up) but I prefer to lean into the framework's way of doing things where available
    f

    few-pizza-8232

    04/02/2023, 9:31 PM
    shortcuts sound like a nice addition - don't think it'd be too much trouble to build my own version in my own program (once screen events are wired up) but I prefer to lean into the framework's way of doing things where available
  • yeah, there is nothing available currently...
    b

    bright-gpu-74537

    04/02/2023, 9:32 PM
    yeah, there is nothing available currently...
  • and its a common thing i tend to use, so i have like 8 different versions of junk ive thrown together to achieve it, as you say, nothing complex
    b

    bright-gpu-74537

    04/02/2023, 9:33 PM
    and its a common thing i tend to use, so i have like 8 different versions of junk ive thrown together to achieve it, as you say, nothing complex
  • but it would be nice to do: `ShortcutManager.instance.register([CTRL, "s"], doSave)`
    b

    bright-gpu-74537

    04/02/2023, 9:33 PM
    but it would be nice to do:
    ShortcutManager.instance.register([CTRL, "s"], doSave)
  • i could also look for duplicates then, which is a nice touch, and finally, things like this could be autowired for you: http://haxeui.org/builder/?6b4058e8
    b

    bright-gpu-74537

    04/02/2023, 9:37 PM
    i could also look for duplicates then, which is a nice touch, and finally, things like this could be autowired for you: http://haxeui.org/builder/?6b4058e8
1...161616171618...1687Latest