Working, super great !
This commit is contained in:
		
					parent
					
						
							
								061883ced0
							
						
					
				
			
			
				commit
				
					
						ac1d04353e
					
				
			
		
					 2 changed files with 41 additions and 25 deletions
				
			
		| 
						 | 
				
			
			@ -47,15 +47,8 @@ void gui::Gui::render_gui(const Controller &controller) {
 | 
			
		|||
		(void) ImGui::Begin("Billy", nullptr, flags);
 | 
			
		||||
		menu.gui();
 | 
			
		||||
 | 
			
		||||
		ImGui::Text("Hello world!");
 | 
			
		||||
		ImGui::Text("Average framerate: %.3f ms/frame (%.1f FPS)", 1000.f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
 | 
			
		||||
		{
 | 
			
		||||
			ImGui::BeginChild("left pane",
 | 
			
		||||
							  ImVec2(ImGui::GetWindowWidth() / 2, -ImGui::GetFrameHeightWithSpacing() -
 | 
			
		||||
																  ImGui::GetStyle().ItemSpacing.y * 4 -
 | 
			
		||||
																  ImGui::GetStyle().ChildBorderSize -
 | 
			
		||||
																  ImGui::GetStyle().FrameBorderSize),
 | 
			
		||||
							  true);
 | 
			
		||||
			ImGui::BeginChild("carac", ImVec2(0, ImGui::GetWindowHeight() * 0.2f), true);
 | 
			
		||||
			ImGui::Text("Caractère");
 | 
			
		||||
			// Remove label
 | 
			
		||||
			ImGui::PushItemWidth(-1);
 | 
			
		||||
| 
						 | 
				
			
			@ -63,23 +56,18 @@ void gui::Gui::render_gui(const Controller &controller) {
 | 
			
		|||
			ImGui::PopItemWidth();
 | 
			
		||||
			ImGui::EndChild();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		ImGui::BeginGroup();
 | 
			
		||||
		{
 | 
			
		||||
			ImGui::BeginChild("habilete", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true);
 | 
			
		||||
			ImGui::Text("Habileté");
 | 
			
		||||
			ImGui::EndChild();
 | 
			
		||||
		}
 | 
			
		||||
		ImGui::SameLine();
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			ImGui::BeginChild("Right Pane",
 | 
			
		||||
							  ImVec2(0,
 | 
			
		||||
									 -ImGui::GetFrameHeightWithSpacing() -
 | 
			
		||||
									 ImGui::GetStyle().ItemSpacing.y * 4 -
 | 
			
		||||
									 ImGui::GetStyle().ChildBorderSize -
 | 
			
		||||
									 ImGui::GetStyle().FrameBorderSize),
 | 
			
		||||
							  true);
 | 
			
		||||
			ImGui::Text("Hello");
 | 
			
		||||
			ImGui::EndChild();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			ImGui::BeginChild("Bottom pane", ImVec2(0, 0), true);
 | 
			
		||||
			ImGui::Text("Bottom pane");
 | 
			
		||||
			ImGui::BeginChild("adresse", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true);
 | 
			
		||||
			ImGui::Text("Adresse");
 | 
			
		||||
			ImGui::Text("Bottom pane1");
 | 
			
		||||
			ImGui::Text("Bottom pane2");
 | 
			
		||||
			ImGui::Text("Bottom pane3");
 | 
			
		||||
| 
						 | 
				
			
			@ -87,6 +75,34 @@ void gui::Gui::render_gui(const Controller &controller) {
 | 
			
		|||
			ImGui::EndChild();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			ImGui::BeginChild("endurance", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true);
 | 
			
		||||
			ImGui::Text("Endurance");
 | 
			
		||||
			ImGui::Text("Bottom pane1");
 | 
			
		||||
			ImGui::Text("Bottom pane2");
 | 
			
		||||
			ImGui::Text("Bottom pane3");
 | 
			
		||||
			ImGui::Text("Bottom pane4");
 | 
			
		||||
			ImGui::EndChild();
 | 
			
		||||
		}
 | 
			
		||||
		ImGui::SameLine();
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			ImGui::BeginChild("chance", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true);
 | 
			
		||||
			ImGui::Text("Chance");
 | 
			
		||||
			ImGui::Text("Bottom pane1");
 | 
			
		||||
			ImGui::Text("Bottom pane2");
 | 
			
		||||
			ImGui::Text("Bottom pane3");
 | 
			
		||||
			ImGui::Text("Bottom pane4");
 | 
			
		||||
			ImGui::EndChild();
 | 
			
		||||
		}
 | 
			
		||||
		ImGui::EndGroup();
 | 
			
		||||
		ImGui::SameLine();
 | 
			
		||||
		{
 | 
			
		||||
			ImGui::BeginChild("stats secondaire", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.4f), true);
 | 
			
		||||
			ImGui::Text("STAT. SECONDAIRES");
 | 
			
		||||
			ImGui::EndChild();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		ImGui::End();
 | 
			
		||||
 | 
			
		||||
		controller.control_menu();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,7 @@ gui::Window::Window() {
 | 
			
		|||
	}
 | 
			
		||||
	glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
 | 
			
		||||
	glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
 | 
			
		||||
	wwindow = std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)>(glfwCreateWindow(600, 800, "Billy Sheet tracker", nullptr, nullptr),
 | 
			
		||||
	wwindow = std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)>(glfwCreateWindow(720, 1280, "Billy Sheet tracker", nullptr, nullptr),
 | 
			
		||||
																		 delete_glfw_window);
 | 
			
		||||
	if (!wwindow) {
 | 
			
		||||
		glfwTerminate();
 | 
			
		||||
| 
						 | 
				
			
			@ -34,9 +34,9 @@ gui::Window::Window() {
 | 
			
		|||
		SPDLOG_CRITICAL("GLEW loader failed.");
 | 
			
		||||
		throw std::runtime_error("GLEW failed. See log.");
 | 
			
		||||
	}
 | 
			
		||||
	glfwSwapInterval(1); // VSync on
 | 
			
		||||
 | 
			
		||||
	glfwSetFramebufferSizeCallback(wwindow.get(), framebufferCallback);
 | 
			
		||||
 | 
			
		||||
	glfwSwapInterval(1); // VSync on
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool gui::Window::should_close() const noexcept {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue