-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMainMenu.h
51 lines (39 loc) · 1.09 KB
/
MainMenu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include "TinyEngine\\T_Menu.h"
#include "TinyEngine\\T_Util.h"
typedef struct
{
POINT pos; // 菜单位置
int width; // 菜单宽度
int height; // 菜单高度
}MENU_BTNWH_INFO;
class MainMenu:public T_Menu
{
public:
MainMenu();
~MainMenu();
void Init();
void SetMenuBkg(wstring img_path, int alphaLevel = 255, COLORREF backColor = RGB(0, 0, 0));
void DrawMenu(HDC hdc, int bkgX = 0, int bkgY = 0, BYTE btnTrans = 255, bool startState = true);
int GetMenuIndex(int x, int y);
void MenuMouseMove(int x, int y);
int MenuMouseClick(int x, int y);
void AudioInit(AudioDX &ds);
void PlayAudio();
int MaxFrameCount = 100; //帧率50,延时2秒
int FrameCount = 0; //帧计数
bool flickerFlag = false; //闪动开关
private:
int BtnNUM = 9;
wstring BtnPath[6];
T_Graph BtnBkg[6];
T_Graph menuBkg[2];
T_Graph flickerImg[3];
AudioDXBuffer first_sound;
AudioDXBuffer mainmenu_backmusic_buffer;
AudioDXBuffer mousedown_buffer;
AudioDXBuffer mousemove_buffer;
AudioDXBuffer nomain_mousedown_buffer;
AudioDXBuffer mousedown_buffer_one;
MENU_BTNWH_INFO BtnDIBWHInfo[9]; //菜单数组
};