Demonstrate creating a fullscreen menu bar and populating it.
| 2195 | |
| 2196 | // Demonstrate creating a fullscreen menu bar and populating it. |
| 2197 | static void ShowExampleAppMainMenuBar() |
| 2198 | { |
| 2199 | if (ImGui::BeginMainMenuBar()) |
| 2200 | { |
| 2201 | if (ImGui::BeginMenu("File")) |
| 2202 | { |
| 2203 | ShowExampleMenuFile(); |
| 2204 | ImGui::EndMenu(); |
| 2205 | } |
| 2206 | if (ImGui::BeginMenu("Edit")) |
| 2207 | { |
| 2208 | if (ImGui::MenuItem("Undo", "CTRL+Z")) {} |
| 2209 | if (ImGui::MenuItem("Redo", "CTRL+Y", false, false)) {} // Disabled item |
| 2210 | ImGui::Separator(); |
| 2211 | if (ImGui::MenuItem("Cut", "CTRL+X")) {} |
| 2212 | if (ImGui::MenuItem("Copy", "CTRL+C")) {} |
| 2213 | if (ImGui::MenuItem("Paste", "CTRL+V")) {} |
| 2214 | ImGui::EndMenu(); |
| 2215 | } |
| 2216 | ImGui::EndMainMenuBar(); |
| 2217 | } |
| 2218 | } |
| 2219 | |
| 2220 | static void ShowExampleMenuFile() |
| 2221 | { |
no test coverage detected