Commit Graph

485 Commits

Author SHA1 Message Date
Isaiah Odhner
2af323bab2 Note Playscii license/language compatibility 2023-04-25 13:16:24 -04:00
Isaiah Odhner
bbe3f01725 Add to known issues 2023-04-25 01:16:46 -04:00
Isaiah Odhner
7bf41a6ac4 Add tips section to readme 2023-04-24 23:43:38 -04:00
Isaiah Odhner
f5ea658848 Fix CharInput interfering with Text tool 2023-04-24 23:28:36 -04:00
Isaiah Odhner
f8cfcb0f6e Make text tool use selected colors
This is a little weird because the selected background color is
analogous to the foreground color in MS Paint, for the other tools,
with the foreground color having no equivalent as it's just pixels
instead of character cells.
So with the default white canvas and black "background color",
this now draws a black text box, unlike MS Paint's default behavior
for the text tool of drawing a white text box.
2023-04-24 23:14:46 -04:00
Isaiah Odhner
fdca36daa1 Allow setting text color with Ctrl+click 2023-04-24 22:52:24 -04:00
Isaiah Odhner
61227597f8 Fix flood fill infinite loop when color under cursor matches fill color 2023-04-24 22:18:48 -04:00
Isaiah Odhner
a91dd25996 Use interpolation feature of my localization function 2023-04-24 21:14:35 -04:00
Isaiah Odhner
cfc82a55c1 Fix unlocalized save changes prompt 2023-04-24 21:13:26 -04:00
Isaiah Odhner
3b08e045e7 Mount menus to the Screen instead of the App
All just to avoid one type checker error:

    Type of "app" is partially unknown
      Type of "app" is "App[Unknown]"PylancereportUnknownMemberType

But it's the last error in menus.py...
But I still have a bunch of this error in main.py, and I don't know
how to deal with it generally. It doesn't seem like a real problem,
but I don't want to add so many ignore comments...
2023-04-24 21:09:24 -04:00
Isaiah Odhner
c3d4e1c254 Remove unused import 2023-04-24 21:02:24 -04:00
Isaiah Odhner
e62064a307 Fix a type checker error 2023-04-24 20:52:49 -04:00
Isaiah Odhner
1523e960bb Fix a type checker error (setting parent_menu on Separator)
Not really a problem, but parent_menu isn't declared on Separator.
2023-04-24 20:51:35 -04:00
Isaiah Odhner
de1a77036b Bind F1 to Help Topics 2023-04-24 20:43:11 -04:00
Isaiah Odhner
9c4728c483 Improve layout of Custom Zoom window 2023-04-24 20:33:12 -04:00
Isaiah Odhner
1c7f7015cb Fix unlocalized buttons 2023-04-24 20:28:57 -04:00
Isaiah Odhner
86fe09cc6e Use a DataTable instead of a grid of buttons for Choose Character dialog
Improve performance, compactness, and keyboard navigation
2023-04-24 20:26:47 -04:00
Isaiah Odhner
8eb4d78646 Update readme 2023-04-24 16:46:32 -04:00
Isaiah Odhner
91883d06cd Tweak warning icon, with a rounder exclamation mark, and smaller overall
I'm not sure I like this better.
2023-04-24 16:31:57 -04:00
Isaiah Odhner
a4f6b0fe35 Improve warning icon 2023-04-24 16:06:16 -04:00
Isaiah Odhner
4608c73219 Make undo/redo cancel in-progress tool usage 2023-04-24 15:46:17 -04:00
Isaiah Odhner
5bf2280569 Fix cycling characters in CharInput due to events queuing 2023-04-24 15:30:08 -04:00
Isaiah Odhner
43b06f2b24 Don't hide help text when hovering menu bar buttons 2023-04-24 15:16:38 -04:00
Isaiah Odhner
9a45b3c839 Disable and hide hotkeys for top level menus since I can't detect Alt 2023-04-24 15:08:45 -04:00
Isaiah Odhner
ac6f9cf2a6 Comment / add docstrings to hotkey handling code 2023-04-24 14:46:14 -04:00
Isaiah Odhner
3a0adb3c94 Fix deselection by clicking outside canvas 2023-04-24 12:54:06 -04:00
Isaiah Odhner
889d1b5636 Invert underlying colors for Free-Form Select preview, don't use selected color 2023-04-24 12:48:49 -04:00
Isaiah Odhner
b7aabd642c Refactor shared conditional to early return in stamp_char 2023-04-24 12:16:22 -04:00
Isaiah Odhner
1a135c4153 Rename a variable that is inside is_inside_polygon
This is an AI-offered function... so I'm sort of guessing here.

This fixes a spell checker issue but there's also a "possibly unbound"
type checker issue here.
2023-04-24 03:09:06 -04:00
Isaiah Odhner
23352d64ac Fix "incompatible" override type checker errors
Method "watch_value" overrides class "Input" in an incompatible manner
  Return type mismatch: base method returns type "Coroutine[Any, Any, None]", override returns type "None"
    Type "None" cannot be assigned to type "Coroutine[Any, Any, None]"PylancereportIncompatibleMethodOverride

Method "validate_cursor_position" overrides class "Input" in an incompatible manner
  Parameter 2 name mismatch: base parameter is named "cursor_position", override parameter is named "position"PylancereportIncompatibleMethodOverride

These wouldn't actually be problems, due to the nature of the reactive properties system, but whatever, I can make it match, no problem.
2023-04-24 03:07:19 -04:00
Isaiah Odhner
6259d11ec5 Switch to previous tool only on mouse up (for Magnifier)
This fixes accidentally activating the other tool when using the Magnifier, and matches the behavior of MS Paint.
2023-04-24 02:16:40 -04:00
Isaiah Odhner
961dfe8039 Add some type hints to variables
I don't know what all should have type annotations, and honestly it's
pretty confusing how these are used. For instance, `selecting_text`
goes from:
    (variable) selecting_text: bool
to:
    (variable) selecting_text: Literal[False]
when annotating it as a bool, looking at the hover text in VS Code
with Pylance language server.
2023-04-24 02:08:48 -04:00
Isaiah Odhner
0c42edce9c Fix cells stroked outside the mouse's path
Use absolute positions instead of delta coordinates.

The deltas would sometimes give points "jutting out" — only by a pixel,
but confusing when trying to do pixel art. You might not even notice it
but it might make you feel like a bad artist until you do.
2023-04-24 01:41:18 -04:00
Isaiah Odhner
dc02833f3f Shorten selected tool condition (DRY) 2023-04-24 01:27:28 -04:00
Isaiah Odhner
a875c61fff Fix mouse coordinates with a better workaround 2023-04-24 01:25:07 -04:00
Isaiah Odhner
bcb26707ef Merge Hovered and Closed events; clear text when mouse leaves menu item 2023-04-24 01:13:04 -04:00
Isaiah Odhner
cb310c2baf Un-bold menus
They're buttons, so they're bold by default.
2023-04-24 01:01:02 -04:00
Isaiah Odhner
2cdb728d64 Fix mouse wheel & show description when hovering over grayed menu items 2023-04-24 00:56:51 -04:00
Isaiah Odhner
c12036880e Show menu item descriptions in the status bar 2023-04-24 00:43:50 -04:00
Isaiah Odhner
d62b320ede Add default status text "For Help, click Help Topics on the Help Menu." 2023-04-24 00:03:05 -04:00
Isaiah Odhner
14ca88ba5b Show dimensions in status bar, and coords in more cases 2023-04-24 00:02:50 -04:00
Isaiah Odhner
c10f2788c1 Remove outdated comment 2023-04-23 23:05:52 -04:00
Isaiah Odhner
4a308f22e1 Tweak status bar styles
- Make there be a border at the outside on both the left and the right
- For the inner dividing borders, use left instead of right so that
  there's a slight gap between the left-aligned text and the border.
2023-04-23 22:56:51 -04:00
Isaiah Odhner
76e578cf4a Show mouse coords in status bar 2023-04-23 22:30:16 -04:00
Isaiah Odhner
b7d14f02bd Add an empty status bar 2023-04-23 22:22:28 -04:00
Isaiah Odhner
eb3b93d454 Require both clicks to be on the same button for a double click 2023-04-23 21:51:44 -04:00
Isaiah Odhner
8136383bca Return to previous tool after using Magnifier or Pick Color tool 2023-04-23 19:51:12 -04:00
Isaiah Odhner
70cb60218f Close menus if clicking outside the menus 2023-04-23 19:42:49 -04:00
Isaiah Odhner
fc35e34153 Use Binding(...) for all bindings, for easy access to priority/show args 2023-04-23 17:22:12 -04:00
Isaiah Odhner
d411b84605 Fix CharInput blocking Ctrl+A, Ctrl+W, etc. 2023-04-23 17:20:08 -04:00