float Creature::getCameraHeight() const { float height = 1.8f; if (_model) { Graphics::Aurora::ModelNode *node = _model->getNode("camerahook"); if (node) { float x, y, z; node->getPosition(x, y, z); height = z; } } return height; }
void WidgetListBox::getProperties() { // Do we have a scroll bar? _hasScrollbar = _model->hasNode("scrollmin") && _model->hasNode("scrollmax"); // Calculate content region Graphics::Aurora::ModelNode *node = 0; float topX = 8.0f, topY = getHeight() - 6.0f, topZ = 0.0f; if ((node = _model->getNode("text0"))) node->getPosition(topX, topY, topZ); float bottomX = getWidth() - (_hasScrollbar ? 25.0f : 3.0f), bottomY = 3.0f, bottomZ = 0.0f; if ((node = _model->getNode("text1"))) node->getPosition(bottomX, bottomY, bottomZ); _contentX = topX; _contentY = topY; _contentWidth = bottomX - topX; _contentHeight = topY - bottomY; }
void ChatModeButton::setPosition(float x, float y, float z) { WidgetButton::setPosition(x, y, z); getPosition(x, y, z); Graphics::Aurora::ModelNode *node = 0; float tX = 0.0, tY = 0.0, tZ = 0.0; if ((node = _model->getNode("text"))) node->getPosition(tX, tY, tZ); _label->setPosition(x + tX, y + tY - (_label->getHeight() / 2.0), z - tZ); }