2018-04-03 23:05:22 +02:00
|
|
|
/*
|
|
|
|
Minetest
|
|
|
|
Copyright (C) 2010-2018 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.
|
2015-02-08 18:45:19 +01:00
|
|
|
|
2018-04-03 23:05:22 +02:00
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "hud.h"
|
|
|
|
#include <cmath>
|
2013-04-20 06:21:32 +02:00
|
|
|
|
2018-01-20 14:09:58 +01:00
|
|
|
const struct EnumString es_HudElementType[] =
|
2016-04-11 05:51:36 +02:00
|
|
|
{
|
2018-01-20 14:09:58 +01:00
|
|
|
{HUD_ELEM_IMAGE, "image"},
|
|
|
|
{HUD_ELEM_TEXT, "text"},
|
|
|
|
{HUD_ELEM_STATBAR, "statbar"},
|
|
|
|
{HUD_ELEM_INVENTORY, "inventory"},
|
|
|
|
{HUD_ELEM_WAYPOINT, "waypoint"},
|
|
|
|
{0, NULL},
|
|
|
|
};
|
2013-08-11 04:09:45 +02:00
|
|
|
|
2018-01-20 14:09:58 +01:00
|
|
|
const struct EnumString es_HudElementStat[] =
|
|
|
|
{
|
|
|
|
{HUD_STAT_POS, "position"},
|
|
|
|
{HUD_STAT_POS, "pos"}, /* Deprecated, only for compatibility's sake */
|
|
|
|
{HUD_STAT_NAME, "name"},
|
|
|
|
{HUD_STAT_SCALE, "scale"},
|
|
|
|
{HUD_STAT_TEXT, "text"},
|
|
|
|
{HUD_STAT_NUMBER, "number"},
|
|
|
|
{HUD_STAT_ITEM, "item"},
|
|
|
|
{HUD_STAT_DIR, "direction"},
|
|
|
|
{HUD_STAT_ALIGN, "alignment"},
|
|
|
|
{HUD_STAT_OFFSET, "offset"},
|
|
|
|
{HUD_STAT_WORLD_POS, "world_pos"},
|
|
|
|
{0, NULL},
|
2016-02-07 20:27:50 +01:00
|
|
|
};
|
|
|
|
|
2018-01-20 14:09:58 +01:00
|
|
|
const struct EnumString es_HudBuiltinElement[] =
|
2013-08-11 04:09:45 +02:00
|
|
|
{
|
2018-01-20 14:09:58 +01:00
|
|
|
{HUD_FLAG_HOTBAR_VISIBLE, "hotbar"},
|
|
|
|
{HUD_FLAG_HEALTHBAR_VISIBLE, "healthbar"},
|
|
|
|
{HUD_FLAG_CROSSHAIR_VISIBLE, "crosshair"},
|
|
|
|
{HUD_FLAG_WIELDITEM_VISIBLE, "wielditem"},
|
|
|
|
{HUD_FLAG_BREATHBAR_VISIBLE, "breathbar"},
|
|
|
|
{HUD_FLAG_MINIMAP_VISIBLE, "minimap"},
|
|
|
|
{0, NULL},
|
|
|
|
};
|