mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 00:56:55 +02:00
Initial commit
This commit is contained in:
37
arm9/source/romBrowser/views/IconButton2DView.h
Normal file
37
arm9/source/romBrowser/views/IconButton2DView.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
#include "IconButtonView.h"
|
||||
|
||||
class IconButton2DView : public IconButtonView
|
||||
{
|
||||
public:
|
||||
class VramToken
|
||||
{
|
||||
u32 _vramOffset;
|
||||
public:
|
||||
VramToken()
|
||||
: _vramOffset(0) { }
|
||||
|
||||
explicit VramToken(u32 offset)
|
||||
: _vramOffset(offset) { }
|
||||
|
||||
constexpr u32 GetVramOffset() const { return _vramOffset; }
|
||||
};
|
||||
|
||||
IconButton2DView() : IconButtonView() { }
|
||||
|
||||
IconButton2DView(Type type, State state,
|
||||
md::sys::color backgroundColor, const MaterialColorScheme* materialColorScheme)
|
||||
: IconButtonView(type, state, backgroundColor, materialColorScheme) { }
|
||||
|
||||
void Draw(GraphicsContext& graphicsContext) override;
|
||||
|
||||
void SetGraphics(const VramToken& vramToken)
|
||||
{
|
||||
_selectorVramOffset = vramToken.GetVramOffset();
|
||||
}
|
||||
|
||||
static VramToken UploadGraphics(IVramManager& vramManager);
|
||||
|
||||
private:
|
||||
u32 _selectorVramOffset;
|
||||
};
|
||||
Reference in New Issue
Block a user