mirror of https://github.com/buggins/dlangide.git
fixes
This commit is contained in:
parent
0e1d8eae18
commit
bf73e5877d
|
@ -66,7 +66,7 @@
|
|||
<debuglevel>0</debuglevel>
|
||||
<debugids />
|
||||
<versionlevel>0</versionlevel>
|
||||
<versionids>Unicode USE_SDL</versionids>
|
||||
<versionids>Unicode</versionids>
|
||||
<dump_source>0</dump_source>
|
||||
<mapverbosity>3</mapverbosity>
|
||||
<createImplib>0</createImplib>
|
||||
|
@ -89,6 +89,7 @@
|
|||
<resfile />
|
||||
<exefile>$(OutDir)\$(ProjectName).exe</exefile>
|
||||
<useStdLibPath>1</useStdLibPath>
|
||||
<cRuntime>2</cRuntime>
|
||||
<additionalOptions>-profile</additionalOptions>
|
||||
<preBuildCommand />
|
||||
<postBuildCommand />
|
||||
|
@ -183,6 +184,7 @@
|
|||
<resfile />
|
||||
<exefile>$(OutDir)\$(ProjectName).exe</exefile>
|
||||
<useStdLibPath>1</useStdLibPath>
|
||||
<cRuntime>1</cRuntime>
|
||||
<additionalOptions />
|
||||
<preBuildCommand />
|
||||
<postBuildCommand />
|
||||
|
|
|
@ -17,16 +17,19 @@ extern (C) int UIAppMain(string[] args) {
|
|||
embeddedResourceList.addResources(embedResourcesFromList!("resources.list")());
|
||||
|
||||
// you can override default hinting mode here
|
||||
//FontManager.hintingMode = HintingMode.Light;
|
||||
//FontManager.hintingMode = HintingMode.AutoHint;
|
||||
FontManager.hintingMode = HintingMode.Normal;
|
||||
//FontManager.hintingMode = HintingMode.Disabled;
|
||||
// you can override antialiasing setting here
|
||||
FontManager.minAnitialiasedFontSize = 0;
|
||||
//version (USE_OPENGL) {
|
||||
version (USE_OPENGL) {
|
||||
// you can turn on subpixel font rendering (ClearType) here
|
||||
FontManager.subpixelRenderingMode = SubpixelRenderingMode.None; //
|
||||
//} else {
|
||||
} else {
|
||||
// you can turn on subpixel font rendering (ClearType) here
|
||||
//FontManager.subpixelRenderingMode = SubpixelRenderingMode.BGR; //SubpixelRenderingMode.None; //
|
||||
//}
|
||||
}
|
||||
|
||||
// create window
|
||||
Window window = Platform.instance.createWindow("Dlang IDE", null);
|
||||
|
|
|
@ -99,7 +99,7 @@ class SimpleDSyntaxHighlighter : SyntaxHighlighter {
|
|||
|
||||
/// categorize characters in content by token types
|
||||
void updateHighlight(dstring[] lines, TokenPropString[] props, int changeStartLine, int changeEndLine) {
|
||||
Log.d("updateHighlight");
|
||||
//Log.d("updateHighlight");
|
||||
long ms0 = currentTimeMillis();
|
||||
_props = props;
|
||||
changeStartLine = 0;
|
||||
|
@ -189,7 +189,9 @@ class SimpleDSyntaxHighlighter : SyntaxHighlighter {
|
|||
}
|
||||
_lines.close();
|
||||
_props = null;
|
||||
Log.d("updateHighlight took ", currentTimeMillis() - ms0, "ms");
|
||||
long elapsed = currentTimeMillis() - ms0;
|
||||
if (elapsed > 20)
|
||||
Log.d("updateHighlight took ", elapsed, "ms");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,50 +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;
|
||||
|
||||
/// 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.all;
import model;
import gui;
/// 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();
}
|
Loading…
Reference in New Issue