Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View command, for images, should support zooming in/out with +/~ #20

Open
JoeStrout opened this issue Jan 14, 2024 · 2 comments
Open

View command, for images, should support zooming in/out with +/~ #20

JoeStrout opened this issue Jan 14, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@JoeStrout
Copy link
Owner

The view command currently draws images at 1:1 size. This can be too big or small to clearly see the image. Add the use of + and - to zoom in and out by a factor of sqrt(2).

In the case of viewing a tileset, don't change the size of the numbers drawn; only change where they are drawn to match the scaled image.

@JoeStrout JoeStrout added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jan 14, 2024
@JoeStrout
Copy link
Owner Author

This code is in startup.ms. Your workflow will look like this:

  1. Clone this repo
  2. In Mini Micro, mount the sys folder in slot 1
  3. edit "startup" (or use an external editor)
  4. run it (from the editor, or the run "startup" command)
  5. Test the view command
  6. Goto 3 until done

@JoeStrout
Copy link
Owner Author

For a recent example of why this would be useful, see this blog post. It uses this tile set image:

image

But because the tiles are only 8x8 pixels, I couldn't use the view command to usefully display the tile indexes. I had to use a drawing program and manually label all 88 tiles! It was a pain.

With this new feature, we'll be able to view those indexes right within Mini Micro by doing this:

display(5).mode = displayMode.tile
td = display(5)
td.tileSet = file.loadImage("dk_tiles.png")  // or whatever we called the above image
td.tileSetTileSize = 8
view td.tileSet

...and then zooming in until it's legible.

JoeStrout added a commit that referenced this issue Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant