void WidgetBar::Update( ) { if( fBinded != NULL ){ if( (*fBinded) != BarValue ) setBarValue( *fBinded ); } if( BindedMaxValue != NULL ){ if( (*BindedMaxValue) != BarMaxValue ) setBarSize( *BindedMaxValue ); } }
void WidgetBar::createBar( std::string name, int picture, int height, color4u clr ) { Height -= height + (int)BarY; BarSprite = RenderManager::CreateGLSprite( PosX + BarX, PosY + BarY, getZ(),(int)BarWidth, height ); BarSprite->setFixed(); if( name != "" ){ TopSprite = RenderManager::CreateGLSprite( PosX + TopX, PosY + TopY, getZ() + 0.1f, (int)Width, (int)Height, RenderManager::GetTextureNumberById(name), picture ); TopSprite->setFixed(); } if( BarSprite ){ BarSprite->clr.set( clr.r, clr.g, clr.b, clr.a ); } //setTextPosition( getTextX(), getTextY() - Height ); setBarValue(1); setBarSize(1); }
void MemorySearch::process() { result_struct *results; u32 numResults=1; int searchEnd; if ((endAddress - curAddress) > searchSize) searchEnd = curAddress+searchSize; else searchEnd = endAddress; results = MappedMemorySearch(curAddress, searchEnd, searchType | SEARCHEXACT, searchString.toLatin1().constData(), NULL, &numResults); if (results && numResults) { timer->stop(); // We're done emit searchResult(true, false, results[0].addr); free(results); return; } if (results) free(results); curAddress += (searchEnd - curAddress); if (curAddress >= endAddress) { timer->stop(); emit searchResult(false, false, 0); return; } steps++; emit setBarValue(steps); }