Commit Graph

18 Commits

Author SHA1 Message Date
Kartik K. Agaram 95d88a8298 use editor state font for width calculations 2024-01-12 05:23:06 -08:00
Kartik K. Agaram bd2179d8aa bugfix
scenario: run without config file, quit, run again
expected: font size remains the same on second run

Before this commit it was increasing on each run.
It turns out the font height that you pass into love.graphics.newFont()
is not the result of font:getHeight().
2023-12-29 11:52:28 -08:00
Kartik K. Agaram 0f4aea6db7 pull font into editor
Now it adjusts the current font for itself.
And it's up to the caller to adjust the current font after.
2023-12-29 11:18:41 -08:00
Kartik K. Agaram 007b965b11 audit all asserts
Each one should provide a message that will show up within LÖVE. Stop
relying on nearby prints to the terminal.

I also found some unnecessary ones.

There is some potential here for performance regressions: the format()
calls will trigger whether or not the assertion fails, and cause
allocations. So far Lua's GC seems good enough to manage the load even
with Moby Dick, even in some situations that caused issues in the past
like undo.
2023-11-18 11:32:01 -08:00
Kartik K. Agaram 523db004d9 change section delimiters in log for OpenBSD
Thanks eril for the report and patch.
2023-10-20 15:53:03 -07:00
Kartik K. Agaram 6ed60848a4 delete some dead code
This is a holdover from the days of bifold text.
2023-09-15 13:33:26 -07:00
Kartik K. Agaram eb55e18e1d hide cursor in log browser window 2023-05-14 17:25:07 -07:00
Kartik K. Agaram 282983d084 switch source side to new screen-line-based render
Also copy over the implementation of links from pensieve.love.
2023-04-03 08:33:07 -07:00
Kartik K. Agaram 4ab901c92e get rid of to_text
I've been misunderstanding what Text objects are. They can render a lot
of text with a given line height, word wrap, colors in various places.
And I've been creating one for every word 🤦

Unwinding this will take some time. This is just a first baby step for
ad hoc text objects. Turns out I don't need to convert to Text to get
something's rendered width, just the Font can do that.

Thanks to the LÖVE Discord for educating me:
  https://discord.com/channels/329400828920070144/330089431379869708/1091535487333826580
2023-04-01 16:12:55 -07:00
Kartik K. Agaram a6dcfc5ac8 some minor cleanup
I can't see the mouse wheel ever setting dx, but it's more obvious now
that the editor doesn't support panning left/right.
2023-03-23 21:38:33 -07:00
Kartik K. Agaram 99faf61abb mouse wheel support 2023-03-23 21:00:09 -07:00
Kartik K. Agaram 6709b394fb more bugfix
Don't crash on showing the log browser.
2023-03-17 22:17:23 -07:00
Kartik K. Agaram e0448d7d7f consistent names in a few more places 2022-12-23 19:32:58 -08:00
Kartik K. Agaram 2b3e09ca0f make love event names consistent
I want the words to be easy to read, and to use a consistent tense.
update and focus seem more timeless; let's make everything like those.
2022-12-23 18:52:28 -08:00
Kartik K. Agaram e3f9908d13 yet another bugfix in log parsing 2022-09-17 23:27:20 -07:00
Kartik K. Agaram 593418972c bugfix: perform matches in the right order 2022-09-17 23:19:36 -07:00
Kartik K. Agaram 620176263a bugfix: log filenames can have 2 formats 2022-09-17 22:56:11 -07:00
Kartik K. Agaram e1c5a42f31 editing source code from within the app
integrated from pong.love via text.love:
  https://merveilles.town/@akkartik/108933336531898243
2022-09-03 14:13:22 -07:00