/[paragui]/paragui/src/core/pgapplication.cpp
ViewVC logotype

Diff of /paragui/src/core/pgapplication.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.4.22.2.1 by braindead, Fri Nov 21 12:27:55 2003 UTC revision 1.2.4.22.2.2 by braindead, Mon Nov 24 09:17:21 2003 UTC
# Line 67  PG_CURSOR_MODE PG_Application::my_mouse_ Line 67  PG_CURSOR_MODE PG_Application::my_mouse_
67  PG_Font* PG_Application::DefaultFont = NULL;  PG_Font* PG_Application::DefaultFont = NULL;
68  SDL_Surface* PG_Application::my_background = NULL;  SDL_Surface* PG_Application::my_background = NULL;
69  SDL_Surface* PG_Application::my_scaled_background = NULL;  SDL_Surface* PG_Application::my_scaled_background = NULL;
70  SDL_Color PG_Application::my_backcolor;  PG_Color PG_Application::my_backcolor;
71  int PG_Application::my_backmode = BKMODE_TILE;  int PG_Application::my_backmode = BKMODE_TILE;
72  bool PG_Application::disableDirtyUpdates = false;  bool PG_Application::disableDirtyUpdates = false;
73    
# Line 435  void PG_Application::RedrawBackground(co Line 435  void PG_Application::RedrawBackground(co
435          PG_Rect fillrect = rect;          PG_Rect fillrect = rect;
436    
437          if(!my_background) {          if(!my_background) {
438                  SDL_Color c = my_backcolor;                  SDL_FillRect(screen, (SDL_Rect*)&fillrect, my_backcolor.MapRGB(screen->format));
                 SDL_FillRect(screen, (SDL_Rect*)&fillrect, SDL_MapRGB(screen->format, c.r, c.g, c.b));  
439                  return;                  return;
440          }          }
441          if(my_backmode == BKMODE_STRETCH &&          if(my_backmode == BKMODE_STRETCH &&
# Line 630  PG_Theme* PG_Application::LoadTheme(cons Line 629  PG_Theme* PG_Application::LoadTheme(cons
629                  PG_LogMSG("size: %i", DefaultFont->GetSize());                  PG_LogMSG("size: %i", DefaultFont->GetSize());
630    
631                  my_background = theme->FindSurface("Background", "Background", "background");                  my_background = theme->FindSurface("Background", "Background", "background");
632                  my_backmode = theme->FindProperty("Background", "Background", "backmode");                  theme->GetProperty("Background", "Background", "backmode", my_backmode);
633                  SDL_Color* bc = theme->FindColor("Background", "Background", "backcolor");                  theme->GetColor("Background", "Background", "backcolor", my_backcolor);
634                  if(bc != NULL) {  
                         my_backcolor = *bc;  
                 }  
635                  if(my_scaled_background) {                  if(my_scaled_background) {
636                          // Destroyed scaled background if present                          // Destroyed scaled background if present
637                          SDL_FreeSurface(my_scaled_background);                          SDL_FreeSurface(my_scaled_background);
# Line 879  PG_Widget *PG_Application::GetWidgetById Line 876  PG_Widget *PG_Application::GetWidgetById
876          return (FindInChildObjects(PG_Widget::GetWidgetList(), id));          return (FindInChildObjects(PG_Widget::GetWidgetList(), id));
877  }  }
878    
879  void PG_Application::SetFontColor(const SDL_Color& Color) {  void PG_Application::SetFontColor(const PG_Color& Color) {
880          DefaultFont->SetColor(Color);          DefaultFont->SetColor(Color);
881  }  }
882    
 void PG_Application::SetFontColor(int Red, int Green, int Blue) {  
         SDL_Color Color;  
         Color.r = Red;  
         Color.g = Green;  
         Color.b = Blue;  
         SetFontColor(Color);  
 }  
   
 void PG_Application::SetFontColor(int c) {  
         SDL_Color Color;  
         Color.r = (c >> 16) & 0xff;  
         Color.g = (c >> 8) & 0xff;  
         Color.b = c & 0xff;  
         SetFontColor(Color);  
 }  
   
883  void PG_Application::SetFontAlpha(int Alpha) {  void PG_Application::SetFontAlpha(int Alpha) {
884          DefaultFont->SetAlpha(Alpha);          DefaultFont->SetAlpha(Alpha);
885  }  }

Legend:
Removed from v.1.2.4.22.2.1  
changed lines
  Added in v.1.2.4.22.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26