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