summaryrefslogtreecommitdiff
path: root/src/hud.h
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-02-07 20:27:50 +0100
committerest31 <MTest31@outlook.com>2016-02-08 00:35:24 +0100
commit16c70087711db38ac40a428c64623355b8e7691b (patch)
tree359ca29f841f95d6ee28190b7331d4a554448b5b /src/hud.h
parent6cd2b3b445bf558fda1e5a7908adef8e3a45449a (diff)
downloadminetest-16c70087711db38ac40a428c64623355b8e7691b.tar.gz
minetest-16c70087711db38ac40a428c64623355b8e7691b.tar.bz2
minetest-16c70087711db38ac40a428c64623355b8e7691b.zip
small drawItemStack cleanup
-> Replace the three bool params with an enum -> Add struct for the static content, leads to less repetition -> cache enable_animations setting
Diffstat (limited to 'src/hud.h')
-rw-r--r--src/hud.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/hud.h b/src/hud.h
index 88e7181d6..f373d4fe2 100644
--- a/src/hud.h
+++ b/src/hud.h
@@ -147,15 +147,20 @@ private:
video::SColor hbar_colors[4];
};
+enum ItemRotationKind {
+ IT_ROT_SELECTED,
+ IT_ROT_HOVERED,
+ IT_ROT_DRAGGED,
+ IT_ROT_NONE, // Must be last, also serves as number
+};
+
void drawItemStack(video::IVideoDriver *driver,
gui::IGUIFont *font,
const ItemStack &item,
const core::rect<s32> &rect,
const core::rect<s32> *clip,
IGameDef *gamedef,
- bool selected,
- bool hovered,
- bool dragged);
+ ItemRotationKind rotation_kind);
#endif