Example #1
0
OptionsGameMenu::OptionsGameMenu(bool isMain, ::Engines::Console *console) : GUI(console) {
	load("options_game");

	if (isMain) {
		WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
		backdrop->setPosition(0.0, 0.0, 100.0);
		addWidget(backdrop);
	}

	std::list<Widget *> hideTiles;
	hideTiles.push_back(getWidget("NeverBox"));
	hideTiles.push_back(getWidget("AutoBox"));
	hideTiles.push_back(getWidget("AlwaysBox"));
	declareGroup(hideTiles);

	// TODO: Hide second story tiles setting
	getWidget("NeverBox" , true)->setDisabled(true);
	getWidget("AutoBox"  , true)->setDisabled(true);
	getWidget("AlwaysBox", true)->setDisabled(true);

	// TODO: Violence level
	getWidget("ViolenceSlider", true)->setDisabled(true);

	_gorepass = new OptionsGorePasswordMenu(isMain, _console);
	_feedback = new OptionsFeedbackMenu    (isMain, _console);
}
Example #2
0
OptionsFeedbackMenu::OptionsFeedbackMenu(bool isMain, ::Engines::Console *console) : GUI(console) {
	load("options_feedback");

	if (isMain) {
		WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
		backdrop->setPosition(0.0, 0.0, 100.0);
		addWidget(backdrop);
	}

	std::list<Widget *> bubbleMode;
	bubbleMode.push_back(getWidget("BubblesTextOnly"));
	bubbleMode.push_back(getWidget("BubblesFull"));
	bubbleMode.push_back(getWidget("BubblesOff"));
	declareGroup(bubbleMode);

	std::list<Widget *> targetingFeedback;
	targetingFeedback.push_back(getWidget("FeedbackNever"));
	targetingFeedback.push_back(getWidget("FeedbackPause"));
	targetingFeedback.push_back(getWidget("FeedbackAlways"));
	declareGroup(targetingFeedback);

	// TODO: Targeting feedback
	getWidget("FeedbackNever", true)->setDisabled(true);
	getWidget("FeedbackPause", true)->setDisabled(true);
	getWidget("FeedbackAlways", true)->setDisabled(true);

	// TODO: Floaty text feedback
	getWidget("FloatyText", true)->setDisabled(true);
}
Example #3
0
OptionsVideoMenu::OptionsVideoMenu(bool isMain) {
	load("options_video");

	if (isMain) {
		WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
		backdrop->setPosition(0.0, 0.0, 100.0);
		addWidget(backdrop);
	}

	// TODO: Video quality
	getWidget("VidQualSlider", true)->setDisabled(true);

	// TODO: Sky boxes
	Widget *skyBox = getWidget("SkyboxBox");
	if (skyBox)
		skyBox->setDisabled(true);

	// TODO: Environment shadows
	getWidget("EnvShadowBox", true)->setDisabled(true);

	// TODO: Creature shadows
	getWidget("ShadowSlider", true)->setDisabled(true);

	_resolution = new OptionsResolutionMenu(isMain);
	_advanced   = new OptionsVideoAdvancedMenu(isMain);
}
Example #4
0
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());
}
Example #5
0
void GUI::addBackground(const Common::UString &background) {
	WidgetPanel *backPanel =
		new WidgetPanel(*this, "Background", "1600x1200" + background,
		                -800.0, -600.0, 1600.0, 1200.0);

	backPanel->movePosition(0.0, 0.0, 10.0);

	addWidget(backPanel);
}
Example #6
0
// Accept the drag move event if possible
void FavoritesView::dragMoveEvent(QDragMoveEvent *event) {
    if (event->mimeData()->hasFormat("application/x-nixnote-favorites")) {
        if (event->answerRect().intersects(childrenRect()))
            event->acceptProposedAction();
        return;
    }

    WidgetPanel *parent = (WidgetPanel*)parentWidget();
    parent->dragMoveHandler(event);
}
Example #7
0
OptionsMenu::OptionsMenu() {
	load("options_pregame");

	WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
	backdrop->setPosition(0.0, 0.0, 100.0);
	addWidget(backdrop);

	_game     = new OptionsGameMenu(true);
	_video    = new OptionsVideoMenu(true);
	_sound    = new OptionsSoundMenu(true);
	_controls = new OptionsControlsMenu(true);
}
Example #8
0
OptionsMenu::OptionsMenu(const Version &gameVersion, ::Engines::Console *console) : GUI(console),
	_gameVersion(&gameVersion) {

	load("options_pregame");

	WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
	backdrop->setPosition(0.0f, 0.0f, 100.0f);
	addWidget(backdrop);

	_game     = new OptionsGameMenu    (true, _console);
	_video    = new OptionsVideoMenu   (true, _console);
	_sound    = new OptionsSoundMenu   (true, _console);
	_controls = new OptionsControlsMenu(true, _console);
}
Example #9
0
OptionsGorePasswordMenu::OptionsGorePasswordMenu(bool isMain, ::Engines::Console *console) : GUI(console) {
	load("options_gorepass");

	if (isMain) {
		WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
		backdrop->setPosition(0.0f, 0.0f, 100.0f);
		addWidget(backdrop);
	}

	// TODO: Password
	getWidget("OldPassword"    , true)->setDisabled(true);
	getWidget("NewPassword"    , true)->setDisabled(true);
	getWidget("ConfirmPassword", true)->setDisabled(true);
}
Example #10
0
OptionsSoundMenu::OptionsSoundMenu(bool isMain) {
	load("options_sound");

	if (isMain) {
		WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
		backdrop->setPosition(0.0, 0.0, 100.0);
		addWidget(backdrop);
	}

	std::list<Widget *> speakerGroup;
	speakerGroup.push_back(getWidget("71Speakers"));
	speakerGroup.push_back(getWidget("51Speakers"));
	speakerGroup.push_back(getWidget("2Speakers"));
	speakerGroup.push_back(getWidget("4Speakers"));
	speakerGroup.push_back(getWidget("Surround"));
	speakerGroup.push_back(getWidget("Headphones"));
	declareGroup(speakerGroup);

	// TODO: Sound settings
	Widget *soundEAX        = getWidget("EAXCheckbox");
	if (soundEAX)
		soundEAX->setDisabled(true);
	Widget *soundHardware   = getWidget("HardwareBox");
	if (soundHardware)
		soundHardware->setDisabled(true);
	Widget *sound71Speakers = getWidget("71Speakers");
	if (sound71Speakers)
		sound71Speakers->setDisabled(true);
	Widget *sound51Speakers = getWidget("51Speakers");
	if (sound51Speakers)
		sound51Speakers->setDisabled(true);
	Widget *sound4Speakers  = getWidget("4Speakers");
	if (sound4Speakers)
		sound4Speakers->setDisabled(true);
	Widget *sound2Speakers  = getWidget("2Speakers");
	if (sound2Speakers)
		sound2Speakers->setDisabled(true);
	Widget *soundSurround   = getWidget("Surround");
	if (soundSurround)
		soundSurround->setDisabled(true);
	Widget *soundHeadphones = getWidget("Headphones");
	if (soundHeadphones)
		soundHeadphones->setDisabled(true);

	_advanced = new OptionsSoundAdvancedMenu(isMain);
}
Example #11
0
// Drag tag event.  Determine if dragging is even possible
void NTagView::dragEnterEvent(QDragEnterEvent *event) {
    if (event->mimeData()->hasFormat("application/x-nixnote-note")) {
        event->accept();
        return;
    }
    if (event->source() == this) {
        if (global.tagBehavior() == "HideInactiveCount") {
            event->ignore();
            return;
        }
        WidgetPanel *parent = (WidgetPanel*)parentWidget();
        parent->dragEnterHandler(event);

        event->accept();
        return;
    }
    event->ignore();
}
Example #12
0
OptionsSoundAdvancedMenu::OptionsSoundAdvancedMenu(bool isMain, ::Engines::Console *console) : GUI(console) {
	load("options_advsound");

	if (isMain) {
		WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
		backdrop->setPosition(0.0f, 0.0f, 100.0f);
		addWidget(backdrop);
	}

	// TODO: Sound providers
	getWidget("ProviderList", true)->setDisabled(true);

	// TODO: 2D/3D bias
	getWidget("2D3DBiasSlider", true)->setDisabled(true);

	// TODO: EAX level
	getWidget("EAXSlider", true)->setDisabled(true);

	// TODO: Test the sound settings
	getWidget("TestButton", true)->setDisabled(true);
}
Example #13
0
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());
}
Example #14
0
OptionsVideoAdvancedMenu::OptionsVideoAdvancedMenu(bool isMain) {
	load("options_adv_vid");

	if (isMain) {
		WidgetPanel *backdrop = new WidgetPanel(*this, "PNL_MAINMENU", "pnl_mainmenu");
		backdrop->setPosition(0.0, 0.0, 100.0);
		addWidget(backdrop);
	}

	// TODO: Grass
	getWidget("GrassSlider", true)->setDisabled(true);

	// TODO: Creature wind
	getWidget("CreatureWind", true)->setDisabled(true);

	// TODO: Dynamic lights
	getWidget("LightSlider", true)->setDisabled(true);

	// TODO: Shadow casting lights
	getWidget("ShadowLights", true)->setDisabled(true);

	// TODO: Texture animations
	getWidget("TexAnimButton", true)->setDisabled(true);

	// TODO: Environment mapping on creatures
	getWidget("EnvMappingButton", true)->setDisabled(true);

	// TODO: High visual effects
	getWidget("VisEffectsBox", true)->setDisabled(true);

	// TODO: Shiny water
	getWidget("ShinyWaterBox", true)->setDisabled(true);

	// TODO: Use vsync
	getWidget("VsyncBox", true)->setDisabled(true);
}