From 0c535a1526d725fbd242c5ce348a7f2252d1fd34 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 16 Nov 2022 12:26:55 -0500 Subject: input bindings; mouse clear dialog box --- src/ui.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/ui.cpp') diff --git a/src/ui.cpp b/src/ui.cpp index 009d6ff..19b939d 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -1,3 +1,22 @@ +/** + * @file ui.cpp + * + * Copyright (C) 2022 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "ui.hpp" #include "text.hpp" @@ -16,7 +35,8 @@ void UISystem::configure(entityx::EntityManager&, entityx::EventManager &events) void UISystem::createDialogBox(float x, float y, float w, float h) { // Queue for generation in the main thread. - m_boxes.emplace_back(0, x, -y, w, h); + // TODO Should y inversion be hidden in the render system? + m_boxes.emplace_back(0, x, -y - h, w, h); } void UISystem::update(entityx::EntityManager&, -- cgit v1.2.3