move standard resources to solution directory; add helloworld project
|
@ -10,6 +10,8 @@ Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "example1", "examples\exampl
|
|||
EndProject
|
||||
Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "test", "examples\test\test.visualdproj", "{BE84DF39-64E6-449D-89E0-8E92404003CB}"
|
||||
EndProject
|
||||
Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "helloworld", "examples\helloworld\helloworld.visualdproj", "{66B1B701-6AC9-41F5-8DB4-5CB1611FB977}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
|
@ -28,6 +30,10 @@ Global
|
|||
{BE84DF39-64E6-449D-89E0-8E92404003CB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{BE84DF39-64E6-449D-89E0-8E92404003CB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{BE84DF39-64E6-449D-89E0-8E92404003CB}.Release|Win32.Build.0 = Release|Win32
|
||||
{66B1B701-6AC9-41F5-8DB4-5CB1611FB977}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{66B1B701-6AC9-41F5-8DB4-5CB1611FB977}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{66B1B701-6AC9-41F5-8DB4-5CB1611FB977}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{66B1B701-6AC9-41F5-8DB4-5CB1611FB977}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
6
dub.json
|
@ -9,7 +9,6 @@
|
|||
"versions-windows": ["USE_OPENGL", "Unicode"],
|
||||
|
||||
"subPackages": [
|
||||
"./examples/example1/",
|
||||
{
|
||||
"versions-windows": ["USE_OPENGL", "Unicode"],
|
||||
"name": "dlanguilib",
|
||||
|
@ -83,11 +82,14 @@
|
|||
"derelict-fi": "~master",
|
||||
"derelict-ft": "~master"
|
||||
}
|
||||
}
|
||||
},
|
||||
"./examples/helloworld/",
|
||||
"./examples/example1/"
|
||||
],
|
||||
|
||||
"dependencies": {
|
||||
"dlangui:dlanguilib": "~master",
|
||||
"dlangui:example1": "~master",
|
||||
"dlangui:helloworld": "~master",
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,9 @@ mixin APP_ENTRY_POINT;
|
|||
extern (C) int UIAppMain(string[] args) {
|
||||
// resource directory search paths
|
||||
string[] resourceDirs = [
|
||||
appendPath(exePath, "../res/"), // for Visual D and DUB builds
|
||||
appendPath(exePath, "../../res/") // for Mono-D builds
|
||||
appendPath(exePath, "../../../res/"), // for Visual D and DUB builds
|
||||
appendPath(exePath, "../../../../res/"),// for Mono-D builds
|
||||
appendPath(exePath, "res/") // when res dir is located at the same directory as executable
|
||||
];
|
||||
// setup resource directories - will use only existing directories
|
||||
drawableCache.setResourcePaths(resourceDirs);
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"name": "helloworld",
|
||||
"description": "dlangui library example Hello World",
|
||||
"homepage": "https://github.com/buggins/dlangui",
|
||||
"license": "Boost",
|
||||
"authors": ["Vadim Lopatin"],
|
||||
|
||||
"targetName": "helloworld",
|
||||
"targetPath": "bin",
|
||||
"targetType": "executable",
|
||||
|
||||
"sourcePaths": ["../../src"],
|
||||
|
||||
"sourceFiles-windows": [
|
||||
"../../3rdparty/win32/basetsd.d",
|
||||
"../../3rdparty/win32/basetyps.d",
|
||||
"../../3rdparty/win32/cderr.d",
|
||||
"../../3rdparty/win32/cguid.d",
|
||||
"../../3rdparty/win32/commdlg.d",
|
||||
"../../3rdparty/win32/commctrl.d",
|
||||
"../../3rdparty/win32/core.d",
|
||||
"../../3rdparty/win32/dde.d",
|
||||
"../../3rdparty/win32/ddeml.d",
|
||||
"../../3rdparty/win32/dlgs.d",
|
||||
"../../3rdparty/win32/imm.d",
|
||||
"../../3rdparty/win32/lzexpand.d",
|
||||
"../../3rdparty/win32/mmsystem.d",
|
||||
"../../3rdparty/win32/nb30.d",
|
||||
"../../3rdparty/win32/oaidl.d",
|
||||
"../../3rdparty/win32/objbase.d",
|
||||
"../../3rdparty/win32/objfwd.d",
|
||||
"../../3rdparty/win32/objidl.d",
|
||||
"../../3rdparty/win32/ole.d",
|
||||
"../../3rdparty/win32/ole2.d",
|
||||
"../../3rdparty/win32/oleauto.d",
|
||||
"../../3rdparty/win32/olectlid.d",
|
||||
"../../3rdparty/win32/oleidl.d",
|
||||
"../../3rdparty/win32/prsht.d",
|
||||
"../../3rdparty/win32/rpc.d",
|
||||
"../../3rdparty/win32/rpcdce.d",
|
||||
"../../3rdparty/win32/rpcdcep.d",
|
||||
"../../3rdparty/win32/rpcndr.d",
|
||||
"../../3rdparty/win32/rpcnsi.d",
|
||||
"../../3rdparty/win32/rpcnsip.d",
|
||||
"../../3rdparty/win32/rpcnterr.d",
|
||||
"../../3rdparty/win32/shellapi.d",
|
||||
"../../3rdparty/win32/shlobj.d",
|
||||
"../../3rdparty/win32/shlguid.d",
|
||||
"../../3rdparty/win32/unknwn.d",
|
||||
"../../3rdparty/win32/uuid.d",
|
||||
"../../3rdparty/win32/w32api.d",
|
||||
"../../3rdparty/win32/winbase.d",
|
||||
"../../3rdparty/win32/wincon.d",
|
||||
"../../3rdparty/win32/windef.d",
|
||||
"../../3rdparty/win32/windows.d",
|
||||
"../../3rdparty/win32/winerror.d",
|
||||
"../../3rdparty/win32/wingdi.d",
|
||||
"../../3rdparty/win32/winnetwk.d",
|
||||
"../../3rdparty/win32/winnls.d",
|
||||
"../../3rdparty/win32/winnt.d",
|
||||
"../../3rdparty/win32/winperf.d",
|
||||
"../../3rdparty/win32/winsock2.d",
|
||||
"../../3rdparty/win32/winspool.d",
|
||||
"../../3rdparty/win32/winsvc.d",
|
||||
"../../3rdparty/win32/winuser.d",
|
||||
"../../3rdparty/win32/winver.d",
|
||||
"../../3rdparty/win32/ws2tcpip.d",
|
||||
"../../3rdparty/win32/wtypes.d"
|
||||
],
|
||||
"sourceFiles": [
|
||||
"src/app.d"
|
||||
],
|
||||
"copyFiles-windows": [
|
||||
"../../lib/FreeImage.dll",
|
||||
"../../lib/libfreetype-6.dll",
|
||||
"../../lib/libpng15.dll",
|
||||
"../../lib/zlib1.dll"
|
||||
],
|
||||
|
||||
"mainSourceFile": "src/app.d",
|
||||
|
||||
"libs-windows": ["dlanguilib", "phobos", "ole32", "kernel32", "user32", "comctl32", "comdlg32"],
|
||||
|
||||
"versions-windows": ["USE_OPENGL", "Unicode"],
|
||||
|
||||
|
||||
"dependencies": {
|
||||
"dlangui:dlanguilib": "~master",
|
||||
"derelict-gl3": "~master",
|
||||
"derelict-fi": "~master",
|
||||
"derelict-ft": "~master"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.0</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{440816C8-DBD6-454C-A0D7-B6E59CA1ED86}</ProjectGuid>
|
||||
<UseDefaultCompiler>true</UseDefaultCompiler>
|
||||
<IncrementalLinking>true</IncrementalLinking>
|
||||
<PreferOneStepBuild>true</PreferOneStepBuild>
|
||||
<DependentProjectIds>
|
||||
<DependentProjectIds>
|
||||
<String>{440816C8-DBD6-454C-A0D7-B6E59CA1ED86}</String>
|
||||
</DependentProjectIds>
|
||||
</DependentProjectIds>
|
||||
<Compiler>DMD</Compiler>
|
||||
<Includes>
|
||||
<Includes>
|
||||
<Path>/home/lve/src/d/dlangui/src</Path>
|
||||
<Path>/home/lve/src/d/DerelictGL3/source</Path>
|
||||
<Path>/home/lve/src/d/DerelictUtil/source</Path>
|
||||
<Path>/home/lve/src/d/DerelictFT/source</Path>
|
||||
<Path>/home/lve/src/d/X11.d</Path>
|
||||
<Path>/home/lve/src/d/dlangui/3rdparty/libpng/source</Path>
|
||||
<Path>/home/lve/src/d/dlangui/3rdparty/libpng/lib</Path>
|
||||
</Includes>
|
||||
</Includes>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<OutputName>helloworld</OutputName>
|
||||
<ObjectsDirectory>obj/Debug</ObjectsDirectory>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
<Target>Executable</Target>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<OutputName>dlanguilib</OutputName>
|
||||
<ObjectsDirectory>obj/Release</ObjectsDirectory>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
<Target>Executable</Target>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Unittest|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Unittest</OutputPath>
|
||||
<ExtraCompilerArguments>-unittest </ExtraCompilerArguments>
|
||||
<ObjectsDirectory>obj/Unittest</ObjectsDirectory>
|
||||
<OutputName>dlanguilib</OutputName>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
<Target>Executable</Target>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="src/main.d" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,194 @@
|
|||
<DProject>
|
||||
<ProjectGuid>{66B1B701-6AC9-41F5-8DB4-5CB1611FB977}</ProjectGuid>
|
||||
<Config name="Debug" platform="Win32">
|
||||
<obj>0</obj>
|
||||
<link>0</link>
|
||||
<lib>0</lib>
|
||||
<subsystem>2</subsystem>
|
||||
<multiobj>0</multiobj>
|
||||
<singleFileCompilation>0</singleFileCompilation>
|
||||
<oneobj>0</oneobj>
|
||||
<trace>0</trace>
|
||||
<quiet>0</quiet>
|
||||
<verbose>0</verbose>
|
||||
<vtls>0</vtls>
|
||||
<symdebug>1</symdebug>
|
||||
<optimize>0</optimize>
|
||||
<cpu>0</cpu>
|
||||
<isX86_64>0</isX86_64>
|
||||
<isLinux>0</isLinux>
|
||||
<isOSX>0</isOSX>
|
||||
<isWindows>0</isWindows>
|
||||
<isFreeBSD>0</isFreeBSD>
|
||||
<isSolaris>0</isSolaris>
|
||||
<scheduler>0</scheduler>
|
||||
<useDeprecated>0</useDeprecated>
|
||||
<errDeprecated>0</errDeprecated>
|
||||
<useAssert>0</useAssert>
|
||||
<useInvariants>0</useInvariants>
|
||||
<useIn>0</useIn>
|
||||
<useOut>0</useOut>
|
||||
<useArrayBounds>0</useArrayBounds>
|
||||
<noboundscheck>0</noboundscheck>
|
||||
<useSwitchError>0</useSwitchError>
|
||||
<useUnitTests>0</useUnitTests>
|
||||
<useInline>0</useInline>
|
||||
<release>0</release>
|
||||
<preservePaths>0</preservePaths>
|
||||
<warnings>0</warnings>
|
||||
<infowarnings>0</infowarnings>
|
||||
<checkProperty>0</checkProperty>
|
||||
<genStackFrame>0</genStackFrame>
|
||||
<pic>0</pic>
|
||||
<cov>0</cov>
|
||||
<nofloat>0</nofloat>
|
||||
<Dversion>2</Dversion>
|
||||
<ignoreUnsupportedPragmas>0</ignoreUnsupportedPragmas>
|
||||
<compiler>0</compiler>
|
||||
<otherDMD>0</otherDMD>
|
||||
<program>$(DMDInstallDir)windows\bin\dmd.exe</program>
|
||||
<imppath>$(SolutionDir)/src $(SolutionDir)/3rdparty $(SolutionDir)/3rdparty/libpng/source $(SolutionDir)/../DerelictGL3/source $(SolutionDir)/../DerelictUtil/source $(SolutionDir)/../gl3n</imppath>
|
||||
<fileImppath />
|
||||
<outdir>$(ConfigurationName)</outdir>
|
||||
<objdir>$(OutDir)</objdir>
|
||||
<objname />
|
||||
<libname />
|
||||
<doDocComments>0</doDocComments>
|
||||
<docdir />
|
||||
<docname />
|
||||
<modules_ddoc />
|
||||
<ddocfiles />
|
||||
<doHdrGeneration>0</doHdrGeneration>
|
||||
<hdrdir />
|
||||
<hdrname />
|
||||
<doXGeneration>1</doXGeneration>
|
||||
<xfilename>$(IntDir)\$(TargetName).json</xfilename>
|
||||
<debuglevel>0</debuglevel>
|
||||
<debugids />
|
||||
<versionlevel>0</versionlevel>
|
||||
<versionids>Unicode USE_OPENGL</versionids>
|
||||
<dump_source>0</dump_source>
|
||||
<mapverbosity>3</mapverbosity>
|
||||
<createImplib>0</createImplib>
|
||||
<defaultlibname />
|
||||
<debuglibname />
|
||||
<moduleDepsFile />
|
||||
<run>0</run>
|
||||
<runargs />
|
||||
<runCv2pdb>1</runCv2pdb>
|
||||
<pathCv2pdb>$(VisualDInstallDir)cv2pdb\cv2pdb.exe</pathCv2pdb>
|
||||
<cv2pdbPre2043>0</cv2pdbPre2043>
|
||||
<cv2pdbNoDemangle>0</cv2pdbNoDemangle>
|
||||
<cv2pdbEnumType>0</cv2pdbEnumType>
|
||||
<cv2pdbOptions />
|
||||
<objfiles />
|
||||
<linkswitches />
|
||||
<libfiles>libpng15.lib dlangui.lib phobos.lib ole32.lib kernel32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib dlangui.lib</libfiles>
|
||||
<libpaths>../../Debug ../../3rdparty/libpng/lib 3rdparty/libpng/lib ../../../DerelictOpenGL3/source</libpaths>
|
||||
<deffile />
|
||||
<resfile />
|
||||
<exefile>$(OutDir)\$(ProjectName).exe</exefile>
|
||||
<useStdLibPath>1</useStdLibPath>
|
||||
<additionalOptions>-profile</additionalOptions>
|
||||
<preBuildCommand />
|
||||
<postBuildCommand />
|
||||
<filesToClean>*.obj;*.cmd;*.build;*.json;*.dep</filesToClean>
|
||||
</Config>
|
||||
<Config name="Release" platform="Win32">
|
||||
<obj>0</obj>
|
||||
<link>0</link>
|
||||
<lib>0</lib>
|
||||
<subsystem>2</subsystem>
|
||||
<multiobj>0</multiobj>
|
||||
<singleFileCompilation>0</singleFileCompilation>
|
||||
<oneobj>0</oneobj>
|
||||
<trace>0</trace>
|
||||
<quiet>0</quiet>
|
||||
<verbose>0</verbose>
|
||||
<vtls>0</vtls>
|
||||
<symdebug>0</symdebug>
|
||||
<optimize>0</optimize>
|
||||
<cpu>0</cpu>
|
||||
<isX86_64>0</isX86_64>
|
||||
<isLinux>0</isLinux>
|
||||
<isOSX>0</isOSX>
|
||||
<isWindows>0</isWindows>
|
||||
<isFreeBSD>0</isFreeBSD>
|
||||
<isSolaris>0</isSolaris>
|
||||
<scheduler>0</scheduler>
|
||||
<useDeprecated>0</useDeprecated>
|
||||
<errDeprecated>0</errDeprecated>
|
||||
<useAssert>0</useAssert>
|
||||
<useInvariants>0</useInvariants>
|
||||
<useIn>0</useIn>
|
||||
<useOut>0</useOut>
|
||||
<useArrayBounds>0</useArrayBounds>
|
||||
<noboundscheck>0</noboundscheck>
|
||||
<useSwitchError>0</useSwitchError>
|
||||
<useUnitTests>0</useUnitTests>
|
||||
<useInline>0</useInline>
|
||||
<release>1</release>
|
||||
<preservePaths>0</preservePaths>
|
||||
<warnings>0</warnings>
|
||||
<infowarnings>0</infowarnings>
|
||||
<checkProperty>0</checkProperty>
|
||||
<genStackFrame>0</genStackFrame>
|
||||
<pic>0</pic>
|
||||
<cov>0</cov>
|
||||
<nofloat>0</nofloat>
|
||||
<Dversion>2</Dversion>
|
||||
<ignoreUnsupportedPragmas>0</ignoreUnsupportedPragmas>
|
||||
<compiler>0</compiler>
|
||||
<otherDMD>0</otherDMD>
|
||||
<program>$(DMDInstallDir)windows\bin\dmd.exe</program>
|
||||
<imppath>../../src ../../3rdparty ../../3rdparty/libpng/source</imppath>
|
||||
<fileImppath />
|
||||
<outdir>$(ConfigurationName)</outdir>
|
||||
<objdir>$(OutDir)</objdir>
|
||||
<objname />
|
||||
<libname />
|
||||
<doDocComments>0</doDocComments>
|
||||
<docdir />
|
||||
<docname />
|
||||
<modules_ddoc />
|
||||
<ddocfiles />
|
||||
<doHdrGeneration>0</doHdrGeneration>
|
||||
<hdrdir />
|
||||
<hdrname />
|
||||
<doXGeneration>1</doXGeneration>
|
||||
<xfilename>$(IntDir)\$(TargetName).json</xfilename>
|
||||
<debuglevel>0</debuglevel>
|
||||
<debugids />
|
||||
<versionlevel>0</versionlevel>
|
||||
<versionids>Unicode</versionids>
|
||||
<dump_source>0</dump_source>
|
||||
<mapverbosity>0</mapverbosity>
|
||||
<createImplib>0</createImplib>
|
||||
<defaultlibname />
|
||||
<debuglibname />
|
||||
<moduleDepsFile />
|
||||
<run>0</run>
|
||||
<runargs />
|
||||
<runCv2pdb>0</runCv2pdb>
|
||||
<pathCv2pdb>$(VisualDInstallDir)cv2pdb\cv2pdb.exe</pathCv2pdb>
|
||||
<cv2pdbPre2043>0</cv2pdbPre2043>
|
||||
<cv2pdbNoDemangle>0</cv2pdbNoDemangle>
|
||||
<cv2pdbEnumType>0</cv2pdbEnumType>
|
||||
<cv2pdbOptions />
|
||||
<objfiles />
|
||||
<linkswitches />
|
||||
<libfiles>dlangui.lib phobos.lib libpng15.lib ole32.lib kernel32.lib user32.lib comctl32.lib comdlg32.lib</libfiles>
|
||||
<libpaths>../../Release ../../3rdparty/libpng/lib 3rdparty/libpng/lib</libpaths>
|
||||
<deffile />
|
||||
<resfile />
|
||||
<exefile>$(OutDir)\$(ProjectName).exe</exefile>
|
||||
<useStdLibPath>1</useStdLibPath>
|
||||
<additionalOptions />
|
||||
<preBuildCommand />
|
||||
<postBuildCommand />
|
||||
<filesToClean>*.obj;*.cmd;*.build;*.json;*.dep</filesToClean>
|
||||
</Config>
|
||||
<Folder name="helloworld">
|
||||
<File path="src/app.d" />
|
||||
</Folder>
|
||||
</DProject>
|
|
@ -0,0 +1,34 @@
|
|||
module app;
|
||||
|
||||
import dlangui.all;
|
||||
import std.stdio;
|
||||
import std.conv;
|
||||
|
||||
|
||||
mixin APP_ENTRY_POINT;
|
||||
|
||||
/// entry point for dlangui based application
|
||||
extern (C) int UIAppMain(string[] args) {
|
||||
// resource directory search paths
|
||||
string[] resourceDirs = [
|
||||
appendPath(exePath, "../../../res/"), // for Visual D and DUB builds
|
||||
appendPath(exePath, "../../../../res/"),// for Mono-D builds
|
||||
appendPath(exePath, "res/") // when res dir is located at the same directory as executable
|
||||
];
|
||||
// setup resource directories - will use only existing directories
|
||||
drawableCache.setResourcePaths(resourceDirs);
|
||||
// setup i18n - look for i18n directory inside one of passed directories
|
||||
i18n.findTranslationsDir(resourceDirs);
|
||||
// select translation file - for english language
|
||||
i18n.load("en.ini"); //"ru.ini", "en.ini"
|
||||
|
||||
// create window
|
||||
Window window = Platform.instance.createWindow("My Window", null);
|
||||
|
||||
window.mainWidget = (new Button()).text("sample button");
|
||||
|
||||
window.show();
|
||||
//window.windowCaption = "New Window Caption";
|
||||
// run message loop
|
||||
return Platform.instance.enterMessageLoop();
|
||||
}
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 716 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 374 B |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 267 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
|
@ -11,14 +11,15 @@ Synopsis:
|
|||
// helloworld
|
||||
import dlangui.all;
|
||||
// required in one of modules
|
||||
mixin DLANGUI_ENTRY_POINT;
|
||||
mixin APP_ENTRY_POINT;
|
||||
|
||||
/// entry point for dlangui based application
|
||||
extern (C) int UIAppMain(string[] args) {
|
||||
// resource directory search paths
|
||||
string[] resourceDirs = [
|
||||
appendPath(exePath, "../res/"), // for Visual D and DUB builds
|
||||
appendPath(exePath, "../../res/") // for Mono-D builds
|
||||
appendPath(exePath, "../../../res/"), // for Visual D and DUB builds
|
||||
appendPath(exePath, "../../../../res/"), // for Mono-D builds
|
||||
appendPath(exePath, "res/") // when res dir is located at the same directory as executable
|
||||
];
|
||||
// setup resource directories - will use only existing directories
|
||||
drawableCache.setResourcePaths(resourceDirs);
|
||||
|
@ -28,10 +29,10 @@ extern (C) int UIAppMain(string[] args) {
|
|||
i18n.load("en.ini"); //"ru.ini", "en.ini"
|
||||
|
||||
// create window
|
||||
Window window = Platform.instance().createWindow("My Window", null);
|
||||
Window window = Platform.instance.createWindow("My Window", null);
|
||||
window.mainWidget = (new Button()).text("Hello world"d);
|
||||
// run message loop
|
||||
return Platform.instance().enterMessageLoop();
|
||||
return Platform.instance.enterMessageLoop();
|
||||
}
|
||||
|
||||
|
||||
|
|