Cambiando a docking!
This commit is contained in:
@@ -32,7 +32,6 @@ Graphics::Graphics(std::shared_ptr<MachineState> machine_state): machine_state{s
|
|||||||
chip8_width(64),
|
chip8_width(64),
|
||||||
chip8_height(32),
|
chip8_height(32),
|
||||||
main_scale(1.0f) {}
|
main_scale(1.0f) {}
|
||||||
|
|
||||||
bool Graphics::init_sdl() {
|
bool Graphics::init_sdl() {
|
||||||
SDL_SetAppMetadata("CHIP-8 Emulator", "0.0.1", "fun.skrd.chip8");
|
SDL_SetAppMetadata("CHIP-8 Emulator", "0.0.1", "fun.skrd.chip8");
|
||||||
|
|
||||||
@@ -72,6 +71,7 @@ bool Graphics::init_imgui() {
|
|||||||
|
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||||
|
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
||||||
|
|
||||||
ImGui::StyleColorsDark();
|
ImGui::StyleColorsDark();
|
||||||
ImGuiStyle& style = ImGui::GetStyle();
|
ImGuiStyle& style = ImGui::GetStyle();
|
||||||
@@ -110,6 +110,7 @@ void Graphics::draw() {
|
|||||||
ImGui_ImplSDLRenderer3_NewFrame();
|
ImGui_ImplSDLRenderer3_NewFrame();
|
||||||
ImGui_ImplSDL3_NewFrame();
|
ImGui_ImplSDL3_NewFrame();
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
ImGui::DockSpaceOverViewport(0, ImGui::GetMainViewport());
|
||||||
|
|
||||||
draw_chip8_widget();
|
draw_chip8_widget();
|
||||||
|
|
||||||
@@ -168,3 +169,4 @@ void Graphics::draw_chip8_widget() {
|
|||||||
ImGui::Image((ImTextureID)(intptr_t)texture.get(), scaled_size);
|
ImGui::Image((ImTextureID)(intptr_t)texture.get(), scaled_size);
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
vendor/imgui
vendored
2
vendor/imgui
vendored
Submodule vendor/imgui updated: afe20dc9b6...efe2b21a5f
Reference in New Issue
Block a user