/*============================================================================= CGui.hpp: Dynamic GUI for the Unreal Engine Copyright 2006 r00t Gamehacking, Inc. All Rights Reserved. Revision history: * Created by h3x`=============================================================================*/#ifndef __CGUI_H__#define __CGUI_H__/*----------------------------------------------------------------------------- CVar: Dynamic variable.-----------------------------------------------------------------------------*/class CVar{public: // Con-/Destructor CVar(TCHAR *name, int max); ~CVar(); int Value; // Current value of a variable int Max; // Max value the variable can have TCHAR Name[64]; // Variable name};/*----------------------------------------------------------------------------- CGuiComponent:A GUI Component. Can be a dialog, or any other control inside the dialog.-----------------------------------------------------------------------------*/class CGuiComponent{public: // Con-/Destructor CGuiComponent(); CGuiComponent(CGuiComponent *owner, int x, int y, int w, int h); ~CGuiComponent(); // Functions void Draw(UCanvas *Canvas); int PosX; // Components X position on screen int PosY; // Components Y position on screen int Width; // Components width int Height; // Components height char Type[8]; // Component type (Checkbox, Edit, Static, ...) CGuiComponent *Owner; // Its owner CGuiComponent *Next; // Next component CGuiComponent *Prev; // Previous component};/*----------------------------------------------------------------------------- CDialog: Contains all components-----------------------------------------------------------------------------*/class CDialog : public CGuiComponent{public: // Con-/Destructor CDialog(TCHAR *name, int x, int y, int w, int h); ~CDialog(); // Functions void AddComponent(char *type, TCHAR *text, int x, int y, int w, int h, CVar *var); TCHAR Title[64]; CGuiComponent *ControlHead; // First component inside the dialog CGuiComponent *ControlTail; // Last component inside the dialog};/*----------------------------------------------------------------------------- CGui: Main GUI class. Manages the whole GUI.-----------------------------------------------------------------------------*/class CGui{public: // Con-/Destructor CGui(); ~CGui(); // Functions void Draw(UCanvas *Canvas); void AddDialog(CGuiComponent *dialog); void CheckClicks(); CDialog *Head; // First dialog CDialog *Tail; // Last dialog};/*----------------------------------------------------------------------------- CCheck: Checkbox component.-----------------------------------------------------------------------------*/class CCheck : public CGuiComponent{public: // Con-/Destructor CCheck(TCHAR *text, CVar *var); ~CCheck(); // Functions void SetCheck (bool bCheck); TCHAR Text[64]; // Checkbox description CVar *bVar; // Checkbox value, using a CVar.};/*---------------------------------------------------------------------------- The end.----------------------------------------------------------------------------*/#endif // __CGUI_H__