X Tutup
Skip to content

[Lua] Add eyedropper action to useTool#5692

Open
Gasparoken wants to merge 1 commit intoaseprite:betafrom
Gasparoken:add-eyedropper-usetool
Open

[Lua] Add eyedropper action to useTool#5692
Gasparoken wants to merge 1 commit intoaseprite:betafrom
Gasparoken:add-eyedropper-usetool

Conversation

@Gasparoken
Copy link
Member

No description provided.

@Gasparoken Gasparoken self-assigned this Mar 6, 2026
@Gasparoken Gasparoken requested a review from dacap as a code owner March 6, 2026 19:25
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

// Get the first point from the points table
lua_pushnil(L);
if (lua_next(L, -2) != 0) {
gfx::Point pt = convert_args_into_point(L, -1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

warning: variable 'pt' of type 'gfx::Point' (aka 'PointT') can be declared 'const' [misc-const-correctness]

Suggested change
gfx::Point pt = convert_args_into_point(L, -1);
gfx::Point const pt = convert_args_into_point(L, -1);

@Gasparoken Gasparoken assigned dacap and unassigned Gasparoken Mar 6, 2026
Comment on lines +454 to +455
type = lua_getfield(L, 1, "points");
if (type == LUA_TTABLE) {
Copy link
Member

Choose a reason for hiding this comment

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

It looks like these lines are duplicated, probably checking for the "points" tablet is the first thing we can do, and after that decide the eyedropper path or the ToolLoop one.

@dacap dacap assigned Gasparoken and unassigned dacap Mar 9, 2026
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.

3 participants

X Tutup