Kartik K. Agaram
18bb4624b3
ensure integer coordinates
...
https://love2d.org/wiki/Text says text can appear blurry otherwise.
I can't tell yet, though.
2022-05-19 04:28:08 -07:00
Kartik K. Agaram
b63a33dd06
handle tab characters
2022-05-18 20:22:57 -07:00
Kartik K. Agaram
ec410d5223
bugfix: ensure Cursor_line is always on a text line
...
Manual test used here:
abc
```lines
{"p1":{"y":72,"x":82},"mode":"line","p2":{"y":29,"x":169}}
```
def
```lines
{"p1":{"y":36,"x":56},"mode":"line","p2":{"y":59,"x":163}}
```
```lines
```
ghi
jkl
Hitting page-down moves the cursor from abc to ghi. The 'ghi' line
should be fully visible on screen.
2022-05-18 18:19:27 -07:00
Kartik K. Agaram
b586c7332e
bugfix: position cursor up top when loading file
2022-05-18 18:18:34 -07:00
Kartik K. Agaram
f91e520124
scroll past first page
...
Still some limitations. The text cursor has to be visible on screen, so
if you have a long series of drawings without intervening lines of text
you won't be able to scroll through them all.
2022-05-18 17:42:08 -07:00
Kartik K. Agaram
e27165cb9f
rectangle and square shapes
2022-05-18 15:29:18 -07:00
Kartik K. Agaram
28c29eecde
lighter color for in-progress strokes
2022-05-18 13:09:06 -07:00
Kartik K. Agaram
d0eeb8586f
use the provided args everywhere
...
This will be important when we implement scrolling..
2022-05-18 07:38:02 -07:00
Kartik K. Agaram
bdf9b27260
casting about for more helpers to extract..
2022-05-18 07:34:18 -07:00
Kartik K. Agaram
0fc3ed212e
move
2022-05-18 07:21:50 -07:00
Kartik K. Agaram
dc618a419c
highlight another global
2022-05-17 23:24:46 -07:00
Kartik K. Agaram
b544e8c357
forgot to move this special case out
2022-05-17 23:23:26 -07:00
Kartik K. Agaram
6e152a9f3f
.
2022-05-17 23:18:56 -07:00
Kartik K. Agaram
c1ba40ac70
delegate update events to drawings
2022-05-17 23:16:08 -07:00
Kartik K. Agaram
10bc32e2f0
DRY some code
2022-05-17 23:10:58 -07:00
Kartik K. Agaram
4818672c11
move mouse_released events to Drawing
2022-05-17 22:55:45 -07:00
Kartik K. Agaram
92bd6839c7
split mouse_pressed events between Text and Drawing
2022-05-17 22:53:09 -07:00
Kartik K. Agaram
222a11a8dd
split keyboard handling between Text and Drawing
2022-05-17 22:43:41 -07:00
Kartik K. Agaram
82742330f8
autosave in a couple more places
2022-05-17 22:26:15 -07:00
Kartik K. Agaram
23176de0e0
assume we always have a filename
2022-05-17 22:24:41 -07:00
Kartik K. Agaram
2241f33a8f
.
2022-05-17 22:23:15 -07:00
Kartik K. Agaram
dcfa2d04ca
bugfix: duplicate character on enter
2022-05-17 22:22:45 -07:00
Kartik K. Agaram
9a42128eb4
jump between lines on left/right
...
Also skip past drawings.
2022-05-17 22:12:08 -07:00
Kartik K. Agaram
6c031fc1d0
split lines on enter
2022-05-17 22:05:46 -07:00
Kartik K. Agaram
a787ef1716
rename
2022-05-17 22:05:21 -07:00
Kartik K. Agaram
61845c335b
.
2022-05-17 22:05:00 -07:00
Kartik K. Agaram
319617141b
join lines on delete
2022-05-17 21:59:48 -07:00
Kartik K. Agaram
e1bc81408f
move
2022-05-17 21:55:19 -07:00
Kartik K. Agaram
8d2f81948a
enable pressing and holding backspace
2022-05-17 21:37:39 -07:00
Kartik K. Agaram
de495ae0f1
several more modules
...
This is probably not ideal; let's see how it goes..
2022-05-17 21:34:55 -07:00
Kartik K. Agaram
91ce333ae0
bugfix typo
2022-05-17 20:52:00 -07:00
Kartik K. Agaram
476bbcdadf
beginnings of a module for the text editor
2022-05-17 20:29:08 -07:00
Kartik K. Agaram
40b1780bca
longer names for indices in long loops
2022-05-17 19:48:12 -07:00
Kartik K. Agaram
2aa8c67a22
extract a module
...
I want to use `drawing` for locals, so I'll use uppercase the module
name just like globals.
2022-05-17 19:41:42 -07:00
Kartik K. Agaram
9ade4d2782
finish uppercasing all globals
2022-05-17 19:38:33 -07:00
Kartik K. Agaram
45eee7ad49
start uppercasing globals
...
We're starting to have a few. Text editing is surprisingly more complex than drawing.
2022-05-17 19:27:54 -07:00
Kartik K. Agaram
13dd253984
record a known issue
...
Discovered while showing this to Dan Oblinger.
2022-05-17 19:22:11 -07:00
Kartik K. Agaram
cfdd563499
let's prevent the text cursor from ever getting on a drawing
2022-05-17 19:18:23 -07:00
Kartik K. Agaram
359056eb7e
bugfix typo
2022-05-17 18:58:42 -07:00
Kartik K. Agaram
12681b6307
start imposing some organization
2022-05-17 18:57:47 -07:00
Kartik K. Agaram
76efb63671
much better help color and copy
2022-05-17 18:55:26 -07:00
Kartik K. Agaram
0999ae9929
bit more polish to help screen
...
Still looks like ass.
2022-05-17 08:18:55 -07:00
Kartik K. Agaram
0b252a4ab7
reset zoom
2022-05-17 08:12:09 -07:00
Kartik K. Agaram
8446ec0fbb
respect zoom when drawing drawings
2022-05-16 23:06:44 -07:00
Kartik K. Agaram
2194b388f8
respect zoom when printing online help
2022-05-16 23:04:39 -07:00
Kartik K. Agaram
680999087b
ctrl-+ and ctrl-- to adjust font size
2022-05-16 23:01:21 -07:00
Kartik K. Agaram
643e55309e
reorg
2022-05-16 22:54:44 -07:00
Kartik K. Agaram
8e074b0a93
more precise cursor positioning
2022-05-16 22:50:52 -07:00
Kartik K. Agaram
e2d4edb4d8
position cursor by clicking on text
...
In the process, a bugfix: up/down from line to drawing or vice versa.
2022-05-16 22:42:54 -07:00
Kartik K. Agaram
97531d9d05
allow text to be typed while mouse hovers over drawing
...
The whole point of my keyboard shortcuts scheme is that if you press a
regular key and the mouse is not down, it goes in at the cursor.
2022-05-16 22:30:53 -07:00