本文整理汇总了C++中Gfx::setItemFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ Gfx::setItemFrame方法的具体用法?C++ Gfx::setItemFrame怎么用?C++ Gfx::setItemFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gfx
的用法示例。
在下文中一共展示了Gfx::setItemFrame方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: selectAnswerN
int16 DialogueManager::selectAnswerN() {
_selection = _balloonMan->hitTestDialogueBalloon(_mousePos.x, _mousePos.y);
VisibleAnswer *oldAnswer = (_oldSelection == NO_ANSWER_SELECTED) ? NULL : &_visAnswers[_oldSelection];
VisibleAnswer *answer = &_visAnswers[_selection];
if (_selection != _oldSelection) {
if (_oldSelection != NO_ANSWER_SELECTED) {
_balloonMan->setBalloonText(oldAnswer->_balloon, oldAnswer->_a->_text, BalloonManager::kUnselectedColor);
}
if (_selection != NO_ANSWER_SELECTED) {
_balloonMan->setBalloonText(answer->_balloon, answer->_a->_text, BalloonManager::kSelectedColor);
_gfx->setItemFrame(_faceId, answer->_a->speakerMood());
}
}
_oldSelection = _selection;
if ((_mouseButtons == kMouseLeftUp) && (_selection != NO_ANSWER_SELECTED)) {
return _visAnswers[_selection]._index;
}
return NO_ANSWER_SELECTED;
}
示例2: displayAnswers
void DialogueManager::displayAnswers() {
// create balloons
int id;
for (int i = 0; i < _numVisAnswers; ++i) {
id = _balloonMan->setDialogueBalloon(_visAnswers[i]._a->_text, 1, BalloonManager::kUnselectedColor);
assert(id >= 0);
_visAnswers[i]._balloon = id;
}
int mood = 0;
if (_numVisAnswers == 1) {
mood = _visAnswers[0]._a->speakerMood();
_balloonMan->setBalloonText(_visAnswers[0]._balloon, _visAnswers[0]._a->_text, BalloonManager::kNormalColor);
} else
if (_numVisAnswers > 1) {
mood = _visAnswers[0]._a->speakerMood();
_oldSelection = NO_ANSWER_SELECTED;
_selection = 0;
}
_faceId = _gfx->setItem(_answerer, _ballonPos._answerChar.x, _ballonPos._answerChar.y);
_gfx->setItemFrame(_faceId, mood);
}
示例3: displayQuestion
bool DialogueManager::displayQuestion() {
if (_q->textIsNull()) return false;
_balloonMan->setSingleBalloon(_q->_text, _ballonPos._questionBalloon.x, _ballonPos._questionBalloon.y, _q->balloonWinding(), BalloonManager::kNormalColor);
_faceId = _gfx->setItem(_questioner, _ballonPos._questionChar.x, _ballonPos._questionChar.y);
_gfx->setItemFrame(_faceId, _q->speakerMood());
return true;
}