Commit Graph

3 Commits

Author SHA1 Message Date
Kartik K. Agaram 2d5abe140b make order of files consistent with upstream
Luckily I only had a chance to mess this up in one fork.

And I don't need to actually make any changes because my definitions are
order-independent.
2023-04-22 18:50:18 -07:00
Kartik K. Agaram 48094828a0 make moving a definition more polished+performant
This is a long-standing problem:
  * each definition requires an edit buffer and some decoration (the
    rectangle for the background color)
  * while the mouse is down during a move it's nice to see the
    decorations change
  * but to change decorations we have to go all the way back to A(),
    which is very slow if there's lots of definitions on the surface

My compromise until now was to just perform B(), not A(). This tore the
background rect away from the editor buffer during a move, which was
ugly. You also wouldn't get any feedback at all if you tried to move a
buffer without any text.

New solution: create a variant of A called A1 that only does the work of
A for a single key (index) in Definitions.

This requires tracking for every shape we render in Surface, which key
in Definitions it is part of. That way we can selectively delete just
shapes belonging to a single key.

Caveat: key is a scalar, so this approach can't handle any nesting, only
a flat array of objects. But that's good enough for both driver.love and
this app.
2023-04-18 01:10:18 -07:00
Kartik K. Agaram 6bf029748c Merge luaML.love 2023-04-16 11:35:42 -07:00