mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 11:11:33 +00:00
FEAT(InstanceMode): Add a tooltip for InstanceMode in the same style as that of PathgridMode
This commit is contained in:
parent
fb9b191027
commit
44d5939572
2 changed files with 20 additions and 1 deletions
|
@ -297,7 +297,7 @@ void CSVRender::InstanceMode::setDragAxis(const char axis)
|
||||||
CSVRender::InstanceMode::InstanceMode(
|
CSVRender::InstanceMode::InstanceMode(
|
||||||
WorldspaceWidget* worldspaceWidget, osg::ref_ptr<osg::Group> parentNode, QWidget* parent)
|
WorldspaceWidget* worldspaceWidget, osg::ref_ptr<osg::Group> parentNode, QWidget* parent)
|
||||||
: EditMode(worldspaceWidget, Misc::ScalableIcon::load(":scenetoolbar/editing-instance"),
|
: EditMode(worldspaceWidget, Misc::ScalableIcon::load(":scenetoolbar/editing-instance"),
|
||||||
Mask_Reference | Mask_Terrain, "Instance editing", parent)
|
Mask_Reference | Mask_Terrain, getTooltip(), parent)
|
||||||
, mSubMode(nullptr)
|
, mSubMode(nullptr)
|
||||||
, mSubModeId("move")
|
, mSubModeId("move")
|
||||||
, mSelectionMode(nullptr)
|
, mSelectionMode(nullptr)
|
||||||
|
@ -345,6 +345,23 @@ CSVRender::InstanceMode::InstanceMode(
|
||||||
qOverload<>(&CSMPrefs::Shortcut::activated), this, [this, axis] { this->setDragAxis(axis); });
|
qOverload<>(&CSMPrefs::Shortcut::activated), this, [this, axis] { this->setDragAxis(axis); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString CSVRender::InstanceMode::getTooltip()
|
||||||
|
{
|
||||||
|
return QString(
|
||||||
|
"Instance editing"
|
||||||
|
"<ul><li>Use {scene-select-primary} and {scene-select-secondary} to select and unselect instances</li>"
|
||||||
|
"<li>Use {scene-edit-primary} to manipulate instances</li>"
|
||||||
|
"<li>Use {scene-select-tertiary} to select a reference object and then {scene-edit-secondary} to snap "
|
||||||
|
"selection relative to the reference object</li>"
|
||||||
|
"<li>Use {scene-submode-move}, {scene-submode-rotate}, {scene-submode-scale} to change to move, rotate, and "
|
||||||
|
"scale modes respectively</li>"
|
||||||
|
"<li>Use {scene-axis-x}, {scene-axis-y}, and {scene-axis-z} to lock changes to X, Y, and Z axes "
|
||||||
|
"respectively</li>"
|
||||||
|
"<li>Use {scene-delete} to delete currently selected objects</li>"
|
||||||
|
"<li>Use {scene-duplicate} to duplicate instances</li>"
|
||||||
|
"<li>Use {scene-instance-drop} to drop instances</li></ul>");
|
||||||
|
}
|
||||||
|
|
||||||
void CSVRender::InstanceMode::activate(CSVWidget::SceneToolbar* toolbar)
|
void CSVRender::InstanceMode::activate(CSVWidget::SceneToolbar* toolbar)
|
||||||
{
|
{
|
||||||
if (!mSubMode)
|
if (!mSubMode)
|
||||||
|
|
|
@ -74,6 +74,8 @@ namespace CSVRender
|
||||||
InstanceMode(
|
InstanceMode(
|
||||||
WorldspaceWidget* worldspaceWidget, osg::ref_ptr<osg::Group> parentNode, QWidget* parent = nullptr);
|
WorldspaceWidget* worldspaceWidget, osg::ref_ptr<osg::Group> parentNode, QWidget* parent = nullptr);
|
||||||
|
|
||||||
|
QString getTooltip();
|
||||||
|
|
||||||
void activate(CSVWidget::SceneToolbar* toolbar) override;
|
void activate(CSVWidget::SceneToolbar* toolbar) override;
|
||||||
|
|
||||||
void deactivate(CSVWidget::SceneToolbar* toolbar) override;
|
void deactivate(CSVWidget::SceneToolbar* toolbar) override;
|
||||||
|
|
Loading…
Reference in a new issue