mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 21:13:26 +02:00
zoom out much more smoother
This commit is contained in:
@@ -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();
|
||||
|
@@ -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; }
|
||||
|
Reference in New Issue
Block a user