mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
UI: Fix fade-out when editing touch controls.
This commit is contained in:
parent
979bc58cac
commit
cb1b8f23bb
@ -34,7 +34,7 @@ public:
|
|||||||
void Update() override;
|
void Update() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float GetButtonOpacity();
|
virtual float GetButtonOpacity();
|
||||||
|
|
||||||
float lastFrameTime_;
|
float lastFrameTime_;
|
||||||
float secondsWithoutTouch_;
|
float secondsWithoutTouch_;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
// Official git repository and contact information can be found at
|
// Official git repository and contact information can be found at
|
||||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/colorutil.h"
|
#include "base/colorutil.h"
|
||||||
@ -65,6 +66,12 @@ public:
|
|||||||
virtual float GetSpacing() const { return 1.0f; }
|
virtual float GetSpacing() const { return 1.0f; }
|
||||||
virtual void SetSpacing(float s) { }
|
virtual void SetSpacing(float s) { }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
float GetButtonOpacity() override {
|
||||||
|
float opacity = g_Config.iTouchButtonOpacity / 100.0f;
|
||||||
|
return std::max(0.5f, opacity);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// convert from screen coordinates (leftColumnWidth to dp_xres) to actual fullscreen coordinates (0 to 1.0)
|
// convert from screen coordinates (leftColumnWidth to dp_xres) to actual fullscreen coordinates (0 to 1.0)
|
||||||
inline float toFullscreenCoord(int screenx) {
|
inline float toFullscreenCoord(int screenx) {
|
||||||
|
Loading…
Reference in New Issue
Block a user