1 /* 2 Minetest 3 Copyright (C) 2010-2018 celeron55, Perttu Ahola <celeron55@gmail.com> 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU Lesser General Public License as published by 7 the Free Software Foundation; either version 2.1 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public License along 16 with this program; if not, write to the Free Software Foundation, Inc., 17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 #include "hud.h" 21 #include <cmath> 22 23 const struct EnumString es_HudElementType[] = 24 { 25 {HUD_ELEM_IMAGE, "image"}, 26 {HUD_ELEM_TEXT, "text"}, 27 {HUD_ELEM_STATBAR, "statbar"}, 28 {HUD_ELEM_INVENTORY, "inventory"}, 29 {HUD_ELEM_WAYPOINT, "waypoint"}, 30 {HUD_ELEM_IMAGE_WAYPOINT, "image_waypoint"}, 31 {HUD_ELEM_COMPASS, "compass"}, 32 {HUD_ELEM_MINIMAP, "minimap"}, 33 {0, NULL}, 34 }; 35 36 const struct EnumString es_HudElementStat[] = 37 { 38 {HUD_STAT_POS, "position"}, 39 {HUD_STAT_POS, "pos"}, /* Deprecated, only for compatibility's sake */ 40 {HUD_STAT_NAME, "name"}, 41 {HUD_STAT_SCALE, "scale"}, 42 {HUD_STAT_TEXT, "text"}, 43 {HUD_STAT_NUMBER, "number"}, 44 {HUD_STAT_ITEM, "item"}, 45 {HUD_STAT_ITEM, "precision"}, 46 {HUD_STAT_DIR, "direction"}, 47 {HUD_STAT_ALIGN, "alignment"}, 48 {HUD_STAT_OFFSET, "offset"}, 49 {HUD_STAT_WORLD_POS, "world_pos"}, 50 {HUD_STAT_SIZE, "size"}, 51 {HUD_STAT_Z_INDEX, "z_index"}, 52 {HUD_STAT_TEXT2, "text2"}, 53 {0, NULL}, 54 }; 55 56 const struct EnumString es_HudBuiltinElement[] = 57 { 58 {HUD_FLAG_HOTBAR_VISIBLE, "hotbar"}, 59 {HUD_FLAG_HEALTHBAR_VISIBLE, "healthbar"}, 60 {HUD_FLAG_CROSSHAIR_VISIBLE, "crosshair"}, 61 {HUD_FLAG_WIELDITEM_VISIBLE, "wielditem"}, 62 {HUD_FLAG_BREATHBAR_VISIBLE, "breathbar"}, 63 {HUD_FLAG_MINIMAP_VISIBLE, "minimap"}, 64 {HUD_FLAG_MINIMAP_RADAR_VISIBLE, "minimap_radar"}, 65 {0, NULL}, 66 }; 67