Big cleanup... Expect bugs
This commit is contained in:
28
ModeSelectionListener.cpp
Normal file
28
ModeSelectionListener.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "Globals.h"
|
||||
#include "Instance.h"
|
||||
#include "ModeSelectionListener.h"
|
||||
#include "Application.h"
|
||||
|
||||
void ModeSelectionListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
//CoordinateFrame frame = g_usableApp->g3dCamera.getCoordinateFrame();
|
||||
int mode = g_usableApp->getMode();
|
||||
|
||||
std::vector<Instance*> instances_2D = g_dataModel->getGuiRoot()->getAllChildren();
|
||||
for(size_t i = 0; i < instances_2D.size(); i++)
|
||||
{
|
||||
if(instances_2D.at(i)->name == "Cursor" || instances_2D.at(i)->name == "Resize" || instances_2D.at(i)->name == "Arrows")
|
||||
{
|
||||
BaseButtonInstance* button = (BaseButtonInstance*)instances_2D.at(i);
|
||||
button->selected = false;
|
||||
}
|
||||
}
|
||||
|
||||
button->selected = true;
|
||||
if(button->name == "Cursor")
|
||||
mode = CURSOR;
|
||||
else if(button->name == "Resize")
|
||||
mode = RESIZE;
|
||||
else if(button->name == "Arrows")
|
||||
mode = ARROWS;
|
||||
}
|
||||
Reference in New Issue
Block a user