예제 #1
0
파일: partyleader.cpp 프로젝트: jjardon/eos
PartyLeader::PartyLeader(Module &module) : _module(&module),
	_currentHP(1), _maxHP(1) {

	// The panel

	WidgetPanel *playerPanel = new WidgetPanel(*this, "LeaderPanel", "pnl_party_bar");

	playerPanel->setPosition(- playerPanel->getWidth(), 0.0, 0.0);

	addWidget(playerPanel);


	// Buttons

	float buttonsX = - playerPanel->getWidth () +  4.0;
	float buttonsY = - playerPanel->getHeight() + 57.0;

	for (int i = 0; i < 8; i++) {
		WidgetButton *button = new WidgetButton(*this, kButtonTags[i], kButtonModels[i]);

		button->setTooltip(TalkMan.getString(kButtonTooltips[i]));
		button->setTooltipPosition(0.0, -10.0, -1.0);

		const float x = buttonsX + ((i / 4) * 36.0);
		const float y = buttonsY - ((i % 4) * 18.0);
		const float z = -100.0;

		button->setPosition(x, y, z);

		addWidget(button);
	}

	getWidget("ButtonPlayers", true)->setDisabled(true);


	// Portrait

	_portrait =
		new PortraitWidget(*this, "LeaderPortrait", "gui_po_nwnlogo_", Portrait::kSizeMedium);

	_portrait->setPosition(-67.0, -103.0, -100.0);
	_portrait->setTooltipPosition(-50.0, 50.0, -1.0);

	addWidget(_portrait);


	// Health bar

	_health = new QuadWidget(*this, "LeaderHealthbar", "", 0.0, 0.0, 6.0, 100.0);

	_health->setColor(1.0, 0.0, 0.0, 1.0);
	_health->setPosition(-76.0, -103.0, -100.0);

	addWidget(_health);


	updatePortraitTooltip();
	notifyResized(0, 0, GfxMan.getScreenWidth(), GfxMan.getScreenHeight());
}
예제 #2
0
파일: dialog.cpp 프로젝트: kevL/xoreos
Dialog::Dialog(const Common::UString &conv, Creature &pc, Object &obj,
               Module &module, bool playHello) :
	_conv(conv), _pc(&pc), _object(&obj), _module(&module) {

	_object->setPCSpeaker(&pc);

	_dlg = new Aurora::DLGFile(conv, _object, true);
	_dlg->startConversation();

	_dlgBox = new DialogBox(kDialogWidth, kDialogHeight);

	updateBox();
	playSound(playHello);
	playAnimation();

	notifyResized(0, 0, WindowMan.getWindowWidth(), WindowMan.getWindowHeight());
}
예제 #3
0
파일: quickchat.cpp 프로젝트: cc9cii/xoreos
Quickchat::Quickchat(float position) {
	// Prompt

	_prompt = new WidgetPanel(*this, "QCPrompt", "pnl_chat_prompt");

	_prompt->setPosition(0.0, position, 0.0);

	addWidget(_prompt);


	// Mode button

	ChatModeButton *modeButton =
		new ChatModeButton(*this, "QCMode", "ctl_btn_chatmode", kModeTalk);

	modeButton->setPosition(0.0, position, -10.0);

	addWidget(modeButton);


	notifyResized(0, 0, GfxMan.getScreenWidth(), GfxMan.getScreenHeight());
}
예제 #4
0
파일: console.cpp 프로젝트: EffWun/xoreos
ConsoleWindow::ConsoleWindow(const Common::UString &font, uint32 lines, uint32 history,
                             int fontHeight) : _font(FontMan.get(font, fontHeight)),
	_historySizeMax(history), _historySizeCurrent(0), _historyStart(0),
	_cursorPosition(0), _overwrite(false),
	_cursorBlinkState(false), _lastCursorBlink(0) {

	assert(lines >= 2);
	assert(history >= lines);

	setTag("ConsoleWindow");
	setClickable(true);

	_lineHeight = _font.getFont().getHeight() + _font.getFont().getLineSpacing();
	_height     = floorf(lines * _lineHeight);

	_prompt = new Graphics::Aurora::Text(_font, "");
	_input  = new Graphics::Aurora::Text(_font, "");

	const float cursorHeight = _font.getFont().getHeight();
	_cursor = new Graphics::Aurora::GUIQuad("", 0.0, 1.0, 0.0, cursorHeight);
	_cursor->setXOR(true);

	_highlight = new Graphics::Aurora::GUIQuad("", 0.0, 0.0, 0.0, cursorHeight);
	_highlight->setColor(1.0, 1.0, 1.0, 0.0);
	_highlight->setXOR(true);

	_lines.reserve(lines - 1);
	for (uint32 i = 0; i < (lines - 1); i++)
		_lines.push_back(new Graphics::Aurora::Text(_font, ""));

	notifyResized(0, 0, GfxMan.getScreenWidth(), GfxMan.getScreenHeight());

	updateScrollbarLength();
	updateScrollbarPosition();

	clearHighlight();

	calculateDistance();
}
예제 #5
0
파일: compass.cpp 프로젝트: cc9cii/xoreos
Compass::Compass(float position) {
	// Panel

	WidgetPanel *panel = new WidgetPanel(*this, "CompassPanel", "pnl_compass");

	float panelWidth  = panel->getWidth ();
	float panelHeight = panel->getHeight();

	panel->setPosition(- panelWidth, position, 0.0);

	addWidget(panel);


	// Compass

	_compass = new CompassWidget(*this, "Compass");

	_compass->setPosition(- (panelWidth / 2.0), position + (panelHeight / 2.0), -100.0);

	addWidget(_compass);


	notifyResized(0, 0, GfxMan.getScreenWidth(), GfxMan.getScreenHeight());
}
예제 #6
0
파일: fps.cpp 프로젝트: Hellzed/xoreos
void FPS::init() {
	setTag("FPS");
	notifyResized(0, 0, GfxMan.getScreenWidth(), GfxMan.getScreenHeight());
}