本文整理汇总了C++中RequestBall::mouseOver方法的典型用法代码示例。如果您正苦于以下问题:C++ RequestBall::mouseOver方法的具体用法?C++ RequestBall::mouseOver怎么用?C++ RequestBall::mouseOver使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RequestBall
的用法示例。
在下文中一共展示了RequestBall::mouseOver方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: logic
void Logstalgia::logic(float t, float dt) {
float sdt = dt*simu_speed;;
if(mousehide_timeout>0.0f) {
mousehide_timeout -= dt;
if(mousehide_timeout<0.0f) {
SDL_ShowCursor(false);
}
}
infowindow.hide();
if(end_reached && balls.empty()) {
appFinished = true;
return;
}
//if paused, dont move anything, only check what is under mouse
if(paused) {
for(std::map<std::string, Paddle*>::iterator it= paddles.begin(); it!=paddles.end();it++) {
std::string paddle_token = it->first;
Paddle* paddle = it->second;
if(paddle->mouseOver(infowindow, mousepos)) {
break;
}
}
for(std::list<RequestBall*>::iterator it = balls.begin(); it != balls.end(); it++) {
RequestBall* ball = *it;
if(ball->mouseOver(infowindow, mousepos)) {
break;
}
}
if(!ipSummarizer->mouseOver(infowindow,mousepos)) {
int nogrps = summGroups.size();
for(int i=0;i<nogrps;i++) {
if(summGroups[i]->mouseOver(infowindow, mousepos)) break;
}
}
return;
}
//increment clock
elapsed_time += sdt;
currtime = starttime + (long)(elapsed_time);
//next will fast forward clock to the time of the next entry,
//if the next entry is in the future
if(next || gAutoSkip && balls.empty()) {
if(!queued_entries.empty()) {
LogEntry* le = queued_entries.front();
long entrytime = le->timestamp;
if(entrytime > currtime) {
elapsed_time = entrytime - starttime;
currtime = starttime + (long)(elapsed_time);
}
}
next = false;
}
//recalc spawn speed each second by
if(currtime != lasttime) {
//dont bother reading the log if we dont need to
if(queued_entries.empty() || queued_entries.back()->timestamp <= currtime) {
readLog();
}
profile_start("determine new entries");
int items_to_spawn=0;
for(std::list<LogEntry*>::iterator it = queued_entries.begin(); it != queued_entries.end(); it++) {
LogEntry* le = *it;
if(le->timestamp > currtime) break;
items_to_spawn++;
addStrings(le);
}
profile_stop();
//debugLog("items to spawn %d\n", items_to_spawn);
if(items_to_spawn > 0) {
profile_start("add new strings");
//re-summarize
ipSummarizer->summarize();
//.........这里部分代码省略.........