-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInfoDlg.cs
More file actions
79 lines (69 loc) · 1.45 KB
/
InfoDlg.cs
File metadata and controls
79 lines (69 loc) · 1.45 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
public class InfoDlg
{
public static bool isShow;
private static string title;
private static string subtitke;
public static int delay;
public static bool isLock;
public static void show(string title, string subtitle, int delay)
{
if (title != null)
{
isShow = true;
InfoDlg.title = title;
subtitke = subtitle;
InfoDlg.delay = delay;
}
}
public static void showWait()
{
show(mResources.PLEASEWAIT, null, 1000);
isLock = true;
}
public static void showWait(string str)
{
show(str, null, 700);
isLock = true;
}
public static void paint(mGraphics g)
{
if (isShow && (!isLock || delay <= 4990) && !GameScr.isPaintAlert)
{
int num = 10;
GameCanvas.paintz.paintPopUp(GameCanvas.hw - 75, num, 150, 55, g);
if (isLock)
{
GameCanvas.paintShukiren(GameCanvas.hw - mFont.tahoma_8b.getWidth(title) / 2 - 10, num + 28, g);
mFont.tahoma_8b.drawString(g, title, GameCanvas.hw + 5, num + 21, 2);
}
else if (subtitke != null)
{
mFont.tahoma_8b.drawString(g, title, GameCanvas.hw, num + 13, 2);
mFont.tahoma_7_green2.drawString(g, subtitke, GameCanvas.hw, num + 30, 2);
}
else
{
mFont.tahoma_8b.drawString(g, title, GameCanvas.hw, num + 21, 2);
}
}
}
public static void update()
{
if (delay > 0)
{
delay--;
if (delay == 0)
{
hide();
}
}
}
public static void hide()
{
title = string.Empty;
subtitke = null;
isLock = false;
delay = 0;
isShow = false;
}
}