ctr_Repair/trunk/CardSaveData/common/gui/gui.h

96 lines
2.3 KiB
C++

/*---------------------------------------------------------------------------*
Project: Horizon
File: irp.h
Copyright (C)2009 Nintendo Co., Ltd. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Rev$
*---------------------------------------------------------------------------*/
#ifndef GUI_H_
#define GUI_H_
#include <nn/os.h>
#include <nn/types.h>
#include "../my_defs.h"
typedef struct
{
uptr callback;
tChar* caption;
u16 x,y;
u16 width,height;
u16 id;
u16 scr;//0:up,else down screen
}tPanel;
typedef enum {
COLOR_BLACK,
COLOR_GRAY,
COLOR_RED,
COLOR_GREEN,
COLOR_BLUE,
COLOR_YELLO,
COLOR_WHITE,
COLOR_PARPL,
COLOR_SKY
}eColor;
typedef struct
{
tChar* str;
u16 x,y;//親の始点との相対
eColor color;//
u8 size;//文字サイズ
u8 id;
u8 parent;//親コンポーネント指定
}tMessage;
typedef struct
{
u16 lines;//表示行数
u16 x,y;//親の始点との相対
eColor color;//文字色
u8 size;//文字サイズ
u8 id;
u8 parent;//親コンポーネント指定
}tMemo;
class Gui
{
private:
bool Initialized;
public:
Gui(){};
~Gui();
bool Initialize(uptr pHeap,u32 size,nn::os::LightEvent* pEvnt);
void Finalize();
void ButtonCallback(uptr adrs);
void ButtonMask(u32 mask);
myResult PanelSet(const tPanel *panel);
myResult MessSet(const tMessage *mes);
// myResult MemoSet(const tMemo *m);
void Draw();
void DisableAll();
myResult PanelEffective(u8 id,bool enable=true,bool visible=true);
myResult MessEffective(u8 id,bool enable=true,bool visible=true);
// myResult MemoEffective(u8 id,bool enable=true,bool visible=true);
myResult MessStr(u8 id,tChar *str);
myResult MessCol(u8 id,eColor col);
// myResult MemoStr(u8 id,tChar *str,u16 ln);
myResult PanelLineStyle(u8 id,eColor col=COLOR_WHITE,u8 width = 2);
//void thUpdate();
};
#endif