## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Touch piano mode. Allows piano keys to be played with the touch screen. Since the touch screen is still needed for menu navigation (including during songs) a toggle switch is added so that the user can flip between navigation mode and piano mode. The touch targets are pixel-perfect. Don't let the game's piano animations fool you. ## Testing
28 lines
576 B
C++
28 lines
576 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <windows.h>
|
|
|
|
#include "touch/native/nativetouchhook.h"
|
|
|
|
namespace games::nost::touch_mode {
|
|
|
|
// nav mode forwards contacts to the game; piano mode converts them into piano keys
|
|
enum class Mode {
|
|
Nav,
|
|
Piano,
|
|
};
|
|
|
|
void enable();
|
|
void disable();
|
|
bool enabled();
|
|
|
|
Mode current_mode();
|
|
|
|
void publish_button_bounds(HWND window, const RECT &client_bounds);
|
|
|
|
uint32_t piano_key_state();
|
|
|
|
bool filter_native_touch(const nativetouch::NativeTouchEvent &event);
|
|
}
|