From 49f6e347f01f72e8854308d5a54aaae337489555 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Thu, 11 Apr 2013 13:23:38 -0500 Subject: Lua HUD --- src/scriptapi_object.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/scriptapi_object.h') diff --git a/src/scriptapi_object.h b/src/scriptapi_object.h index a44016933..6df4366bb 100644 --- a/src/scriptapi_object.h +++ b/src/scriptapi_object.h @@ -29,6 +29,14 @@ extern "C" { #include "content_sao.h" #include "player.h" +#define HUD_STAT_POS 0 +#define HUD_STAT_NAME 1 +#define HUD_STAT_SCALE 2 +#define HUD_STAT_TEXT 3 +#define HUD_STAT_NUMBER 4 +#define HUD_STAT_ITEM 5 +#define HUD_STAT_DIR 6 + /* ObjectRef */ @@ -190,6 +198,27 @@ private: // get_player_control_bits(self) static int l_get_player_control_bits(lua_State *L); + // hud_add(self, id, form) + static int l_hud_add(lua_State *L); + + // hud_rm(self, id) + static int l_hud_rm(lua_State *L); + + // hud_change(self, id, stat, data) + static int l_hud_change(lua_State *L); + + // hud_get_next_id(self) + static u32 hud_get_next_id(lua_State *L); + + // hud_get(self, id) + static int l_hud_get(lua_State *L); + + // hud_lock_next_bar(self, right) + static int l_hud_lock_next_bar(lua_State *L); + + // hud_unlock_bar(self, id) + static int l_hud_unlock_bar(lua_State *L); + public: ObjectRef(ServerActiveObject *object); -- cgit v1.2.3 From 666aae359310483b7ad0f2bba1f4c31d8a58c737 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sat, 13 Apr 2013 18:20:22 -0400 Subject: Split HUD code off to hud.cpp, make into a class, extensive Lua HUD modification --- src/scriptapi_object.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/scriptapi_object.h') diff --git a/src/scriptapi_object.h b/src/scriptapi_object.h index 6df4366bb..fd46f2cf6 100644 --- a/src/scriptapi_object.h +++ b/src/scriptapi_object.h @@ -29,14 +29,6 @@ extern "C" { #include "content_sao.h" #include "player.h" -#define HUD_STAT_POS 0 -#define HUD_STAT_NAME 1 -#define HUD_STAT_SCALE 2 -#define HUD_STAT_TEXT 3 -#define HUD_STAT_NUMBER 4 -#define HUD_STAT_ITEM 5 -#define HUD_STAT_DIR 6 - /* ObjectRef */ @@ -202,23 +194,14 @@ private: static int l_hud_add(lua_State *L); // hud_rm(self, id) - static int l_hud_rm(lua_State *L); + static int l_hud_remove(lua_State *L); // hud_change(self, id, stat, data) static int l_hud_change(lua_State *L); - // hud_get_next_id(self) - static u32 hud_get_next_id(lua_State *L); - // hud_get(self, id) static int l_hud_get(lua_State *L); - // hud_lock_next_bar(self, right) - static int l_hud_lock_next_bar(lua_State *L); - - // hud_unlock_bar(self, id) - static int l_hud_unlock_bar(lua_State *L); - public: ObjectRef(ServerActiveObject *object); -- cgit v1.2.3