tweak to non-touch screen representation of interactive buttons
This commit is contained in:
@@ -68,13 +68,22 @@ void InteractiveButton::Render()
|
||||
float stringWidth = mainFont->GetStringWidth(detailedInfoString.c_str());
|
||||
DWORD currentColor = mainFont->GetColor();
|
||||
#ifndef TOUCH_ENABLED
|
||||
mXOffset = 5;
|
||||
mXOffset = -5
|
||||
mYOffset = 10;
|
||||
float boxStartX = getX() - 5;
|
||||
float pspIconsSize = 0.5;
|
||||
renderer->FillRoundRect( boxStartX, getY() - 5, stringWidth, mainFont->GetHeight() + 15, .5, ARGB( 255, 0, 0, 0) );
|
||||
if (buttonImage != NULL)
|
||||
renderer->RenderQuad(buttonImage.get(), getX(), getY() + 2, 0, pspIconsSize, pspIconsSize);
|
||||
{
|
||||
renderer->FillRoundRect( boxStartX, getY() - 5, stringWidth, mainFont->GetHeight() + 15, .5, ARGB(255, 0, 0, 0) );
|
||||
renderer->RenderQuad(buttonImage.get(), boxStartX + (stringWidth/2), getY() + 2, 0, pspIconsSize, pspIconsSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
mYOffset = -3;
|
||||
mXOffset = 0;
|
||||
renderer->FillRoundRect( boxStartX, getY() - 5, stringWidth + 6, mainFont->GetHeight(), .5, ARGB(255, 192, 172, 119));
|
||||
renderer->DrawRoundRect( boxStartX, getY() - 5, stringWidth + 6, mainFont->GetHeight(), .75, ARGB(255,255,255,255));
|
||||
}
|
||||
#else
|
||||
mXOffset = 0;
|
||||
mYOffset = 0;
|
||||
|
||||
@@ -1683,6 +1683,7 @@
|
||||
CEA377211291C60500B9016A /* GuiPhaseBar.cpp */,
|
||||
CEA377221291C60500B9016A /* GuiPlay.cpp */,
|
||||
CEA377231291C60500B9016A /* GuiStatic.cpp */,
|
||||
12272FC714CD6A3900192DC7 /* InteractiveButton.cpp */,
|
||||
CEA377241291C60500B9016A /* ManaCost.cpp */,
|
||||
CEA377251291C60500B9016A /* ManaCostHybrid.cpp */,
|
||||
CEA377261291C60500B9016A /* MenuItem.cpp */,
|
||||
@@ -1707,6 +1708,7 @@
|
||||
CEA3773B1291C60500B9016A /* PriceList.cpp */,
|
||||
CEA3773C1291C60500B9016A /* ReplacementEffects.cpp */,
|
||||
CEA3773D1291C60500B9016A /* Rules.cpp */,
|
||||
12272FC314CD57CF00192DC7 /* SimpleButton.cpp */,
|
||||
CEA3773F1291C60500B9016A /* SimpleMenu.cpp */,
|
||||
CEA377401291C60500B9016A /* SimpleMenuItem.cpp */,
|
||||
CEA377411291C60500B9016A /* SimplePad.cpp */,
|
||||
@@ -1730,8 +1732,6 @@
|
||||
CEA377551291C60500B9016A /* WFont.cpp */,
|
||||
CEA377561291C60500B9016A /* WGui.cpp */,
|
||||
CEA377571291C60500B9016A /* WResourceManager.cpp */,
|
||||
12272FC314CD57CF00192DC7 /* SimpleButton.cpp */,
|
||||
12272FC714CD6A3900192DC7 /* InteractiveButton.cpp */,
|
||||
);
|
||||
path = src;
|
||||
sourceTree = "<group>";
|
||||
|
||||
Reference in New Issue
Block a user