Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5024 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Aug 15, 2005, 1:00:21 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: icon and name get displayed correctly again

Location:
orxonox/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/graphics_engine.cc

    r4955 r5024  
    115115  if (this->isInit)
    116116    return -1;
    117   // initialize SDL_VIDEO
     117  //   initialize SDL_VIDEO
    118118  if (SDL_Init(SDL_INIT_VIDEO) == -1)
    119     {
    120       PRINTF(1)("could not initialize SDL Video\n");
     119  {
     120    PRINTF(1)("could not initialize SDL Video\n");
    121121      //      return -1;
    122     }
     122  }
    123123  // initialize SDL_GL-settings
    124124  this->setGLattribs();
     
    145145  this->setResolution(resX, resY, bbp);
    146146
    147   // TO DO: Create a cool icon and use it here
    148   char* loadPic = new char[strlen(ResourceManager::getInstance()->getDataDir())+ 100];
    149   sprintf(loadPic, "%s%s", ResourceManager::getInstance()->getDataDir(),  "pictures/orxonox-icon32x32.bmp");
    150   SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL);
    151   delete loadPic;
    152147  // Enable default GL stuff
    153148  glEnable(GL_DEPTH_TEST);
     
    165160void GraphicsEngine::setWindowName(const char* windowName, const char* icon)
    166161{
    167   // Set window labeling
     162  SDL_WM_SetIcon(SDL_LoadBMP(icon), NULL);
     163
    168164  SDL_WM_SetCaption (windowName, icon);
    169165}
  • orxonox/trunk/src/lib/gui/gui_exec.h

    r5021 r5024  
    11/*!
    2   \file gui_exec.h
    3   \brief File that holds the class that creates the execute-Options.
    4 */
     2 * file gui_exec.h
     3 * File that holds the class that creates the execute-Options.
     4 */
    55
    66#ifndef _GUI_EXEC_H
  • orxonox/trunk/src/lib/gui/gui_gtk.h

    r5015 r5024  
    11/*!
    2  \file gui_gtk.h
    3  \brief Contains all th different Widgets.
    4 */
     2 * @file gui_gtk.h
     3 * Contains all th different Widgets.
     4 */
    55#ifndef _GUI_GTK_H
    66#define _GUI_GTK_H
     
    3333
    3434// enumerator for different GuiOption-Types
    35 enum GUI_OPTION {GUI_BOX = -2,
    36                  GUI_CONTAINER = -1,
    37                  GUI_NOTHING = 0,
    38                  GUI_BOOL = 1,
    39                  GUI_INT = 2,
    40                  GUI_FLOAT = 3,
    41                  GUI_CHAR = 4,
    42                  GUI_CHAR_ARRAY = 5};
     35enum GUI_OPTION
     36{
     37  GUI_BOX = -2,
     38  GUI_CONTAINER = -1,
     39  GUI_NOTHING = 0,
     40  GUI_BOOL = 1,
     41  GUI_INT = 2,
     42  GUI_FLOAT = 3,
     43  GUI_CHAR = 4,
     44  GUI_CHAR_ARRAY = 5
     45};
    4346
    4447extern char* executable;
  • orxonox/trunk/src/lib/gui/gui_video.cc

    r4836 r5024  
    223223      }
    224224  }
     225  SDL_QuitSubSystem(SDL_INIT_VIDEO);
    225226  SDL_Quit();
    226227}
  • orxonox/trunk/src/orxonox.cc

    r5019 r5024  
    160160
    161161  GraphicsEngine::getInstance();
    162   GraphicsEngine::getInstance()->setWindowName(PACKAGE_NAME " " PACKAGE_VERSION, PACKAGE_NAME " " PACKAGE_VERSION);
    163162
    164163  GraphicsEngine::getInstance()->initFromIniFile(this->iniParser);
    165164
     165  char* icon = ResourceManager::getFullName("pictures/fighter-top-32x32.bmp");
     166  GraphicsEngine::getInstance()->setWindowName(PACKAGE_NAME " " PACKAGE_VERSION, icon);
     167  delete icon;
    166168  return 0;
    167169}
  • orxonox/trunk/src/orxonox.h

    r5018 r5024  
    5454
    5555
    56 
    57 
     56////////////////////////
     57// Start-up functions //
     58////////////////////////
    5859int startHelp(int argc, char** argv);
    5960int startOrxonox(int argc, char** argv);
Note: See TracChangeset for help on using the changeset viewer.