David Catuhe 7 anni fa
parent
commit
19ca569e53
1 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 10 1
      gui/src/2D/controls/gridDisplay.ts

+ 10 - 1
gui/src/2D/controls/gridDisplay.ts

@@ -100,12 +100,21 @@ export class GridDisplay extends Control {
                 context.lineTo(cellX, this._currentMeasure.top + this._currentMeasure.height);
                 context.stroke();
             }
+
+            const top = this._currentMeasure.top + this._currentMeasure.height / 2;
+
+            for (var y = -cellCountY / 2; y < cellCountY / y; x++) {
+                const cellY = top + y * this.cellHeight;
+                context.moveTo(this._currentMeasure.left, cellY);
+                context.lineTo(this._currentMeasure.left + this._currentMeasure.width, cellY);
+                context.stroke();
+            }            
         }
 
         context.restore();
     }
 
     protected _getTypeName(): string {
-        return "GridDisplayRectangle";
+        return "GridDisplay";
     }
 }