fix build errors

This commit is contained in:
Vadim Lopatin 2015-11-02 09:28:36 +03:00
parent 2f9a48eb53
commit 2ef1154265
3 changed files with 15 additions and 2 deletions
dlanguilib.visualdproj
examples/example1/src
src/dlangui/graphics/xpm

View File

@ -96,6 +96,7 @@
<exefile>$(OutDir)\$(ProjectName).lib</exefile>
<useStdLibPath>1</useStdLibPath>
<cRuntime>2</cRuntime>
<privatePhobos>0</privatePhobos>
<additionalOptions />
<preBuildCommand />
<postBuildCommand />
@ -197,6 +198,7 @@
<exefile>$(OutDir)\$(ProjectName).lib</exefile>
<useStdLibPath>1</useStdLibPath>
<cRuntime>1</cRuntime>
<privatePhobos>0</privatePhobos>
<additionalOptions />
<preBuildCommand />
<postBuildCommand />
@ -396,6 +398,10 @@
<File path="src\dlangui\dml\parser.d" />
</Folder>
<Folder name="graphics">
<Folder name="xpm">
<File path="src\dlangui\graphics\xpm\colors.d" />
<File path="src\dlangui\graphics\xpm\reader.d" />
</Folder>
<Folder name="scene">
<File path="src\dlangui\graphics\scene\camera.d" />
<File path="src\dlangui\graphics\scene\node.d" />

View File

@ -477,7 +477,14 @@ extern (C) int UIAppMain(string[] args) {
);
destroy(w);
layout.childById("BTN1").click = delegate (Widget w) { Log.d("onClick ", w.id); return true; };
layout.childById("BTN1").click = delegate (Widget w) {
Log.d("onClick ", w.id);
//w.backgroundImageId = null;
//w.backgroundColor = 0xFF00FF;
w.textColor = 0xFF00FF;
w.styleId = STYLE_BUTTON_NOMARGINS;
return true;
};
layout.childById("BTN2").click = delegate (Widget w) { Log.d("onClick ", w.id); return true; };
layout.childById("BTN3").click = delegate (Widget w) { Log.d("onClick ", w.id); return true; };

View File

@ -21,7 +21,7 @@ import std.range;
import std.exception;
import std.format : formattedRead;
private inout(char)[] extractXPMString(inout(char)[] str) {
private const(char)[] extractXPMString(const(char)[] str) {
auto firstIndex = str.indexOf('"');
if (firstIndex != -1) {
auto secondIndex = str.indexOf('"', firstIndex+1);