// Button.h: interface for the CButton class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_BUTTON_H__9324DC0C_492F_4978_B9E6_954D90415104__INCLUDED_) #define AFX_BUTTON_H__9324DC0C_492F_4978_B9E6_954D90415104__INCLUDED_ #if _MSC_VER > 1000 #pragma once #include #include "GameEngine.h" #include "Resource.h" #include "Bitmap.h" #endif // _MSC_VER > 1000 class CButton { protected: int iCurrentImage; int ix; int iy; int iwidth; int iheight; bool bHold; Bitmap* bmpButton[3]; bool isReady; bool bShow; bool bOnceMoved; public: void SetImage(UINT uiImage); void SetPlace(int x,int y,bool bReady); virtual ~CButton(); bool MouseMove(int x,int y); bool MouseButtonDown(int x,int y,BOOL bLeft); bool MouseButtonUp(int x,int y,BOOL bLeft); void DrawScreen(HDC hDC); void OnClick(){;} bool IsReady(){return isReady;} void SetReady(bool bReady){isReady=bReady;} }; #endif // !defined(AFX_BUTTON_H__9324DC0C_492F_4978_B9E6_954D90415104__INCLUDED_)