editor mode pauses simulation
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
62ad638255
commit
2cf46cc38f
@ -1328,6 +1328,7 @@ Fix block meshgen algorithm iteration bug
|
||||
Add debug control to swap first/third person
|
||||
Setup scaffolding for drag-and-drop asset handling
|
||||
Editor mode asset file drag and drop
|
||||
Editor mode pauses simulation
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package electrosphere.client.ui.menu.editor;
|
||||
|
||||
import electrosphere.controls.ControlHandler.ControlsState;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.engine.Main;
|
||||
import electrosphere.renderer.ui.imgui.ImGuiWindow;
|
||||
import electrosphere.renderer.ui.imgui.ImGuiWindow.ImGuiWindowCallback;
|
||||
import imgui.ImGui;
|
||||
@ -62,8 +63,10 @@ public class ImGuiEditorWindows {
|
||||
ImGuiEditorWindows.editorIsOpen = mainWindow.isOpen();
|
||||
if(mainWindow.isOpen()){
|
||||
Globals.controlHandler.hintUpdateControlState(ControlsState.IN_GAME_MAIN_MENU);
|
||||
Main.setFramestep(Main.FRAMESTEP_PAUSE);
|
||||
} else {
|
||||
Globals.controlHandler.hintUpdateControlState(ControlsState.MAIN_GAME);
|
||||
Main.setFramestep(Main.FRAMESTEP_AUTO);
|
||||
}
|
||||
|
||||
//toggle all windows
|
||||
|
||||
@ -33,7 +33,21 @@ public class Main {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Pauses simulation
|
||||
*/
|
||||
public static final int FRAMESTEP_PAUSE = 0;
|
||||
|
||||
/**
|
||||
* Simulates a single frame
|
||||
*/
|
||||
public static final int FRAMESTEP_SINGLE = 1;
|
||||
|
||||
/**
|
||||
* Toggles automatic simulation
|
||||
*/
|
||||
public static final int FRAMESTEP_AUTO = 2;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -50,6 +64,7 @@ public class Main {
|
||||
|
||||
//framestep variable
|
||||
static int framestep = 2;
|
||||
|
||||
|
||||
public static void main(String args[]){
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user