diff options
author | Paul Gilbert | 2016-09-11 11:34:06 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-11 11:34:06 -0400 |
commit | 207afb6f462fadbe48d4ec298ce7c30ea5c874f0 (patch) | |
tree | cbb200af7f34a2fd6feebda5418328b58bc0dcf4 /engines/titanic/pet_control/pet_translation.cpp | |
parent | df4dadb5a6354d5962597d27a117a9fe53b35891 (diff) | |
download | scummvm-rg350-207afb6f462fadbe48d4ec298ce7c30ea5c874f0.tar.gz scummvm-rg350-207afb6f462fadbe48d4ec298ce7c30ea5c874f0.tar.bz2 scummvm-rg350-207afb6f462fadbe48d4ec298ce7c30ea5c874f0.zip |
TITANIC: In progress work on German Translation view in PET
Diffstat (limited to 'engines/titanic/pet_control/pet_translation.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_translation.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/engines/titanic/pet_control/pet_translation.cpp b/engines/titanic/pet_control/pet_translation.cpp index 783c9019e2..fe6c37c8ab 100644 --- a/engines/titanic/pet_control/pet_translation.cpp +++ b/engines/titanic/pet_control/pet_translation.cpp @@ -20,11 +20,12 @@ * */ -#include "titanic/pet_control/pet_message.h" +#include "titanic/pet_control/pet_translation.h" +#include "titanic/pet_control/pet_control.h" namespace Titanic { -CPetMessage::CPetMessage() { +CPetTranslation::CPetTranslation() { Rect rect1(0, 0, 580, 70); rect1.translate(32, 368); _message.setBounds(rect1); @@ -37,21 +38,33 @@ CPetMessage::CPetMessage() { _tooltip.setHasBorder(false); } -bool CPetMessage::setup(CPetControl *petControl) { +bool CPetTranslation::setup(CPetControl *petControl) { if (petControl && setupControl(petControl)) return reset(); return false; } -void CPetMessage::draw(CScreenManager *screenManager) { +void CPetTranslation::draw(CScreenManager *screenManager) { _message.draw(screenManager); _tooltip.draw(screenManager); } -bool CPetMessage::setupControl(CPetControl *petControl) { +bool CPetTranslation::setupControl(CPetControl *petControl) { if (petControl) _petControl = petControl; return true; } +void CPetTranslation::clearTranslation() { + _message.setup(); +} + +void CPetTranslation::addTranslation(const CString &str1, const CString &str2) { + CString msg = CString::format("%s%s - %s%s", + CPetText::getColorText(0, 0x80, 0).c_str(), str1.c_str(), + CPetText::getColorText(0, 0, 0).c_str(), str2.c_str()); + _message.addLine(msg); + _petControl->makeDirty(); +} + } // End of namespace Titanic |