Switched menu button system to component inheritance system.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#include "MenuComponent.h"
|
||||
#include "Crawler.h"
|
||||
|
||||
MenuIconButton::MenuIconButton(geom2d::rect<float>rect,Decal*icon,MenuFunc onClick)
|
||||
:MenuComponent(rect,"",onClick),icon(icon)
|
||||
{}
|
||||
|
||||
void MenuIconButton::Update(Crawler*game){
|
||||
MenuComponent::Update(game);
|
||||
}
|
||||
|
||||
void MenuIconButton::Draw(Crawler*game,vf2d parentPos){
|
||||
MenuComponent::Draw(game,parentPos);
|
||||
game->DrawRotatedDecal(parentPos+rect.middle(),icon,0,icon->sprite->Size()/2);
|
||||
}
|
||||
Reference in New Issue
Block a user