mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-16 19:21:12 +00:00
lua: Rename app.toolStroke() -> app.useTool()
This function was called app.drawWithTool() first, but some tools do not "draw" (e.g. eraser, selection-like tools, etc.). And then the app.toolStroke() name could be confused with the Edit > Stroke command.
This commit is contained in:
parent
7d8e493dca
commit
98080544cf
@ -190,11 +190,11 @@ int App_refresh(lua_State* L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int App_toolStroke(lua_State* L)
|
||||
int App_useTool(lua_State* L)
|
||||
{
|
||||
// First argument must be a table
|
||||
if (!lua_istable(L, 1))
|
||||
return luaL_error(L, "app.toolStroke() must be called with a table as its first argument");
|
||||
return luaL_error(L, "app.useTool() must be called with a table as its first argument");
|
||||
|
||||
auto ctx = App::instance()->context();
|
||||
Doc* doc = ctx->activeDocument();
|
||||
@ -511,7 +511,7 @@ const luaL_Reg App_methods[] = {
|
||||
{ "redo", App_redo },
|
||||
{ "alert", App_alert },
|
||||
{ "refresh", App_refresh },
|
||||
{ "toolStroke", App_toolStroke },
|
||||
{ "useTool", App_useTool },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user