mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #873 from Azaezel/alpha401/compilefix
leftover profile reference flaw
This commit is contained in:
commit
dbb7fbc9ac
3 changed files with 9 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Soundasset.h"
|
#include "SoundAsset.h"
|
||||||
|
|
||||||
#ifndef _GUI_INSPECTOR_TYPES_H_
|
#ifndef _GUI_INSPECTOR_TYPES_H_
|
||||||
#include "gui/editor/guiInspectorTypes.h"
|
#include "gui/editor/guiInspectorTypes.h"
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ void GuiButtonBaseCtrl::onMouseDown(const GuiEvent &event)
|
||||||
if (mProfile->mCanKeyFocus)
|
if (mProfile->mCanKeyFocus)
|
||||||
setFirstResponder();
|
setFirstResponder();
|
||||||
|
|
||||||
if (mProfile->getSoundButtonDown())
|
if (mProfile->isSoundButtonDownValid())
|
||||||
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
||||||
|
|
||||||
mMouseDownPoint = event.mousePoint;
|
mMouseDownPoint = event.mousePoint;
|
||||||
|
|
@ -292,7 +292,7 @@ void GuiButtonBaseCtrl::onMouseEnter(const GuiEvent &event)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mProfile->getSoundButtonOver())
|
if (mProfile->isSoundButtonOverValid())
|
||||||
SFX->playOnce(mProfile->getSoundButtonOverProfile());
|
SFX->playOnce(mProfile->getSoundButtonOverProfile());
|
||||||
|
|
||||||
mHighlighted = true;
|
mHighlighted = true;
|
||||||
|
|
@ -377,7 +377,7 @@ bool GuiButtonBaseCtrl::onKeyDown(const GuiEvent &event)
|
||||||
if ((event.keyCode == KEY_RETURN || event.keyCode == KEY_SPACE)
|
if ((event.keyCode == KEY_RETURN || event.keyCode == KEY_SPACE)
|
||||||
&& event.modifier == 0)
|
&& event.modifier == 0)
|
||||||
{
|
{
|
||||||
if (mProfile->getSoundButtonDown())
|
if (mProfile->isSoundButtonDownValid())
|
||||||
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,9 @@ void GuiSliderCtrl::onMouseDown(const GuiEvent &event)
|
||||||
setFirstResponder();
|
setFirstResponder();
|
||||||
mDepressed = true;
|
mDepressed = true;
|
||||||
|
|
||||||
|
if (mProfile->isSoundButtonDownValid())
|
||||||
|
SFX->playOnce(mProfile->getSoundButtonDownProfile());
|
||||||
|
|
||||||
Point2I curMousePos = globalToLocalCoord( event.mousePoint );
|
Point2I curMousePos = globalToLocalCoord( event.mousePoint );
|
||||||
F32 value;
|
F32 value;
|
||||||
if (getWidth() >= getHeight())
|
if (getWidth() >= getHeight())
|
||||||
|
|
@ -261,7 +264,8 @@ void GuiSliderCtrl::onMouseEnter(const GuiEvent &event)
|
||||||
if( mActive && mProfile->mSoundButtonOver )
|
if( mActive && mProfile->mSoundButtonOver )
|
||||||
{
|
{
|
||||||
//F32 pan = (F32(event.mousePoint.x)/F32(getRoot()->getWidth())*2.0f-1.0f)*0.8f;
|
//F32 pan = (F32(event.mousePoint.x)/F32(getRoot()->getWidth())*2.0f-1.0f)*0.8f;
|
||||||
SFX->playOnce( mProfile->mSoundButtonOver );
|
if (mProfile->isSoundButtonOverValid())
|
||||||
|
SFX->playOnce(mProfile->getSoundButtonOverProfile());
|
||||||
}
|
}
|
||||||
|
|
||||||
mMouseOver = true;
|
mMouseOver = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue