修复host窗口在关闭后没有办法toggle的问题
This commit is contained in:
parent
f366339ba1
commit
263504c1a2
@ -1,4 +1,4 @@
|
||||
project(arona LANGUAGES C CXX OBJCXX OBJC)
|
||||
project(arona LANGUAGES C CXX)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
|
@ -24,6 +24,7 @@ void configure_imgui(ImGuiIO& io) {
|
||||
ImGui::StyleColorsClassic();
|
||||
ImGuiStyle* style = &ImGui::GetStyle();
|
||||
style->TabRounding = 0;
|
||||
// style->Colors[ImGuiCol_ButtonActive] = ImVec4(0.2f, 0.2f, 0.2f, 0.0f); // hide tab bar小三角使用此颜色, 如果想要隐藏, 就需要更改这个颜色
|
||||
// ImGui::StyleColorsDark();
|
||||
//ImGui::StyleColorsLight();
|
||||
|
||||
@ -48,10 +49,21 @@ void configure_imgui(ImGuiIO& io) {
|
||||
void draw_imgui(float delta_time) {
|
||||
// 全局dockspace
|
||||
ImGui::DockSpaceOverViewport();
|
||||
ImGui::Begin("Arona");
|
||||
if (ImGui::Button("Test")) {
|
||||
ImGui::Begin("Instrument");
|
||||
auto instruments = get_plugin_host_manager()->get_instrument_hosts();
|
||||
for (int32_t i = 0; i < instruments.size(); ++i) {
|
||||
plugin_host* host = instruments.at(i);
|
||||
std::string button_label = host->name + "##" + std::to_string(i);
|
||||
if (ImGui::Button(button_label.c_str())) {
|
||||
host->toggle_editor();
|
||||
}
|
||||
}
|
||||
if (ImGui::Button("Add")) {
|
||||
get_arona_application()->test();
|
||||
}
|
||||
if (ImGui::Button("Test2")) {
|
||||
spdlog::info("log");
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 47ae2613c842650e91e61d8e203737071dad1146
|
||||
Subproject commit dc4576634d6a78c1d50a84dca321ee6f05e3a8a0
|
Loading…
x
Reference in New Issue
Block a user