diff options
author | est31 <MTest31@outlook.com> | 2016-02-07 20:27:50 +0100 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2016-02-08 00:35:24 +0100 |
commit | 16c70087711db38ac40a428c64623355b8e7691b (patch) | |
tree | 359ca29f841f95d6ee28190b7331d4a554448b5b /src/hud.h | |
parent | 6cd2b3b445bf558fda1e5a7908adef8e3a45449a (diff) | |
download | minetest-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.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 |