Commit Graph

129 Commits

Author SHA1 Message Date
Kartik K. Agaram dedb843535 Merge text.love 2024-01-15 01:45:35 -08:00
Kartik K. Agaram 348852ee2b Merge lines.love 2024-01-15 01:38:38 -08:00
Kartik K. Agaram 95d88a8298 use editor state font for width calculations 2024-01-12 05:23:06 -08:00
Kartik K. Agaram 4121613fc6 don't save settings on error in source editor 2024-01-12 03:51:34 -08:00
Kartik K. Agaram 5d4fd4aa93 fix still more issues with the previous scenario
- source editor always expects relative paths
- refresh mocked data

There's still one issue after this: the font size saved in the config
file is the one we use in tests. More broadly, Editor_state is
completely wrong.

Ideally I'd just not save any settings for the source editor if the
tests fail.
2024-01-12 03:35:22 -08:00
Kartik K. Agaram 6c568c6ef0 Merge text.love 2023-12-29 14:30:35 -08:00
Kartik K. Agaram 6bd2086b51 Merge lines.love 2023-12-29 14:29:18 -08:00
Kartik K. Agaram aa6bfb4b15 moar bugfix X-( 2023-12-29 12:02:45 -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 f0436579c0 Merge text.love 2023-09-15 23:59:12 -07:00
Kartik K. Agaram 09c76c82c2 Merge lines.love 2023-09-15 23:56:49 -07:00
Kartik K. Agaram 715c6fd32f source: show file being edited in window title bar 2023-09-15 13:36:27 -07:00
Kartik K. Agaram 76f119b7b9 hide line numbers from log browser 2023-09-15 13:30:42 -07:00
Kartik K. Agaram 6e429d3e4d Merge text.love 2023-09-14 22:41:22 -07:00
Kartik K. Agaram 1a88b4a290 Merge lines.love 2023-09-14 22:39:18 -07:00
Kartik K. Agaram 1fd30c0462 always show line numbers in source editor
The drawing buttons are now absolutely positioned, which is a horrible
hack. But for just the source editor it seems good enough. The
alternative is to modify magic constants in all the tests :/
2023-09-14 22:27:38 -07:00
Kartik K. Agaram b70fa64d1b Merge text.love 2023-09-10 21:58:25 -07:00
Kartik K. Agaram 37cb030489 Merge lines.love 2023-09-10 21:56:43 -07:00
Kartik K. Agaram 7062963888 Revert "deemphasize the source editor"
Now that we have decent error handling, I think we can encourage people
to press ctrl+e again.

This reverts commit 4b43e9e85d.
2023-09-10 21:45:59 -07:00
Kartik K. Agaram 60b6308fc7 Merge text.love 2023-09-04 15:24:31 -07:00
Kartik K. Agaram 529857ad73 Merge lines.love 2023-09-04 15:22:10 -07:00
Kartik K. Agaram e74b92b733 show any error after switching to source editor
Error_message is a special global. It's set when the app (Current_app = 'run')
encounters an error and switches to the source editor, and cleared when
switching from source editor back to the app.
2023-09-04 15:07:54 -07:00
Kartik K. Agaram 5eec90424e Merge text.love 2023-07-11 10:30:17 -07:00
Kartik K. Agaram f72fe2f172 Merge lines.love 2023-07-11 10:06:12 -07:00
Kartik K. Agaram 52ba030eaa drop an unused arg 2023-07-11 08:36:42 -07:00
Kartik K. Agaram c1f793a130 Merge text.love 2023-07-10 18:25:07 -07:00
Kartik K. Agaram 8482be9472 Merge lines.love 2023-07-10 17:55:12 -07:00
Kartik K. Agaram bca7f82598 standardize between run and source some more
We shouldn't be thinking about saving settings when we're initializing
window geometry.
2023-07-10 17:16:58 -07:00
Kartik K. Agaram 7f4c5f847b simplify saving settings
We don't ever call one app's settings while Current_app is the other.
2023-07-10 17:14:38 -07:00
Kartik K. Agaram a8747478ff bugfix: Windows pushing title bar off screen
I'm learning the hard way that resizing the window is a big deal. Only
do this when someone explicitly requests it, otherwise follow LÖVE's
defaults.

Therefore we're also going to stop trying to be smart when showing the
log browser. Leave window resizing to manual operations.

Now initialization looks a lot more similar for the run and source apps.
2023-07-10 17:09:09 -07:00
Kartik K. Agaram 3f52063d02 delete flags that have never been exercised
Initialization is getting complex, and I'm finding bugs.
2023-07-10 16:33:17 -07:00
Kartik K. Agaram e68261d7a3 bugfix: preserve window position 2023-07-10 15:50:47 -07:00
Kartik K. Agaram f881f19f98 Merge text.love 2023-06-04 15:17:36 -07:00
Kartik K. Agaram bf2c2555d6 Merge lines.love 2023-06-04 15:11:24 -07:00
Kartik K. Agaram 637e28f300 port inscript's bugfix to source editor 2023-06-04 12:33:23 -07:00
Kartik K. Agaram b071ba51a3 Merge text.love 2023-05-14 17:32:31 -07:00
Kartik K. Agaram 0f3841f186 Merge lines.love 2023-05-14 17:31:55 -07:00
Kartik K. Agaram eb55e18e1d hide cursor in log browser window 2023-05-14 17:25:07 -07:00
Kartik K. Agaram bef604abb8 Merge text.love 2023-04-09 14:14:21 -07:00
Kartik K. Agaram 0d913ba8f1 Merge lines.love 2023-04-09 14:14:03 -07:00
Kartik K. Agaram 4b43e9e85d deemphasize the source editor
This repo does not support freewheeling modification. It's a primitive
to enable freewheeling modification in downstream forks.

The source editor is a convenience, but it's a sharp tool and can easily
leave the app in a broken state that requires dropping down to external
tools (editor, file manager) to fix.
2023-04-09 11:12:36 -07:00
Kartik K. Agaram bc3f1aca36 Merge text.love 2023-04-03 09:23:54 -07:00
Kartik K. Agaram e406fdae0d Merge lines.love 2023-04-03 09:23:28 -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 24a48e665f Merge text.love 2023-04-02 09:31:56 -07:00
Kartik K. Agaram 3547c18db6 Merge lines.love 2023-04-02 09:22:32 -07:00
Kartik K. Agaram 876d6298b4 App.width can no longer take a Text
In the process I discovered the horrible fact that Text.x allocates a new Text.
And it gets called (just once, thank goodness) on every single frame.
2023-04-01 18:12:29 -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 dd3efa3b68 Merge text.love 2023-03-25 11:39:14 -07:00