Changeset 1633 for code/trunk/src/orxonox/overlays/console
- Timestamp:
- Jun 29, 2008, 6:45:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/console/InGameConsole.cc
r1625 r1633 36 36 #include <OgreOverlayManager.h> 37 37 #include <OgreOverlayContainer.h> 38 #include <OgreStringConverter.h> 39 38 #include <OgreFontManager.h> 39 #include <OgreFont.h> 40 41 #include "util/Math.h" 42 #include "util/Convert.h" 40 43 #include "core/Debug.h" 41 44 #include "core/CoreIncludes.h" … … 43 46 #include "core/ConsoleCommand.h" 44 47 #include "core/input/InputManager.h" 45 #include "util/Math.h"46 48 #include "GraphicsEngine.h" 47 49 … … 136 138 this->consoleOverlayContainer_->addChild(this->consoleOverlayBorder_); 137 139 140 // create a new font to match the requested size exactly 141 Ogre::FontPtr font = static_cast<Ogre::FontPtr> 142 (Ogre::FontManager::getSingleton().create("MonofurConsole", "General")); 143 font->setType(Ogre::FT_TRUETYPE); 144 font->setSource("Monofur.ttf"); 145 font->setTrueTypeSize(18); 146 // reto: I don't know why, but setting the resolution twice as high makes the font look a lot clearer 147 font->setTrueTypeResolution(192); 148 font->addCodePointRange(Ogre::Font::CodePointRange(33, 126)); 149 font->addCodePointRange(Ogre::Font::CodePointRange(161, 255)); 150 138 151 // create the text lines 139 152 this->consoleOverlayTextAreas_ = new Ogre::TextAreaOverlayElement*[LINES]; 140 153 for (int i = 0; i < LINES; i++) 141 154 { 142 this->consoleOverlayTextAreas_[i] = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "InGameConsoleTextArea" + Ogre::StringConverter::toString(i)));155 this->consoleOverlayTextAreas_[i] = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "InGameConsoleTextArea" + convertToString(i))); 143 156 this->consoleOverlayTextAreas_[i]->setMetricsMode(Ogre::GMM_PIXELS); 144 this->consoleOverlayTextAreas_[i]->setFontName("Monofur ");157 this->consoleOverlayTextAreas_[i]->setFontName("MonofurConsole"); 145 158 this->consoleOverlayTextAreas_[i]->setCharHeight(18); 146 159 this->consoleOverlayTextAreas_[i]->setParameter("colour_top", "0.21 0.69 0.21"); … … 153 166 this->consoleOverlayCursor_ = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "InGameConsoleCursor")); 154 167 this->consoleOverlayCursor_->setMetricsMode(Ogre::GMM_PIXELS); 155 this->consoleOverlayCursor_->setFontName("Monofur ");168 this->consoleOverlayCursor_->setFontName("MonofurConsole"); 156 169 this->consoleOverlayCursor_->setCharHeight(18); 157 170 this->consoleOverlayCursor_->setParameter("colour_top", "0.21 0.69 0.21");
Note: See TracChangeset
for help on using the changeset viewer.