From 16c70087711db38ac40a428c64623355b8e7691b Mon Sep 17 00:00:00 2001 From: est31 Date: Sun, 7 Feb 2016 20:27:50 +0100 Subject: 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 --- src/hud.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/hud.h') 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 &rect, const core::rect *clip, IGameDef *gamedef, - bool selected, - bool hovered, - bool dragged); + ItemRotationKind rotation_kind); #endif -- cgit v1.2.3