Index: test.d ================================================================== --- test.d +++ test.d @@ -1,10 +1,11 @@ import std.algorithm; import std.array; import std.conv; import std.stdio; import std.string; +import dfl.all; class Map { private char[][] data; @@ -108,23 +109,79 @@ } data = next; } } -void main(string[] args) +class MyForm : Form { - Map m = new Map(File(args[1])); - for(;;) { - writeln(m); - write("> "); - string s = readln(); - if(s.length == 0) + Map m; + this(Map m) + { + noMessageFilter(); + this.m = m; + this.text = "Dark Integers"; + this.keyDown ~= &myKey; + } + override void onResize(EventArgs ev) { + invalidate(); + } + override void onPaint(PaintEventArgs ev) + { + int Z = min(this.clientSize.width, this.clientSize.height) / max(m.W-2, m.H-2); + Font font = new Font("MS Gothic", Z-4); + Graphics g = ev.graphics; + for(int y=1; y+1