Fix warnings.

This commit is contained in:
Zachary Hall 2023-07-21 09:56:13 -07:00
parent 4f0f1dd84b
commit 8ab46669de
2 changed files with 31 additions and 31 deletions

View file

@ -324,38 +324,38 @@ int main(int, char**)
// 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
if (show_demo_window) if (show_demo_window)
ImGui::ShowDemoWindow(&show_demo_window); ImGui::ShowDemoWindow(&show_demo_window);
if (ImGui::BeginMainMenuBar()) { if (ImGui::BeginMainMenuBar()) {
if (ImGui::BeginMenu(ICON_FK_FILE "File")) { if (ImGui::BeginMenu(ICON_FK_FILE "File")) {
if (ImGui::MenuItem(ICON_FK_FOLDER_OPEN "Open")) { if (ImGui::MenuItem(ICON_FK_FOLDER_OPEN "Open")) {
fileDialog.Open(); fileDialog.Open();
}
if (ImGui::MenuItem(ICON_FK_WINDOW_CLOSE "Quit")) {
done = true;
}
ImGui::EndMenu();
} }
if (ImGui::BeginMenu(ICON_FK_SCISSORS "Edit")) { if (ImGui::MenuItem(ICON_FK_WINDOW_CLOSE "Quit")) {
if (ImGui::MenuItem(ICON_FK_COG "Preferences...")) { done = true;
prefs_window = true;
}
ImGui::EndMenu();
} }
#ifdef DEBUG ImGui::EndMenu();
if (ImGui::BeginMenu(ICON_FK_COG "Debug")) {
if (ImGui::MenuItem("Show ImGui Demo Window", nullptr, show_demo_window)) {
show_demo_window = !show_demo_window;
}
ImGui::EndMenu();
}
#endif
if (ImGui::BeginMenu(ICON_FK_INFO_CIRCLE "Help")) {
if (ImGui::MenuItem(ICON_FK_INFO "About", nullptr, about_window)) {
about_window = !about_window;
}
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
} }
if (ImGui::BeginMenu(ICON_FK_SCISSORS "Edit")) {
if (ImGui::MenuItem(ICON_FK_COG "Preferences...")) {
prefs_window = true;
}
ImGui::EndMenu();
}
#ifdef DEBUG
if (ImGui::BeginMenu(ICON_FK_COG "Debug")) {
if (ImGui::MenuItem("Show ImGui Demo Window", nullptr, show_demo_window)) {
show_demo_window = !show_demo_window;
}
ImGui::EndMenu();
}
#endif
if (ImGui::BeginMenu(ICON_FK_INFO_CIRCLE "Help")) {
if (ImGui::MenuItem(ICON_FK_INFO "About", nullptr, about_window)) {
about_window = !about_window;
}
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
ImGui::SetNextWindowDockID(dockid); ImGui::SetNextWindowDockID(dockid);
ImGui::Begin(ICON_FK_PLAY "Player", nullptr, 0); ImGui::Begin(ICON_FK_PLAY "Player", nullptr, 0);
{ {

View file

@ -277,7 +277,7 @@ bool Theme::ShowEditor(bool* open, Theme* &theme, ImGuiID dockid, int window_wid
if (themePath.stem().string().starts_with(filter)) { if (themePath.stem().string().starts_with(filter)) {
const bool is_selected = strcmp(themePath.stem().generic_string().c_str(), selectedThemeName) == 0; const bool is_selected = strcmp(themePath.stem().generic_string().c_str(), selectedThemeName) == 0;
if (ImGui::Selectable(themePath.stem().generic_string().c_str(), is_selected)) { if (ImGui::Selectable(themePath.stem().generic_string().c_str(), is_selected)) {
strncpy(selectedThemeName, themePath.stem().generic_string().c_str(), 1024); strncpy(selectedThemeName, themePath.stem().generic_string().c_str(), 1023);
} }
if (is_selected) { if (is_selected) {
ImGui::SetItemDefaultFocus(); ImGui::SetItemDefaultFocus();