当前位置: 首页>>代码示例>>C++>>正文


C++ Gfx::setItemFrame方法代码示例

本文整理汇总了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;
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:26,代码来源:dialogue.cpp

示例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);
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:25,代码来源:dialogue.cpp

示例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;
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:9,代码来源:dialogue.cpp


注:本文中的Gfx::setItemFrame方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。