Nim Appdev

2297 Members
8 Servers

Load older messages

24 Sep 2023
@_discord_145405730571288577:t2bot.ioelegantbeef#0 apple users can kick rocks 02:55:09
@_discord_145405730571288577:t2bot.ioelegantbeef#0 Alternatively have it be KControl and have a const KCommand = KControl 02:55:25
@_discord_703717429230174229:t2bot.io.elcritch haha, except I'm on mac - and command is better than control for GUI stuff 😛 02:55:58
@_discord_145405730571288577:t2bot.ioelegantbeef#0 I mean more keyboards say 'ctrl' than 'command' 02:56:29
@_discord_145405730571288577:t2bot.ioelegantbeef#0 So uhhh fite me 02:56:31
@_discord_703717429230174229:t2bot.io.elcritch not a const, it'd be nice to use "command" key on linux -- which is why I made if configurable 02:56:32
@_discord_703717429230174229:t2bot.io.elcritch * not a const, it'd be nice to use "menu" key on linux as command -- which is why I made if configurable 02:57:17
@_discord_145405730571288577:t2bot.ioelegantbeef#0 This is some cursed code 02:58:02
proc toModifier*(buttons: UiButtonView): ModifierKeys =
  when not defined(release):
    var count = 0
  for modifier, mappedButtons in keyConfig:
    if (mappedButtons * buttons).len > 0:
      result = modifier
      when not defined(release):
        inc count
  when not defined(release):
    assert count == 1
@_discord_703717429230174229:t2bot.io.elcritch I think it's easier if you do some form of:
  let ck = keys * ModifierButtons
  if ck == {} and keyConfig[commands] == {}: ....
@_discord_703717429230174229:t2bot.io.elcritch Oh wait, nvm I see the len there 03:02:35
@_discord_703717429230174229:t2bot.io.elcritch Hmmm, maybe a set[ModifierKeys]? The UiButtons are copied from Windy, which don't have generic "KeyControl", just the left / right ones 03:03:28
@_discord_145405730571288577:t2bot.ioelegantbeef#0 Eh I now realise that you had a custom == so this was all pointless really 03:04:18
@_discord_703717429230174229:t2bot.io.elcritch Yah but it only handled one modifer - not sets of modifier which would be a nicer way to do that probably 03:05:27
@_discord_145405730571288577:t2bot.ioelegantbeef#0 Probably in the future 03:05:52
@_discord_703717429230174229:t2bot.io.elcritch Also, theres ModifierButtons 03:05:55
@_discord_703717429230174229:t2bot.io.elcritch Hmmm, my few takes to let widgets decide where child elements "live" failed - it screwed lots of things. The second sorta worked, but ended up deleting and rebuilding child-nodes on every refresh :/ Messing with the parent / child relationship is hard! 03:13:18
@_discord_703717429230174229:t2bot.io.elcritch Think it's time to go to the movie theater watch a movie and drink a beer! 😎 03:14:02
@elegantbeef:matrix.orgElegantbeefHave fun, I'm taking a break from this text editor03:14:34
@_discord_703717429230174229:t2bot.io.elcritch lol, don't blame yah. thanks for hacking on it though, definitely need to bone up the text handling 03:17:10
@elegantbeef:matrix.orgElegantbeefI'll probably have a PR sometime03:17:25
@_discord_703717429230174229:t2bot.io.elcritch sweet! 03:17:52
@_discord_215308525050658818:t2bot.ioalendrik I meant B-Trees as in balanced trees. I have the general idea of it, but im struggling to understand the “balancing” operation. 03:28:41
@elegantbeef:matrix.orgElegantbeefI've not looked at the algorithims for it, but what's holding you up?04:04:51
@_discord_593294576026910720:t2bot.iosaiiiniii#0 changed their profile picture.04:07:07
@_discord_215308525050658818:t2bot.ioalendrik I'm not really sure how the "balancing" operation works. There are some restrictions on how many leafs/sub-nodes a node can have and some operation is done to split and balance 05:38:00
@_discord_215308525050658818:t2bot.ioalendrik However, I'm not really sure how to conceptualize it. Yeah, I could probably rip it off somewhere else, but I want to get a better understanding atleast. 05:38:29
@_discord_215308525050658818:t2bot.ioalendrik I received the comment that I should just use a DB, but I don't want to add anything that isn't particularly needed. 05:39:16
@elegantbeef:matrix.orgElegantbeef .elcritch so looking at it again now, and i've disabled all the logic for backspace but it moves the selection to the right 05:58:52
@elegantbeef:matrix.orgElegantbeef Oh keyInput fires for sub 20 characters 06:02:37

There are no newer messages yet.

Back to Room ListRoom Version: 9