mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-09 12:05:52 -04:00
don't allow activation if paused or in event
This commit is contained in:
+7
-2
@@ -7498,8 +7498,10 @@ bool dCamera_c::executeDebugFlyCam() {
|
||||
return false;
|
||||
}
|
||||
|
||||
event->mEventStatus = 1;
|
||||
dComIfGp_getEventManager().setCameraPlay(1);
|
||||
if (!mDebugFlyCam.initialized && (event->mEventStatus != 0 || dComIfGp_isPauseFlag())) {
|
||||
dusk::getSettings().game.debugFlyCam.setValue(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mDebugFlyCam.initialized) {
|
||||
mDebugFlyCam.savedCenter = mCenter;
|
||||
@@ -7517,6 +7519,9 @@ bool dCamera_c::executeDebugFlyCam() {
|
||||
mDebugFlyCam.initialized = true;
|
||||
}
|
||||
|
||||
event->mEventStatus = 1;
|
||||
dComIfGp_getEventManager().setCameraPlay(1);
|
||||
|
||||
interface_of_controller_pad& pad = mDoCPd_c::getCpadInfo(0);
|
||||
f32 stickY = pad.mMainStickPosY * 72.0f;
|
||||
f32 stickX = pad.mMainStickPosX * 72.0f;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
#include "imgui.h"
|
||||
#include "ImGuiConfig.hpp"
|
||||
@@ -50,11 +51,22 @@ namespace dusk {
|
||||
|
||||
ImGui::SeparatorText("Options");
|
||||
|
||||
bool eventRunning = (dComIfGp_event_runCheck() || dComIfGp_isPauseFlag()) && !getSettings().game.debugFlyCam;
|
||||
if (eventRunning) {
|
||||
ImGui::BeginDisabled();
|
||||
}
|
||||
config::ImGuiCheckbox("Fly Mode", getSettings().game.debugFlyCam);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Detach camera and fly freely.\n"
|
||||
"Left stick: move, C-stick: look\n"
|
||||
"L/R triggers: up/down, Z: fast");
|
||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) {
|
||||
if (eventRunning) {
|
||||
ImGui::SetTooltip("Cannot enable while paused or during an active event.");
|
||||
} else {
|
||||
ImGui::SetTooltip("Detach camera and fly freely.\n"
|
||||
"Left stick: move, C-stick: look\n"
|
||||
"L/R triggers: up/down, Z: fast");
|
||||
}
|
||||
}
|
||||
if (eventRunning) {
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
|
||||
ShowCornerContextMenu(m_cameraOverlayCorner, 0);
|
||||
|
||||
Reference in New Issue
Block a user