diff options
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/ThemeEngine.cpp | 19 | ||||
| -rw-r--r-- | gui/ThemeLayout.cpp | 2 | ||||
| -rw-r--r-- | gui/ThemeLayout.h | 2 | ||||
| -rw-r--r-- | gui/Tooltip.cpp | 2 | ||||
| -rw-r--r-- | gui/credits.h | 5 | ||||
| -rw-r--r-- | gui/dialog.cpp | 4 | ||||
| -rw-r--r-- | gui/launcher.cpp | 2 | ||||
| -rw-r--r-- | gui/options.cpp | 6 | ||||
| -rw-r--r-- | gui/predictivedialog.cpp | 3 | ||||
| -rw-r--r-- | gui/saveload-dialog.cpp | 2 | ||||
| -rw-r--r-- | gui/themes/translations.dat | bin | 567688 -> 569099 bytes | |||
| -rw-r--r-- | gui/widget.cpp | 6 | ||||
| -rw-r--r-- | gui/widgets/edittext.cpp | 4 | ||||
| -rw-r--r-- | gui/widgets/popup.cpp | 3 | 
14 files changed, 50 insertions, 10 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index c2deb8c61e..0ed020ebb8 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -311,6 +311,12 @@ ThemeEngine::ThemeEngine(Common::String id, GraphicsMode mode) :  	_themeArchive = 0;  	_initOk = false; +	_cursorHotspotX = _cursorHotspotY = 0; +	_cursorWidth = _cursorHeight = 0; +	_cursorPalSize = 0; + +	_needPaletteUpdates = false; +  	// We prefer files in archive bundles over the common search paths.  	_themeFiles.add("default", &SearchMan, 0, false);  } @@ -558,7 +564,7 @@ void ThemeEngine::restoreBackground(Common::Rect r) {  void ThemeEngine::addDrawStep(const Common::String &drawDataId, const Graphics::DrawStep &step) {  	DrawData id = parseDrawDataId(drawDataId); -	assert(_widgets[id] != 0); +	assert(id != kDDNone && _widgets[id] != 0);  	_widgets[id]->_steps.push_back(step);  } @@ -859,7 +865,7 @@ void ThemeEngine::queueDD(DrawData type, const Common::Rect &r, uint32 dynamic,  void ThemeEngine::queueDDText(TextData type, TextColor color, const Common::Rect &r, const Common::String &text, bool restoreBg,                                bool ellipsis, Graphics::TextAlign alignH, TextAlignVertical alignV, int deltax, const Common::Rect &drawableTextArea) { -	if (_texts[type] == 0) +	if (type == kTextDataNone || _texts[type] == 0)  		return;  	Common::Rect area = r; @@ -1259,8 +1265,15 @@ void ThemeEngine::updateScreen(bool render) {  		_screenQueue.clear();  	} -	if (render) +	if (render) { +#ifdef LAYOUT_DEBUG_DIALOG +		_vectorRenderer->fillSurface(); +		_themeEval->debugDraw(&_screen, _font); +		_vectorRenderer->copyWholeFrame(_system); +#else  		renderDirtyScreen(); +#endif +	}  }  void ThemeEngine::addDirtyRect(Common::Rect r) { diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp index 6a6fd9e343..71e4b2c9fd 100644 --- a/gui/ThemeLayout.cpp +++ b/gui/ThemeLayout.cpp @@ -123,7 +123,7 @@ int16 ThemeLayoutStacked::getParentHeight() {  #ifdef LAYOUT_DEBUG_DIALOG  void ThemeLayout::debugDraw(Graphics::Surface *screen, const Graphics::Font *font) { -	uint16 color = 0xFFFF; +	uint32 color = 0xFFFFFFFF;  	font->drawString(screen, getName(), _x, _y, _w, color, Graphics::kTextAlignRight, 0, true);  	screen->hLine(_x, _y, _x + _w, color);  	screen->hLine(_x, _y + _h, _x + _w , color); diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h index ba28fae1ac..c4d7e672dd 100644 --- a/gui/ThemeLayout.h +++ b/gui/ThemeLayout.h @@ -29,7 +29,7 @@  #ifdef LAYOUT_DEBUG_DIALOG  namespace Graphics { -class Surface; +struct Surface;  }  #endif diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp index ba313ee34f..09ad7ce5ca 100644 --- a/gui/Tooltip.cpp +++ b/gui/Tooltip.cpp @@ -32,7 +32,7 @@ namespace GUI {  Tooltip::Tooltip() : -	Dialog(-1, -1, -1, -1), _maxWidth(-1) { +	Dialog(-1, -1, -1, -1), _maxWidth(-1), _parent(NULL), _xdelta(0), _ydelta(0) {  	_backgroundType = GUI::ThemeEngine::kDialogBackgroundTooltip;  } diff --git a/gui/credits.h b/gui/credits.h index 79f4516370..8a0cd18da7 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -138,6 +138,11 @@ static const char *credits[] = {  "C2""(retired)",  "C0""Willem Jan Palenstijn",  "", +"C1""Gnap", +"A0""Arnaud Boutonne", +"C0""Arnaud Boutonn\351", +"C0""Benjamin Haisch", +"",  "C1""Gob",  "A0""Torbjorn Andersson",  "C0""Torbj\366rn Andersson", diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 075a3bb533..50b7755bb3 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -51,6 +51,8 @@ Dialog::Dialog(int x, int y, int w, int h)  	// will for example crash after returning to the launcher when the user  	// started a 640x480 game with a non 1x scaler.  	g_gui.checkScreenChange(); + +	_result = -1;  }  Dialog::Dialog(const Common::String &name) @@ -66,6 +68,8 @@ Dialog::Dialog(const Common::String &name)  	// Fixes bug #1590596: "HE: When 3x graphics are choosen, F5 crashes game"  	// and bug #1595627: "SCUMM: F5 crashes game (640x480)"  	g_gui.checkScreenChange(); + +	_result = -1;  }  int Dialog::runModal() { diff --git a/gui/launcher.cpp b/gui/launcher.cpp index bae894cba1..9a3300b11f 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -282,6 +282,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)  	//  	// 6) The MIDI tab  	// +	_globalMIDIOverride = NULL;  	if (!_guioptions.contains(GUIO_NOMIDI)) {  		tab->addTab(_("MIDI")); @@ -296,6 +297,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)  	//  	// 7) The MT-32 tab  	// +	_globalMT32Override = NULL;  	if (!_guioptions.contains(GUIO_NOMIDI)) {  		tab->addTab(_("MT-32")); diff --git a/gui/options.cpp b/gui/options.cpp index 2bb17509eb..e410971818 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -112,6 +112,7 @@ void OptionsDialog::init() {  	_fullscreenCheckbox = 0;  	_aspectCheckbox = 0;  	_enableAudioSettings = false; +	_midiTabId = 0;  	_midiPopUp = 0;  	_midiPopUpDesc = 0;  	_oplPopUp = 0; @@ -144,6 +145,7 @@ void OptionsDialog::init() {  	_speechVolumeSlider = 0;  	_speechVolumeLabel = 0;  	_muteCheckbox = 0; +	_enableSubtitleSettings = false;  	_subToggleDesc = 0;  	_subToggleGroup = 0;  	_subToggleSubOnly = 0; @@ -152,6 +154,8 @@ void OptionsDialog::init() {  	_subSpeedDesc = 0;  	_subSpeedSlider = 0;  	_subSpeedLabel = 0; + +	_pathsTabId = 0;  	_oldTheme = g_gui.theme()->getThemeId();  	// Retrieve game GUI options @@ -209,7 +213,7 @@ void OptionsDialog::open() {  #ifdef GUI_ONLY_FULLSCREEN  		_fullscreenCheckbox->setState(true);  		_fullscreenCheckbox->setEnabled(false); -		_aspectCheckbox->setState(false); +		_aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain));  		_aspectCheckbox->setEnabled(false);  #else // !GUI_ONLY_FULLSCREEN  		// Fullscreen setting diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp index 63b69a39ea..933667186e 100644 --- a/gui/predictivedialog.cpp +++ b/gui/predictivedialog.cpp @@ -142,6 +142,9 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {  	_numMemory = 0;  	_navigationWithKeys = false; + +	_curPressedButton = kNoAct; +	_needRefresh = true;  }  PredictiveDialog::~PredictiveDialog() { diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index a333c5fe57..3d4adfff2b 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -932,6 +932,8 @@ SavenameDialog::SavenameDialog()  	new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), 0, kOKCmd);  	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), 0, 0, kOKCmd); + +	_targetSlot = 0;  }  void SavenameDialog::setDescription(const Common::String &desc) { diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex 917acdb13d..617f7d4bac 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat diff --git a/gui/widget.cpp b/gui/widget.cpp index dda44604c8..73d055527c 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -275,7 +275,7 @@ void StaticTextWidget::setAlign(Graphics::TextAlign align) {  		draw();  		clearFlags(WIDGET_CLEARBG);  	} -	  +  } @@ -542,14 +542,14 @@ void RadiobuttonWidget::drawWidget() {  SliderWidget::SliderWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd)  	: Widget(boss, x, y, w, h, tooltip), CommandSender(boss), -	  _cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false) { +	  _cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false), _labelWidth(0) {  	setFlags(WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG);  	_type = kSliderWidget;  }  SliderWidget::SliderWidget(GuiObject *boss, const Common::String &name, const char *tooltip, uint32 cmd)  	: Widget(boss, name, tooltip), CommandSender(boss), -	  _cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false) { +	  _cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false), _labelWidth(0) {  	setFlags(WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG);  	_type = kSliderWidget;  } diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp index 1481bebae3..bef90d4382 100644 --- a/gui/widgets/edittext.cpp +++ b/gui/widgets/edittext.cpp @@ -36,6 +36,8 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons  	setEditString(text);  	setFontStyle(ThemeEngine::kFontStyleNormal); + +	_leftPadding = _rightPadding = 0;  }  EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd) @@ -46,6 +48,8 @@ EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String  	setEditString(text);  	setFontStyle(ThemeEngine::kFontStyleNormal); + +	_leftPadding = _rightPadding = 0;  }  void EditTextWidget::setEditString(const String &str) { diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp index 0b2ea9fd4e..0a1010f8fa 100644 --- a/gui/widgets/popup.cpp +++ b/gui/widgets/popup.cpp @@ -144,6 +144,8 @@ PopUpDialog::PopUpDialog(PopUpWidget *boss, int clickX, int clickY)  	_clickY = clickY - _y;  	_openTime = 0; +	_buffer = nullptr; +	_entriesPerColumn = 1;  }  void PopUpDialog::drawDialog() { @@ -380,6 +382,7 @@ PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const char *toolti  	_type = kPopUpWidget;  	_selectedItem = -1; +	_leftPadding = _rightPadding = 0;  }  PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip)  | 
