summaryrefslogtreecommitdiff
path: root/src/gui/game/GameModel.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-07-18 19:40:32 (GMT)
committer jacob1 <jfu614@gmail.com>2013-07-18 19:40:32 (GMT)
commitf56a2f60008adb1328f841aa67cc27beb0a3d271 (patch)
tree38f7239b1b22f1d60173095d41216226a412a4e7 /src/gui/game/GameModel.cpp
parentcc887995c0881d728e13fbdfe0757e0fa256bce0 (diff)
downloadpowder-f56a2f60008adb1328f841aa67cc27beb0a3d271.zip
powder-f56a2f60008adb1328f841aa67cc27beb0a3d271.tar.gz
add back replace mode and specific delete. Activated with insert key / delete key, use ctrl+alt click to select what to use for the checks
Diffstat (limited to 'src/gui/game/GameModel.cpp')
-rw-r--r--src/gui/game/GameModel.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/game/GameModel.cpp b/src/gui/game/GameModel.cpp
index 22c5e3c..c58bab0 100644
--- a/src/gui/game/GameModel.cpp
+++ b/src/gui/game/GameModel.cpp
@@ -39,8 +39,8 @@ GameModel::GameModel():
activeTools = regularToolset;
- std::fill(decoToolset, decoToolset+3, (Tool*)NULL);
- std::fill(regularToolset, regularToolset+3, (Tool*)NULL);
+ std::fill(decoToolset, decoToolset+4, (Tool*)NULL);
+ std::fill(regularToolset, regularToolset+4, (Tool*)NULL);
//Default render prefs
std::vector<unsigned int> tempArray;
@@ -235,13 +235,15 @@ void GameModel::BuildMenus()
if(activeMenu != -1)
lastMenu = activeMenu;
- std::string activeToolIdentifiers[3];
+ std::string activeToolIdentifiers[4];
if(regularToolset[0])
activeToolIdentifiers[0] = regularToolset[0]->GetIdentifier();
if(regularToolset[1])
activeToolIdentifiers[1] = regularToolset[1]->GetIdentifier();
if(regularToolset[2])
activeToolIdentifiers[2] = regularToolset[2]->GetIdentifier();
+ if(regularToolset[3])
+ activeToolIdentifiers[3] = regularToolset[3]->GetIdentifier();
//Empty current menus
for(std::vector<Menu*>::iterator iter = menuList.begin(), end = menuList.end(); iter != end; ++iter)
@@ -338,11 +340,13 @@ void GameModel::BuildMenus()
decoToolset[0] = GetToolFromIdentifier("DEFAULT_DECOR_SET");
decoToolset[1] = GetToolFromIdentifier("DEFAULT_DECOR_CLR");
decoToolset[2] = GetToolFromIdentifier("DEFAULT_UI_SAMPLE");
+ decoToolset[3] = GetToolFromIdentifier("DEFAULT_PT_NONE");
//Set default tools
regularToolset[0] = GetToolFromIdentifier("DEFAULT_PT_DUST");
regularToolset[1] = GetToolFromIdentifier("DEFAULT_PT_NONE");
regularToolset[2] = GetToolFromIdentifier("DEFAULT_UI_SAMPLE");
+ regularToolset[3] = GetToolFromIdentifier("DEFAULT_PT_NONE");
if(activeToolIdentifiers[0].length())
@@ -351,6 +355,8 @@ void GameModel::BuildMenus()
regularToolset[1] = GetToolFromIdentifier(activeToolIdentifiers[1]);
if(activeToolIdentifiers[2].length())
regularToolset[2] = GetToolFromIdentifier(activeToolIdentifiers[2]);
+ if(activeToolIdentifiers[3].length())
+ regularToolset[3] = GetToolFromIdentifier(activeToolIdentifiers[3]);
lastTool = activeTools[0];