Script component inspector, glfwErrorCallback etc...

* Filling out script component inspector
* adding error_callback for glfw
* Measuring gflwInit time
* Moving Swap interval set to be after making context current
This commit is contained in:
2023-05-09 19:38:53 +02:00
parent 43fc721413
commit c82398205a
3 changed files with 57 additions and 11 deletions

View File

@ -134,9 +134,29 @@ void Inspector::ShowComponents()
}
if (selected.HasComponent<YoggieEngine::ScriptComponent>()) {
ComponentView("Scripting", [] {
ImGui::LabelText("##--", "Hello scripting");
});
const char* AssetNames[]{ "Script 1" , "Script 2" };
if (ImGui::CollapsingHeader("Script", ImGuiTreeNodeFlags_Leaf)) {
if (ImGui::Button("Select Renderable Asset"))
ImGui::OpenPopup("Scripts_list_popup");
if (ImGui::BeginPopup("Scripts_list_popup")) {
ImGui::Text("None");
ImGui::Separator();
for (int i = 0; i < IM_ARRAYSIZE(AssetNames); i++) {
if (ImGui::Selectable(AssetNames[i]))
{
}
}
ImGui::EndPopup();
}
ImGui::SameLine();
std::string scriptAssetId = "<Random_GUID>";
ImGui::InputText("asset", scriptAssetId.data(), scriptAssetId.length(), ImGuiInputTextFlags_ReadOnly | ImGuiInputTextFlags_AutoSelectAll);
}
}
}