comparison mde/gui/widget/AChildWidget.d @ 169:bc1cf73dc835

Context menu refinements: right button click-drag-release use and closing via buttons.
author Diggory Hardy <diggory.hardy@gmail.com>
date Mon, 29 Jun 2009 18:55:50 +0200
parents 2476790223b8
children e45226d3deae
comparison
equal deleted inserted replaced
168:da8d3091fdaf 169:bc1cf73dc835
265 mgr.renderer.drawButton (x,y, w,h, pushed); 265 mgr.renderer.drawButton (x,y, w,h, pushed);
266 } 266 }
267 267
268 /// Handles the down-click 268 /// Handles the down-click
269 override int clickEvent (wdabs, wdabs, ubyte b, bool state) { 269 override int clickEvent (wdabs, wdabs, ubyte b, bool state) {
270 if (b != 1) return 0; 270 if (parentIPPW.menuActive && b == 1 || b == 3) {
271 if (parentIPPW.menuActive) {
272 parentIPPW.menuDone; 271 parentIPPW.menuDone;
273 activated; 272 activated;
274 } else if (state) { 273 } else if (state && b == 1) {
275 pushed = true; 274 pushed = true;
276 mgr.requestRedraw; 275 mgr.requestRedraw;
277 return 2; 276 return 2;
278 } 277 }
279 return 0; 278 return 0;