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/client.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index 16cdc237f..696385a9a 100644 --- a/src/client.h +++ b/src/client.h @@ -160,7 +160,10 @@ enum ClientEventType CE_SHOW_FORMSPEC, CE_SPAWN_PARTICLE, CE_ADD_PARTICLESPAWNER, - CE_DELETE_PARTICLESPAWNER + CE_DELETE_PARTICLESPAWNER, + CE_HUDADD, + CE_HUDRM, + CE_HUDCHANGE }; struct ClientEvent @@ -217,6 +220,27 @@ struct ClientEvent struct{ u32 id; } delete_particlespawner; + struct{ + u32 id; + u8 type; + v2f* pos; + std::string* name; + v2f* scale; + std::string* text; + u32 number; + u32 item; + u32 dir; + } hudadd; + struct{ + u32 id; + } hudrm; + struct{ + u32 id; + u8 stat; + v2f* v2fdata; + std::string* sdata; + u32 data; + } hudchange; }; }; -- 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/client.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index 696385a9a..f59588680 100644 --- a/src/client.h +++ b/src/client.h @@ -186,8 +186,8 @@ struct ClientEvent f32 camera_point_target_z; } deathscreen; struct{ - std::string* formspec; - std::string* formname; + std::string *formspec; + std::string *formname; } show_formspec; struct{ } textures_updated; @@ -221,24 +221,24 @@ struct ClientEvent u32 id; } delete_particlespawner; struct{ - u32 id; - u8 type; - v2f* pos; - std::string* name; - v2f* scale; - std::string* text; - u32 number; - u32 item; - u32 dir; + u32 id; + u8 type; + v2f *pos; + std::string *name; + v2f *scale; + std::string *text; + u32 number; + u32 item; + u32 dir; } hudadd; struct{ u32 id; } hudrm; struct{ u32 id; - u8 stat; - v2f* v2fdata; - std::string* sdata; + HudElementStat stat; + v2f *v2fdata; + std::string *sdata; u32 data; } hudchange; }; -- cgit v1.2.3