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:
		@ -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);
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user