clang-format

This commit is contained in:
Christian Kaiser 2024-12-17 09:34:50 -03:00 committed by David Capello
parent 747518173d
commit 8c6fe820b9

View File

@ -39,8 +39,7 @@
// And running script code in a background is not supported.
// #define ENABLE_REMAP_TILESET_EVENT 1
namespace app {
namespace script {
namespace app { namespace script {
using namespace doc;
@ -242,20 +241,22 @@ private:
void onBeforeCommand(CommandExecutionEvent& ev)
{
s_stopPropagationFlag = false;
call(BeforeCommand, { { "name", ev.command()->id() },
{ "params", ev.params() },
{ "stopPropagation",
(lua_CFunction)
[](lua_State*) -> int {
auto stopPropagation = (lua_CFunction)[](lua_State*)->int
{
s_stopPropagationFlag = true;
return 0;
}
}
} // namespace
);
};
call(BeforeCommand,
{
{ "name", ev.command()->id() },
{ "params", ev.params() },
{ "stopPropagation", stopPropagation }
});
if (s_stopPropagationFlag)
ev.cancel();
} // namespace script
}
void onAfterCommand(CommandExecutionEvent& ev)
{
@ -636,5 +637,4 @@ void push_window_events(lua_State* L, ui::Window* window)
push_ptr<Events>(L, g_windowEvents.get());
}
} // namespace script
} // namespace app
}} // namespace app::script