Skip to content

Commit

Permalink
GUIFormSpecMenu refactored, BoxDrawSpec replaced by BoxWidget.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Dec 12, 2018
1 parent 08610aa commit 05e900c
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 190 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,6 +5,7 @@
*.orig
# Vim
*.vim
.ycm_extra_conf.py
# Kate
.*.kate-swp
.swp.*
Expand Down
1 change: 1 addition & 0 deletions src/gui/CMakeLists.txt
Expand Up @@ -12,5 +12,6 @@ set(gui_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/intlGUIEditBox.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modalMenu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/profilergraph.cpp
${CMAKE_CURRENT_SOURCE_DIR}/widget/box_widget.cpp
PARENT_SCOPE
)
40 changes: 40 additions & 0 deletions src/gui/formspec_data.h
@@ -0,0 +1,40 @@
/*
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#pragma once

#include <stack>

#include "irr_v2d.h"
#include "rect.h"

struct FormSpecData {
u32 formspec_version = 0;

v2s32 padding;
v2f32 spacing;
v2s32 imgsize;
v2s32 offset;
v2f32 pos_offset;

core::rect<s32> absolute_rect;

std::stack<v2f32> container_stack;
};

0 comments on commit 05e900c

Please sign in to comment.