comparison mde/menus.d @ 132:264028f4115a

Cleaned up mde.imde and a couple of widget functions. New mde.menus module to add default menus. The input singleton is now created in mde.input.Input instead of mde.imde.
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 23 Jan 2009 14:59:05 +0000
parents
children 9fd705793568
comparison
equal deleted inserted replaced
131:9cff74f68b84 132:264028f4115a
1 /* LICENSE BLOCK
2 Part of mde: a Modular D game-oriented Engine
3 Copyright © 2007-2008 Diggory Hardy
4
5 This program is free software: you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free Software
7 Foundation, either version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
15
16 /******************************************************************************
17 * Import this module to add some standard menus to imde.menus.
18 *
19 * Note that the widget manager also adds menu items in debug mode.
20 *****************************************************************************/
21 module mde.menus;
22
23 import mde.content.miscContent;
24 import mde.imde;
25 debug {
26 import tango.util.log.Log : Log, Logger;
27 private Logger logger;
28 static this () {
29 logger = Log.getLogger ("mde.menus");
30 }
31 }
32
33 static this () {
34 auto quit = new EventContent("quit");
35 quit.addCallback ((Content){
36 debug logger.trace ("Quit (from menu)");
37 run = false;
38 });
39 menus.append (new ContentList ("main", [cast(Content)quit]));
40 }