Nokia N900 >> Sbox

移植gmenu2x 0.12


程式碼如下:

--- old/Makefile
+++ new/Makefile
@@ -4,9 +4,10 @@
 CXX = g++
 STRIP = strip
 
-CFLAGS = -I"/usr/include" `sdl-config --cflags` -DTARGET_PC -DTARGET=$(TARGET) -DLOG_LEVEL=4 -Wall -Wundef -Wno-deprecated -Wno-unknown-pragmas -Wno-format -pg -O0 -g3
+CFLAGS = -I"/usr/include" `sdl-config --cflags` -DTARGET_PC -DTARGET=$(TARGET) -DLOG_LEVEL=3 -Wall -Wundef -Wno-deprecated -Wno-unknown-pragmas -Wno-format -pg -g3
+
 CXXFLAGS = $(CFLAGS)
-LDFLAGS = -L"/usr/lib" `sdl-config --libs` -lfreetype -lSDL_image -lSDL_ttf -lSDL_gfx -ljpeg -lpng12 -lz #-lSDL_gfx
+LDFLAGS = -L"/usr/lib" `sdl-config --libs` -lfreetype -lSDL_image -lSDL_ttf -lSDL_gfx -ljpeg -lpng12 -lz SDL_ttf.o #-lSDL_gfx
 
 OBJDIR = objs/$(TARGET)
 DISTDIR = dist/$(TARGET)/gmenu2x
--- old/assets/wiz/autorun.gpu
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-mount -o bind /mnt/sd/gmenu2x /usr/gp2x
-cd /usr/gp2x
-./gp2xmenu
--- old/assets/wiz/gp2xmenu
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-LD_LIBRARY_PATH="$PWD" exec ./gmenu2x
--- old/assets/wiz/scripts/exit.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-cd /
-umount /usr/gp2x
-cd /usr/gp2x
-./gp2xmenu
--- old/assets/wiz/sections/settings/exit
+++ /dev/null
@@ -1,5 +0,0 @@
-title=Exit
-description=Exit GMenu2X to the official frontend
-icon=skin:icons/exit.jpg
-exec=scripts/exit.sh
-wrapper=false
--- old/src/browsedialog.cpp
+++ new/src/browsedialog.cpp
@@ -14,12 +14,12 @@
   : Dialog(gmenu2x), title(title), subtitle(subtitle), ts_pressed(false), buttonBox(gmenu2x) {
   IconButton *btn;
 
-  btn = new IconButton(gmenu2x, "skin:imgs/buttons/x.jpg", gmenu2x->tr["Up one folder"]);
-  btn->setAction(MakeDelegate(this, &BrowseDialog::directoryUp));
+  btn = new IconButton(gmenu2x, "skin:imgs/buttons/a.jpg", gmenu2x->tr["Enter folder"]);
+  btn->setAction(MakeDelegate(this, &BrowseDialog::directoryEnter));
   buttonBox.add(btn);
 
-  btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg", gmenu2x->tr["Enter folder"]);
-  btn->setAction(MakeDelegate(this, &BrowseDialog::directoryEnter));
+  btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg", gmenu2x->tr["Up one folder"]);
+  btn->setAction(MakeDelegate(this, &BrowseDialog::directoryUp));
   buttonBox.add(btn);
 
   btn = new IconButton(gmenu2x, "skin:imgs/buttons/start.jpg", gmenu2x->tr["Confirm"]);
@@ -44,9 +44,9 @@
   fl->browse();
 
   rowHeight = gmenu2x->font->getHeight()+2;
-  clipRect = (SDL_Rect){0, gmenu2x->skinConfInt["topBarHeight"]+2, gmenu2x->resX-9, gmenu2x->resY - gmenu2x->skinConfInt["topBarHeight"] - 25};
+  clipRect = (SDL_Rect){0, gmenu2x->skinConfInt["topBarHeight"]+2, gmenu2x->resX-9, gmenu2x->resY - gmenu2x->skinConfInt["topBarHeight"] - 27};
   touchRect = (SDL_Rect){2, gmenu2x->skinConfInt["topBarHeight"]+4, gmenu2x->resX-12, clipRect.h};
-  numRows = (clipRect.h + 2) / rowHeight;
+  numRows = (clipRect.h + 2) / (rowHeight + 2);
 
   selected = 0;
   close = false;
@@ -98,8 +98,9 @@
 
   if (gmenu2x->f200 && gmenu2x->ts.pressed() && !gmenu2x->ts.inRect(touchRect)) ts_pressed = false;
 
-  if (action == BrowseDialog::ACT_SELECT && (*fl)[selected] == "..")
+  if (action == BrowseDialog::ACT_SELECT && (*fl)[selected] == ".."){
     action = BrowseDialog::ACT_GOUP;
+ }
   switch (action) {
   case BrowseDialog::ACT_CLOSE:
     close = true;
@@ -155,10 +156,10 @@
   if (p == path.size() - 1)
     p = path.rfind("/", p - 1);
 
-  if (p == string::npos || p < 4 || path.compare(0, CARD_ROOT_LEN, CARD_ROOT) != 0) {
+  /*if (p == string::npos || p < 4 || path.compare(0, CARD_ROOT_LEN, CARD_ROOT) != 0) {
     close = true;
     result = false;
-  } else {
+  } else */{
     selected = 0;
     setPath(path.substr(0, p));
   }
@@ -199,8 +200,8 @@
 
   //Selection
   iY = selected-firstElement;
-  iY = offsetY + iY*rowHeight;
-  gmenu2x->s->box(2, iY, gmenu2x->resX-12, rowHeight-2, gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
+  iY = offsetY + iY*(rowHeight + 2);
+  gmenu2x->s->box(2, iY, gmenu2x->resX-23, rowHeight+2, gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
 
   lastElement = firstElement + numRows;
   if (lastElement > fl->size())
@@ -219,15 +220,20 @@
     } else {
       icon = iconFile;
     }
-    icon->blit(gmenu2x->s, 5, offsetY);
-    gmenu2x->s->write(gmenu2x->font, (*fl)[i], 24, offsetY + 6, HAlignLeft, VAlignMiddle);
+  if(icon == iconGoUp){
+      icon->blit(gmenu2x->s, 5, offsetY+1);
+  }
+  else{
+      icon->blit(gmenu2x->s, 5, offsetY+2);
+  }
+    gmenu2x->s->write(gmenu2x->font, (*fl)[i], 34, offsetY + 12, HAlignLeft, VAlignMiddle);
 
-    if (gmenu2x->f200 && gmenu2x->ts.pressed() && gmenu2x->ts.inRect(touchRect.x, offsetY + 3, touchRect.w, rowHeight)) {
+    if (gmenu2x->f200 && gmenu2x->ts.pressed() && gmenu2x->ts.inRect(touchRect.x, offsetY + 5, touchRect.w, rowHeight)) {
       ts_pressed = true;
       selected = i;
     }
 
-    offsetY += rowHeight;
+    offsetY += rowHeight+2;
   }
   gmenu2x->s->clearClipRect();
 
--- old/src/buttonbox.cpp
+++ new/src/buttonbox.cpp
@@ -22,7 +22,7 @@
 void ButtonBox::paint(unsigned int posX)
 {
   for (ButtonList::const_iterator it = buttons.begin(); it != buttons.end(); ++it)
-    posX = gmenu2x->drawButton(*it, posX);
+    posX = gmenu2x->drawButton(*it, posX, 480-18);
 }
 
 void ButtonBox::handleTS()
--- old/src/dialog.cpp
+++ new/src/dialog.cpp
@@ -20,19 +20,19 @@
   if (i==NULL)
     i = gmenu2x->sc.skinRes("icons/generic.jpg");
 
-  i->blit(s,4,(gmenu2x->skinConfInt["topBarHeight"]-32)/2, 32, 32);
+  i->blit(s,10,(gmenu2x->skinConfInt["topBarHeight"]-64)/2, 64, 64);
 }
 
 void Dialog::writeTitle(const std::string &title, Surface *s) {
   if (s==NULL)
     s = gmenu2x->s;
-  s->write(gmenu2x->font, title, 40, gmenu2x->skinConfInt["topBarHeight"]/2 -1, HAlignLeft, VAlignBottom);
+  s->write(gmenu2x->font, title, 85, gmenu2x->skinConfInt["topBarHeight"]/2 -1, HAlignLeft, VAlignBottom);
 }
 
 void Dialog::writeSubTitle(const std::string &subtitle, Surface *s) {
   if (s==NULL)
     s = gmenu2x->s;
-  s->write(gmenu2x->font, subtitle, 40, gmenu2x->skinConfInt["topBarHeight"]/2, HAlignLeft, VAlignTop);
+  s->write(gmenu2x->font, subtitle, 85, gmenu2x->skinConfInt["topBarHeight"]/2, HAlignLeft, VAlignTop);
 }
 
 
--- old/src/fonthelper.cpp
+++ new/src/fonthelper.cpp
@@ -12,6 +12,7 @@
       exit(2);
     }
   }
+ size = 16;
   this->font = TTF_OpenFont(font.c_str(), size);
   if (!this->font) {
     ERROR("TTF_OpenFont %s: %s", font.c_str(), TTF_GetError());
@@ -22,8 +23,10 @@
     ERROR("TTF_OpenFont %s: %s", font.c_str(), TTF_GetError());
     exit(2);
   }
-  TTF_SetFontHinting(this->font, TTF_HINTING_NORMAL);
-  TTF_SetFontHinting(fontOutline, TTF_HINTING_NORMAL);
+  TTF_SetFontStyle(this->font, TTF_STYLE_BOLD);
+  TTF_SetFontHinting(this->font, TTF_HINTING_LIGHT);
+  TTF_SetFontStyle(fontOutline, TTF_STYLE_BOLD);
+  TTF_SetFontHinting(fontOutline, TTF_HINTING_LIGHT);
   TTF_SetFontOutline(fontOutline, 1);
   height = 0;
   // Get maximum line height with a sample text
--- old/src/gmenu2x.cpp
+++ new/src/gmenu2x.cpp
@@ -72,8 +72,8 @@
 
 #include <sys/mman.h>
 
-const char *CARD_ROOT = "/mnt/"; //Note: Add a trailing /!
-const int CARD_ROOT_LEN = 5;
+const char *CARD_ROOT = "/home/user/"; //Note: Add a trailing /!
+const int CARD_ROOT_LEN = 11;
 
 static GMenu2X *app;
 
@@ -119,7 +119,7 @@
 }
 
 int main(int /*argc*/, char * /*argv*/[]) {
-  INFO("GMenu2X starting: If you read this message in the logs, check http://mtorromeo.github.com/gmenu2x/troubleshooting.html for a solution");
+  //INFO("GMenu2X starting: If you read this message in the logs, check http://mtorromeo.github.com/gmenu2x/troubleshooting.html for a solution");
 
   signal(SIGINT, &quit_all);
   signal(SIGSEGV,&quit_all);
@@ -260,8 +260,8 @@
 
   halfX = resX/2;
   halfY = resY/2;
-  bottomBarIconY = resY-18;
-  bottomBarTextY = resY-10;
+  bottomBarIconY = resY-24;
+  bottomBarTextY = resY-12;
 
   path = "";
   getExePath();
@@ -303,9 +303,11 @@
     SDL_Surface *dbl = SDL_SetVideoMode(resX, resY, confInt["videoBpp"], SDL_SWSURFACE);
     s->enableVirtualDoubleBuffer(dbl);
     SDL_ShowCursor(0);
-  }
+ }
 #else
-  s->raw = SDL_SetVideoMode(resX, resY, confInt["videoBpp"], SDL_HWSURFACE|SDL_DOUBLEBUF);
+ s->raw = SDL_SetVideoMode(800, 480, confInt["videoBpp"], 
+  SDL_SWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN);
+ SDL_ShowCursor(0);
 #endif
 
   bg = NULL;
@@ -394,13 +396,13 @@
   Surface volume("imgs/volume.jpg", confStr["skin"]);
   string df = getDiskFree();
 
-  sd.blit( sc["bgmain"], 3, bottomBarIconY );
-  sc["bgmain"]->write( font, df, 22, bottomBarTextY, HAlignLeft, VAlignMiddle );
+  //sd.blit( sc["bgmain"], 3, bottomBarIconY );
+  //sc["bgmain"]->write( font, df, 22, bottomBarTextY, HAlignLeft, VAlignMiddle );
   volumeX = 27+font->getTextWidth(df);
-  volume.blit( sc["bgmain"], volumeX, bottomBarIconY );
+  //volume.blit( sc["bgmain"], volumeX, bottomBarIconY );
   volumeX += 19;
   cpuX = volumeX+font->getTextWidth("100")+5;
-  cpu.blit( sc["bgmain"], cpuX, bottomBarIconY );
+  //cpu.blit( sc["bgmain"], cpuX, bottomBarIconY );
   cpuX += 19;
   manualX = cpuX+font->getTextWidth("300Mhz")+5;
 
@@ -535,7 +537,7 @@
 and all the anonymous donors...\n\
 (If I missed to list you or if you want to be removed, contact me.)";
   split(text, temp, "\n");
-  TextDialog td(this, "GMenu2X", tr.translate("Version $1 (Build date: $2)", "0.12", __DATE__, NULL), "icons/about.jpg", &text);
+  TextDialog td(this, "GMenu2X ported for Nokia N900 by Steward", tr.translate("Based on version $1 (Build date: $2)", "0.12", __DATE__, NULL), "icons/about.jpg", &text);
   td.exec();
 }
 
@@ -804,10 +806,10 @@
   uint linksPerPage = linkColumns*linkRows;
   int linkSpacingX = (resX-10 - linkColumns*skinConfInt["linkWidth"])/linkColumns;
   int linkSpacingY = (resY-35 - skinConfInt["topBarHeight"] - linkRows*skinConfInt["linkHeight"])/linkRows;
-  uint sectionLinkPadding = max(skinConfInt["topBarHeight"] - 32 - font->getHeight(), 0) / 3;
+  uint sectionLinkPadding = max(skinConfInt["topBarHeight"] - 64 - font->getHeight(), 0) / 3;
 
   bool quit = false;
-  int x,y, offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6, helpBoxHeight = fwType=="open2x" ? 154 : 139;
+  int x,y, offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6, helpBoxHeight = fwType=="open2x" ? 194 : 176;
   uint i;
   long tickBattery = -60000, tickNow;
   string batteryIcon = "imgs/battery/0.jpg";
@@ -816,7 +818,7 @@
   SDL_Rect re = {0,0,0,0};
 
   btnContextMenu = new IconButton(this,"skin:imgs/menu.jpg");
-  btnContextMenu->setPosition(resX-38, bottomBarIconY);
+  btnContextMenu->setPosition(resX-26, bottomBarIconY);
   btnContextMenu->setAction(MakeDelegate(this, &GMenu2X::contextMenu));
 
   while (!quit) {
@@ -832,9 +834,9 @@
     else
       sc.skinRes("imgs/l_disabled.jpg")->blit(s,0,0);
     if (menu->firstDispSection()+linkColumns<menu->getSections().size())
-      sc.skinRes("imgs/r_enabled.jpg")->blit(s,resX-10,0);
+      sc.skinRes("imgs/r_enabled.jpg")->blit(s,resX-20,0);
     else
-      sc.skinRes("imgs/r_disabled.jpg")->blit(s,resX-10,0);
+      sc.skinRes("imgs/r_disabled.jpg")->blit(s,resX-20,0);
     for (i=menu->firstDispSection(); i<menu->getSections().size() && i<menu->firstDispSection()+linkColumns; i++) {
       string sectionIcon = "skin:sections/"+menu->getSections()[i]+".jpg";
       x = (i-menu->firstDispSection())*skinConfInt["linkWidth"]+sectionsCoordX;
@@ -843,9 +845,9 @@
         skinConfInt["topBarHeight"], skinConfColors[COLOR_SELECTION_BG]);
       x += skinConfInt["linkWidth"]/2;
       if (sc.exists(sectionIcon))
-        sc[sectionIcon]->blit(s,x-16,sectionLinkPadding,32,32);
+        sc[sectionIcon]->blit(s,x-32,sectionLinkPadding,64,64);
       else
-        sc.skinRes("icons/section.jpg")->blit(s,x-16,sectionLinkPadding,32,32);
+        sc.skinRes("icons/section.jpg")->blit(s,x-32,sectionLinkPadding,64,64);
       s->write( font, menu->getSections()[i], x, skinConfInt["topBarHeight"]-sectionLinkPadding, HAlignCenter, VAlignBottom );
     }
 
@@ -864,7 +866,7 @@
     }
     s->clearClipRect();
 
-    drawScrollBar(linkRows,menu->sectionLinks()->size()/linkColumns + ((menu->sectionLinks()->size()%linkColumns==0) ? 0 : 1),menu->firstDispRow(),43,resY-81);
+    drawScrollBar(linkRows,menu->sectionLinks()->size()/linkColumns + ((menu->sectionLinks()->size()%linkColumns==0) ? 0 : 1),menu->firstDispRow(),97,resY-124);
 
     if (fwType=="open2x") {
       switch(volumeMode) {
@@ -875,14 +877,14 @@
     }
 
     if (menu->selLink()!=NULL) {
-      s->write ( font, menu->selLink()->getDescription(), halfX, resY-19, HAlignCenter, VAlignBottom );
-      if (menu->selLinkApp()!=NULL) {
+      s->write ( font, menu->selLink()->getDescription(), halfX, resY-4, HAlignCenter, VAlignBottom );
+      /*if (menu->selLinkApp()!=NULL) {
         s->write ( font, menu->selLinkApp()->clockStr(confInt["maxClock"]), cpuX, bottomBarTextY, HAlignLeft, VAlignMiddle );
         s->write ( font, menu->selLinkApp()->volumeStr(), volumeX, bottomBarTextY, HAlignLeft, VAlignMiddle );
         //Manual indicator
         if (!menu->selLinkApp()->getManual().empty())
           sc.skinRes("imgs/manual.jpg")->blit(s,manualX,bottomBarIconY);
-      }
+      }*/
     }
 
     if (f200) {
@@ -901,21 +903,21 @@
         batteryIcon = "imgs/battery/"+batteryIcon+".jpg";
       }
     }
-    sc.skinRes(batteryIcon)->blit( s, resX-19, bottomBarIconY );
+    //sc.skinRes(batteryIcon)->blit( s, resX-27, bottomBarIconY );
 
     //On Screen Help
     if (input.isActive(MODIFIER)) {
-      s->box(10,50,300,143, skinConfColors[COLOR_MESSAGE_BOX_BG]);
-      s->rectangle( 12,52,296,helpBoxHeight, skinConfColors[COLOR_MESSAGE_BOX_BORDER] );
+      s->box(10,50,400,180, skinConfColors[COLOR_MESSAGE_BOX_BG]);
+      s->rectangle( 12,52,396,helpBoxHeight, skinConfColors[COLOR_MESSAGE_BOX_BORDER] );
       s->write( font, tr["CONTROLS"], 20, 60 );
       s->write( font, tr["B, Stick press: Launch link / Confirm action"], 20, 80 );
-      s->write( font, tr["L, R: Change section"], 20, 95 );
-      s->write( font, tr["Y: Show manual/readme"], 20, 110 );
-      s->write( font, tr["VOLUP, VOLDOWN: Change cpu clock"], 20, 125 );
-      s->write( font, tr["A+VOLUP, A+VOLDOWN: Change volume"], 20, 140 );
-      s->write( font, tr["SELECT: Show contextual menu"], 20, 155 );
-      s->write( font, tr["START: Show options menu"], 20, 170 );
-      if (fwType=="open2x") s->write( font, tr["X: Toggle speaker mode"], 20, 185 );
+      s->write( font, tr["L, R: Change section"], 20, 100 );
+      s->write( font, tr["Y: Show manual/readme"], 20, 120 );
+      s->write( font, tr["VOLUP, VOLDOWN: Change cpu clock"], 20, 140 );
+      s->write( font, tr["A+VOLUP, A+VOLDOWN: Change volume"], 20, 160 );
+      s->write( font, tr["SELECT: Show contextual menu"], 20, 180 );
+      s->write( font, tr["START: Show options menu"], 20, 200 );
+      if (fwType=="open2x") s->write( font, tr["X: Toggle speaker mode"], 20, 220 );
     }
 
     s->flip();
@@ -1035,7 +1037,7 @@
   int curGlobalVolume = confInt["globalVolume"];
   //G
   int prevgamma = confInt["gamma"];
-  bool showRootFolder = fileExists("/mnt/root");
+  bool showRootFolder = fileExists("/");
 
   FileLister fl_tr("translations");
   fl_tr.browse();
@@ -1050,18 +1052,18 @@
   sd.addSetting(new MenuSettingMultiString(this,tr["Language"],tr["Set the language used by GMenu2X"],&lang,&fl_tr.getFiles()));
   sd.addSetting(new MenuSettingBool(this,tr["Save last selection"],tr["Save the last selected link and section on exit"],&confInt["saveSelection"]));
 #ifdef TARGET_GP2X
-  sd.addSetting(new MenuSettingInt(this,tr["Clock for GMenu2X"],tr["Set the cpu working frequency when running GMenu2X"],&confInt["menuClock"],50,325));
-  sd.addSetting(new MenuSettingInt(this,tr["Maximum overclock"],tr["Set the maximum overclock for launching links"],&confInt["maxClock"],50,325));
+  //sd.addSetting(new MenuSettingInt(this,tr["Clock for GMenu2X"],tr["Set the cpu working frequency when running GMenu2X"],&confInt["menuClock"],50,325));
+  //sd.addSetting(new MenuSettingInt(this,tr["Maximum overclock"],tr["Set the maximum overclock for launching links"],&confInt["maxClock"],50,325));
 #endif
 #if defined(TARGET_WIZ) || defined(TARGET_CAANOO)
-  sd.addSetting(new MenuSettingInt(this,tr["Clock for GMenu2X"],tr["Set the cpu working frequency when running GMenu2X"],&confInt["menuClock"],50,900,10));
-  sd.addSetting(new MenuSettingInt(this,tr["Maximum overclock"],tr["Set the maximum overclock for launching links"],&confInt["maxClock"],50,900,10));
+  //sd.addSetting(new MenuSettingInt(this,tr["Clock for GMenu2X"],tr["Set the cpu working frequency when running GMenu2X"],&confInt["menuClock"],50,900,10));
+  //sd.addSetting(new MenuSettingInt(this,tr["Maximum overclock"],tr["Set the maximum overclock for launching links"],&confInt["maxClock"],50,900,10));
 #endif
-  sd.addSetting(new MenuSettingInt(this,tr["Global Volume"],tr["Set the default volume for the gp2x soundcard"],&confInt["globalVolume"],0,100));
+  //sd.addSetting(new MenuSettingInt(this,tr["Global Volume"],tr["Set the default volume for the gp2x soundcard"],&confInt["globalVolume"],0,100));
   sd.addSetting(new MenuSettingBool(this,tr["Output logs"],tr["Logs the output of the links. Use the Log Viewer to read them."],&confInt["outputLogs"]));
   //G
-  sd.addSetting(new MenuSettingInt(this,tr["Gamma"],tr["Set gp2x gamma value (default: 10)"],&confInt["gamma"],1,100));
-  sd.addSetting(new MenuSettingMultiString(this,tr["Tv-Out encoding"],tr["Encoding of the tv-out signal"],&confStr["tvoutEncoding"],&encodings));
+  //sd.addSetting(new MenuSettingInt(this,tr["Gamma"],tr["Set gp2x gamma value (default: 10)"],&confInt["gamma"],1,100));
+  //sd.addSetting(new MenuSettingMultiString(this,tr["Tv-Out encoding"],tr["Encoding of the tv-out signal"],&confStr["tvoutEncoding"],&encodings));
   sd.addSetting(new MenuSettingBool(this,tr["Show root"],tr["Show root folder in the file selection dialogs"],&showRootFolder));
 
   if (sd.exec() && sd.edited()) {
@@ -1071,10 +1073,11 @@
     if (curGlobalVolume!=confInt["globalVolume"]) setVolume(confInt["globalVolume"]);
     if (lang == "English") lang = "";
     if (lang != tr.lang()) tr.setLang(lang);
-    if (fileExists("/mnt/root") && !showRootFolder)
-      unlink("/mnt/root");
-    else if (!fileExists("/mnt/root") && showRootFolder)
-      symlink("/","/mnt/root");
+    if (fileExists("/") && !showRootFolder)
+      unlink("/");
+    else if (!fileExists("/") && showRootFolder){
+      //symlink("/","/mnt/root");
+  }
     writeConfig();
   }
 }
@@ -1194,10 +1197,10 @@
     }
   }
 
-  evalIntConf( &skinConfInt["topBarHeight"], 40, 32,120 );
-  evalIntConf( &skinConfInt["linkHeight"], 40, 32,120 );
-  evalIntConf( &skinConfInt["linkWidth"], 60, 32,120 );
-  evalIntConf( &skinConfInt["fontSize"], 9, 6,60 );
+  evalIntConf( &skinConfInt["topBarHeight"], 96, 32,120 );
+  evalIntConf( &skinConfInt["linkHeight"], 96, 32,120 );
+  evalIntConf( &skinConfInt["linkWidth"], 64, 32,120 );
+  evalIntConf( &skinConfInt["fontSize"], 16, 6,60 );
 
   //recalculate some coordinates based on the new element sizes
   linkColumns = (resX-10)/skinConfInt["linkWidth"];
@@ -1278,8 +1281,8 @@
   MenuOption opt = {tr["Delete section"], MakeDelegate(this, &GMenu2X::deleteSection)};
   voices.push_back(opt);
   }{
-  MenuOption opt = {tr["Scan for applications and games"], MakeDelegate(this, &GMenu2X::scanner)};
-  voices.push_back(opt);
+  //MenuOption opt = {tr["Scan for applications and games"], MakeDelegate(this, &GMenu2X::scanner)};
+  //voices.push_back(opt);
   }
 
   bool close = false;
@@ -1443,9 +1446,9 @@
   sd.addSetting(new MenuSettingImage(       this, tr["Icon"],                 tr.translate("Select an icon for the link: $1", linkTitle.c_str(), NULL), &linkIcon, ".jpg,.bmp,.jpg,.jpeg", wd ));
   sd.addSetting(new MenuSettingFile(        this, tr["Manual"],               tr["Select a graphic/textual manual or a readme"], &linkManual, ".man.jpg,.txt", wd ));
 
-  sd.addSetting(new MenuSettingInt(         this, tr.translate("Clock (default: $1)",strClock.c_str(), NULL), tr["Cpu clock frequency to set when launching this link"], &linkClock, 50, confInt["maxClock"] ));
-  sd.addSetting(new MenuSettingBool(        this, tr["Tweak RAM Timings"],    tr["This usually speeds up the application at the cost of stability"], &linkUseRamTimings ));
-  sd.addSetting(new MenuSettingInt(         this, tr["Volume (default: -1)"], tr["Volume to set for this link"], &linkVolume, -1, 100 ));
+  //sd.addSetting(new MenuSettingInt(         this, tr.translate("Clock (default: $1)",strClock.c_str(), NULL), tr["Cpu clock frequency to set when launching this link"], &linkClock, 50, confInt["maxClock"] ));
+  //sd.addSetting(new MenuSettingBool(        this, tr["Tweak RAM Timings"],    tr["This usually speeds up the application at the cost of stability"], &linkUseRamTimings ));
+  //sd.addSetting(new MenuSettingInt(         this, tr["Volume (default: -1)"], tr["Volume to set for this link"], &linkVolume, -1, 100 ));
   sd.addSetting(new MenuSettingString(      this, tr["Parameters"],           tr["Parameters to pass to the application"], &linkParams, diagTitle, diagIcon ));
 
   sd.addSetting(new MenuSettingDir(         this, tr["Selector Directory"],   tr["Directory to scan for the selector"], &linkSelDir, wd ));
@@ -1462,7 +1465,7 @@
 #  endif
 
   //G
-  sd.addSetting(new MenuSettingInt(         this, tr["Gamma (default: 0)"],   tr["Gamma value to set when launching this link"], &linkGamma, 0, 100 ));
+  //sd.addSetting(new MenuSettingInt(         this, tr["Gamma (default: 0)"],   tr["Gamma value to set when launching this link"], &linkGamma, 0, 100 ));
   sd.addSetting(new MenuSettingBool(        this, tr["Wrapper"],              tr["Explicitly relaunch GMenu2X after this link's execution ends"], &menu->selLinkApp()->needsWrapperRef() ));
   sd.addSetting(new MenuSettingBool(        this, tr["Don't Leave"],          tr["Don't quit GMenu2X when launching this link"], &menu->selLinkApp()->runsInBackgroundRef() ));
 
@@ -1582,8 +1585,8 @@
 
 void GMenu2X::deleteSection() {
   MessageBox mb(this,tr["You will lose all the links in this section."]+"\n"+tr["Are you sure?"]);
-  mb.setButton(CONFIRM, tr["Yes"]);
   mb.setButton(CANCEL,  tr["No"]);
+  mb.setButton(CONFIRM, tr["Yes"]);
   if (mb.exec() == CONFIRM) {
     ledOn();
     if (rmtree(path+"sections/"+menu->selSection())) {
@@ -1911,19 +1914,23 @@
   return path;
 }
 
-string GMenu2X::getDiskFree() {
-  stringstream ss;
-  string df = "";
-  struct statvfs b;
-
-  int ret = statvfs("/mnt/sd", &b);
-  if (ret==0) {
-    unsigned long long free = (unsigned long long)(((unsigned long long)b.f_bfree * b.f_bsize) / 1048576.0);
-    unsigned long long total = (unsigned long long)(((unsigned long long)b.f_blocks * b.f_frsize) / 1048576.0);
-    ss << free << "/" << total << "MB";
-    ss >> df;
-  } else WARNING("statvfs failed with error '%s'.", strerror(errno));
-  return df;
+string GMenu2X::getDiskFree()
+{
+ return "";
+ /*stringstream ss;
+ string df = "";
+ struct statvfs b;
+ int ret = statvfs("/mnt/sd", &b);
+ if(ret == 0){
+  unsigned long long free = (unsigned long long)(((unsigned long long)b.f_bfree * b.f_bsize) / 1048576.0);
+  unsigned long long total = (unsigned long long)(((unsigned long long)b.f_blocks * b.f_frsize) / 1048576.0);
+  ss << free << "/" << total << "MB";
+  ss >> df;
+ }
+ else{
+  WARNING("statvfs failed with error '%s'.", strerror(errno));
+ }
+ return df;*/
 }
 
 int GMenu2X::drawButton(Button *btn, int x, int y) {
@@ -1937,9 +1944,9 @@
   if (y<0) y = resY+y;
   SDL_Rect re = {x, y-7, 0, 16};
   if (sc.skinRes("imgs/buttons/"+btn+".jpg") != NULL) {
-    sc["imgs/buttons/"+btn+".jpg"]->blit(s, x, y-7);
+    sc["imgs/buttons/"+btn+".jpg"]->blit(s, x, y-14);
     re.w = sc["imgs/buttons/"+btn+".jpg"]->raw->w+3;
-    s->write(font, text, x+re.w, y, HAlignLeft, VAlignMiddle);
+    s->write(font, text, x+re.w, y-3, HAlignLeft, VAlignMiddle);
     re.w += font->getTextWidth(text);
   }
   return x+re.w+6;
@@ -1949,8 +1956,8 @@
   if (y<0) y = resY+y;
   if (sc.skinRes("imgs/buttons/"+btn+".jpg") != NULL) {
     x -= 16;
-    sc["imgs/buttons/"+btn+".jpg"]->blit(s, x, y-7);
-    x -= 3;
+    sc["imgs/buttons/"+btn+".jpg"]->blit(s, x-5, y-11);
+    x -= 5;
     s->write(font, text, x, y, HAlignRight, VAlignMiddle);
     return x-6-font->getTextWidth(text);
   }
@@ -1960,7 +1967,7 @@
 void GMenu2X::drawScrollBar(uint pagesize, uint totalsize, uint pagepos, uint top, uint height) {
   if (totalsize<=pagesize) return;
 
-  s->rectangle(resX-8, top, 7, height, skinConfColors[COLOR_SELECTION_BG]);
+  s->rectangle(resX-20, top, 19, height, skinConfColors[COLOR_SELECTION_BG]);
 
   //internal bar total height = height-2
   //bar size
@@ -1971,7 +1978,7 @@
   if (by+bs>top+height-2) by = top+height-2-bs;
 
 
-  s->box(resX-6, by, 3, bs, skinConfColors[COLOR_SELECTION_BG]);
+  s->box(resX-18, by, 15, bs, skinConfColors[COLOR_SELECTION_BG]);
 }
 
 void GMenu2X::drawTopBar(Surface *s) {
--- old/src/iconbutton.cpp
+++ new/src/iconbutton.cpp
@@ -33,7 +33,7 @@
   if (iconSurface != NULL)
     iconSurface->blit(gmenu2x->s,iconRect);
   if (label != "")
-    gmenu2x->s->write(gmenu2x->font, label, labelRect.x, labelRect.y, labelHAlign, labelVAlign);
+    gmenu2x->s->write(gmenu2x->font, label, labelRect.x, labelRect.y-2, labelHAlign, labelVAlign);
 }
 
 bool IconButton::paintHover() {
--- old/src/imagedialog.cpp
+++ new/src/imagedialog.cpp
@@ -50,7 +50,7 @@
 
 void ImageDialog::beforeFileList() {
   if (fl->isFile(selected) && fileExists(getPath()+"/"+(*fl)[selected]))
-    previews[getPath()+"/"+(*fl)[selected]]->blitRight(gmenu2x->s, 310, 43);
+    previews[getPath()+"/"+(*fl)[selected]]->blitRight(gmenu2x->s, 600, 16);
 }
 
 void ImageDialog::onChangeDir() {
--- old/src/inputdialog.cpp
+++ new/src/inputdialog.cpp
@@ -113,7 +113,7 @@
       x++;
     }
 
-  kbLeft = 160 - kbLength*KEY_WIDTH/2;
+  kbLeft = 400 - kbLength*KEY_WIDTH/2;
   kbWidth = kbLength*KEY_WIDTH+3;
   kbHeight = (this->kb->size()+1)*KEY_HEIGHT+3;
 
@@ -124,7 +124,7 @@
 }
 
 bool InputDialog::exec() {
-  SDL_Rect box = {0, 60, 0, gmenu2x->font->getHeight()+4};
+  SDL_Rect box = {0, 100, 0, gmenu2x->font->getHeight()+4};
 
   Uint32 caretTick = 0, curTick;
   bool caretOn = true;
@@ -138,14 +138,13 @@
     writeSubTitle(text);
     drawTitleIcon(icon);
 
-    gmenu2x->drawButton(gmenu2x->s, "y", gmenu2x->tr["Change keys"],
-    gmenu2x->drawButton(gmenu2x->s, "b", gmenu2x->tr["Confirm"],
-    gmenu2x->drawButton(gmenu2x->s, "r", gmenu2x->tr["Space"],
-    gmenu2x->drawButton(btnBackspaceL,
-    gmenu2x->drawButton(btnBackspaceX)-6))));
+    gmenu2x->drawButton(gmenu2x->s, "a", gmenu2x->tr["Confirm"], 5, gmenu2x->resY-18);
+    gmenu2x->drawButton(gmenu2x->s, "y", gmenu2x->tr["Change keys"], 106, gmenu2x->resY-18);
+    gmenu2x->drawButton(btnBackspaceL, 244, gmenu2x->resY-18);
+    gmenu2x->drawButton(gmenu2x->s, "r", gmenu2x->tr["Space"], 365, gmenu2x->resY-18);
 
     box.w = gmenu2x->font->getTextWidth(input)+18;
-    box.x = 160-box.w/2;
+    box.x = 400-box.w/2;
     gmenu2x->s->box(box.x, box.y, box.w, box.h,
     gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
     gmenu2x->s->rectangle(box.x, box.y, box.w, box.h, gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
@@ -291,7 +290,7 @@
     selCol = 0;
     selRow = kb->size();
   }
-  gmenu2x->s->write(gmenu2x->font, gmenu2x->tr["Cancel"], (int)(160-kbLength*KEY_WIDTH/4), KB_TOP+kb->size()*KEY_HEIGHT+KEY_HEIGHT/2, HAlignCenter, VAlignMiddle);
+  gmenu2x->s->write(gmenu2x->font, gmenu2x->tr["Cancel"], (int)(400-kbLength*KEY_WIDTH/4), KB_TOP+kb->size()*KEY_HEIGHT+KEY_HEIGHT/2, HAlignCenter, VAlignMiddle);
 
   re.x = kbLeft+kbLength*KEY_WIDTH/2-1;
   gmenu2x->s->rectangle(re, gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
@@ -299,7 +298,7 @@
     selCol = 1;
     selRow = kb->size();
   }
-  gmenu2x->s->write(gmenu2x->font, gmenu2x->tr["OK"], (int)(160+kbLength*KEY_WIDTH/4), KB_TOP+kb->size()*KEY_HEIGHT+KEY_HEIGHT/2, HAlignCenter, VAlignMiddle);
+  gmenu2x->s->write(gmenu2x->font, gmenu2x->tr["OK"], (int)(400+kbLength*KEY_WIDTH/4), KB_TOP+kb->size()*KEY_HEIGHT+KEY_HEIGHT/2, HAlignCenter, VAlignMiddle);
 
   //if ts released
   if (gmenu2x->f200 && ts.released() && ts.inRect(kbRect)) {
--- old/src/inputdialog.h
+++ new/src/inputdialog.h
@@ -21,9 +21,9 @@
 #ifndef INPUTDIALOG_H_
 #define INPUTDIALOG_H_
 
-#define KEY_WIDTH 20
-#define KEY_HEIGHT 20
-#define KB_TOP 90
+#define KEY_WIDTH 30
+#define KEY_HEIGHT 30
+#define KB_TOP 130
 
 #define ID_NO_ACTION 0
 #define ID_ACTION_CLOSE 1
--- old/src/inputmanager.cpp
+++ new/src/inputmanager.cpp
@@ -160,36 +160,37 @@
 }
 
 
-bool InputManager::update(bool wait) {
-  bool anyactions = false;
-  SDL_JoystickUpdate();
+bool InputManager::update(bool wait)
+{
+ bool anyactions = false;
+ SDL_JoystickUpdate();
 
-  events.clear();
-  SDL_Event event;
+ events.clear();
+ SDL_Event event;
 
-  if (wait) {
-    SDL_WaitEvent(&event);
-    SDL_Event evcopy = event;
-    events.push_back(evcopy);
-  }
-  while (SDL_PollEvent(&event)) {
-    SDL_Event evcopy = event;
-    events.push_back(evcopy);
-  }
+ if(wait){
+  SDL_WaitEvent(&event);
+  SDL_Event evcopy = event;
+  events.push_back(evcopy);
+ }
+ while(SDL_PollEvent(&event)){
+  SDL_Event evcopy = event;
+  events.push_back(evcopy);
+ }
 
-  long now = SDL_GetTicks();
-  for (uint x=0; x<actions.size(); x++) {
-    bool prevstate = actions[x].active;
-    bool state = isActive(x);
-    actions[x].active = false;
-    if (state != prevstate) {
-      if (state) {
-        if (now-actions[x].last >= actions[x].interval) {
-          actions[x].active = true;
-          anyactions = true;
-          actions[x].last = now;
+ long now = SDL_GetTicks();
+ for (uint x=0; x<actions.size(); x++) {
+  bool prevstate = actions[x].active;
+  bool state = isActive(x);
+  actions[x].active = false;
+  if(state != prevstate){
+   if(state){
+    if(now-actions[x].last >= actions[x].interval){
+     actions[x].active = true;
+     anyactions = true;
+     actions[x].last = now;
 
-          if (actions[x].timer == NULL) {
+     if(actions[x].timer == NULL){
             // Set a timer to repeat the event in actions[x].interval milliseconds
             RepeatEventData *data = new RepeatEventData();
             data->im = this;
--- old/src/link.cpp
+++ new/src/link.cpp
@@ -42,8 +42,8 @@
 void Link::run() {}
 
 void Link::paint() {
-  iconSurface->blit(gmenu2x->s, iconX, rect.y+padding, 32,32);
-  gmenu2x->s->write( gmenu2x->font, getTitle(), iconX+16, rect.y+gmenu2x->skinConfInt["linkHeight"]-padding, HAlignCenter, VAlignBottom );
+  iconSurface->blit(gmenu2x->s, iconX-2, rect.y+padding, 64,64);
+  gmenu2x->s->write( gmenu2x->font, getTitle(), iconX+29, rect.y+gmenu2x->skinConfInt["linkHeight"]-padding, HAlignCenter, VAlignBottom );
 }
 
 bool Link::paintHover() {
@@ -133,6 +133,6 @@
 }
 
 void Link::recalcCoordinates() {
-  iconX = rect.x+(rect.w-32)/2;
-  padding = max(gmenu2x->skinConfInt["linkHeight"] - 32 - gmenu2x->font->getHeight(), 0) / 3;
+  iconX = rect.x+(rect.w-64)/2;
+  padding = max(gmenu2x->skinConfInt["linkHeight"] - 64 - gmenu2x->font->getHeight(), 0) / 3;
 }
--- old/src/linkapp.cpp
+++ new/src/linkapp.cpp
@@ -103,7 +103,7 @@
     } else if (name == "selectoraliases") {
       setAliasFile( value );
     } else {
-      WARNING("Unrecognized option: '%s'", name.c_str());
+      //WARNING("Unrecognized option: '%s'", name.c_str());
       break;
     }
   }
@@ -248,21 +248,21 @@
 
   string text = gmenu2x->tr.translate("Launching $1",getTitle().c_str(),NULL);
   int textW = gmenu2x->font->getTextWidth(text);
-  int boxW = 62+textW;
+  int boxW = 96+textW;
   int halfBoxW = boxW/2;
 
   //outer box
-  gmenu2x->s->box(gmenu2x->halfX-2-halfBoxW, gmenu2x->halfY-23, halfBoxW*2+5, 47, gmenu2x->skinConfColors[COLOR_MESSAGE_BOX_BG]);
+  gmenu2x->s->box(gmenu2x->halfX-2-halfBoxW, gmenu2x->halfY-38, halfBoxW*2+5, 79, gmenu2x->skinConfColors[COLOR_MESSAGE_BOX_BG]);
   //inner rectangle
-  gmenu2x->s->rectangle(gmenu2x->halfX-halfBoxW, gmenu2x->halfY-21, boxW, 42, gmenu2x->skinConfColors[COLOR_MESSAGE_BOX_BORDER]);
+  gmenu2x->s->rectangle(gmenu2x->halfX-halfBoxW, gmenu2x->halfY-35, boxW, 74, gmenu2x->skinConfColors[COLOR_MESSAGE_BOX_BORDER]);
 
   int x = gmenu2x->halfX+10-halfBoxW;
   /*if (getIcon()!="")
     gmenu2x->sc[getIcon()]->blit(gmenu2x->s,x,104);
   else
     gmenu2x->sc["icons/generic.jpg"]->blit(gmenu2x->s,x,104);*/
-  gmenu2x->sc[getIconPath()]->blit(gmenu2x->s,x,gmenu2x->halfY-16,32,32);
-  gmenu2x->s->write( gmenu2x->font, text, x+42, gmenu2x->halfY+1, HAlignLeft, VAlignMiddle );
+  gmenu2x->sc[getIconPath()]->blit(gmenu2x->s,x,gmenu2x->halfY-32,64,64);
+  gmenu2x->s->write( gmenu2x->font, text, x+74, gmenu2x->halfY+1, HAlignLeft, VAlignMiddle );
   gmenu2x->s->flip();
 }
 
--- old/src/menusettingbool.cpp
+++ new/src/menusettingbool.cpp
@@ -48,7 +48,7 @@
 
 void MenuSettingBool::initButton()
 {
-  IconButton *btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg",
+  IconButton *btn = new IconButton(gmenu2x, "skin:imgs/buttons/a.jpg",
                    gmenu2x->tr["Switch"]);
   btn->setAction(MakeDelegate(this, &MenuSettingBool::toggle));
   buttonBox.add(btn);
@@ -57,7 +57,7 @@
 void MenuSettingBool::draw(int y)
 {
   MenuSetting::draw(y);
-  gmenu2x->s->write( gmenu2x->font, strvalue, 155, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
+  gmenu2x->s->write( gmenu2x->font, strvalue, 255, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
 }
 
 void MenuSettingBool::manageInput()
--- old/src/menusettingdir.cpp
+++ new/src/menusettingdir.cpp
@@ -29,13 +29,13 @@
   , startPath(startPath_)
 {
   IconButton *btn;
-
-  btn = new IconButton(gmenu2x, "skin:imgs/buttons/x.jpg", gmenu2x->tr["Clear"]);
-  btn->setAction(MakeDelegate(this, &MenuSettingDir::clear));
+  
+ btn = new IconButton(gmenu2x, "skin:imgs/buttons/a.jpg", gmenu2x->tr["Select a directory"]);
+  btn->setAction(MakeDelegate(this, &MenuSettingDir::edit));
   buttonBox.add(btn);
 
-  btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg", gmenu2x->tr["Select a directory"]);
-  btn->setAction(MakeDelegate(this, &MenuSettingDir::edit));
+  btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg", gmenu2x->tr["Clear"]);
+  btn->setAction(MakeDelegate(this, &MenuSettingDir::clear));
   buttonBox.add(btn);
 }
 
--- old/src/menusettingfile.cpp
+++ new/src/menusettingfile.cpp
@@ -30,13 +30,14 @@
 {
   IconButton *btn;
 
-  btn = new IconButton(gmenu2x, "skin:imgs/buttons/x.jpg", gmenu2x->tr["Clear"]);
+  btn = new IconButton(gmenu2x, "skin:imgs/buttons/a.jpg", gmenu2x->tr["Select a file"]);
+  btn->setAction(MakeDelegate(this, &MenuSettingFile::edit));
+  buttonBox.add(btn);
+  
+ btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg", gmenu2x->tr["Clear"]);
   btn->setAction(MakeDelegate(this, &MenuSettingFile::clear));
   buttonBox.add(btn);
 
-  btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg", gmenu2x->tr["Select a file"]);
-  btn->setAction(MakeDelegate(this, &MenuSettingFile::edit));
-  buttonBox.add(btn);
 }
 
 void MenuSettingFile::edit() {
--- old/src/menusettingint.cpp
+++ new/src/menusettingint.cpp
@@ -61,7 +61,7 @@
 
 void MenuSettingInt::draw(int y) {
   MenuSetting::draw(y);
-  gmenu2x->s->write( gmenu2x->font, strvalue, 155, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
+  gmenu2x->s->write( gmenu2x->font, strvalue, 255, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
 }
 
 void MenuSettingInt::manageInput() {
--- old/src/menusettingrgba.cpp
+++ new/src/menusettingrgba.cpp
@@ -58,12 +58,12 @@
 void MenuSettingRGBA::draw(int y) {
   this->y = y;
   MenuSetting::draw(y);
-  gmenu2x->s->rectangle( 153, y+3, 11, 11, 0,0,0,255 );
-  gmenu2x->s->box( 154, y+4, 9, 9, value() );
-  gmenu2x->s->write( gmenu2x->font, "R: "+strR, 169, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
-  gmenu2x->s->write( gmenu2x->font, "G: "+strG, 205, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
-  gmenu2x->s->write( gmenu2x->font, "B: "+strB, 241, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
-  gmenu2x->s->write( gmenu2x->font, "A: "+strA, 277, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
+  gmenu2x->s->rectangle( 255, y+3, 15, 15, 0,0,0,255 );
+  gmenu2x->s->box( 256, y+4, 13, 13, value() );
+  gmenu2x->s->write( gmenu2x->font, "R: "+strR, 274, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
+  gmenu2x->s->write( gmenu2x->font, "G: "+strG, 334, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
+  gmenu2x->s->write( gmenu2x->font, "B: "+strB, 394, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
+  gmenu2x->s->write( gmenu2x->font, "A: "+strA, 454, y+gmenu2x->font->getHalfHeight(), HAlignLeft, VAlignMiddle );
 }
 
 void MenuSettingRGBA::handleTS() {
@@ -174,8 +174,8 @@
 
 void MenuSettingRGBA::drawSelected(int y)
 {
-  int x = 166+selPart*36;
-  gmenu2x->s->box( x, y, 36, 14, gmenu2x->skinConfColors[COLOR_SELECTION_BG] );
+  int x = 266+selPart*36;
+  //gmenu2x->s->box( x, y, 36, 14, gmenu2x->skinConfColors[COLOR_SELECTION_BG] );
 
   MenuSetting::drawSelected(y);
 }
--- old/src/menusettingstring.cpp
+++ new/src/menusettingstring.cpp
@@ -34,13 +34,14 @@
 {
   IconButton *btn;
 
-  btn = new IconButton(gmenu2x, "skin:imgs/buttons/x.jpg", gmenu2x->tr["Clear"]);
+  btn = new IconButton(gmenu2x, "skin:imgs/buttons/a.jpg", gmenu2x->tr["Edit"]);
+  btn->setAction(MakeDelegate(this, &MenuSettingString::edit));
+  buttonBox.add(btn);
+  
+ btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg", gmenu2x->tr["Clear"]);
   btn->setAction(MakeDelegate(this, &MenuSettingString::clear));
   buttonBox.add(btn);
 
-  btn = new IconButton(gmenu2x, "skin:imgs/buttons/b.jpg", gmenu2x->tr["Edit"]);
-  btn->setAction(MakeDelegate(this, &MenuSettingString::edit));
-  buttonBox.add(btn);
 }
 
 void MenuSettingString::edit()
--- old/src/menusettingstringbase.cpp
+++ new/src/menusettingstringbase.cpp
@@ -40,7 +40,7 @@
   MenuSetting::draw(y);
   gmenu2x->s->write(
       gmenu2x->font, value(),
-      155, y + gmenu2x->font->getHalfHeight(),
+      255, y + gmenu2x->font->getHalfHeight(),
       HAlignLeft, VAlignMiddle);
 }
 
--- old/src/messagebox.cpp
+++ new/src/messagebox.cpp
@@ -47,9 +47,9 @@
   buttonLabels[DOWN] = "down";
   buttonLabels[LEFT] = "left";
   buttonLabels[RIGHT] = "right";
-  buttonLabels[MODIFIER] = "a";
-  buttonLabels[CONFIRM] = "b";
-  buttonLabels[CANCEL] = "x";
+  buttonLabels[MODIFIER] = "x";
+  buttonLabels[CONFIRM] = "a";
+  buttonLabels[CANCEL] = "b";
   buttonLabels[MANUAL] = "y";
   buttonLabels[DEC] = "x";
   buttonLabels[INC] = "y";
@@ -75,8 +75,8 @@
   bg.box(0, 0, gmenu2x->resX, gmenu2x->resY, 0,0,0,200);
 
   SDL_Rect box;
-  box.h = gmenu2x->font->getHeight()*3 +18;
-  box.w = gmenu2x->font->getTextWidth(text) + 24 + (gmenu2x->sc[icon] != NULL ? 37 : 0);
+  box.h = gmenu2x->font->getHeight()*3 + 36;
+  box.w = gmenu2x->font->getTextWidth(text) + 24 + (gmenu2x->sc[icon] != NULL ? 64 : 0);
   box.x = gmenu2x->halfX - box.w/2 -2;
   box.y = gmenu2x->halfY - box.h/2 -2;
 
@@ -87,8 +87,8 @@
   gmenu2x->skinConfColors[COLOR_MESSAGE_BOX_BORDER]);
   //icon+text
   if (gmenu2x->sc[icon] != NULL)
-    gmenu2x->sc[icon]->blitCenter( &bg, box.x+25, box.y+gmenu2x->font->getHeight()+7 );
-  bg.write( gmenu2x->font, text, box.x+(gmenu2x->sc[icon] != NULL ? 47 : 10), box.y+gmenu2x->font->getHeight()+6, HAlignLeft, VAlignMiddle );
+    gmenu2x->sc[icon]->blitCenter( &bg, box.x+40, box.y+gmenu2x->font->getHeight()+14 );
+  bg.write( gmenu2x->font, text, box.x+(gmenu2x->sc[icon] != NULL ? 80 : 8), box.y+gmenu2x->font->getHeight()+8, HAlignLeft, VAlignMiddle );
 
   int btnX = gmenu2x->halfX+box.w/2-6;
   for (uint i=0; i<buttons.size(); i++) {
--- old/src/selector.cpp
+++ new/src/selector.cpp
@@ -63,11 +63,11 @@
 
   if (link->getSelectorBrowser()) {
     gmenu2x->drawButton(&bg, "start", gmenu2x->tr["Exit"],
-    gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Select a file"],
-    gmenu2x->drawButton(&bg, "x", gmenu2x->tr["Up one folder"], 5)));
+    gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Up one folder"],
+    gmenu2x->drawButton(&bg, "a", gmenu2x->tr["Select a file"], 5)));
   } else {
-    gmenu2x->drawButton(&bg, "x", gmenu2x->tr["Exit"],
-    gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Select a file"], 5));
+    gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Exit"],
+    gmenu2x->drawButton(&bg, "a", gmenu2x->tr["Select a file"], 5));
   }
 
   Uint32 selTick = SDL_GetTicks(), curTick;
@@ -77,6 +77,10 @@
   uint selected = constrain(startSelection,0,fl.size()-1);
 
   //Add the folder icon manually to be sure to load it with alpha support since we are going to disable it for screenshots
+  if (gmenu2x->sc.skinRes("imgs/go-up.jpg")==NULL)
+    gmenu2x->sc.addSkinRes("imgs/go-up.jpg");
+  if (gmenu2x->sc.skinRes("imgs/file.jpg")==NULL)
+    gmenu2x->sc.addSkinRes("imgs/file.jpg");
   if (gmenu2x->sc.skinRes("imgs/folder.jpg")==NULL)
     gmenu2x->sc.addSkinRes("imgs/folder.jpg");
   gmenu2x->sc.defaultAlpha = false;
@@ -88,31 +92,40 @@
     if (selected<firstElement) firstElement=selected;
 
     //Selection
+  unsigned char barsize=25;
     iY = selected-firstElement;
-    iY = 42+(iY*16);
+    iY = 97+(iY*barsize);
     if (selected<fl.size())
-      gmenu2x->s->box(1, iY, 309, 14, gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
+      gmenu2x->s->box(1, iY, 778, barsize, gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
 
     //Screenshot
     if (selected-fl.dirCount()<screens.size() && screens[selected-fl.dirCount()]!="") {
       curTick = SDL_GetTicks();
       if (curTick-selTick>200)
-        gmenu2x->sc[screens[selected-fl.dirCount()]]->blitRight(gmenu2x->s, 311, 42, 160, 160, min((curTick-selTick-200)/3,255));
+        gmenu2x->sc[screens[selected-fl.dirCount()]]->blitRight(gmenu2x->s, 311, 97, 160, 160, min((curTick-selTick-200)/3,255));
     }
 
     //Files & Dirs
-    gmenu2x->s->setClipRect(0,41,311,179);
+    gmenu2x->s->setClipRect(0,97,778,480-(97+27));
     for (i=firstElement; i<fl.size() && i<firstElement+SELECTOR_ELEMENTS; i++) {
       iY = i-firstElement;
       if (fl.isDirectory(i)) {
-        gmenu2x->sc["imgs/folder.jpg"]->blit(gmenu2x->s, 4, 42+(iY*16));
-        gmenu2x->s->write(gmenu2x->font, fl[i], 21, 49+(iY*16), HAlignLeft, VAlignMiddle);
-      } else
-        gmenu2x->s->write(gmenu2x->font, titles[i-fl.dirCount()], 4, 49+(iY*16), HAlignLeft, VAlignMiddle);
+    if(strcmp(fl[i].c_str(), "..") == 0){
+          gmenu2x->sc["imgs/go-up.jpg"]->blit(gmenu2x->s, 4, 97+(iY*barsize));
+    }
+    else{
+          gmenu2x->sc["imgs/folder.jpg"]->blit(gmenu2x->s, 4, 99+(iY*barsize));
+    }
+        gmenu2x->s->write(gmenu2x->font, fl[i], 32, 108+(iY*barsize), HAlignLeft, VAlignMiddle);
+      }
+   else{
+        gmenu2x->sc["imgs/file.jpg"]->blit(gmenu2x->s, 4, 99+(iY*barsize));
+        gmenu2x->s->write(gmenu2x->font, titles[i-fl.dirCount()], 32, 108+(iY*barsize), HAlignLeft, VAlignMiddle);
+   }
     }
     gmenu2x->s->clearClipRect();
 
-    gmenu2x->drawScrollBar(SELECTOR_ELEMENTS,fl.size(),firstElement,42,175);
+    gmenu2x->drawScrollBar(SELECTOR_ELEMENTS,fl.size(),firstElement,97,480-(97+27));
     gmenu2x->s->flip();
 
 
--- old/src/selector.h
+++ new/src/selector.h
@@ -26,7 +26,7 @@
 #include "utilities.h"
 #include "dialog.h"
 
-#define SELECTOR_ELEMENTS 11
+#define SELECTOR_ELEMENTS 14
 
 class LinkApp;
 class FileLister;
--- old/src/settingsdialog.cpp
+++ new/src/settingsdialog.cpp
@@ -78,7 +78,7 @@
     iY = gmenu2x->skinConfInt["topBarHeight"]+2+(iY*rowHeight);
     gmenu2x->s->setClipRect(clipRect);
     if (sel<voices.size())
-      gmenu2x->s->box(1, iY, 148, rowHeight-1, gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
+      gmenu2x->s->box(1, iY, 250, rowHeight-1, gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
     gmenu2x->s->clearClipRect();
 
     //selected option
--- old/src/surface.cpp
+++ new/src/surface.cpp
@@ -164,13 +164,15 @@
   }
 }
 
-void Surface::flip() {
-  if (dblbuffer!=NULL) {
-    this->blit(dblbuffer,0,0);
-    SDL_Flip(dblbuffer);
-  } else {
-    SDL_Flip(raw);
-  }
+void Surface::flip()
+{
+ if(dblbuffer != NULL){
+  this->blit(dblbuffer,0,0);
+  SDL_Flip(dblbuffer);
+ }
+ else{
+  SDL_Flip(raw);
+ }
 }
 
 bool Surface::blit(SDL_Surface *destination, int x, int y, int w, int h, int a) {
--- old/src/surface.h
+++ new/src/surface.h
@@ -58,7 +58,7 @@
   void enableAlpha();
 
   SDL_Surface *raw;
-
+ 
   void free();
   void load(const string &img, bool alpha=true, const string &skin="");
   void lock();
--- old/src/textdialog.cpp
+++ new/src/textdialog.cpp
@@ -75,22 +75,22 @@
 }
 
 void TextDialog::drawText(vector<string> *text, uint firstRow, uint rowsPerPage) {
-  gmenu2x->s->setClipRect(0,41,gmenu2x->resX-10,gmenu2x->resY-60);
+  gmenu2x->s->setClipRect(0,97,gmenu2x->resX-22,gmenu2x->resY-(97 + 27));
 
   for (uint i=firstRow; i<firstRow+rowsPerPage && i<text->size(); i++) {
     int rowY;
     if (text->at(i)=="----") { //draw a line
-      rowY = 42+(int)((i-firstRow+0.5)*gmenu2x->font->getHeight());
-      gmenu2x->s->hline(5,rowY,gmenu2x->resX-16,255,255,255,130);
-      gmenu2x->s->hline(5,rowY+1,gmenu2x->resX-16,0,0,0,130);
+      rowY = 98+(int)((i-firstRow+0.5)*gmenu2x->font->getHeight());
+      gmenu2x->s->hline(5,rowY,gmenu2x->resX-28,255,255,255,130);
+      gmenu2x->s->hline(5,rowY+1,gmenu2x->resX-28,0,0,0,130);
     } else {
-      rowY = 42+(i-firstRow)*gmenu2x->font->getHeight();
+      rowY = 98+(i-firstRow)*gmenu2x->font->getHeight();
       gmenu2x->font->write(gmenu2x->s, text->at(i), 5, rowY);
     }
   }
 
   gmenu2x->s->clearClipRect();
-  gmenu2x->drawScrollBar(rowsPerPage,text->size(),firstRow,42,gmenu2x->resY-65);
+  gmenu2x->drawScrollBar(rowsPerPage,text->size(),firstRow,97,gmenu2x->resY-(97+27));
 }
 
 void TextDialog::exec() {
@@ -106,11 +106,11 @@
   writeTitle(title,&bg);
   writeSubTitle(description,&bg);
 
-  gmenu2x->drawButton(&bg, "x", gmenu2x->tr["Exit"],
-  gmenu2x->drawButton(&bg, "down", gmenu2x->tr["Scroll"],
-  gmenu2x->drawButton(&bg, "up", "", 5)-10));
+  gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Exit"], 105, gmenu2x->resY -16);
+  gmenu2x->drawButton(&bg, "down", gmenu2x->tr["Scroll"], 25, gmenu2x->resY -16);
+  gmenu2x->drawButton(&bg, "up", "", 5, gmenu2x->resY -16);
 
-  uint firstRow = 0, rowsPerPage = (gmenu2x->resY-60)/gmenu2x->font->getHeight();
+  uint firstRow = 0, rowsPerPage = (gmenu2x->resY-(97+27))/gmenu2x->font->getHeight();
   while (!close) {
     bg.blit(gmenu2x->s,0,0);
     drawText(text, firstRow, rowsPerPage);
--- old/src/wallpaperdialog.cpp
+++ new/src/wallpaperdialog.cpp
@@ -48,9 +48,10 @@
 
   DEBUG("Wallpapers: %i", wallpapers.size());
 
+ uint filecnt=18;
   uint i, selected = 0, firstElement = 0, iY;
   while (!close) {
-    if (selected>firstElement+9) firstElement=selected-9;
+    if (selected>firstElement+filecnt) firstElement=selected-filecnt;
     if (selected<firstElement) firstElement=selected;
 
     //Wallpaper
@@ -59,29 +60,28 @@
     else
       gmenu2x->sc["skins/Default/wallpapers/"+wallpapers[selected]]->blit(gmenu2x->s,0,0);
 
-    gmenu2x->drawTopBar(gmenu2x->s);
-    gmenu2x->drawBottomBar(gmenu2x->s);
+    //gmenu2x->drawTopBar(gmenu2x->s);
+    //gmenu2x->drawBottomBar(gmenu2x->s);
+    //drawTitleIcon("icons/wallpaper.jpg",true);
+    //writeTitle("Wallpaper selection");
+    //writeSubTitle("Select an image from the list, to use as a wallpaper");
 
-    drawTitleIcon("icons/wallpaper.jpg",true);
-    writeTitle("Wallpaper selection");
-    writeSubTitle("Select an image from the list, to use as a wallpaper");
+    gmenu2x->drawButton(gmenu2x->s, "a", gmenu2x->tr["Select wallpaper"],5,480-18);
 
-    gmenu2x->drawButton(gmenu2x->s, "b", gmenu2x->tr["Select wallpaper"],5);
-
     //Selection
     iY = selected-firstElement;
-    iY = 44+(iY*17);
-    gmenu2x->s->box(2, iY, 308, 16,  gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
+    iY = 0+(iY*24);
+    gmenu2x->s->box(2, iY, 777, 24,  gmenu2x->skinConfColors[COLOR_SELECTION_BG]);
 
     //Files & Directories
-    gmenu2x->s->setClipRect(0,41,311,179);
-    for (i=firstElement; i<wallpapers.size() && i<firstElement+10; i++) {
+    gmenu2x->s->setClipRect(0,0,777,480-25);
+    for (i=firstElement; i<wallpapers.size() && i<firstElement+(filecnt+1); i++) {
       iY = i-firstElement;
-      gmenu2x->s->write(gmenu2x->font, wallpapers[i], 5, 52+(iY*17), HAlignLeft, VAlignMiddle);
+      gmenu2x->s->write(gmenu2x->font, wallpapers[i], 5, 10+(iY*24), HAlignLeft, VAlignMiddle);
     }
     gmenu2x->s->clearClipRect();
 
-    gmenu2x->drawScrollBar(10,wallpapers.size(),firstElement,44,170);
+    gmenu2x->drawScrollBar(20,wallpapers.size(),firstElement,0,480-25);
     gmenu2x->s->flip();

完成














返回上一頁