-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add cursor style for morphs #62
base: master
Are you sure you want to change the base?
Conversation
I have also put these changes into my snap mod, so if you want to see what it could look like, here it is. |
This is nice, thank you! I'm currently not really sure whether I want to extend Morphic with cursor shapes. There was a time - a decade ago - when I would've really killed for it, but it didn't work across browsers back then, and I sort of killed my desire for it then :) But there's another feature you've been pioneering (I think) that some of us (especially me) are very interested in: Wasn't it you who made a beautiful patch that adds flat dark mode to Snap? If I'm wrong about that then sorry, otherwise I'd love to talk to you about it! |
I've had a closer look at your fork, and I love it, mostly everything I see, and I might not have noticed evrerything! You're right, the "live" mouse pointers are awfully nice to use! There seems to be an issue about Morphic not (yet) noticing some subtle state changes, such as when the user releases the mouse button after dragging something without moving the mouse, but those might just have to be added. |
That would be awesome! Although some things I added are pretty buggy.
Here's a list of all my changes.
- Dark / flat design
- Customizable theme
- Copy / paste scripts
- Select categories in the export / used blocks dialogs
These ones can be merged immediately
- Dark / flat design
- This has many fixes for making non-flat light design look good (I
actually got many of them from joecooldoo's mod). It also has saving flat /
dark design in the settings.
- Select categories in export / unused blocks dialog
- This works just fine, and is ready to be merges. I would love to also
add it to the hide blocks dialog, but I ran into an issue with some blocks
in other categories being in other categories (the warp block). It would be
nice if the blocks had some kind of master category property, which is the
category it's in, in the palette (not the color).
- Copy / paste scripts
- This needs a bit more work, because currently, it just stores a copy
of the BlockMorph in a variable and pastes it (like the duplicate function,
only it doesn't show the block immediately). This can have some issues,
such as, saving a project will result in obsolete blocks. That specifically
happens when you copy a local custom block to a different sprite, or when
you paste a custom block that was previously deleted. I fixed a big issue
by storing the clipboard in the scene, which prevents copy / pasting
between scenes.
- Customizable theme
- This is the most unfinished addition, as saving the theme in the
browser is a little buggy, turning on / off flat design in the options menu
doesn't save, and many other issues. I have an idea to centralize the theme
in an object / class, much MorphicPrefrances. This will allow it to be
easier to save and restore the theme. I think it would also be great to add
an option to save theme presets (in the browser, idk if you want to save
them in the cloud), and also export themes, that way people can share their
themes on the forum (or transfer them between devices).
Of course before they're merged, I do want to split them into different
branches, that way I can create separate pull requests for each addition.
…On Thu, Aug 17, 2023, 6:20 AM Jens Mönig ***@***.***> wrote:
I've had a closer look at your fork, and I *love* it, mostly everything I
see, and I might not have noticed evrerything! You're right, the "live"
mouse pointers are awfully nice to use! There seems to be an issue about
Morphic not (yet) noticing some subtle state changes, such as when the user
releases the mouse button after dragging something without moving the
mouse, but those might just have to be added.
I also noticed your changes to the "skin", including the "flat" and
"dark/light" settings. I *love* those! And you've even added a nice
dialog that lets users configure the colors of the UI, what a beautiful
hack!2
Hey, thinking about all of these I really like them. How would you feel
about merging them all into the main Snap! branch for v10? If you're
interested just drop me note (here or via email), I'd like to discuss this
further with you!
Thank you, *thank you* for sharing these wonderful hacks!
—
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQ5PRCUKQBLL4OESPA3JYWLXVYD77ANCNFSM6AAAAAA3JASCJM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This adds a new
cursorStyle
attribute toMorph
s, which is what the cursor turns into when hovering over theMorph
. It's initiallynull
, which you can change to any css cursor. The code that changes the cursor (aka, sets the canvas style to show the cursor) looks for the firstMorph
under the mouse that does not have anull
cursorStyle
, and then uses that. I also made sure to keep the cursor when dragging aMorph
(unless it'snull
, we can discuss whether that's the best behavior). There's also acursorGrabStyle
which is used when theMorph
is currently being dragged (aka, grabbed).I just decided to do this because I felt that it would make snap feel more interactive.