mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-09 23:02:11 -04:00
Disable Editor when its disabled
This commit is contained in:
@@ -41,6 +41,14 @@ namespace Editor {
|
||||
}
|
||||
|
||||
void Editor::Tick() {
|
||||
|
||||
if (CVarGetInteger("gEditorEnabled", 0) == true) {
|
||||
bEditorEnabled = true;
|
||||
} else {
|
||||
bEditorEnabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
auto wnd = GameEngine::Instance->context->GetWindow();
|
||||
|
||||
static bool wasMouseDown = false;
|
||||
@@ -94,6 +102,9 @@ namespace Editor {
|
||||
}
|
||||
|
||||
void Editor::Draw() {
|
||||
if (!bEditorEnabled) {
|
||||
return;
|
||||
}
|
||||
eObjectPicker.Draw();
|
||||
for (auto& object : eGameObjects) {
|
||||
object->Draw();
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
void SetLevelDimensions(s16 minX, s16 maxX, s16 minZ, s16 maxZ, s16 minY, s16 maxY);
|
||||
void ClearMatrixPool();
|
||||
void DeleteObject();
|
||||
bool bEditorEnabled = false;
|
||||
|
||||
private:
|
||||
bool _draw = false;
|
||||
|
||||
Reference in New Issue
Block a user