|
| 1 | +/* |
| 2 | +=========================================================================== |
| 3 | +blockattack - Block Attack - Rise of the Blocks |
| 4 | +Copyright (C) 2005-2025 Poul Sander |
| 5 | +
|
| 6 | +This program is free software: you can redistribute it and/or modify |
| 7 | +it under the terms of the GNU General Public License as published by |
| 8 | +the Free Software Foundation, either version 2 of the License, or |
| 9 | +(at your option) any later version. |
| 10 | +
|
| 11 | +This program is distributed in the hope that it will be useful, |
| 12 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +GNU General Public License for more details. |
| 15 | +
|
| 16 | +You should have received a copy of the GNU General Public License |
| 17 | +along with this program. If not, see http://www.gnu.org/licenses/ |
| 18 | +
|
| 19 | +Source information and contacts persons can be found at |
| 20 | +https://blockattack.net |
| 21 | +=========================================================================== |
| 22 | +*/ |
| 23 | + |
| 24 | +#include "PuzzleEditorState.hpp" |
| 25 | +#include "imgui.h" |
| 26 | +#include "backends/imgui_impl_sdl2.h" |
| 27 | +#include "backends/imgui_impl_sdlrenderer2.h" |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +bool PuzzleEditorState::IsActive() { |
| 32 | + return isActive; |
| 33 | +} |
| 34 | + |
| 35 | +void PuzzleEditorState::ProcessInput(const SDL_Event& event, bool& processed) { |
| 36 | + ImGui_ImplSDL2_ProcessEvent(&event); |
| 37 | +} |
| 38 | + |
| 39 | +void PuzzleEditorState::Draw(SDL_Renderer* target) { |
| 40 | + ImGui::Begin("File list", nullptr, ImGuiWindowFlags_NoCollapse); |
| 41 | + if (ImGui::Selectable("File 1", this->selected_file == "File 1")) { |
| 42 | + this->selected_file = "File 1"; |
| 43 | + } |
| 44 | + if (ImGui::Selectable("File 2", this->selected_file == "File 2")) { |
| 45 | + this->selected_file = "File 2"; |
| 46 | + } |
| 47 | + |
| 48 | + ImGui::End(); |
| 49 | +} |
| 50 | + |
| 51 | +void PuzzleEditorState::Update() { |
| 52 | +} |
| 53 | + |
0 commit comments