mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
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
This commit is contained in:
11
src/hud.h
11
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
|
||||
|
||||
|
Reference in New Issue
Block a user