Make virtual gamepad visible from the start if button fading is on. They'll fade out after a while.

This commit is contained in:
Henrik Rydgard committed 2016-01-17 20:31:10 +01:00
1 parent 63aa4291eb
commit a53d31a8d7
2 files changed
+5 -2

No files matched your search

+4
View File
@@ -34,6 +34,10 @@ static u32 GetButtonColor() {
return g_Config.iTouchButtonStyle == 1 ? 0xFFFFFF : 0xc0b080;
}
GamepadView::GamepadView(UI::LayoutParams *layoutParams) : UI::View(layoutParams), secondsWithoutTouch_(0) {
lastFrameTime_ = time_now_d();
}
void GamepadView::Touch(const TouchInput &input) {
secondsWithoutTouch_ = 0.0f;
}
+1 -2
View File
@@ -25,8 +25,7 @@
class GamepadView : public UI::View {
public:
GamepadView(UI::LayoutParams *layoutParams) : UI::View(layoutParams), lastFrameTime_(0.0f), secondsWithoutTouch_(0) {
}
GamepadView(UI::LayoutParams *layoutParams);
void Touch(const TouchInput &input) override;
bool Key(const KeyInput &input) override {