Clean up of sandbox
* Added a statistics panel * Added comments to `Sandbox.cpp` * Moved utility functions and GUI code out of sandbox.cpp
This commit is contained in:
31
SandboxApplication/GUI.cpp
Normal file
31
SandboxApplication/GUI.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "GUI.h"
|
||||
|
||||
void CameraTool(Camera* cam) {
|
||||
|
||||
ImGui::Begin("Camera");
|
||||
|
||||
ImGui::SliderFloat("Zoom:", &cam->Zoom, 10, 190);
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void ScriptingTool(char* code) {
|
||||
ImGui::Begin("Scripting");
|
||||
|
||||
ImGui::InputTextMultiline("Lua Script", code, 255);
|
||||
bool runCode = ImGui::Button("Run");
|
||||
|
||||
|
||||
ImGui::End();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void transformWindow(Transform& transform, std::string PanelName) {
|
||||
ImGui::Begin(PanelName.c_str());
|
||||
ImGui::InputFloat3("Position:", (float*)&transform.Position[0]);
|
||||
ImGui::InputFloat3("Rotation:", (float*)&transform.Rotation[0]);
|
||||
ImGui::InputFloat3("Scale:", (float*)&transform.Scale[0]);
|
||||
ImGui::End();
|
||||
|
||||
}
|
Reference in New Issue
Block a user