comparison mde/gui/widget/AChildWidget.d @ 141:6f69a9c111eb

Fix for using BoolContentWidget in a menu. Made popups' widths match their parents under certain conditions. Removed dummy testing menu items.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sun, 08 Feb 2009 15:49:45 +0000
parents 9f035cd139c6
children 66c58e5b0062
comparison
equal deleted inserted replaced
140:c94ec5594449 141:6f69a9c111eb
244 } 244 }
245 245
246 /// Handles the down-click 246 /// Handles the down-click
247 override int clickEvent (wdabs, wdabs, ubyte b, bool state) { 247 override int clickEvent (wdabs, wdabs, ubyte b, bool state) {
248 if (b != 1) return 0; 248 if (b != 1) return 0;
249 if (state) { 249 if (parentIPPW.menuActive) {
250 parentIPPW.menuDone;
251 activated;
252 } else if (state) {
250 pushed = true; 253 pushed = true;
251 mgr.requestRedraw; 254 mgr.requestRedraw;
252 mgr.addClickCallback (&clickWhilePushed); 255 mgr.addClickCallback (&clickWhilePushed);
253 mgr.addMotionCallback (&motionWhilePushed); 256 mgr.addMotionCallback (&motionWhilePushed);
254 }
255 if (parentIPPW.menuActive) {
256 parentIPPW.menuDone;
257 activated;
258 } 257 }
259 return 0; 258 return 0;
260 } 259 }
261 260
262 /// When menuActive, highlight on mouse-over 261 /// When menuActive, highlight on mouse-over