chess.epj: Added Android configuration
[chess] / src / connect.ec
1 import "chess.ec"
2
3 class ConnectDialog : Window
4 {
5    minClientSize = Size { 300, 100 };
6    tabCycle = true, background = activeBorder, hasClose = true, text = "Connect to server";
7
8    Button ok
9    {
10       parent = this, bevel = true, isDefault = true, text = "OK",
11       size = Size { w = 80 }, anchor = Anchor { horz = -48, bottom = 10 };
12
13       bool NotifyClicked(Button button, int x, int y, Modifiers mods)
14       {
15          ((Chess)master).Connect(address.line.text);
16          Destroy(0);
17          return true;
18       }
19    };
20
21    Button cancel
22    {
23       parent = this, bevel = true, text = "Cancel", size = Size { w = 80 }, hotKey = escape;
24       anchor = Anchor { horz = 48, bottom = 10 };
25
26       bool NotifyClicked(Button button, int x, int y, Modifiers mods)
27       {
28          Destroy(0);
29          return false;
30       }
31    };
32
33    EditBox address
34    {
35       parent = this, textHorzScroll = true,  size = Size { w = 200 }, anchor = Anchor { top = 10 },
36       line.text = "localhost"
37    };
38 }