mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Make DynOS and Player panels disable pause camera zoom out
This commit is contained in:
parent
e2fdcbe5b9
commit
1e1c46f6b9
5 changed files with 11 additions and 1 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "pc/network/network.h"
|
||||
#include "pc/lua/smlua_hooks.h"
|
||||
#include "pc/djui/djui.h"
|
||||
#include "pc/djui/djui_panel_player.h"
|
||||
#include "first_person_cam.h"
|
||||
|
||||
#define CBUTTON_MASK (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)
|
||||
|
@ -3660,7 +3661,7 @@ void zoom_out_if_paused_and_outside(struct GraphNodeCamera *camera) {
|
|||
areaMaskIndex = 0;
|
||||
areaBit = 0;
|
||||
}
|
||||
if (gCameraMovementFlags & CAM_MOVE_PAUSE_SCREEN) {
|
||||
if (gCameraMovementFlags & CAM_MOVE_PAUSE_SCREEN && !gDjuiPanelPlayerCreated) {
|
||||
if (sFramesPaused >= 2) {
|
||||
if (sZoomOutAreaMasks[areaMaskIndex] & areaBit) {
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "djui_panel_main.h"
|
||||
#include "djui_panel_pause.h"
|
||||
#include "djui_panel_join_message.h"
|
||||
#include "djui_panel_player.h"
|
||||
#include "src/pc/debuglog.h"
|
||||
#include "src/pc/utils/misc.h"
|
||||
#include "sounds.h"
|
||||
|
@ -121,6 +122,7 @@ void djui_panel_back(void) {
|
|||
play_sound(SOUND_MENU_CLICK_FILE_SELECT, gGlobalSoundSource);
|
||||
|
||||
gDjuiPanelJoinMessageVisible = false;
|
||||
gDjuiPanelPlayerCreated = false;
|
||||
}
|
||||
|
||||
void djui_panel_update(void) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "pc/network/network.h"
|
||||
#include "djui_panel_main.h"
|
||||
#include "djui_panel_options.h"
|
||||
#include "djui_panel_player.h"
|
||||
|
||||
void djui_panel_dynos_create(struct DjuiBase* caller);
|
||||
|
||||
|
@ -72,4 +73,5 @@ void djui_panel_dynos_create(struct DjuiBase* caller) {
|
|||
}
|
||||
|
||||
djui_panel_add(caller, panel, NULL);
|
||||
gDjuiPanelPlayerCreated = true;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ static struct DjuiSelectionbox* sPalettePresetSelection;
|
|||
static struct DjuiInputbox* sHexColorTextBox;
|
||||
static struct DjuiSlider *sSliderR, *sSliderG, *sSliderB;
|
||||
|
||||
bool gDjuiPanelPlayerCreated = false;
|
||||
|
||||
static void djui_panel_player_edit_palette_update_hex_code_box(void) {
|
||||
char buf[7];
|
||||
static const char digitToChar[] = "0123456789abcdef";
|
||||
|
@ -337,4 +339,5 @@ void djui_panel_player_create(struct DjuiBase* caller) {
|
|||
|
||||
struct DjuiPanel* p = djui_panel_add(caller, panel, NULL);
|
||||
p->on_panel_destroy = djui_panel_player_destroy;
|
||||
gDjuiPanelPlayerCreated = true;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#pragma once
|
||||
#include "djui.h"
|
||||
|
||||
extern bool gDjuiPanelPlayerCreated;
|
||||
|
||||
void djui_panel_player_create(struct DjuiBase* caller);
|
||||
|
|
Loading…
Reference in a new issue