123 {
124 int w = 33;
125 int h = 33;
126 string s = System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/";
127 tools.Clear();
128 if (tools.Count == 0)
129 {
130 int x = 0; int y = 0;
131 foreach (Tool.Type t in (Tool.Type[])Enum.GetValues(typeof(Tool.Type)))
132 {
133 if(t != Type.script)
134 if(t != Type.color1 && t != Type.color2)
135 {
136 Tool tool = new Tool(t, new ColorS(0, 0, 0));
137 tool.bounds = new Rectangle(x * w, y * h, w, h);
138 tool.image = new Pixbuf(s + "Images/" + tool.type.ToString() + ".png");
139 tools.Add(tool.ToString(), tool);
140 }
141 else
142 {
143 Tool tool = new Tool(t, new ColorS(0, 0, 0));
144 tool.bounds = new Rectangle(x * w, y * h, w, h);
145 tools.Add(tool.ToString(), tool);
146 }
147 x++;
148 if(x > Tools.gridW-1)
149 {
150 x = 0;
151 y++;
152 }
153 }
154 }
155 DrawColor = new ColorS(ushort.MaxValue, ushort.MaxValue, ushort.MaxValue);
156 }