Nigel Barink
16b61986a1
* Added Texures to the two sample cubes * Modified mesh structure - mesh now contains indices and vertices - Vertices contain vertices and uv's (later on they will also contain normals) Solution definitely not perfect and needs improvement.
41 lines
1000 B
C++
41 lines
1000 B
C++
#include "GUI.h"
|
|
|
|
void CameraTool(Camera* cam) {
|
|
|
|
ImGui::Begin("Camera");
|
|
|
|
ImGui::SliderFloat("Zoom:", &cam->Zoom, 10, 190);
|
|
|
|
ImGui::InputFloat3("Position:", &cam->Position[0]);
|
|
|
|
ImGui::InputFloat3("Rotation:", &cam->Rotation[0]);
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
void materialWindow(Material& material, std::string PanelName) {
|
|
ImGui::Begin(PanelName.c_str());
|
|
ImGui::ColorPicker3("Color:", &material.Color[0]);
|
|
ImGui::End();
|
|
} |