void Cursor::init() { myIsRotatable = false; myAngle = 0.f; myRotationOffset = 16.f; setZPosition(1000); }
void Menu::init() { setModel(std::make_shared<DefaultMenuModel>()); setVerticalFlip(false); myIsMenuInvalid = true; setZPosition(500); }
eWindow::eWindow(eWidgetDesktop *desktop, int z): eWidget(0) { m_flags = 0; m_animation_mode = 0x11; m_desktop = desktop; /* ask style manager for current style */ ePtr<eWindowStyleManager> mgr; eWindowStyleManager::getInstance(mgr); ePtr<eWindowStyle> style; if (mgr) mgr->getStyle(desktop->getStyleID(), style); /* when there is either no style manager or no style, revert to simple style. */ if (!style) style = new eWindowStyleSimple(); setStyle(style); setZPosition(z); /* must be done before addRootWidget */ /* we are the parent for the child window. */ /* as we are in the constructor, this is thread safe. */ m_child = this; m_child = new eWidget(this); desktop->addRootWidget(this); }
Obstacle::Obstacle(float x, float y, float z, ObstacleType obsType) : GameObject(), obsType(obsType) { type = OBSTACLE; setXPosition(x); setYPosition(y); setZPosition(z); BoundingCilinder *bc = getBoundingCilinder(); if (obsType == COLUMN) { bc->setHeight(12.5f); bc->setRadius(2.0f); } else if (obsType == BARREL) { bc->setHeight(2.5f); bc->setRadius(1.2f); } }
void eWidget::lower() { m_lowered++; setZPosition(m_z_position - 1); }
void eWidget::raise() { if (m_lowered <= 0) return; m_lowered--; setZPosition(m_z_position + 1); }