new screen (media library), some fixes etc.

This commit is contained in:
unknown
2008-08-08 20:40:04 +02:00
parent 52f5976af8
commit 7783f9b3f5
13 changed files with 480 additions and 53 deletions

View File

@@ -34,7 +34,7 @@ enum LOCATION { lLeft, lCenter, lRight };
class Menu : public Window
{
public:
Menu(int startx, int starty, int width, int height, string title, COLOR color, BORDER border) : Window(startx, starty, width, height, title, color, border), itsStaticsNumber(0), itsChoice(0), itsBeginning(0), itsHighlight(0), itsHighlightEnabled(1) { SetColor(color); }
Menu(int startx, int starty, int width, int height, string title, COLOR color, BORDER border) : Window(startx, starty, width, height, title, color, border), itsStaticsNumber(0), itsChoice(0), itsBeginning(0), itsHighlight(0), itsHighlightColor(itsBaseColor), itsHighlightEnabled(1) { SetColor(color); }
virtual ~Menu() {}
virtual void Add(string str) { AddOption(str); }
@@ -47,8 +47,8 @@ class Menu : public Window
void BoldOption(int, IS_BOLD);
void MakeStatic(int, IS_STATIC);
void DeleteOption(int);
string GetCurrentOption() { return itsOptions[itsHighlight]; }
string GetOption(int i) { return itsOptions[i-1]; }
string GetCurrentOption() const;
string GetOption(int i) const;
virtual void Display();
virtual void Refresh();
@@ -57,7 +57,8 @@ class Menu : public Window
virtual void Reset();
virtual void Clear(bool clear_screen = 1);
void Highlighting(bool hl) { itsHighlightEnabled = hl; }
void HighlightColor(COLOR col) { itsHighlightColor = col; }
void Highlighting(bool hl) { itsHighlightEnabled = hl; Refresh(); }
int GetRealChoice() const;
virtual int GetChoice() const { return itsHighlight+1; }
@@ -84,6 +85,8 @@ class Menu : public Window
int itsBeginning;
int itsHighlight;
COLOR itsHighlightColor;
bool itsHighlightEnabled;
};