本文整理汇总了C++中IObject::IsButton方法的典型用法代码示例。如果您正苦于以下问题:C++ IObject::IsButton方法的具体用法?C++ IObject::IsButton怎么用?C++ IObject::IsButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IObject
的用法示例。
在下文中一共展示了IObject::IsButton方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Button *LWF::SearchButtonInstanceByInstanceId(int instId) const
{
if (instId < 0 || instId >= (int)m_instances.size())
return 0;
IObject *obj = m_instances[instId];
while (obj) {
if (obj->IsButton())
return (Button *)obj;
obj = obj->nextInstance;
}
return 0;
}
示例2: if
Button *Movie::SearchButtonInstanceByInstanceId(
int instId, bool recursive) const
{
for (IObject *instance = m_instanceHead; instance;
instance = instance->linkInstance) {
if (instance->IsButton() && instance->instanceId == instId) {
return (Button *)instance;
} else if (recursive && instance->IsMovie()) {
Button *i = ((Movie *)instance)->SearchButtonInstanceByInstanceId(
instId, recursive);
if (i)
return i;
}
}
return 0;
}
示例3: PostExec
void Movie::PostExec(bool progressing)
{
hasButton = false;
if (!active)
return;
m_execedFrame = -1;
bool postExeced = m_postExecCount == lwf->execCount;
if (progressing && playing && !m_jumped && !postExeced) {
++m_currentFrameInternal;
currentFrame = m_currentFrameInternal + 1;
}
for (;;) {
if (m_currentFrameInternal < 0 ||
m_currentFrameInternal >= totalFrames) {
m_currentFrameInternal = 0;
currentFrame = m_currentFrameInternal + 1;
}
if (m_currentFrameInternal == m_execedFrame)
break;
m_currentFrameCurrent = m_currentFrameInternal;
m_execedFrame = m_currentFrameCurrent;
const Data *d = lwf->data.get();
const Format::Frame &frame = d->frames[
data->frameOffset + m_currentFrameCurrent];
int controlAnimationOffset;
IObject *instance;
if (m_lastControlOffset == frame.controlOffset &&
m_lastControls == frame.controls) {
controlAnimationOffset = m_lastControlAnimationOffset;
if (m_skipped) {
instance = m_instanceHead;
while (instance) {
if (instance->IsMovie()) {
Movie *movie = (Movie *)instance;
movie->m_attachMovieExeced = false;
movie->m_attachMoviePostExeced = false;
} else if (instance->IsButton()) {
((Button *)instance)->EnterFrame();
}
instance = instance->linkInstance;
}
hasButton = m_lastHasButton;
} else {
for (int dlDepth = 0; dlDepth < data->depths; ++dlDepth) {
Object *obj = m_displayList[dlDepth].get();
if (obj) {
if (!postExeced) {
obj->matrixIdChanged = false;
obj->colorTransformIdChanged = false;
}
if (obj->IsMovie()) {
Movie *movie = (Movie *)obj;
movie->m_attachMovieExeced = false;
movie->m_attachMoviePostExeced = false;
} else if (obj->IsButton()) {
((Button *)obj)->EnterFrame();
hasButton = true;
}
}
}
m_lastHasButton = hasButton;
m_skipped = true;
}
} else {
++m_movieExecCount;
m_instanceHead = 0;
m_instanceTail = 0;
m_lastControlOffset = frame.controlOffset;
m_lastControls = frame.controls;
controlAnimationOffset = -1;
for (int i = 0; i < frame.controls; ++i) {
const Format::Control &control =
d->controls[frame.controlOffset + i];
switch (control.controlType) {
case Format::Control::MOVE:
{
const Format::Place &p = d->places[control.controlId];
ExecObject(p.depth, p.objectId,
p.matrixId, 0, p.instanceId, p.blendMode);
}
break;
case Format::Control::MOVEM:
{
const Format::ControlMoveM &ctrl =
d->controlMoveMs[control.controlId];
const Format::Place &p = d->places[ctrl.placeId];
ExecObject(p.depth, p.objectId,
ctrl.matrixId, 0, p.instanceId, p.blendMode);
}
break;
//.........这里部分代码省略.........