mirror of https://github.com/sm64pc/sm64pc.git
Fix menu sensitivity when using a gamepad
This commit is contained in:
parent
fa71b56cb0
commit
afa3b92fe9
|
@ -99,7 +99,7 @@ void MoonScreen::Update(){
|
|||
widgets[i]->Update();
|
||||
}
|
||||
float yStick = GetStickValue(MoonButtons::U_STICK, false);
|
||||
if(yStick > 0) {
|
||||
if(yStick > 5) {
|
||||
if(stickExecuted) return;
|
||||
if(this->selected != NULL) return;
|
||||
this->widgets[this->scrollIndex]->selected = false;
|
||||
|
@ -109,7 +109,7 @@ void MoonScreen::Update(){
|
|||
this->widgets[this->scrollIndex]->selected = true;
|
||||
stickExecuted = true;
|
||||
}
|
||||
if(yStick < 0) {
|
||||
if(yStick < -5) {
|
||||
if(stickExecuted) return;
|
||||
if(this->selected != NULL) return;
|
||||
this->widgets[this->scrollIndex]->selected = false;
|
||||
|
|
|
@ -64,12 +64,12 @@ void MoonAchievementsScreen::changeScroll(int idx){
|
|||
|
||||
void MoonAchievementsScreen::Update(){
|
||||
float yStick = GetStickValue(MoonButtons::U_STICK, false);
|
||||
if(yStick > 0) {
|
||||
if(yStick > 5) {
|
||||
if(dispatched) return;
|
||||
MoonAchievementsScreen::changeScroll(-1);
|
||||
dispatched = true;
|
||||
}
|
||||
if(yStick < 0) {
|
||||
if(yStick < -5) {
|
||||
if(dispatched) return;
|
||||
MoonAchievementsScreen::changeScroll(1);
|
||||
dispatched = true;
|
||||
|
|
|
@ -83,7 +83,7 @@ void MoonAddonsScreen::changeScroll(int idx){
|
|||
|
||||
void MoonAddonsScreen::Update(){
|
||||
float yStick = GetStickValue(MoonButtons::U_STICK, false);
|
||||
if(yStick > 0) {
|
||||
if(yStick > 5) {
|
||||
if(dispatched) return;
|
||||
if(currentPack != NULL){
|
||||
if(currentSubItem > 0)
|
||||
|
@ -96,7 +96,7 @@ void MoonAddonsScreen::Update(){
|
|||
MoonAddonsScreen::changeScroll(-1);
|
||||
dispatched = true;
|
||||
}
|
||||
if(yStick < 0) {
|
||||
if(yStick < -5) {
|
||||
if(dispatched) return;
|
||||
if(currentPack != NULL){
|
||||
if(currentSubItem < 2)
|
||||
|
|
|
@ -81,7 +81,7 @@ void MoonOptMain::Update(){
|
|||
isOpen = false;
|
||||
}
|
||||
float xStick = GetStickValue(MoonButtons::L_STICK, false);
|
||||
if(xStick < 0) {
|
||||
if(xStick < -50) {
|
||||
if(cswStickExecuted) return;
|
||||
if(categoryIndex > 0)
|
||||
categoryIndex -= 1;
|
||||
|
@ -90,7 +90,7 @@ void MoonOptMain::Update(){
|
|||
this->setCategory(categoryIndex);
|
||||
cswStickExecuted = true;
|
||||
}
|
||||
if(xStick > 0) {
|
||||
if(xStick > 50) {
|
||||
if(cswStickExecuted) return;
|
||||
if(categoryIndex < categories.size() - 1)
|
||||
categoryIndex += 1;
|
||||
|
|
|
@ -80,7 +80,7 @@ void MoonStoreScreen::changeScroll(int idx){
|
|||
|
||||
void MoonStoreScreen::Update(){
|
||||
float yStick = GetStickValue(MoonButtons::U_STICK, false);
|
||||
if(yStick > 0) {
|
||||
if(yStick > 5) {
|
||||
if(dispatched) return;
|
||||
if(currentPack != NULL){
|
||||
if(currentSubItem > 0)
|
||||
|
@ -93,7 +93,7 @@ void MoonStoreScreen::Update(){
|
|||
MoonStoreScreen::changeScroll(-1);
|
||||
dispatched = true;
|
||||
}
|
||||
if(yStick < 0) {
|
||||
if(yStick < -5) {
|
||||
if(dispatched) return;
|
||||
if(currentPack != NULL){
|
||||
if(currentSubItem < 2)
|
||||
|
|
Loading…
Reference in New Issue