Esempio n. 1
0
void Cursor::init()
{
	myIsRotatable = false;
	myAngle = 0.f;
	myRotationOffset = 16.f;
	setZPosition(1000);
}
Esempio n. 2
0
void Menu::init()
{
	setModel(std::make_shared<DefaultMenuModel>());
	setVerticalFlip(false);
	myIsMenuInvalid = true;
	setZPosition(500);
}
Esempio n. 3
0
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);
}
Esempio n. 4
0
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);
	}
}
Esempio n. 5
0
void eWidget::lower()
{
	m_lowered++;
	setZPosition(m_z_position - 1);
}
Esempio n. 6
0
void eWidget::raise()
{
	if (m_lowered <= 0) return;
	m_lowered--;
	setZPosition(m_z_position + 1);
}