forked from mirror/openmw-tes3mp
updated run button
This commit is contained in:
parent
d37ff8ec63
commit
50a489321f
4 changed files with 7 additions and 8 deletions
|
@ -172,7 +172,7 @@ CSVWidget::SceneToolRun *CSVRender::WorldspaceWidget::makeRunTool (
|
||||||
std::sort (profiles.begin(), profiles.end());
|
std::sort (profiles.begin(), profiles.end());
|
||||||
|
|
||||||
mRun = new CSVWidget::SceneToolRun (parent, "Run OpenMW from the current camera position",
|
mRun = new CSVWidget::SceneToolRun (parent, "Run OpenMW from the current camera position",
|
||||||
":placeholder", ":placeholder", profiles);
|
":scenetoolbar/play", profiles);
|
||||||
|
|
||||||
connect (mRun, SIGNAL (runRequest (const std::string&)),
|
connect (mRun, SIGNAL (runRequest (const std::string&)),
|
||||||
this, SLOT (runRequest (const std::string&)));
|
this, SLOT (runRequest (const std::string&)));
|
||||||
|
|
|
@ -26,7 +26,7 @@ void CSVWidget::SceneToolRun::adjustToolTips()
|
||||||
|
|
||||||
void CSVWidget::SceneToolRun::updateIcon()
|
void CSVWidget::SceneToolRun::updateIcon()
|
||||||
{
|
{
|
||||||
setIcon (QIcon (mSelected==mProfiles.end() ? mIconDisabled : mIcon));
|
setDisabled (mSelected==mProfiles.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWidget::SceneToolRun::updatePanel()
|
void CSVWidget::SceneToolRun::updatePanel()
|
||||||
|
@ -46,11 +46,11 @@ void CSVWidget::SceneToolRun::updatePanel()
|
||||||
}
|
}
|
||||||
|
|
||||||
CSVWidget::SceneToolRun::SceneToolRun (SceneToolbar *parent, const QString& toolTip,
|
CSVWidget::SceneToolRun::SceneToolRun (SceneToolbar *parent, const QString& toolTip,
|
||||||
const QString& icon, const QString& iconDisabled, const std::vector<std::string>& profiles)
|
const QString& icon, const std::vector<std::string>& profiles)
|
||||||
: SceneTool (parent, Type_TopAction), mProfiles (profiles.begin(), profiles.end()),
|
: SceneTool (parent, Type_TopAction), mProfiles (profiles.begin(), profiles.end()),
|
||||||
mSelected (mProfiles.begin()), mToolTip (toolTip), mIcon (icon),
|
mSelected (mProfiles.begin()), mToolTip (toolTip)
|
||||||
mIconDisabled (iconDisabled)
|
|
||||||
{
|
{
|
||||||
|
setIcon (QIcon (icon));
|
||||||
updateIcon();
|
updateIcon();
|
||||||
adjustToolTips();
|
adjustToolTips();
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ namespace CSVWidget
|
||||||
std::set<std::string> mProfiles;
|
std::set<std::string> mProfiles;
|
||||||
std::set<std::string>::iterator mSelected;
|
std::set<std::string>::iterator mSelected;
|
||||||
QString mToolTip;
|
QString mToolTip;
|
||||||
QString mIcon;
|
|
||||||
QString mIconDisabled;
|
|
||||||
QFrame *mPanel;
|
QFrame *mPanel;
|
||||||
QTableWidget *mTable;
|
QTableWidget *mTable;
|
||||||
|
|
||||||
|
@ -35,7 +33,7 @@ namespace CSVWidget
|
||||||
public:
|
public:
|
||||||
|
|
||||||
SceneToolRun (SceneToolbar *parent, const QString& toolTip, const QString& icon,
|
SceneToolRun (SceneToolbar *parent, const QString& toolTip, const QString& icon,
|
||||||
const QString& iconDisabled, const std::vector<std::string>& profiles);
|
const std::vector<std::string>& profiles);
|
||||||
|
|
||||||
virtual void showPanel (const QPoint& position);
|
virtual void showPanel (const QPoint& position);
|
||||||
|
|
||||||
|
|
|
@ -79,5 +79,6 @@
|
||||||
<file alias="1st-person">eyeballdude.png</file>
|
<file alias="1st-person">eyeballdude.png</file>
|
||||||
<file alias="free-camera">flying eye.png</file>
|
<file alias="free-camera">flying eye.png</file>
|
||||||
<file alias="orbiting-camera">orbit2.png</file>
|
<file alias="orbiting-camera">orbit2.png</file>
|
||||||
|
<file alias="play">scene-play.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in a new issue