| 371 | } |
| 372 | |
| 373 | void handlePopupEnd() |
| 374 | { |
| 375 | if (s_editorPopup == POPUP_NONE || s_hidePopup) { return; } |
| 376 | |
| 377 | const EditorPopup popupId = s_editorPopup; |
| 378 | switch (s_editorPopup) |
| 379 | { |
| 380 | case POPUP_MSG_BOX: |
| 381 | { |
| 382 | if (messageBoxUi()) |
| 383 | { |
| 384 | ImGui::CloseCurrentPopup(); |
| 385 | s_editorPopup = POPUP_NONE; |
| 386 | } |
| 387 | } break; |
| 388 | case POPUP_CONFIG: |
| 389 | { |
| 390 | if (configUi()) |
| 391 | { |
| 392 | ImGui::CloseCurrentPopup(); |
| 393 | s_editorPopup = POPUP_NONE; |
| 394 | } |
| 395 | } break; |
| 396 | case POPUP_RESOURCES: |
| 397 | { |
| 398 | if (resources_ui()) |
| 399 | { |
| 400 | ImGui::CloseCurrentPopup(); |
| 401 | s_editorPopup = POPUP_NONE; |
| 402 | } |
| 403 | } break; |
| 404 | case POPUP_NEW_PROJECT: |
| 405 | { |
| 406 | if (project_editUi(true)) |
| 407 | { |
| 408 | ImGui::CloseCurrentPopup(); |
| 409 | s_editorPopup = POPUP_NONE; |
| 410 | } |
| 411 | } break; |
| 412 | case POPUP_EDIT_PROJECT: |
| 413 | { |
| 414 | if (project_editUi(false)) |
| 415 | { |
| 416 | ImGui::CloseCurrentPopup(); |
| 417 | s_editorPopup = POPUP_NONE; |
| 418 | } |
| 419 | } break; |
| 420 | case POPUP_EXPORT_PROJECT: |
| 421 | { |
| 422 | if (project_exportUi()) |
| 423 | { |
| 424 | ImGui::CloseCurrentPopup(); |
| 425 | s_editorPopup = POPUP_NONE; |
| 426 | } |
| 427 | } break; |
| 428 | case POPUP_NEW_LEVEL: |
| 429 | { |
| 430 | if (level_newLevelUi()) |
no test coverage detected