📄 button.h
字号:
//--------------------------------------------------
// Desc: BUTTON
// Date: 2006.11.16 /update
// Author: artsylee
//
// Copyright (C) 2006 artsylee
//
//--------------------------------------------------
#ifndef _BUTTON_
#define _BUTTON_
#include "Window.h"
#include "../Core/Font.h"
//--------------------------------------------------
// 三态或四态按钮,默认为四态
//--------------------------------------------------
enum BTN_STATE
{
BTN_NORMAL,
BTN_OVER,
BTN_DOWN,
BTN_DISABLE,
BTN_STATENUM,
};
class ASE_DLL Button : public CWindow
{
public:
Button(CWindow* pParent = NULL);
virtual ~Button();
virtual void Render();
virtual DWORD ProcessEvent();
virtual bool LoadFromIni(char* pfilename, char* pIndex);
virtual void Enable();
virtual void Disable();
virtual void Show(bool c = true);
protected:
BTN_STATE m_State;
GRect m_DstRect[BTN_STATENUM];
bool m_bMouseOn;
int m_StateNum;
};
class ASE_DLL CoolButton : public Button
{
public:
CoolButton(CWindow* pParent = NULL);
virtual ~CoolButton();
virtual bool LoadFromIni(char* pfilename, char* pIndex);
virtual void Render();
private:
CSimFont m_Font;
POINT m_Center;
};
#endif // _BUTTON_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -