mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #9828 from JosJuice/android-pressed-opacity
Android: Apply opacity setting to pressed buttons too
This commit is contained in:
commit
4979974a57
@ -117,6 +117,7 @@ public final class InputOverlayDrawableButton
|
|||||||
public void setOpacity(int value)
|
public void setOpacity(int value)
|
||||||
{
|
{
|
||||||
mDefaultStateBitmap.setAlpha(value);
|
mDefaultStateBitmap.setAlpha(value);
|
||||||
|
mPressedStateBitmap.setAlpha(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rect getBounds()
|
public Rect getBounds()
|
||||||
|
@ -186,6 +186,8 @@ public final class InputOverlayDrawableDpad
|
|||||||
public void setOpacity(int value)
|
public void setOpacity(int value)
|
||||||
{
|
{
|
||||||
mDefaultStateBitmap.setAlpha(value);
|
mDefaultStateBitmap.setAlpha(value);
|
||||||
|
mPressedOneDirectionStateBitmap.setAlpha(value);
|
||||||
|
mPressedTwoDirectionsStateBitmap.setAlpha(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rect getBounds()
|
public Rect getBounds()
|
||||||
|
@ -255,8 +255,20 @@ public final class InputOverlayDrawableJoystick
|
|||||||
public void setOpacity(int value)
|
public void setOpacity(int value)
|
||||||
{
|
{
|
||||||
mOpacity = value;
|
mOpacity = value;
|
||||||
|
|
||||||
mDefaultStateInnerBitmap.setAlpha(value);
|
mDefaultStateInnerBitmap.setAlpha(value);
|
||||||
|
mPressedStateInnerBitmap.setAlpha(value);
|
||||||
|
|
||||||
|
if (trackId == -1)
|
||||||
|
{
|
||||||
mOuterBitmap.setAlpha(value);
|
mOuterBitmap.setAlpha(value);
|
||||||
|
mBoundsBoxBitmap.setAlpha(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mOuterBitmap.setAlpha(0);
|
||||||
|
mBoundsBoxBitmap.setAlpha(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rect getBounds()
|
public Rect getBounds()
|
||||||
|
Loading…
Reference in New Issue
Block a user