[Scummvm-cvs-logs] SF.net SVN: scummvm: [26738] scummvm/trunk/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu May 3 01:27:26 CEST 2007
Revision: 26738
http://scummvm.svn.sourceforge.net/scummvm/?rev=26738&view=rev
Author: thebluegr
Date: 2007-05-02 16:27:25 -0700 (Wed, 02 May 2007)
Log Message:
-----------
More IHNM options panel improvements: added text and working widgets for read speed, music and sound, matched the font and the coordinates of the options panel and the widgets with the ones of the original interpreter
Modified Paths:
--------------
scummvm/trunk/engines/saga/displayinfo.h
scummvm/trunk/engines/saga/interface.cpp
Modified: scummvm/trunk/engines/saga/displayinfo.h
===================================================================
--- scummvm/trunk/engines/saga/displayinfo.h 2007-05-02 21:39:56 UTC (rev 26737)
+++ scummvm/trunk/engines/saga/displayinfo.h 2007-05-02 23:27:25 UTC (rev 26738)
@@ -319,9 +319,16 @@
static PanelButton IHNM_OptionPanelButtons[] = {
//TODO: Add the rest of the buttons
- //TODO: Those coordinates might not be pixel perfect, check with the original interpreter
- {kPanelButtonOption, 20,150, 200,25, kTextQuitGame,'q',0, 0,0,0}, //quit
- {kPanelButtonOption, 20,175, 200,25, kTextContinuePlaying,'c',0, 0,0,0}, //continue
+ {kPanelButtonOptionText,28,36, 0,0, kTextReadingSpeed,'-',0, 0,0,0}, // text: read speed
+ {kPanelButtonOptionText,60,61, 0,0, kTextMusic,'-',0, 0,0,0}, // text: music
+ {kPanelButtonOptionText,60,86, 0,0, kTextSound,'-',0, 0,0,0}, // text: noise
+ // TODO: Add Voices text here
+ {kPanelButtonOption, 154,30, 79,23, kTextReadingSpeed,'r',0, 0,0,0}, //read speed
+ {kPanelButtonOption, 154,55, 79,23, kTextMusic,'m',0, 0,0,0}, //music
+ {kPanelButtonOption, 154,80, 79,23, kTextSound,'n',0, 0,0,0}, //sound-noise
+ // TODO: Add Voices widget here
+ {kPanelButtonOption, 19,149, 200,25, kTextQuitGame,'q',0, 0,0,0}, //quit
+ {kPanelButtonOption, 19,177, 200,25, kTextContinuePlaying,'c',0, 0,0,0}, //continue
//.....
};
@@ -380,7 +387,7 @@
-1, -1, // save file index
0, // optionSaveFileVisible
- 100, 75, // option panel offsets
+ 92, 46, // option panel offsets
ARRAYSIZE(IHNM_OptionPanelButtons),
IHNM_OptionPanelButtons,
Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp 2007-05-02 21:39:56 UTC (rev 26737)
+++ scummvm/trunk/engines/saga/interface.cpp 2007-05-02 23:27:25 UTC (rev 26738)
@@ -697,14 +697,20 @@
text = _vm->getTextString(panelButton->id);
panel->calcPanelButtonRect(panelButton, rect);
if (panelButton->xOffset < 0) {
- textWidth = _vm->_font->getStringWidth(kKnownFontMedium, text, 0, kFontNormal);
+ if (_vm->getGameType() == GType_ITE)
+ textWidth = _vm->_font->getStringWidth(kKnownFontMedium, text, 0, kFontNormal);
+ else
+ textWidth = _vm->_font->getStringWidth(kKnownFontVerb, text, 0, kFontNormal);
rect.left += 2 + (panel->imageWidth - 1 - textWidth) / 2;
}
textPoint.x = rect.left;
textPoint.y = rect.top + 1;
- _vm->_font->textDraw(kKnownFontMedium, ds, text, textPoint, _vm->KnownColor2ColorId(kKnownColorVerbText), _vm->KnownColor2ColorId(kKnownColorVerbTextShadow), kFontShadow);
+ if (_vm->getGameType() == GType_ITE)
+ _vm->_font->textDraw(kKnownFontMedium, ds, text, textPoint, _vm->KnownColor2ColorId(kKnownColorVerbText), _vm->KnownColor2ColorId(kKnownColorVerbTextShadow), kFontShadow);
+ else
+ _vm->_font->textDraw(kKnownFontVerb, ds, text, textPoint, _vm->KnownColor2ColorId(kKnownColorVerbText), _vm->KnownColor2ColorId(kKnownColorVerbTextShadow), kFontShadow);
}
void Interface::drawOption() {
@@ -1897,7 +1903,6 @@
}
text = _vm->getTextString(textId);
- // TODO: This looks like to be the proper font for IHNM, check for validity
if (_vm->getGameType() == GType_ITE) {
textWidth = _vm->_font->getStringWidth(kKnownFontMedium, text, 0, kFontNormal);
textHeight = _vm->_font->getHeight(kKnownFontMedium);
@@ -1918,7 +1923,6 @@
panel->calcPanelButtonRect(panelButton, rect);
drawButtonBox(ds, rect, kButton, panelButton->state > 0);
- // TODO: This looks like to be the proper font for IHNM, check for validity
if (_vm->getGameType() == GType_ITE)
_vm->_font->textDraw(kKnownFontMedium, ds, text, point,
_vm->KnownColor2ColorId(textColor), _vm->KnownColor2ColorId(kKnownColorVerbTextShadow), kFontShadow);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list