mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 21:33:40 -07:00
alias controls on M1/M2 for now
This commit is contained in:
parent
f48647986b
commit
2e25f846bc
4 changed files with 11 additions and 4 deletions
|
@ -1597,7 +1597,6 @@ void SohInputEditorWindow::DrawLinkTab() {
|
|||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Modifier Buttons")) {
|
||||
DrawButtonLine("QV", portIndex, BTN_CUSTOM_QUERYVIEW);
|
||||
DrawButtonLine("M1", portIndex, BTN_CUSTOM_MODIFIER1);
|
||||
DrawButtonLine("M2", portIndex, BTN_CUSTOM_MODIFIER2);
|
||||
|
||||
|
|
|
@ -177,7 +177,17 @@ void RegisterOnInterfaceUpdateHook() {
|
|||
if (!GameInteractor::IsSaveLoaded(true))
|
||||
return;
|
||||
|
||||
if (CHECK_BTN_ALL(gPlayState->state.input->press.button, BTN_CUSTOM_QUERYVIEW)) {
|
||||
if (CHECK_BTN_ALL(gPlayState->state.input->press.button, BTN_CUSTOM_MODIFIER1)) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
if (player != NULL) {
|
||||
char ttsAnnounceBuf[16];
|
||||
int angle = (int)(player->actor.world.rot.y / (65536 / 360.0));
|
||||
int annouceBuf = snprintf(ttsAnnounceBuf, sizeof(ttsAnnounceBuf), "facing %d", angle);
|
||||
SpeechSynthesizer::Instance->Speak(ttsAnnounceBuf, "en-US");
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(gPlayState->state.input->press.button, BTN_CUSTOM_MODIFIER2)) {
|
||||
int minDist = 1000000;
|
||||
Actor* readOut = NULL;
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
|
|
|
@ -314,7 +314,6 @@ OTRGlobals::OTRGlobals() {
|
|||
context->GetResourceManager()->SetAltAssetsEnabled(prevAltAssets);
|
||||
|
||||
auto controlDeck = std::make_shared<LUS::ControlDeck>(std::vector<CONTROLLERBUTTONS_T>({
|
||||
BTN_CUSTOM_QUERYVIEW,
|
||||
BTN_CUSTOM_MODIFIER1,
|
||||
BTN_CUSTOM_MODIFIER2,
|
||||
BTN_CUSTOM_OCARINA_NOTE_D4,
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define BTN_CUSTOM_QUERYVIEW 0x0020
|
||||
#define BTN_CUSTOM_MODIFIER1 0x0040
|
||||
#define BTN_CUSTOM_MODIFIER2 0x0080
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue