forked from spiceweasel/matching-columns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
#ScoreView.h#
56 lines (49 loc) · 1.02 KB
/
#ScoreView.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
50
51
52
53
54
55
56
// ScoreView.h
// The High Score View header for MatchColumns.proj
// by: Scott Jacovidis bigscott@cyberservices.com
// See ReadMe for program details.
#include <View.h>
#include <Entry.h>
#include <File.h>
#include <List.h>
#include <TextControl.h>
#include <Button.h>
#ifndef _ScoreView_
class SaveData
{
public:
char name[15];
int32 score;
int boardX;
int boardY;
};
class ScoreView : public BView
{
public:
ScoreView(BRect size, int totX, int totY);
~ScoreView(void);
bool IsDismissed(void);
void Display(int x, int32 xSc = -1);
void AddToHighScore(void);
//virtual void AttachedToWindow(void);
virtual void Draw(BRect updateRect);
private:
void LoadScores(void);
void SaveScores(void);
bool IsAHighScore(int32 x);
void PrintHighScores(void);
void NewHSList(void);
int totalX, totalY;
int32 curScore;
BPath *xPath;
//entry_ref appRef;
bool isDismissed;
BFile *xFile;
BButton *btnSave;
BButton *btnCancel;
BButton *btnOk;
BTextControl *txcNameEntry;
SaveData Scores[10];
};
#define _ScoreView_
#endif