forked from mirror/openmw-tes3mp
35 lines
838 B
C++
35 lines
838 B
C++
|
|
#include "instancemode.hpp"
|
|
|
|
#include "elements.hpp"
|
|
#include "object.hpp"
|
|
|
|
CSVRender::InstanceMode::InstanceMode (WorldspaceWidget *worldspaceWidget, QWidget *parent)
|
|
: EditMode (worldspaceWidget, QIcon (":placeholder"), Element_Reference, "Instance editing",
|
|
parent)
|
|
{
|
|
|
|
}
|
|
|
|
void CSVRender::InstanceMode::primaryEditPressed (osg::ref_ptr<TagBase> tag)
|
|
{
|
|
|
|
}
|
|
|
|
void CSVRender::InstanceMode::secondaryEditPressed (osg::ref_ptr<TagBase> tag)
|
|
{
|
|
|
|
}
|
|
|
|
void CSVRender::InstanceMode::selectPressed (osg::ref_ptr<TagBase> tag)
|
|
{
|
|
if (tag)
|
|
{
|
|
if (CSVRender::ObjectTag *objectTag = dynamic_cast<CSVRender::ObjectTag *> (tag.get()))
|
|
{
|
|
// hit an Object, toggle its selection state
|
|
CSVRender::Object* object = objectTag->mObject;
|
|
object->setSelected (!object->getSelected());
|
|
}
|
|
}
|
|
}
|