summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-12 01:47:13 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-12 01:47:13 (GMT)
commit51f27bfad72e7fbc72388f63c3b8a48162e509a1 (patch)
treeabd95cad4e12085fb8a67f63bce788db44f61f03 /src/gui
parent9d89d4b79b26584490e55cfb992fc58d3e11ea2b (diff)
parenta0a0e305a92b41923f7634fca1d30b0e71ee12e0 (diff)
downloadpowder-51f27bfad72e7fbc72388f63c3b8a48162e509a1.zip
powder-51f27bfad72e7fbc72388f63c3b8a48162e509a1.tar.gz
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/dialogues/LegacyDialogues.h2
-rw-r--r--src/gui/filebrowser/FileBrowserActivity.cpp2
-rw-r--r--src/gui/filebrowser/FileBrowserActivity.h2
-rw-r--r--src/gui/game/GameController.cpp8
-rw-r--r--src/gui/game/GameController.h5
-rw-r--r--src/gui/game/PropertyTool.cpp2
-rw-r--r--src/gui/game/RenderPreset.h2
-rw-r--r--src/gui/game/Tool.cpp2
-rw-r--r--src/gui/interface/ContextMenu.cpp2
-rw-r--r--src/gui/interface/ContextMenu.h2
-rw-r--r--src/gui/interface/LuaProgressBar.h2
-rw-r--r--src/gui/interface/ProgressBar.cpp2
-rw-r--r--src/gui/interface/ScrollPanel.cpp2
-rw-r--r--src/gui/interface/ScrollPanel.h2
-rw-r--r--src/gui/save/LocalSaveActivity.cpp2
-rw-r--r--src/gui/save/LocalSaveActivity.h2
-rw-r--r--src/gui/save/ServerSaveActivity.h2
17 files changed, 26 insertions, 17 deletions
diff --git a/src/gui/dialogues/LegacyDialogues.h b/src/gui/dialogues/LegacyDialogues.h
index 7f6097d..a604905 100644
--- a/src/gui/dialogues/LegacyDialogues.h
+++ b/src/gui/dialogues/LegacyDialogues.h
@@ -8,4 +8,4 @@ void ErrorUI(std::string title, std::string message) {}
void InformationUI(std::string title, std::string message) {}
-std::string MessagePromptUI(std::string title, std::string message, std::string text, std::string placeholder) {} \ No newline at end of file
+std::string MessagePromptUI(std::string title, std::string message, std::string text, std::string placeholder) {}
diff --git a/src/gui/filebrowser/FileBrowserActivity.cpp b/src/gui/filebrowser/FileBrowserActivity.cpp
index 7612ae2..d27f1b1 100644
--- a/src/gui/filebrowser/FileBrowserActivity.cpp
+++ b/src/gui/filebrowser/FileBrowserActivity.cpp
@@ -333,4 +333,4 @@ FileBrowserActivity::~FileBrowserActivity()
{
if(callback)
delete callback;
-} \ No newline at end of file
+}
diff --git a/src/gui/filebrowser/FileBrowserActivity.h b/src/gui/filebrowser/FileBrowserActivity.h
index d607d49..3696ba7 100644
--- a/src/gui/filebrowser/FileBrowserActivity.h
+++ b/src/gui/filebrowser/FileBrowserActivity.h
@@ -62,4 +62,4 @@ public:
virtual void NotifyError(Task * task);
virtual void NotifyProgress(Task * task);
virtual void NotifyStatus(Task * task);
-}; \ No newline at end of file
+};
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp
index ed1a866..d7b808b 100644
--- a/src/gui/game/GameController.cpp
+++ b/src/gui/game/GameController.cpp
@@ -145,8 +145,12 @@ GameController::GameController():
gameView->AttachController(this);
gameModel->AddObserver(gameView);
- commandInterface = new LuaScriptInterface(this, gameModel);//new TPTScriptInterface();
+#ifdef LUACONSOLE
+ commandInterface = new LuaScriptInterface(this, gameModel);
((LuaScriptInterface*)commandInterface)->SetWindow(gameView);
+#else
+ commandInterface = new TPTScriptInterface(this, gameModel);
+#endif
commandInterface->OnBrushChanged(gameModel->GetBrushID(), gameModel->GetBrush()->GetRadius().X, gameModel->GetBrush()->GetRadius().X);
ActiveToolChanged(0, gameModel->GetActiveTool(0));
@@ -706,7 +710,9 @@ void GameController::Tick()
{
if(firstTick)
{
+#ifdef LUACONSOLE
((LuaScriptInterface*)commandInterface)->Init();
+#endif
if(!Client::Ref().GetPrefBool("InstallCheck", false))
{
Client::Ref().SetPref("InstallCheck", true);
diff --git a/src/gui/game/GameController.h b/src/gui/game/GameController.h
index c34d44a..f2cf26b 100644
--- a/src/gui/game/GameController.h
+++ b/src/gui/game/GameController.h
@@ -14,8 +14,11 @@
#include "gui/console/ConsoleController.h"
#include "gui/localbrowser/LocalBrowserController.h"
#include "gui/options/OptionsController.h"
-//#include "cat/TPTScriptInterface.h"
+#ifdef LUACONSOLE
#include "cat/LuaScriptInterface.h"
+#else
+#include "cat/TPTScriptInterface.h"
+#endif
#include "client/ClientListener.h"
#include "RenderPreset.h"
#include "Menu.h"
diff --git a/src/gui/game/PropertyTool.cpp b/src/gui/game/PropertyTool.cpp
index 05726d3..aff535e 100644
--- a/src/gui/game/PropertyTool.cpp
+++ b/src/gui/game/PropertyTool.cpp
@@ -232,4 +232,4 @@ void PropertyWindow::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl
void PropertyTool::Click(Simulation * sim, Brush * brush, ui::Point position)
{
new PropertyWindow(this, sim, position);
-} \ No newline at end of file
+}
diff --git a/src/gui/game/RenderPreset.h b/src/gui/game/RenderPreset.h
index 9cc9f4c..91689c7 100644
--- a/src/gui/game/RenderPreset.h
+++ b/src/gui/game/RenderPreset.h
@@ -16,4 +16,4 @@ public:
ColourMode(colourMode)
{}
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/gui/game/Tool.cpp b/src/gui/game/Tool.cpp
index def6e46..ed43da7 100644
--- a/src/gui/game/Tool.cpp
+++ b/src/gui/game/Tool.cpp
@@ -212,4 +212,4 @@ void Element_TESC_Tool::DrawFill(Simulation * sim, Brush * brush, ui::Point posi
void PlopTool::Click(Simulation * sim, Brush * brush, ui::Point position)
{
sim->create_part(-1, position.X, position.Y, toolID);
-} \ No newline at end of file
+}
diff --git a/src/gui/interface/ContextMenu.cpp b/src/gui/interface/ContextMenu.cpp
index 0d34e19..aa9eeb5 100644
--- a/src/gui/interface/ContextMenu.cpp
+++ b/src/gui/interface/ContextMenu.cpp
@@ -96,4 +96,4 @@ void ContextMenu::OnDraw()
Graphics * g = ui::Engine::Ref().g;
g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 100, 100, 100, 255);
g->drawrect(Position.X, Position.Y, Size.X, Size.Y, Appearance.BackgroundInactive.Red, Appearance.BackgroundInactive.Green, Appearance.BackgroundInactive.Blue, Appearance.BackgroundInactive.Alpha);
-} \ No newline at end of file
+}
diff --git a/src/gui/interface/ContextMenu.h b/src/gui/interface/ContextMenu.h
index e5549d3..c7d8b5f 100644
--- a/src/gui/interface/ContextMenu.h
+++ b/src/gui/interface/ContextMenu.h
@@ -37,4 +37,4 @@ public:
};
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/gui/interface/LuaProgressBar.h b/src/gui/interface/LuaProgressBar.h
index dc2ef4e..98283cb 100644
--- a/src/gui/interface/LuaProgressBar.h
+++ b/src/gui/interface/LuaProgressBar.h
@@ -27,4 +27,4 @@ public:
LuaProgressBar(lua_State * l);
~LuaProgressBar();
-}; \ No newline at end of file
+};
diff --git a/src/gui/interface/ProgressBar.cpp b/src/gui/interface/ProgressBar.cpp
index 95da72c..80eb9c6 100644
--- a/src/gui/interface/ProgressBar.cpp
+++ b/src/gui/interface/ProgressBar.cpp
@@ -78,4 +78,4 @@ void ProgressBar::Tick(float dt)
intermediatePos += 1.0f*dt;
if(intermediatePos>100.0f)
intermediatePos = 0.0f;
-} \ No newline at end of file
+}
diff --git a/src/gui/interface/ScrollPanel.cpp b/src/gui/interface/ScrollPanel.cpp
index 74f6b62..11a4f71 100644
--- a/src/gui/interface/ScrollPanel.cpp
+++ b/src/gui/interface/ScrollPanel.cpp
@@ -170,4 +170,4 @@ void ScrollPanel::XTick(float dt)
scrollBarWidth++;
else if(!mouseInside && scrollBarWidth > 0 && !scrollbarSelected)
scrollBarWidth--;
-} \ No newline at end of file
+}
diff --git a/src/gui/interface/ScrollPanel.h b/src/gui/interface/ScrollPanel.h
index c26c420..08b5069 100644
--- a/src/gui/interface/ScrollPanel.h
+++ b/src/gui/interface/ScrollPanel.h
@@ -29,4 +29,4 @@ namespace ui
virtual void XOnMouseUp(int x, int y, unsigned int button);
virtual void XOnMouseMoved(int localx, int localy, int dx, int dy);
};
-} \ No newline at end of file
+}
diff --git a/src/gui/save/LocalSaveActivity.cpp b/src/gui/save/LocalSaveActivity.cpp
index f494f09..084f2f2 100644
--- a/src/gui/save/LocalSaveActivity.cpp
+++ b/src/gui/save/LocalSaveActivity.cpp
@@ -142,4 +142,4 @@ LocalSaveActivity::~LocalSaveActivity()
delete thumbnail;
if(callback)
delete callback;
-} \ No newline at end of file
+}
diff --git a/src/gui/save/LocalSaveActivity.h b/src/gui/save/LocalSaveActivity.h
index b58af5e..4668dd3 100644
--- a/src/gui/save/LocalSaveActivity.h
+++ b/src/gui/save/LocalSaveActivity.h
@@ -36,4 +36,4 @@ public:
virtual void OnDraw();
virtual void OnResponseReady(void * imagePtr);
virtual ~LocalSaveActivity();
-}; \ No newline at end of file
+};
diff --git a/src/gui/save/ServerSaveActivity.h b/src/gui/save/ServerSaveActivity.h
index 793579b..ceca173 100644
--- a/src/gui/save/ServerSaveActivity.h
+++ b/src/gui/save/ServerSaveActivity.h
@@ -49,4 +49,4 @@ protected:
friend class CancelAction;
friend class SaveAction;
friend class RulesAction;
-}; \ No newline at end of file
+};