2016-03-10 03:47:37 +00:00
|
|
|
#ifndef __URDE_CGUITABLEGROUP_HPP__
|
|
|
|
#define __URDE_CGUITABLEGROUP_HPP__
|
|
|
|
|
2016-03-11 00:23:16 +00:00
|
|
|
#include "CGuiCompoundWidget.hpp"
|
2016-03-10 03:47:37 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
2016-03-18 02:45:45 +00:00
|
|
|
struct CCellPos
|
|
|
|
{
|
|
|
|
u32 x0_ = 0;
|
|
|
|
u32 x4_ = 0;
|
|
|
|
bool x8_ = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CGuiVirtualBox
|
|
|
|
{
|
|
|
|
int x0_;
|
|
|
|
int x4_;
|
|
|
|
int x8_;
|
|
|
|
int xc_;
|
|
|
|
int x10_;
|
|
|
|
int x14_;
|
|
|
|
int x18_;
|
|
|
|
int x1c_ = 0;
|
|
|
|
std::unique_ptr<CCellPos[]> x20_;
|
|
|
|
std::unique_ptr<CCellPos[]> x24_;
|
|
|
|
std::unique_ptr<CCellPos[]> x28_;
|
|
|
|
std::unique_ptr<CCellPos[]> x2c_;
|
|
|
|
public:
|
|
|
|
CGuiVirtualBox(int a,int b,int c,int d,int e,int f)
|
|
|
|
: x0_(a), x4_(b), x8_(c), xc_(d), x10_(e), x14_(f), x18_(std::max(x10_, x14_)),
|
|
|
|
x20_(new CCellPos[c*d]),
|
|
|
|
x24_(new CCellPos[c*d]),
|
|
|
|
x28_(new CCellPos[x18_]),
|
|
|
|
x2c_(new CCellPos[x18_]) {}
|
|
|
|
|
|
|
|
void GetDifference(int,int,int&,int&);
|
|
|
|
bool ShiftHorizontal(int,bool);
|
|
|
|
bool ShiftVertical(int,bool);
|
|
|
|
void ResolveTransitionCells();
|
|
|
|
void FillCellsInBox(CCellPos* cells);
|
|
|
|
};
|
|
|
|
|
2016-03-11 00:23:16 +00:00
|
|
|
class CGuiTableGroup : public CGuiCompoundWidget
|
|
|
|
{
|
|
|
|
public:
|
2016-03-18 02:45:45 +00:00
|
|
|
enum class ETableGroupModes
|
|
|
|
{
|
|
|
|
};
|
|
|
|
private:
|
|
|
|
int xf8_;
|
|
|
|
int xfc_;
|
|
|
|
int x100_[3][2];
|
|
|
|
bool x118_;
|
|
|
|
bool x119_;
|
|
|
|
float x11c_;
|
|
|
|
float x120_;
|
|
|
|
bool x124_;
|
|
|
|
float x128_;
|
|
|
|
bool x12c_ = false;
|
|
|
|
ETableGroupModes x130_modes;
|
|
|
|
CGuiVirtualBox x134_box;
|
|
|
|
public:
|
|
|
|
CGuiTableGroup(const CGuiWidgetParms& parms, int, int, ETableGroupModes modes,
|
|
|
|
int, int, bool, bool, float, float, bool, float, CGuiVirtualBox&& box);
|
|
|
|
FourCC GetWidgetTypeID() const {return FOURCC('TBGP');}
|
2016-03-11 00:23:16 +00:00
|
|
|
static void LoadWidgetFnMap();
|
|
|
|
|
|
|
|
bool MAF_SelectNextColumn(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectPrevColumn(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectNextRow(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectPrevRow(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectNextColumnSkipUnActivated(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectPrevColumnSkipUnActivated(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectNextRowSkipUnActivated(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectPrevRowSkipUnActivated(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectColumnAtIndex(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_SelectRowAtIndex(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_InitializeTable(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_MenuAdvance(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
|
|
|
bool MAF_MenuCancel(CGuiFunctionDef* def, CGuiControllerInfo* info);
|
2016-03-18 02:45:45 +00:00
|
|
|
|
|
|
|
static CGuiTableGroup* Create(CGuiFrame* frame, CInputStream& in, bool);
|
2016-03-11 00:23:16 +00:00
|
|
|
};
|
2016-03-10 03:47:37 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGUITABLEGROUP_HPP__
|