It adds all the tools to the tools list.
1599 {
1600 int w = 33;
1601 int h = 33;
1602 string s = System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/";
1603 tools.Clear();
1604 if (tools.Count == 0)
1605 {
1606 int x = 0; int y = 0;
1607 foreach (Tool.Type t in (Tool.Type[])Enum.GetValues(typeof(Tool.Type)))
1608 {
1609 if (t != Type.script)
1610 if (t != Type.color1 && t != Type.color2)
1611 {
1612 Tool tool = new Tool(t, new ColorS(0, 0, 0));
1613 tool.bounds = new Rectangle(x * w, y * h, w, h);
1614 tool.image = new Pixbuf(s + "Images/" + tool.type.ToString() + ".png");
1615 tools.Add(tool.ToString(), tool);
1616 }
1617 else
1618 {
1619 Tool tool = new Tool(t, new ColorS(0, 0, 0));
1620 tool.bounds = new Rectangle(x * w, y * h, w, h);
1621 tools.Add(tool.ToString(), tool);
1622 }
1623 x++;
1624 if (x > Tools.gridW - 1)
1625 {
1626 x = 0;
1627 y++;
1628 }
1629 }
1630 }
1631 DrawColor = new ColorS(ushort.MaxValue, ushort.MaxValue, ushort.MaxValue);
1632 }