diff options
author | Paul Gilbert | 2016-03-31 20:27:28 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-03-31 20:27:28 -0400 |
commit | 24a2fc7e853d826f184bcd977e69a0d906f327a7 (patch) | |
tree | a04ae7ccb84024d4bf9b36b8fd8738a63cb12014 /engines/titanic/pet_control/pet_frame.cpp | |
parent | d94b1dc7bb68ee1641edcbbd31fd40ef7e5dc442 (diff) | |
download | scummvm-rg350-24a2fc7e853d826f184bcd977e69a0d906f327a7.tar.gz scummvm-rg350-24a2fc7e853d826f184bcd977e69a0d906f327a7.tar.bz2 scummvm-rg350-24a2fc7e853d826f184bcd977e69a0d906f327a7.zip |
TITANIC: Implement CPetFrame setup and drawing code
Diffstat (limited to 'engines/titanic/pet_control/pet_frame.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_frame.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp index e94bc6c848..48a05cdd11 100644 --- a/engines/titanic/pet_control/pet_frame.cpp +++ b/engines/titanic/pet_control/pet_frame.cpp @@ -21,6 +21,7 @@ */ #include "titanic/pet_control/pet_frame.h" +#include "titanic/pet_control/pet_control.h" namespace Titanic { @@ -41,7 +42,23 @@ bool CPetFrame::setup(CPetControl *petControl) { bool CPetFrame::setup() { if (_petControl) { - // TODO + _background.setup("PetBackground", _petControl, MODE_0); + _modeBackground.setup("PetModeBackground", _petControl, MODE_0); + + for (int idx = 0; idx < 5; ++idx) { + CString resName = Common::String::format("PetMode%d", idx); + _modeButtons[idx].setup(resName, _petControl, MODE_0); + } + + for (int idx = 0; idx < 6; ++idx) { + CString resName = Common::String::format("3Pettitle%d", idx); + _titles[idx].setup(resName, _petControl, MODE_0); + } + + for (int idx = 0; idx < 7; ++idx) { + CString resName = Common::String::format("PetIndent%d", idx); + _titles[idx].setup(resName, _petControl, MODE_0); + } } return true; @@ -98,7 +115,13 @@ void CPetFrame::setArea(PetArea newArea) { } void CPetFrame::drawFrame(CScreenManager *screenManager) { - warning("TODO: CPetFrame::drawFrame"); + _background.draw(screenManager); + _modeBackground.draw(screenManager); + + for (int idx = 0; idx < 5; ++idx) + _modeButtons[idx].draw(screenManager); + + _titles[_petControl->_currentArea].draw(screenManager); } } // End of namespace Titanic |