2015-02-12 23:16:25 +08:00
|
|
|
// Aseprite
|
2017-12-01 10:41:45 +08:00
|
|
|
// Copyright (C) 2001-2017 David Capello
|
2015-02-12 23:16:25 +08:00
|
|
|
//
|
2016-08-27 04:02:58 +08:00
|
|
|
// This program is distributed under the terms of
|
|
|
|
// the End-User License Agreement for Aseprite.
|
2012-01-06 06:45:03 +08:00
|
|
|
|
2013-08-06 08:20:19 +08:00
|
|
|
#ifdef HAVE_CONFIG_H
|
2012-01-06 06:45:03 +08:00
|
|
|
#include "config.h"
|
2013-08-06 08:20:19 +08:00
|
|
|
#endif
|
2012-01-06 06:45:03 +08:00
|
|
|
|
2016-11-21 21:25:27 +08:00
|
|
|
#ifndef ENABLE_SCRIPTING
|
|
|
|
#error ENABLE_SCRIPTING must be defined
|
|
|
|
#endif
|
|
|
|
|
2014-05-09 12:01:59 +08:00
|
|
|
#include "app/app.h"
|
2013-08-06 08:20:19 +08:00
|
|
|
#include "app/commands/command.h"
|
2014-05-09 12:01:59 +08:00
|
|
|
#include "app/ui/main_window.h"
|
2012-01-06 06:45:03 +08:00
|
|
|
|
2013-08-06 08:20:19 +08:00
|
|
|
namespace app {
|
|
|
|
|
2012-06-18 09:02:54 +08:00
|
|
|
using namespace ui;
|
|
|
|
|
2013-08-06 08:20:19 +08:00
|
|
|
class DeveloperConsoleCommand : public Command {
|
2012-01-06 06:45:03 +08:00
|
|
|
public:
|
|
|
|
DeveloperConsoleCommand();
|
|
|
|
~DeveloperConsoleCommand();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void onExecute(Context* context);
|
|
|
|
};
|
|
|
|
|
2025-08-06 02:59:31 +08:00
|
|
|
DeveloperConsoleCommand::DeveloperConsoleCommand() : Command(CommandId::DeveloperConsole())
|
2012-01-06 06:45:03 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
DeveloperConsoleCommand::~DeveloperConsoleCommand()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void DeveloperConsoleCommand::onExecute(Context* context)
|
|
|
|
{
|
2016-04-23 00:19:06 +08:00
|
|
|
App::instance()->mainWindow()->showDevConsole();
|
2012-01-06 06:45:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
Command* CommandFactory::createDeveloperConsoleCommand()
|
|
|
|
{
|
|
|
|
return new DeveloperConsoleCommand;
|
|
|
|
}
|
2013-08-06 08:20:19 +08:00
|
|
|
|
|
|
|
} // namespace app
|