enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src menus.cc,1.66,1.67


From: Ralf Westram <address@hidden>
Subject: [Enigma-cvs] enigma/src menus.cc,1.66,1.67
Date: Mon, 20 Oct 2003 18:30:18 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv24754/src

Modified Files:
        menus.cc 
Log Message:
- Shading depends on difficulty level
- invalidate_all on difficulty change



Index: menus.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/menus.cc,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** menus.cc    20 Oct 2003 08:05:45 -0000      1.66
--- menus.cc    20 Oct 2003 18:30:16 -0000      1.67
***************
*** 191,195 ****
  
              Rect buttonarea(xpos, ypos, buttonw, buttonh);
!             if (!(r.overlaps(buttonarea) || r.w == 0)) 
                  continue;       // r.w==0 if repainting whole screen
  
--- 191,195 ----
  
              Rect buttonarea(xpos, ypos, buttonw, buttonh);
!             if (!(r.overlaps(buttonarea) || r.w == 0))
                  continue;       // r.w==0 if repainting whole screen
  
***************
*** 230,234 ****
              int imgy = ypos + 10;
              if (img) {
!                 if (finished) {
                      set_color(gc, 0,0,0);
                      box(gc, imgx, imgy, imgw, imgh);
--- 230,235 ----
              int imgy = ypos + 10;
              if (img) {
!                 if (finished >= options::Difficulty) {
!                     // Shade completed levels
                      set_color(gc, 0,0,0);
                      box(gc, imgx, imgy, imgw, imgh);
***************
*** 608,617 ****
  
  
! FullscreenButton::FullscreenButton() : TextButton("", this) 
  {
!     update(); 
  }
  
! void FullscreenButton::on_action(Widget *) 
  {
      bool old = FullScreen;
--- 609,618 ----
  
  
! FullscreenButton::FullscreenButton() : TextButton("", this)
  {
!     update();
  }
  
! void FullscreenButton::on_action(Widget *)
  {
      bool old = FullScreen;
***************
*** 630,636 ****
  }
  
! DifficultyButton::DifficultyButton() : TextButton("", this) 
  {
!     update(); 
  }
  
--- 631,637 ----
  }
  
! DifficultyButton::DifficultyButton() : TextButton("", this)
  {
!     update();
  }
  
***************
*** 792,804 ****
      add (lbl_statistics, Rect (325, Y2+20, 305, 28));
      lbl_statistics->set_alignment (HALIGN_RIGHT, VALIGN_TOP);
!     
      add (lbl_levelname,  Rect (10,Y2,305, 28));
      lbl_levelname->set_alignment (HALIGN_LEFT, VALIGN_TOP);
      add (lbl_levelinfo,  Rect (10,Y2+20,305, 28));
      lbl_levelinfo->set_alignment (HALIGN_LEFT, VALIGN_TOP);
!     
      add (levelwidget,  Rect (10,Y1,590,350));
      levelwidget->set_listener(this);
  
      set_position(pos);
  }
--- 793,807 ----
      add (lbl_statistics, Rect (325, Y2+20, 305, 28));
      lbl_statistics->set_alignment (HALIGN_RIGHT, VALIGN_TOP);
! 
      add (lbl_levelname,  Rect (10,Y2,305, 28));
      lbl_levelname->set_alignment (HALIGN_LEFT, VALIGN_TOP);
      add (lbl_levelinfo,  Rect (10,Y2+20,305, 28));
      lbl_levelinfo->set_alignment (HALIGN_LEFT, VALIGN_TOP);
! 
      add (levelwidget,  Rect (10,Y1,590,350));
      levelwidget->set_listener(this);
  
+     but_difficulty->set_listener(this);
+ 
      set_position(pos);
  }
***************
*** 845,849 ****
  
          if ((unsigned)ilevel < lp->size()) {
!             if (!LevelIsLocked (lp, ilevel)) 
              {
                  ilevel = StartGame(lp, ilevel);
--- 848,852 ----
  
          if ((unsigned)ilevel < lp->size()) {
!             if (!LevelIsLocked (lp, ilevel))
              {
                  ilevel = StartGame(lp, ilevel);
***************
*** 873,876 ****
--- 876,882 ----
          }
          invalidate_all();
+     } else if (w == but_difficulty) {
+         but_difficulty->on_action(w);
+         invalidate_all();
      }
  }
***************
*** 890,896 ****
        lbl_statistics->set_text(txt);
      }
!     
      int iselected = levelwidget->selected_level();
!     if (const enigma::LevelInfo *li = lp->get_info (iselected)) 
      {
        // Display level name
--- 896,902 ----
        lbl_statistics->set_text(txt);
      }
! 
      int iselected = levelwidget->selected_level();
!     if (const enigma::LevelInfo *li = lp->get_info (iselected))
      {
        // Display level name





reply via email to

[Prev in Thread] Current Thread [Next in Thread]