@@ -28,7 +28,7 @@ class GUI
2828 Uint32 _lastScrollTick;
2929
3030 CtxVar! (MainEventSource) eventSource;
31-
31+
3232 class Timeout
3333 {
3434 bool done;
@@ -37,7 +37,7 @@ class GUI
3737 shared (TimeoutEvent) ev;
3838 int msInit;
3939
40- static sNextID = 1 ;
40+ static sNextID = 1 ;
4141 this ()
4242 {
4343 id = sNextID++ ;
@@ -112,9 +112,9 @@ class GUI
112112 static import io.file;
113113 import platform.system;
114114 import gui.resources;
115- auto g = new GUI (gs is null ? new graphics.graphicssystem. OpenGLSystem() : gs);
115+ auto g = new GUI (gs is null ? new OpenGLSystem() : gs);
116116 g._graphicsSystem.init();
117- the = g;
117+ the = g;
118118 g.ioManager = new io.iomanager.IOManager;
119119 // g.ioManager.add(new io.iomanager.ScanProtocol);
120120 g.ioManager.add(new io.file.FileProtocol);
@@ -133,7 +133,7 @@ class GUI
133133 g.locationsManager.addListener(g.shaderProgramManager);
134134 g.locationsManager.addListener(g.textureManager);
135135 g.locationsManager.addListener(g.materialManager);
136- g.locationsManager.addListener(g.styleSheetManager);
136+ g.locationsManager.addListener(g.styleSheetManager);
137137
138138 return g;
139139
@@ -246,7 +246,8 @@ class GUI
246246 {
247247 output(" Frame %s" , i++ );
248248 auto worst = frame;
249- foreach (zone; zones.filter! (z => z.startTime >= worst.startTime && z.endTime <= worst.endTime))
249+ auto r = zones.filter! (z => z.startTime >= worst.startTime && z.endTime <= worst.endTime);
250+ foreach (zone; r)
250251 {
251252 output(" %s: %s ms from %s to %s" ,
252253 zone.info, hnsToMS (zone.duration), hnsToS(zone.startTime), hnsToS(zone.endTime));
@@ -265,7 +266,7 @@ class GUI
265266 {
266267 output(" eventCount : %s\n " , var);
267268 }
268- }
269+ }
269270
270271 void stop ()
271272 {
@@ -275,8 +276,8 @@ class GUI
275276 struct TimeoutHandle
276277 {
277278 static ulong _nextID = 1 ;
278- GUI gui;
279- ulong id;
279+ GUI gui;
280+ ulong id;
280281 bool abort ()
281282 {
282283 if (gui ! is null )
@@ -291,7 +292,7 @@ class GUI
291292 auto to = new FnTimeout! (Fn,Args)(cast (int )d.total! " msecs" , fn, args);
292293 auto data = TimeoutHandle(this , to.id);
293294 to.ev = eventSource.scheduleTimeout(d, Variant (data));
294- _timeouts ~= to;
295+ _timeouts ~= to;
295296 return data;
296297 }
297298
@@ -311,11 +312,11 @@ class GUI
311312 _timeouts[idx].ev = eventSource.scheduleTimeout(dur! " msecs" (_timeouts[idx].msInit), Variant (data));
312313 }
313314 else
314- {
315+ {
315316 // Remove from list.
316317 _timeouts[idx] = _timeouts[$- 1 ];
317318 _timeouts.length -= 1 ;
318- assumeSafeAppend (_timeouts);
319+ assumeSafeAppend (_timeouts);
319320 }
320321 break ;
321322 }
@@ -331,11 +332,11 @@ class GUI
331332 if (_timeouts[idx].id == id)
332333 {
333334 eventSource.abortTimeout(_timeouts[idx].ev);
334- // Remove from list.
335- _timeouts[idx] = _timeouts[$- 1 ];
336- _timeouts.length -= 1 ;
335+ // Remove from list.
336+ _timeouts[idx] = _timeouts[$- 1 ];
337+ _timeouts.length -= 1 ;
337338 assumeSafeAppend (_timeouts);
338- return true ;
339+ return true ;
339340 }
340341 }
341342 return false ;
@@ -381,8 +382,8 @@ class GUI
381382 // import graphics.mesh : Mesh;
382383 // Mesh.numDrawCalls = 0;
383384 // Mesh.numBufferUploads= 0;
384-
385- foreach (k, v; _windows)
385+
386+ foreach (k, v; _windows)
386387 {
387388 // TODO: cull hidden windows
388389 // TODO: fix double drawing of widgets because the are all drawn here and some of them
@@ -688,7 +689,7 @@ class GUI
688689 if (ge ! is null )
689690 {
690691 auto w = ge.windowID in _windows;
691- if (w ! is null )
692+ if (w ! is null )
692693 {
693694 w.dispatch(e);
694695 return ;
@@ -709,12 +710,12 @@ class GUI
709710 }
710711
711712 if (e.type != GUIEvents.completed)
712- {
713+ {
713714 import std.stdio ;
714715 debug writeln(" Event with no window target received " , e);
715716 }
716717 }
717-
718+
718719 void repaintAllWindows ()
719720 {
720721 foreach (winID, win; _windows)
0 commit comments