No longer using extra icons for hilighted and disabled state, but drawing them with toolbox transform modes.
git-svn-id: svn://10.0.0.236/trunk@362 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
050a3b89b3
commit
d416a91e4b
@ -84,6 +84,7 @@ CButton::CButton(LStream *inStream)
|
||||
{
|
||||
mButtonMask = NULL;
|
||||
mGraphicHandle = NULL;
|
||||
mIconTransform = kTransformNone;
|
||||
SetTrackInside(false);
|
||||
|
||||
*inStream >> mTrackBehaviour;
|
||||
@ -342,7 +343,7 @@ void CButton::DrawButtonGraphic(void)
|
||||
else if (mGraphicType == 'ICN#')
|
||||
{
|
||||
CIconFamily theFamily(GetGraphicID());
|
||||
theFamily.Plot(mCachedGraphicFrame, mGraphicAlignment);
|
||||
theFamily.Plot(mCachedGraphicFrame, mGraphicAlignment, mIconTransform);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -119,6 +119,7 @@ class CButton : public LControl, public MPaneEnablerPolicy
|
||||
Int16 mGraphicPadPixels;
|
||||
|
||||
CIconHandle mGraphicHandle;
|
||||
IconTransformType mIconTransform;
|
||||
|
||||
private:
|
||||
virtual void HandleEnablingPolicy();
|
||||
|
||||
@ -91,27 +91,32 @@ void CPatternButton::DrawButtonContent(void)
|
||||
|
||||
void CPatternButton::DrawButtonGraphic(void)
|
||||
{
|
||||
ResIDT theSaveID = GetGraphicID();
|
||||
ResIDT theNewID = theSaveID;
|
||||
|
||||
bool useMouseOverIcon = false;
|
||||
mIconTransform = kTransformNone;
|
||||
|
||||
if (IsEnabled() && IsActive())
|
||||
{
|
||||
{
|
||||
if (!IsBehaviourButton() && (GetValue() == Button_On))
|
||||
{
|
||||
// do something different if IsTrackInside()
|
||||
theNewID += 2;
|
||||
//theNewID += 2;
|
||||
}
|
||||
else if (IsTrackInside())
|
||||
theNewID += 3;
|
||||
mIconTransform = kTransformSelected;
|
||||
else if (IsMouseInFrame())
|
||||
theNewID += 2;
|
||||
}
|
||||
useMouseOverIcon = true;
|
||||
}
|
||||
else
|
||||
theNewID += 1;
|
||||
mIconTransform = kTransformDisabled;
|
||||
|
||||
SetGraphicID(theNewID);
|
||||
ResIDT theIconID;
|
||||
if ( useMouseOverIcon ) {
|
||||
theIconID = GetGraphicID();
|
||||
SetGraphicID(theIconID + 2);
|
||||
}
|
||||
CToolbarButton::DrawButtonGraphic();
|
||||
SetGraphicID(theSaveID);
|
||||
if ( useMouseOverIcon )
|
||||
SetGraphicID(theIconID);
|
||||
}
|
||||
|
||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user