zoom out much more smoother

This commit is contained in:
Eduardo Bart
2012-01-31 15:06:55 -02:00
parent deedef235d
commit 51b0822267
7 changed files with 195 additions and 85 deletions

View File

@@ -28,7 +28,8 @@ EventDispatcher g_dispatcher;
void EventDispatcher::flush()
{
poll();
while(!m_eventList.empty())
poll();
while(!m_scheduledEventList.empty())
m_scheduledEventList.pop();
@@ -44,7 +45,8 @@ void EventDispatcher::poll()
scheduledEvent->execute();
}
while(!m_eventList.empty()) {
int maxEvents = m_eventList.size();
for(int i=0;i<maxEvents;++i) {
EventPtr event = m_eventList.front();
m_eventList.pop_front();
event->execute();

View File

@@ -61,10 +61,10 @@ public:
TSize<T> operator/(const float v) const { return TSize<T>((T)wd/v, (T)ht/v); }
TSize<T>& operator/=(const float v) { wd/=v; ht/=v; return *this; }
bool operator<=(const TSize<T>&other) const { return wd<=other.wd || ht<=other.ht; }
bool operator>=(const TSize<T>&other) const { return wd>=other.wd || ht>=other.ht; }
bool operator<(const TSize<T>&other) const { return wd<other.wd || ht<other.ht; }
bool operator>(const TSize<T>&other) const { return wd>other.wd || ht>other.ht; }
bool operator<=(const TSize<T>&other) const { return wd<=other.wd && ht<=other.ht; }
bool operator>=(const TSize<T>&other) const { return wd>=other.wd && ht>=other.ht; }
bool operator<(const TSize<T>&other) const { return wd<other.wd && ht<other.ht; }
bool operator>(const TSize<T>&other) const { return wd>other.wd && ht>other.ht; }
TSize<T>& operator=(const TSize<T>& other) { wd = other.wd; ht = other.ht; return *this; }
bool operator==(const TSize<T>& other) const { return other.wd==wd && other.ht==ht; }