Change implementation of scrollable inventory component displays, make tabs on inventory window functional.
This commit is contained in:
@@ -44,7 +44,6 @@ All rights reserved.
|
||||
#include "Item.h"
|
||||
#include "safemap.h"
|
||||
#include "olcPGEX_Graphics2D.h"
|
||||
#include "drawutil.h"
|
||||
|
||||
INCLUDE_game
|
||||
INCLUDE_ITEM_DATA
|
||||
@@ -58,7 +57,6 @@ private:
|
||||
MenuFunc onHover;
|
||||
MenuFunc onMouseOut;
|
||||
bool hoverState=false;
|
||||
bool selected=false;
|
||||
bool hideQty=false;
|
||||
CompactText compact=COMPACT;
|
||||
public:
|
||||
@@ -79,9 +77,6 @@ public:
|
||||
inline Item&SetItem(Item&newItem){
|
||||
return itemRef=std::reference_wrapper<Item>(newItem);
|
||||
}
|
||||
inline void SetSelected(bool selected){
|
||||
this->selected=selected;
|
||||
}
|
||||
inline void SetShowQuantity(bool show){
|
||||
this->hideQty=!show;
|
||||
}
|
||||
@@ -146,9 +141,6 @@ protected:
|
||||
}
|
||||
virtual inline void Draw(Crawler*game,vf2d parentPos)override{
|
||||
MenuIconButton::Draw(game,parentPos);
|
||||
if(selected){
|
||||
drawutil::DrawCrosshair(game,{parentPos+rect.pos,rect.size},0);
|
||||
}
|
||||
}
|
||||
virtual inline void DrawDecal(Crawler*game,vf2d parentPos,bool focused)override{
|
||||
MenuIconButton::DrawDecal(game,parentPos,focused);
|
||||
|
||||
Reference in New Issue
Block a user