Changeset 3300 for code/trunk/src/orxonox/overlays/console
- Timestamp:
- Jul 17, 2009, 11:53:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/console/InGameConsole.cc
r3280 r3300 332 332 333 333 this->consoleOverlayCursor_->setCaption(std::string(pos,' ') + cursorSymbol_); 334 this->consoleOverlayCursor_->setTop( (int) this->windowH_ * this->relativeHeight- 24);334 this->consoleOverlayCursor_->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24); 335 335 } 336 336 … … 416 416 this->windowW_ = newWidth; 417 417 this->windowH_ = newHeight; 418 this->consoleOverlayBorder_->setWidth( (int) this->windowW_* this->relativeWidth);419 this->consoleOverlayBorder_->setHeight( (int) this->windowH_ * this->relativeHeight);420 this->consoleOverlayNoise_->setWidth( (int) this->windowW_ * this->relativeWidth- 10);421 this->consoleOverlayNoise_->setHeight( (int) this->windowH_ * this->relativeHeight- 5);418 this->consoleOverlayBorder_->setWidth(static_cast<int>(this->windowW_* this->relativeWidth)); 419 this->consoleOverlayBorder_->setHeight(static_cast<int>(this->windowH_ * this->relativeHeight)); 420 this->consoleOverlayNoise_->setWidth(static_cast<int>(this->windowW_ * this->relativeWidth) - 10); 421 this->consoleOverlayNoise_->setHeight(static_cast<int>(this->windowH_ * this->relativeHeight) - 5); 422 422 this->consoleOverlayNoise_->setTiling(consoleOverlayNoise_->getWidth() / (50.0f * this->noiseSize_), consoleOverlayNoise_->getHeight() / (50.0f * this->noiseSize_)); 423 423 424 424 // now adjust the text lines... 425 this->desiredTextWidth_ = (int)(this->windowW_ * this->relativeWidth) - 12;425 this->desiredTextWidth_ = static_cast<int>(this->windowW_ * this->relativeWidth) - 12; 426 426 427 427 if (LINES > 0) 428 this->maxCharsPerLine_ = std::max( (unsigned int)10, (unsigned int) ((float)this->desiredTextWidth_/ CHAR_WIDTH));428 this->maxCharsPerLine_ = std::max(10U, static_cast<unsigned int>(static_cast<float>(this->desiredTextWidth_) / CHAR_WIDTH)); 429 429 else 430 430 this->maxCharsPerLine_ = 10; … … 433 433 { 434 434 this->consoleOverlayTextAreas_[i]->setWidth(this->desiredTextWidth_); 435 this->consoleOverlayTextAreas_[i]->setTop( (int) this->windowH_ * this->relativeHeight- 24 - 14*i);435 this->consoleOverlayTextAreas_[i]->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24 - 14*i); 436 436 } 437 437
Note: See TracChangeset
for help on using the changeset viewer.