Changeset 6502 for code/trunk/src/modules/questsystem
- Timestamp:
- Mar 11, 2010, 11:34:20 AM (15 years ago)
- Location:
- code/trunk/src/modules/questsystem
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/questsystem/QuestGUINode.cc
r6417 r6502 161 161 const QuestDescription* description = this->item_->getDescription(); 162 162 this->details_ = this->gui_->getWindowManager()->createWindow("TaharezLook/FrameWindow", stream.str()); 163 this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7 , 0),CEGUI::UDim(0.7, 0)));164 this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1 , 0),CEGUI::UDim(0.1, 0)));163 this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7f, 0),CEGUI::UDim(0.7f, 0))); 164 this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1f, 0),CEGUI::UDim(0.1f, 0))); 165 165 this->details_->setText(description->getTitle()); 166 166 this->details_->setAlpha(1.0); … … 173 173 CEGUI::Window* window = this->gui_->getWindowManager()->createWindow("TaharezLook/ScrollablePane", stream.str()); 174 174 window->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -2*QuestGUINode::BORDER_WIDTH),CEGUI::UDim(1.0, -QuestGUINode::TITLE_HEIGHT))); 175 window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0,QuestGUINode::TITLE_HEIGHT)));175 window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, (float)QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0, (float)QuestGUINode::TITLE_HEIGHT))); 176 176 this->details_->addChildWindow(window); 177 177 … … 203 203 statusWindow->setProperty("VertFormatting", "TopAligned"); 204 204 statusWindow->setText(status); 205 statusWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));206 statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));205 statusWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset))); 206 statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0))); 207 207 height = setHeight(statusWindow); 208 208 … … 219 219 descriptionWindowTitle->setProperty("VertFormatting", "TopAligned"); 220 220 descriptionWindowTitle->setText("Description:"); 221 descriptionWindowTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));222 descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0 , -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));221 descriptionWindowTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset))); 222 descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0f, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0))); 223 223 224 224 offset += setHeight(descriptionWindowTitle); … … 232 232 descriptionWindow->setProperty("VertFormatting", "TopAligned"); 233 233 descriptionWindow->setText(description->getDescription()); 234 descriptionWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));235 descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));234 descriptionWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset))); 235 descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0))); 236 236 height = setHeight(descriptionWindow); 237 237 … … 255 255 hintsTitle->setProperty("VertFormatting", "TopAligned"); 256 256 hintsTitle->setText("Hints:"); 257 hintsTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));257 hintsTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset))); 258 258 hintsTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0))); 259 259 offset += setHeight(hintsTitle);; … … 261 261 } 262 262 QuestGUINode* node = *it; 263 node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0 , -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0,QuestGUINode::BUTTON_HEIGHT)));264 node->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));263 node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0f, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, (float)QuestGUINode::BUTTON_HEIGHT))); 264 node->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset))); 265 265 window->addChildWindow(node->window_); 266 266 offset += QuestGUINode::BUTTON_HEIGHT; … … 337 337 338 338 //! Get the formatted line count - using the formatting area obtained above. 339 const float lines = window->getFont()->getFormattedLineCount(window->getText(), formattedArea, CEGUI::WordWrapLeftAligned);339 const float lines = (float)(window->getFont()->getFormattedLineCount(window->getText(), formattedArea, CEGUI::WordWrapLeftAligned)); 340 340 341 341 //! Calculate pixel height of window, which is the number of formatted lines multiplied by the spacing of the font, plus the pixel height of the frame. … … 357 357 void QuestGUINode::updatePosition(void) 358 358 { 359 this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::INDENT_WIDTH*this->depth_),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT*this->index_)));360 this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, -QuestGUINode::INDENT_WIDTH*this->depth_-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0,QuestGUINode::BUTTON_HEIGHT)));359 this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, (float)(QuestGUINode::INDENT_WIDTH*this->depth_)),CEGUI::UDim(0, (float)(QuestGUINode::BUTTON_HEIGHT*this->index_)))); 360 this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, (float)(-QuestGUINode::INDENT_WIDTH*this->depth_-QuestGUINode::SCROLLBAR_WIDTH)),CEGUI::UDim(0, (float)QuestGUINode::BUTTON_HEIGHT))); 361 361 } 362 362 -
code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc
r6417 r6502 139 139 { 140 140 this->removeContainer(*it); 141 this->scroll(Vector2(0.0 ,-(1.1*this->getFontSize())));141 this->scroll(Vector2(0.0f,-(1.1f*this->getFontSize()))); 142 142 it = this->containers_.begin(); //TODO: Needed? 143 143 } 144 144 145 this->tickTime_ = 0.0 ; //!< Reset time counter.145 this->tickTime_ = 0.0f; //!< Reset time counter. 146 146 } 147 147 } … … 193 193 it = this->containers_.begin(); 194 194 this->removeContainer(*it); 195 this->scroll(Vector2(0.0 ,-(1.1*this->getFontSize())));195 this->scroll(Vector2(0.0f,-(1.1f*this->getFontSize()))); 196 196 } 197 197 … … 375 375 { 376 376 (*it)->overlay->setPosition(this->getPosition()); 377 (*it)->overlay->scroll(Vector2(0.0 ,(1.1*this->getFontSize())*counter));377 (*it)->overlay->scroll(Vector2(0.0f,(1.1f*this->getFontSize())*counter)); 378 378 counter++; 379 379 } … … 407 407 this->size_= this->size_+1; 408 408 409 container->overlay->scroll(Vector2(0.0 ,(1.1*this->getFontSize())*(this->getSize()-1)));409 container->overlay->scroll(Vector2(0.0f,(1.1f*this->getFontSize())*(this->getSize()-1))); 410 410 } 411 411
Note: See TracChangeset
for help on using the changeset viewer.