Skip to content

Commit

Permalink
Updated skin with bigger top bar
Browse files Browse the repository at this point in the history
Updated skin configuration file with optional icon size and top bar size
Reworked layout code to improve readability
Added lineHeight code so the font classes (size of the "0" char)
Initial implementation of fade effect for context menu


git-svn-id: https://gmenu2x.svn.sourceforge.net/svnroot/gmenu2x@148 bad23c4b-591a-0410-b480-ec8053e4ca07
  • Loading branch information
mtorromeo committed Oct 26, 2008
1 parent 030225a commit 07da6da
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 115 deletions.
33 changes: 9 additions & 24 deletions build/skins/Default/skin.conf
@@ -1,24 +1,9 @@
selectionColorR=255
selectionColorG=255
selectionColorB=255
selectionColorA=130
topBarColorR=162
topBarColorG=255
topBarColorB=255
topBarColorA=130
bottomBarColorR=255
bottomBarColorG=255
bottomBarColorB=255
bottomBarColorA=130
messageBoxColorR=255
messageBoxColorG=255
messageBoxColorB=255
messageBoxColorA=255
messageBoxBorderColorR=80
messageBoxBorderColorG=80
messageBoxBorderColorB=80
messageBoxBorderColorA=255
messageBoxSelectionColorR=160
messageBoxSelectionColorG=160
messageBoxSelectionColorB=160
messageBoxSelectionColorA=255
linkWidth=60
linkHeight=40
topBarHeight=40
messageBoxBorder=#505050ff
topBarBg=#ffffff82
selectionBg=#ffffff82
messageBoxBg=#ffffffff
messageBoxSelection=#a0a0a0ff
bottomBarBg=#ffffff82
3 changes: 1 addition & 2 deletions pandora/gmenu2x.conf
Expand Up @@ -12,7 +12,6 @@ link=0
globalVolume=0
globalVolume=67
saveSelection=1
globalVolume=0
gamma=10
globalVolume=0
gamma=10
videoBpp=24
Binary file modified pandora/skins/Default/imgs/selection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pandora/skins/Default/imgs/topbar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions pandora/skins/Default/skin.conf
Expand Up @@ -4,3 +4,6 @@ selectionBg=#ffffff82
messageBoxBg=#ffffffff
messageBoxSelection=#a0a0a0ff
bottomBarBg=#ffffff82
topBarHeight=50
linkHeight=50
linkWidth=80
10 changes: 10 additions & 0 deletions src/asfont.cpp
Expand Up @@ -9,16 +9,19 @@ using namespace std;
ASFont::ASFont(SDL_Surface* font) {
this->font.initFont(font);
halfHeight = getHeight()/2;
halfLineHeight = getLineHeight()/2;
}

ASFont::ASFont(Surface* font) {
this->font.initFont(font->raw);
halfHeight = getHeight()/2;
halfLineHeight = getLineHeight()/2;
}

ASFont::ASFont(string font) {
this->font.initFont(font);
halfHeight = getHeight()/2;
halfLineHeight = getLineHeight()/2;
}

ASFont::~ASFont() {
Expand Down Expand Up @@ -95,6 +98,13 @@ int ASFont::getHalfHeight() {
return halfHeight;
}

int ASFont::getLineHeight() {
return font.getLineHeight();
}
int ASFont::getHalfLineHeight() {
return halfLineHeight;
}

int ASFont::getTextWidth(const char* text) {
return font.getTextWidth(text);
}
Expand Down
4 changes: 3 additions & 1 deletion src/asfont.h
Expand Up @@ -31,6 +31,8 @@ class ASFont {

int getHeight();
int getHalfHeight();
int getLineHeight();
int getHalfLineHeight();
int getTextWidth(const char* text);
int getTextWidth(const string& text);
int getTextWidth(vector<string> *text);
Expand All @@ -41,7 +43,7 @@ class ASFont {

private:
SFontPlus font;
int halfHeight;
int halfHeight, halfLineHeight;
};

#endif /* ASFONT_H */

0 comments on commit 07da6da

Please sign in to comment.