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 2016-01-17 19:23:28 +01:00
parent 63aa4291eb
commit a53d31a8d7
2 changed files with 5 additions and 2 deletions

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;
}

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 {