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

[lua] suggestion: move canvas behind foreground dialog #4465

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lampysprites
Copy link
Contributor

It would be useful to allow moving and zooming on canvas when showing dialog in foreground, similar to built-in filter dialogs, e.g. like so:

d = Dialog()
d:show{ move = true }

Without it things work same as before. It's really nice to have for previewing color adjustment or other intermediary changes to the image.

There's one problem though: it's still possible to use ctrl key to move layers which feels like a problem. Filters avoid this because the sprite is locked ("Sprite is used by backup/data recovery task") but I'm not sure it's okay to do so here because the script also needs to use it? I wonder if there is a simple solution to this.


I agree that my contributions are licensed under the Individual Contributor License Agreement V4.0 ("CLA") as stated in https://github.com/igarastudio/cla/blob/main/cla.md

I have signed the CLA following the steps given in https://github.com/igarastudio/cla#signing

@lampysprites lampysprites requested a review from dacap as a code owner May 13, 2024 07:30
Copy link
Collaborator

@aseprite-bot aseprite-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

class DialogWindow : public ui::Window,
public EditorObserver {
public:
bool moveTool;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member variable 'moveTool' has public visibility [misc-non-private-member-variables-in-classes]

    bool moveTool;
         ^

ToolBar::instance()->selectTool(m_oldTool);
}

void onOpen(Event& ev) override {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'ev' is unused [misc-unused-parameters]

Suggested change
void onOpen(Event& ev) override {
void onOpen(Event& /*ev*/) override {

}
}

void onBeforeClose(CloseEvent& ev) override {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'ev' is unused [misc-unused-parameters]

Suggested change
void onBeforeClose(CloseEvent& ev) override {
void onBeforeClose(CloseEvent& /*ev*/) override {

@dacap dacap self-assigned this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants