Android: Apply opacity setting to pressed buttons too
This commit is contained in:
parent
3e1a25ead0
commit
d33efc37af
|
@ -117,6 +117,7 @@ public final class InputOverlayDrawableButton
|
|||
public void setOpacity(int value)
|
||||
{
|
||||
mDefaultStateBitmap.setAlpha(value);
|
||||
mPressedStateBitmap.setAlpha(value);
|
||||
}
|
||||
|
||||
public Rect getBounds()
|
||||
|
|
|
@ -186,6 +186,8 @@ public final class InputOverlayDrawableDpad
|
|||
public void setOpacity(int value)
|
||||
{
|
||||
mDefaultStateBitmap.setAlpha(value);
|
||||
mPressedOneDirectionStateBitmap.setAlpha(value);
|
||||
mPressedTwoDirectionsStateBitmap.setAlpha(value);
|
||||
}
|
||||
|
||||
public Rect getBounds()
|
||||
|
|
|
@ -255,8 +255,20 @@ public final class InputOverlayDrawableJoystick
|
|||
public void setOpacity(int value)
|
||||
{
|
||||
mOpacity = value;
|
||||
|
||||
mDefaultStateInnerBitmap.setAlpha(value);
|
||||
mOuterBitmap.setAlpha(value);
|
||||
mPressedStateInnerBitmap.setAlpha(value);
|
||||
|
||||
if (trackId == -1)
|
||||
{
|
||||
mOuterBitmap.setAlpha(value);
|
||||
mBoundsBoxBitmap.setAlpha(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
mOuterBitmap.setAlpha(0);
|
||||
mBoundsBoxBitmap.setAlpha(value);
|
||||
}
|
||||
}
|
||||
|
||||
public Rect getBounds()
|
||||
|
|
Loading…
Reference in New Issue