📄 guicellbuttonctrl.h
字号:
//guiCellButtonCtrl.h
/*/////////////////////////////////////////////////////////////////
李亦 liease@163.com 4040719
2006-7-8
/*/////////////////////////////////////////////////////////////////
#ifndef _GUICELLBUTTONCTRL_H_
#define _GUICELLBUTTONCTRL_H_
#ifndef _GAMEICONDICTIONARY_H_
#include "rpg/ui/gameIconDictionary.h"
#endif
#ifndef _GUIBUTTONCTRL_H_
#include "gui/controls/guiButtonCtrl.h"
#endif
#ifndef _GTEXMANAGER_H_
#include "dgl/gTexManager.h"
#endif
namespace RPG
{
class GameIconDictionary;
struct GameIconDictionary::Entry;
};
class GuiCellArrayControl;
class GuiCellButtonCtrl : public GuiButtonCtrl
{
friend class GuiCellArrayControl;
friend class GuiCellButtonCtrl;
typedef GuiButtonCtrl Parent;
//StringTableEntry m_pIconName;
RPG::GameIconDictionary::Entry *m_pGameIcon;
GuiCellArrayControl* m_pOwnerCtrl;
TextureHandle m_texHandle;
RectI m_iconRect;
S32 m_nCellIndex;
//GuiCursor* m_pCursorCaret;
Point2I m_textOffset;
Point2I m_iconOffset;
public:
DECLARE_CONOBJECT(GuiCellButtonCtrl);
GuiCellButtonCtrl(GuiCellArrayControl* pOwner = 0);
static void initPersistFields();
virtual void onAction();
//Parent methods
bool onWake();
void onSleep();
void inspectPostApply();
void onMouseDown(const GuiEvent &);
void onMouseEnter(const GuiEvent &);
void onMouseLeave(const GuiEvent &);
void onMouseDragged(const GuiEvent &);
void onRightMouseDown(const GuiEvent &);
void onMouseUp(const GuiEvent &);
//void onRightMouseUp(const GuiEvent &);
void setTipText(StringTableEntry pTip);
void updateGameIcon();
void setGameIcon(StringTableEntry pName,bool bLoadNow=false);
//void clearCell();
//void swapCellTo(GuiCellButtonCtrl* pDest);
void drawDragCursor(const Point2I &pos);
void onRender(Point2I offset, const RectI &updateRect);
};
#endif //_GUICELLBUTTONCTRL_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -