migrate to new dlangui - using package.d instead of dlangui/all.d

This commit is contained in:
Vadim Lopatin 2015-02-24 10:55:33 +03:00
parent 73086a5498
commit e95a94fcc6
5 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,7 @@
module dlangide.tools.d.dparser;
version(USE_LIBDPARSE):
import dlangui.core.logger;
import std.d.lexer;

View File

@ -1,6 +1,6 @@
module dlangide.ui.outputpanel;
import dlangui.all;
import dlangui;
import dlangide.workspace.workspace;
import dlangide.workspace.project;

View File

@ -1,6 +1,6 @@
module dlangide.ui.wspanel;
import dlangui.all;
import dlangui;
import dlangide.workspace.workspace;
import dlangide.workspace.project;
import dlangide.ui.commands;

View File

@ -2,7 +2,7 @@ module gui;
import model;
import dlangui.all;
import dlangui;
/// game action codes
enum TetrisAction : int {

View File

@ -1 +1 @@
// Written in the D programming language. /** This app is a Tetris demo for DlangUI library. Synopsis: ---- dub run dlangui:tetris ---- Copyright: Vadim Lopatin, 2014 License: Boost License 1.0 Authors: Vadim Lopatin, coolreader.org@gmail.com */ module main; import dlangui.all; import model; import gui; import std.stdio; /// Required for Windows platform: DMD cannot find WinMain if it's in library mixin APP_ENTRY_POINT; /// entry point for dlangui based application extern (C) int UIAppMain(string[] args) { //auto power2 = delegate(int X) { return X * X; }; auto power2 = (int X) => X * X; // embed resources listed in views/resources.list into executable embeddedResourceList.addResources(embedResourcesFromList!("resources.list")()); // select translation file - for english language Platform.instance.uiLanguage = "en"; // load theme from file "theme_default.xml" Platform.instance.uiTheme = "theme_default"; // create window Window window = Platform.instance.createWindow("DLangUI: Tetris game example"d, null, WindowFlag.Modal); window.mainWidget = new GameWidget(); window.windowIcon = drawableCache.getImage("dtetris-logo1"); window.show(); // run message loop return Platform.instance.enterMessageLoop(); }
// Written in the D programming language. /** This app is a Tetris demo for DlangUI library. Synopsis: ---- dub run dlangui:tetris ---- Copyright: Vadim Lopatin, 2014 License: Boost License 1.0 Authors: Vadim Lopatin, coolreader.org@gmail.com */ module main; import dlangui; import model; import gui; import std.stdio; /// Required for Windows platform: DMD cannot find WinMain if it's in library mixin APP_ENTRY_POINT; long n; /// entry point for dlangui based application extern (C) int UIAppMain(string[] args) { //auto power2 = delegate(int X) { return X * X; }; auto power2 = (int X) => X * X; // embed resources listed in views/resources.list into executable embeddedResourceList.addResources(embedResourcesFromList!("resources.list")()); // select translation file - for english language Platform.instance.uiLanguage = "en"; // load theme from file "theme_default.xml" Platform.instance.uiTheme = "theme_default"; int n = 20; { import std.conv; int a = n + 25; string s = to!string(n); n++; } int ccc = n; // create window Window window = Platform.instance.createWindow("DLangUI: Tetris game example"d, null, WindowFlag.Modal); window.mainWidget = new GameWidget(); window.windowIcon = drawableCache.getImage("dtetris-logo1"); window.show(); // run message loop return Platform.instance.enterMessageLoop(); }