diff --git a/build/editor.cfg b/build/editor.cfg index 62a6a04ec5ac61b09ce91e091554e746a38c408d..8d3d9028080f90eb958f9bf3763c2974fc81a3f7 100644 --- a/build/editor.cfg +++ b/build/editor.cfg @@ -4,4 +4,4 @@ echo "Executing editor config file" unbind f10 cl_mode_editor 1 -rs_stats 1 \ No newline at end of file +r_stats 1 \ No newline at end of file diff --git a/build/gamesource/config/entities/defaults.ent b/build/gamesource/config/entities/defaults.ent index 70fb6cda8f8781a8409f4d3183a9a83c5b9bd482..6a95731c86826ceebc7ef81fded0c9a93f8dbd05 100644 --- a/build/gamesource/config/entities/defaults.ent +++ b/build/gamesource/config/entities/defaults.ent @@ -1,5 +1,5 @@ [npc_zombie] -; model = "models/zombie/zombie.dse" +model = "models/zombie/zombie.dse" ; model = "models/zombie/zombie_hb.dse" -model = "models/stalker_zombi/stalker_zombi_a.dse" +; model = "models/stalker_zombi/stalker_zombi_a.dse" diff --git a/build/gamesource/shaders/ppe/ppe_lens_flare2.ps b/build/gamesource/shaders/ppe/ppe_lens_flare2.ps index 8790fa88534cd218c1fd91329fc95567ce76a538..2fb0e3d95105fd991b1542eb2a4f136341e884d4 100644 --- a/build/gamesource/shaders/ppe/ppe_lens_flare2.ps +++ b/build/gamesource/shaders/ppe/ppe_lens_flare2.ps @@ -43,5 +43,5 @@ half4 main(vs_out_pp IN):COLOR0 } result /= half(NumSamples)*(LensFlareParam.z); - return half4(result+0.1,0.0); + return half4(result,0.0); } \ No newline at end of file diff --git a/build/sysconfig.cfg b/build/sysconfig.cfg index 595abcb14e782db5c72c44363f5e0911ff0a0386..7c73de96303ea8078e8845e7816643e846e7358b 100644 --- a/build/sysconfig.cfg +++ b/build/sysconfig.cfg @@ -46,7 +46,7 @@ grass_frec 100 green_lod0 50 green_lod1 100 green_less 20 -p_far 400 +r_far 400 r_s_filter 2 r_s_max_anisotropy 16 diff --git a/proj/SkyXEngine/vs2013/SkyXEngine.sln b/proj/SkyXEngine/vs2013/SkyXEngine.sln index 6f0809bc6ce13b432f157abb51a3e53953857311..8fc054f49e5e5f48f9e36358051bdf279096aa5b 100644 --- a/proj/SkyXEngine/vs2013/SkyXEngine.sln +++ b/proj/SkyXEngine/vs2013/SkyXEngine.sln @@ -90,8 +90,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bullet3Dynamics", "..\..\.. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bullet3Geometry", "..\..\..\sdks\bullet3\build3\vs2010\Bullet3Geometry.vcxproj", "{60A46FEB-576C-7B40-A047-D6079D9D66C4}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bullet3OpenCL_clew", "..\..\..\sdks\bullet3\build3\vs2010\Bullet3OpenCL_clew.vcxproj", "{A690CE26-63ED-6C4E-8406-C494AED4C073}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sxphysics", "..\..\sxphysics\vs2013\sxphysics.vcxproj", "{7C0C8205-BDD3-44A3-AA3A-7855C7EFC88E}" ProjectSection(ProjectDependencies) = postProject {46A17C83-2972-4C41-B67F-224640089085} = {46A17C83-2972-4C41-B67F-224640089085} @@ -178,6 +176,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sxrender", "..\..\sxrender\ {56A8D7F7-B73C-4206-8038-83D8A169AA2F} = {56A8D7F7-B73C-4206-8038-83D8A169AA2F} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sxgenpreview", "..\..\sxgenpreview\vs2013\sxgenpreview.vcxproj", "{D381001E-C1FF-415F-A269-5264AD9013D5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -302,14 +302,6 @@ Global {60A46FEB-576C-7B40-A047-D6079D9D66C4}.Release|Win32.Build.0 = Release|Win32 {60A46FEB-576C-7B40-A047-D6079D9D66C4}.Release|x64.ActiveCfg = Release|x64 {60A46FEB-576C-7B40-A047-D6079D9D66C4}.Release|x64.Build.0 = Release|x64 - {A690CE26-63ED-6C4E-8406-C494AED4C073}.Debug|Win32.ActiveCfg = Debug|Win32 - {A690CE26-63ED-6C4E-8406-C494AED4C073}.Debug|Win32.Build.0 = Debug|Win32 - {A690CE26-63ED-6C4E-8406-C494AED4C073}.Debug|x64.ActiveCfg = Debug|x64 - {A690CE26-63ED-6C4E-8406-C494AED4C073}.Debug|x64.Build.0 = Debug|x64 - {A690CE26-63ED-6C4E-8406-C494AED4C073}.Release|Win32.ActiveCfg = Release|Win32 - {A690CE26-63ED-6C4E-8406-C494AED4C073}.Release|Win32.Build.0 = Release|Win32 - {A690CE26-63ED-6C4E-8406-C494AED4C073}.Release|x64.ActiveCfg = Release|x64 - {A690CE26-63ED-6C4E-8406-C494AED4C073}.Release|x64.Build.0 = Release|x64 {7C0C8205-BDD3-44A3-AA3A-7855C7EFC88E}.Debug|Win32.ActiveCfg = Debug|Win32 {7C0C8205-BDD3-44A3-AA3A-7855C7EFC88E}.Debug|Win32.Build.0 = Debug|Win32 {7C0C8205-BDD3-44A3-AA3A-7855C7EFC88E}.Debug|x64.ActiveCfg = Debug|Win32 @@ -428,6 +420,12 @@ Global {7F0ACED1-6E16-4DD3-800E-0C50150897C2}.Release|Win32.ActiveCfg = Release|Win32 {7F0ACED1-6E16-4DD3-800E-0C50150897C2}.Release|Win32.Build.0 = Release|Win32 {7F0ACED1-6E16-4DD3-800E-0C50150897C2}.Release|x64.ActiveCfg = Release|Win32 + {D381001E-C1FF-415F-A269-5264AD9013D5}.Debug|Win32.ActiveCfg = Debug|Win32 + {D381001E-C1FF-415F-A269-5264AD9013D5}.Debug|Win32.Build.0 = Debug|Win32 + {D381001E-C1FF-415F-A269-5264AD9013D5}.Debug|x64.ActiveCfg = Debug|Win32 + {D381001E-C1FF-415F-A269-5264AD9013D5}.Release|Win32.ActiveCfg = Release|Win32 + {D381001E-C1FF-415F-A269-5264AD9013D5}.Release|Win32.Build.0 = Release|Win32 + {D381001E-C1FF-415F-A269-5264AD9013D5}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -457,11 +455,11 @@ Global {9C34362D-7FA6-4BD1-A48B-8FDE541344B0} = {5128FBE9-1706-4255-B422-4A652320085E} {CEFD4247-0B36-4268-B455-C1E826173005} = {5128FBE9-1706-4255-B422-4A652320085E} {B66C63CA-62E0-472F-9D24-070CAC7C8B12} = {5128FBE9-1706-4255-B422-4A652320085E} + {D381001E-C1FF-415F-A269-5264AD9013D5} = {5128FBE9-1706-4255-B422-4A652320085E} {A57B87BE-C63D-C64F-A06E-C48B4723C51A} = {6376944C-E417-43FD-8B56-073A310EB7D9} {EF2EC91D-F2A6-BD43-89AC-8054F3D5EECA} = {6376944C-E417-43FD-8B56-073A310EB7D9} {D6ECE531-C294-BC42-8C32-6F09F1240325} = {6376944C-E417-43FD-8B56-073A310EB7D9} {60A46FEB-576C-7B40-A047-D6079D9D66C4} = {6376944C-E417-43FD-8B56-073A310EB7D9} - {A690CE26-63ED-6C4E-8406-C494AED4C073} = {6376944C-E417-43FD-8B56-073A310EB7D9} {072A60D2-317A-CC41-AD12-7E381235064A} = {6376944C-E417-43FD-8B56-073A310EB7D9} {46A17C83-2972-4C41-B67F-224640089085} = {6376944C-E417-43FD-8B56-073A310EB7D9} {E74F00B5-7DC5-DC48-8E91-D1C2296F455F} = {6376944C-E417-43FD-8B56-073A310EB7D9} diff --git a/proj/SkyXEngine/vs2013/SkyXEngine.vcxproj b/proj/SkyXEngine/vs2013/SkyXEngine.vcxproj index ef9a54c1b3c7fc98c7dc10a596d1cdd865315ac0..c6b3a9fb258b0b930ac464862fcc5d7a7dbe2b23 100644 --- a/proj/SkyXEngine/vs2013/SkyXEngine.vcxproj +++ b/proj/SkyXEngine/vs2013/SkyXEngine.vcxproj @@ -94,12 +94,16 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\skyxengine.cpp" /> <ClCompile Include="..\..\..\source\SkyXEngine_Build\SkyXEngine_Build.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\gdefines.h" /> <ClInclude Include="..\..\..\source\GRegisterIndex.h" /> <ClInclude Include="..\..\..\source\SkyXEngine.h" /> diff --git a/proj/SkyXEngine/vs2013/SkyXEngine.vcxproj.filters b/proj/SkyXEngine/vs2013/SkyXEngine.vcxproj.filters index 087531ce94fd734db4a0c037ec5db57054c6b5e3..7bb6dc4f31e96678d93c47c6297cf0db1a29f9b9 100644 --- a/proj/SkyXEngine/vs2013/SkyXEngine.vcxproj.filters +++ b/proj/SkyXEngine/vs2013/SkyXEngine.vcxproj.filters @@ -10,6 +10,12 @@ <ClCompile Include="..\..\..\source\skyxengine.cpp"> <Filter>Source</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <Filter Include="Header"> @@ -38,6 +44,12 @@ <ClInclude Include="..\..\..\source\GRegisterIndex.h"> <Filter>Header</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\..\source\SkyXEngine_Build\SkyXEngine.rc"> diff --git a/proj/sxae/vs2013/sxae.vcxproj b/proj/sxae/vs2013/sxae.vcxproj index b2c4dab6124f4f1d378a28b504981381797cac44..01bc535faeb16e062681cf8767b6c1bc694d5ed5 100644 --- a/proj/sxae/vs2013/sxae.vcxproj +++ b/proj/sxae/vs2013/sxae.vcxproj @@ -20,14 +20,14 @@ <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v120_xp</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v120_xp</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> @@ -42,13 +42,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <LinkIncremental>false</LinkIncremental> <OutDir>../../../build/</OutDir> - <IncludePath>../../../source/;$(VC_IncludePath);$(WindowsSDK_IncludePath);../../../sdks/dx9sdk/Include/</IncludePath> + <IncludePath>../../../source/;$(VC_IncludePath);$(WindowsSDK_IncludePath);../../../sdks/dx9sdk/Include/;../../../sdks/bullet3/src</IncludePath> <LibraryPath>../../../libs/;../../../sdks/dx9sdk/Lib/;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);</LibraryPath> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <LinkIncremental>false</LinkIncremental> <OutDir>../../../build/</OutDir> - <IncludePath>../../../source/;$(VC_IncludePath);$(WindowsSDK_IncludePath);../../../sdks/dx9sdk/Include/</IncludePath> + <IncludePath>../../../source/;$(VC_IncludePath);$(WindowsSDK_IncludePath);../../../sdks/dx9sdk/Include/;../../../sdks/bullet3/src</IncludePath> <LibraryPath>../../../libs/;../../../sdks/dx9sdk/Lib/;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);</LibraryPath> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> @@ -93,7 +93,10 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> + <ClCompile Include="..\..\..\source\skyxengine.cpp" /> <ClCompile Include="..\..\..\source\sxae\Camera.cpp" /> <ClCompile Include="..\..\..\source\sxae\Editor.cpp" /> <ClCompile Include="..\..\..\source\sxae\EditorTab.cpp" /> @@ -110,6 +113,10 @@ <ClCompile Include="..\..\..\source\anim\animated.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> + <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> + <ClInclude Include="..\..\..\source\SkyXEngine.h" /> <ClInclude Include="..\..\..\source\sxae\Camera.h" /> <ClInclude Include="..\..\..\source\sxae\Editor.h" /> <ClInclude Include="..\..\..\source\sxae\EditorTab.h" /> diff --git a/proj/sxae/vs2013/sxae.vcxproj.filters b/proj/sxae/vs2013/sxae.vcxproj.filters index 5174610779c42387142a66ce70fb3aa0999aa6f8..3c5b935d6c7164cdeaf3e484c093209403ffd38e 100644 --- a/proj/sxae/vs2013/sxae.vcxproj.filters +++ b/proj/sxae/vs2013/sxae.vcxproj.filters @@ -60,6 +60,15 @@ <ClCompile Include="..\..\..\source\common\string.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\skyxengine.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\source\sxae\resource.h"> @@ -104,6 +113,18 @@ <ClInclude Include="..\..\..\source\sxae\TabSkins.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\SkyXEngine.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\..\source\sxae\sxae.rc"> diff --git a/proj/sxcore/vs2013/sxcore.vcxproj b/proj/sxcore/vs2013/sxcore.vcxproj index 34244c1dc769405f733ab304ca9a22384eb4f74f..3aeefd39acd1d590194d9d47be2fd94e58b5b3e0 100644 --- a/proj/sxcore/vs2013/sxcore.vcxproj +++ b/proj/sxcore/vs2013/sxcore.vcxproj @@ -11,6 +11,9 @@ </ProjectConfiguration> </ItemGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> + <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\core\concmd.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> @@ -31,6 +34,9 @@ <ClCompile Include="..\..\..\source\core\time.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> + <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\core\concmd.h" /> <ClInclude Include="..\..\..\source\core\concurrent_queue.h" /> <ClInclude Include="..\..\..\source\core\Config.h" /> diff --git a/proj/sxcore/vs2013/sxcore.vcxproj.filters b/proj/sxcore/vs2013/sxcore.vcxproj.filters index 6aa1af4e4310c2ada54896a56e21d95bfe983258..6978dbd103b77d707875d53992f0db25aac002e4 100644 --- a/proj/sxcore/vs2013/sxcore.vcxproj.filters +++ b/proj/sxcore/vs2013/sxcore.vcxproj.filters @@ -16,9 +16,6 @@ <ClCompile Include="..\..\..\source\core\time.cpp"> <Filter>Source</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\core\file.cpp"> - <Filter>Source</Filter> - </ClCompile> <ClCompile Include="..\..\..\source\core\Task.cpp"> <Filter>Source</Filter> </ClCompile> @@ -28,6 +25,18 @@ <ClCompile Include="..\..\..\source\core\Config.cpp"> <Filter>Source</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\string.cpp"> + <Filter>Source</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\core\file.cpp"> + <Filter>Source</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <Filter Include="Source"> @@ -77,5 +86,14 @@ <ClInclude Include="..\..\..\source\core\Config.h"> <Filter>Header</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\string.h"> + <Filter>Header</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header</Filter> + </ClInclude> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxdecals/vs2013/sxdecals.vcxproj b/proj/sxdecals/vs2013/sxdecals.vcxproj index b4bd6708bec3d682e3807bfa235b6adfae4c0c97..1b227e27c4d5773b3de3144d587f426f656511a1 100644 --- a/proj/sxdecals/vs2013/sxdecals.vcxproj +++ b/proj/sxdecals/vs2013/sxdecals.vcxproj @@ -15,6 +15,7 @@ <ClCompile Include="..\..\..\source\decals\sxdecals_dll.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\decals\DecalManager.h" /> <ClInclude Include="..\..\..\source\decals\sxdecals.h" /> </ItemGroup> diff --git a/proj/sxdecals/vs2013/sxdecals.vcxproj.filters b/proj/sxdecals/vs2013/sxdecals.vcxproj.filters index e7da2bd98a39bfbb8fb1a0ce6422ad85ce37cb14..a4b01061ed910a5ef618fa83865ab69c66248e71 100644 --- a/proj/sxdecals/vs2013/sxdecals.vcxproj.filters +++ b/proj/sxdecals/vs2013/sxdecals.vcxproj.filters @@ -29,5 +29,8 @@ <ClInclude Include="..\..\..\source\decals\sxdecals.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxgcore/vs2013/sxgcore.vcxproj b/proj/sxgcore/vs2013/sxgcore.vcxproj index d5e0ae7036c498d59901a48f773670dce42cd4f4..d74f390dc2cd689d5b01900df0a46c0b1ff17381 100644 --- a/proj/sxgcore/vs2013/sxgcore.vcxproj +++ b/proj/sxgcore/vs2013/sxgcore.vcxproj @@ -94,7 +94,9 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\gcore\bound.cpp" /> <ClCompile Include="..\..\..\source\gcore\camera.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> @@ -125,7 +127,9 @@ <ClCompile Include="..\..\..\source\gcore\sxgcore_dll.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\gcore\bound.h" /> <ClInclude Include="..\..\..\source\gcore\camera.h" /> <ClInclude Include="..\..\..\source\gcore\creatortextures.h" /> diff --git a/proj/sxgcore/vs2013/sxgcore.vcxproj.filters b/proj/sxgcore/vs2013/sxgcore.vcxproj.filters index 7952574c740b34f1842f86938a7f081a7c7065e8..36cfc4945d92bdeac9c628ef69a25010247a1c0e 100644 --- a/proj/sxgcore/vs2013/sxgcore.vcxproj.filters +++ b/proj/sxgcore/vs2013/sxgcore.vcxproj.filters @@ -34,6 +34,12 @@ <ClCompile Include="..\..\..\source\gcore\loader_static.cpp"> <Filter>Source</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <Filter Include="Source"> @@ -77,5 +83,11 @@ <ClInclude Include="..\..\..\source\gcore\loader_static.h"> <Filter>Header</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header</Filter> + </ClInclude> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxgenpreview/vs2013/sxgenpreview.vcxproj b/proj/sxgenpreview/vs2013/sxgenpreview.vcxproj new file mode 100644 index 0000000000000000000000000000000000000000..8a3e22b164c16616fb48be3585921fe51b0726a9 --- /dev/null +++ b/proj/sxgenpreview/vs2013/sxgenpreview.vcxproj @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{D381001E-C1FF-415F-A269-5264AD9013D5}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>sxgenpreview</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>../../../build/</OutDir> + <TargetName>$(ProjectName)</TargetName> + <IncludePath>../../../source;../../../sdks/bullet3/src;$(VC_IncludePath);$(WindowsSDK_IncludePath);../../../sdks/dx9sdk/Include;../../../sdks/ogg/libvorbis/include/;../../../sdks/ogg/libogg/include/;</IncludePath> + <LibraryPath>../../../libs;$(LibraryPath);../../../sdks/dx9sdk/Lib</LibraryPath> + <SourcePath>../../../source;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);../../../sdks/dx9sdk/Include</SourcePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>../../../build/</OutDir> + <IncludePath>../../../source;../../../sdks/bullet3/src;$(VC_IncludePath);$(WindowsSDK_IncludePath);../../../sdks/dx9sdk/Include;../../../sdks/ogg/libvorbis/include/;../../../sdks/ogg/libogg/include/;</IncludePath> + <LibraryPath>../../../libs;$(LibraryPath);../../../sdks/dx9sdk/Lib</LibraryPath> + <SourcePath>../../../source;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);../../../sdks/dx9sdk/Include</SourcePath> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level1</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(ProjectDir)$(TargetName).pdb</ProgramDatabaseFile> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level1</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>false</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <ProgramDatabaseFile>$(ProjectDir)$(TargetName).pdb</ProgramDatabaseFile> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> + <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> + <ClCompile Include="..\..\..\source\skyxengine.cpp" /> + <ClCompile Include="..\..\..\source\sxgenpreview\sxgenpreview.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> + <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> + <ClInclude Include="..\..\..\source\SkyXEngine.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/proj/sxgenpreview/vs2013/sxgenpreview.vcxproj.filters b/proj/sxgenpreview/vs2013/sxgenpreview.vcxproj.filters new file mode 100644 index 0000000000000000000000000000000000000000..a5742b1b70341c23aef02f681aa3f9f712a015a8 --- /dev/null +++ b/proj/sxgenpreview/vs2013/sxgenpreview.vcxproj.filters @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\..\source\sxgenpreview\sxgenpreview.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\skyxengine.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\source\SkyXEngine.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/proj/sxguiwinapi/vs2013/sxguiwinapi.vcxproj b/proj/sxguiwinapi/vs2013/sxguiwinapi.vcxproj index 81dba1f1671597ca11958a0cd90f84a40ddabf05..9fed0e9a4ba53d15b32d4dc9e9138581ca098add 100644 --- a/proj/sxguiwinapi/vs2013/sxguiwinapi.vcxproj +++ b/proj/sxguiwinapi/vs2013/sxguiwinapi.vcxproj @@ -11,109 +11,61 @@ </ProjectConfiguration> </ItemGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> + <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\base.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\base_wnd.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\button.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\checkbox.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\combobox.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\dialog_select_dir.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\dialog_select_file.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\edit.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\groupbox.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\hint.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\img_button.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\listbox.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\listview.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\memo.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\menu.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\progressbar.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\radiobutton.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\static.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\statusbar.cpp" /> <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI.cpp" /> <ClCompile Include="..\..\..\source\SXGUIWinApi\sxguiwinapi_dll.cpp" /> - <ClCompile Include="..\..\..\source\SXGUIWinApi\sxgui_base.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_base_wnd.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_button.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_check_box.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_combo_box.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_edit.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_group_box.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_hint.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\sxgui_img_button.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_list_box.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_list_view.cpp" /> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_memo.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\sxgui_menu.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_progress_bar.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_radio_button.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_static.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_status_bar.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_toolbar.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_track_bar.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_up_down.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> - </ClCompile> + <ClCompile Include="..\..\..\source\SXGUIWinApi\toolbar.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\trackbar.cpp" /> + <ClCompile Include="..\..\..\source\SXGUIWinApi\updown.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> + <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\base.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\base_wnd.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\button.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\checkbox.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\combobox.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\dialog_select_dir.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\dialog_select_file.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\edit.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\groupbox.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\hint.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\img_button.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\listbox.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\listview.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\memo.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\menu.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\progressbar.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\radiobutton.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\static.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\statusbar.h" /> <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\sxgui_base.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_base_wnd.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\sxgui_button.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_check_box.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_combo_box.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\sxgui_edit.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_group_box.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_hint.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_img_button.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_list_box.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_list_view.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_memo.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_menu.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_progress_bar.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_radio_button.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_static.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_status_bar.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_toolbar.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_toolbar_sx.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_track_bar.h" /> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_up_down.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\toolbar.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\trackbar.h" /> + <ClInclude Include="..\..\..\source\SXGUIWinApi\updown.h" /> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{0292BE32-298E-4E18-BC42-5A39F9487EBA}</ProjectGuid> diff --git a/proj/sxguiwinapi/vs2013/sxguiwinapi.vcxproj.filters b/proj/sxguiwinapi/vs2013/sxguiwinapi.vcxproj.filters index 92101370ec7f8bdb96dde0fb371f1fa4bba93ff3..346c7ffdd25cb87feb4a2aeefb7544f1feb33b85 100644 --- a/proj/sxguiwinapi/vs2013/sxguiwinapi.vcxproj.filters +++ b/proj/sxguiwinapi/vs2013/sxguiwinapi.vcxproj.filters @@ -15,138 +15,165 @@ </Filter> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_base_wnd.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\sxguiwinapi_dll.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_button.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_check_box.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\trackbar.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_combo_box.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\updown.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_edit.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\base.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_group_box.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\base_wnd.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_hint.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\button.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\sxgui_img_button.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\checkbox.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_list_box.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\combobox.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_memo.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\edit.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\sxgui_menu.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\groupbox.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_progress_bar.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\hint.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_radio_button.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\img_button.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_static.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\listbox.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_status_bar.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\listview.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_toolbar.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\memo.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_track_bar.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\menu.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_up_down.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\progressbar.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\sxguiwinapi_dll.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\radiobutton.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\sxgui_base.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\static.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI.cpp"> + <ClCompile Include="..\..\..\source\SXGUIWinApi\statusbar.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\SXGUIWinApi\toolbar.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\SXGUIWinApi\dialog_select_dir.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\SXGUIWinApi\dialog_select_file.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\SXGUIWinApi\SXGUI_list_view.cpp"> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> <Filter>Source Files</Filter> </ClCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\..\source\SXGUIWinApi\sxgui_button.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_check_box.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\statusbar.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_combo_box.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\toolbar.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\sxgui_edit.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\trackbar.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_group_box.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\updown.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_hint.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\base.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_img_button.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\base_wnd.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_list_box.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\button.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_memo.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\checkbox.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_menu.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\combobox.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_progress_bar.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\edit.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_radio_button.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\groupbox.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_static.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\hint.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_status_bar.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\img_button.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_toolbar.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\listbox.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_toolbar_sx.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\listview.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_track_bar.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\memo.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_up_down.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\menu.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\progressbar.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\SXGUIWinApi\radiobutton.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\SXGUIWinApi\static.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\SXGUIWinApi\dialog_select_dir.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\sxgui_base.h"> + <ClInclude Include="..\..\..\source\SXGUIWinApi\dialog_select_file.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_base_wnd.h"> + <ClInclude Include="..\..\..\source\common\file_utils.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\source\SXGUIWinApi\SXGUI_list_view.h"> + <ClInclude Include="..\..\..\source\common\string_utils.h"> <Filter>Header Files</Filter> </ClInclude> </ItemGroup> diff --git a/proj/sxlevel/vs2013/sxlevel.vcxproj b/proj/sxlevel/vs2013/sxlevel.vcxproj index 334d962fe99444b5dabb829044ebc89ec583baf2..e891afd1ac60e0aa765210f62cbceb7bb26d948e 100644 --- a/proj/sxlevel/vs2013/sxlevel.vcxproj +++ b/proj/sxlevel/vs2013/sxlevel.vcxproj @@ -40,7 +40,7 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> + <LinkIncremental>false</LinkIncremental> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);../../../source;../../../sdks/bullet3/src;../../../sdks/dx9sdk/Include;</IncludePath> <LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);../../../libs;../../../sdks/dx9sdk/Lib</LibraryPath> <SourcePath>$(VC_SourcePath);../../../source;../../../sdks/bullet3/src;../../../sdks/dx9sdk/Include;</SourcePath> @@ -92,7 +92,9 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\level\AmbientSounds.cpp" /> <ClCompile Include="..\..\..\source\level\level.cpp" /> <ClCompile Include="..\..\..\source\level\sxlevel.cpp" /> @@ -100,7 +102,9 @@ <ClCompile Include="..\..\..\source\level\weather.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\level\AmbientSounds.h" /> <ClInclude Include="..\..\..\source\level\level.h" /> <ClInclude Include="..\..\..\source\level\sxlevel.h" /> diff --git a/proj/sxlevel/vs2013/sxlevel.vcxproj.filters b/proj/sxlevel/vs2013/sxlevel.vcxproj.filters index 520675be86801a5374a728eb69432f504ac84d10..ed67031cb4a2925b8a2b864ed355910b2ffc7dec 100644 --- a/proj/sxlevel/vs2013/sxlevel.vcxproj.filters +++ b/proj/sxlevel/vs2013/sxlevel.vcxproj.filters @@ -33,6 +33,12 @@ <ClCompile Include="..\..\..\source\common\string.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\source\level\Weather.h"> @@ -50,5 +56,11 @@ <ClInclude Include="..\..\..\source\common\string.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxleveleditor/vs2013/sxleveleditor.vcxproj b/proj/sxleveleditor/vs2013/sxleveleditor.vcxproj index e5d12dfd4da83be290f2e850322cc1accd068ac5..dbad1dc4f9b557416f7b58a4d5c7ad51d01cfb66 100644 --- a/proj/sxleveleditor/vs2013/sxleveleditor.vcxproj +++ b/proj/sxleveleditor/vs2013/sxleveleditor.vcxproj @@ -90,7 +90,9 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\editors_utils\axes_helper.cpp" /> <ClCompile Include="..\..\..\source\skyxengine.cpp" /> <ClCompile Include="..\..\..\source\sxleveleditor\aigrid_callback.cpp" /> @@ -119,7 +121,9 @@ <ResourceCompile Include="..\..\..\source\sxleveleditor\SXLevelEditor.rc" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\editors_utils\axes_helper.h" /> <ClInclude Include="..\..\..\source\gdefines.h" /> <ClInclude Include="..\..\..\source\SkyXEngine.h" /> diff --git a/proj/sxleveleditor/vs2013/sxleveleditor.vcxproj.filters b/proj/sxleveleditor/vs2013/sxleveleditor.vcxproj.filters index b21656abecd2d6153dd43f3d73d1c4dc7490c135..296864c6be46d31a428388c5e0b14eb961a258d5 100644 --- a/proj/sxleveleditor/vs2013/sxleveleditor.vcxproj.filters +++ b/proj/sxleveleditor/vs2013/sxleveleditor.vcxproj.filters @@ -45,6 +45,12 @@ <ClCompile Include="..\..\..\source\common\string.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\..\source\sxleveleditor\SXLevelEditor.rc"> @@ -85,6 +91,12 @@ <ClInclude Include="..\..\..\source\common\string.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <Image Include="..\..\..\source\sxleveleditor\resource\new.bmp"> diff --git a/proj/sxmaterialeditor/vs2013/sxmaterialeditor.vcxproj b/proj/sxmaterialeditor/vs2013/sxmaterialeditor.vcxproj index 90a9a462f75bbeb3dbd7658e1e868c8e712225b3..2186261308d36b9f3493a0ccb6957f6bd28def4c 100644 --- a/proj/sxmaterialeditor/vs2013/sxmaterialeditor.vcxproj +++ b/proj/sxmaterialeditor/vs2013/sxmaterialeditor.vcxproj @@ -90,7 +90,9 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\skyxengine.cpp" /> <ClCompile Include="..\..\..\source\sxmaterialeditor\buttons_callback.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> @@ -127,7 +129,9 @@ </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\source\common\array.h" /> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\common\SXMath.h" /> <ClInclude Include="..\..\..\source\gdefines.h" /> <ClInclude Include="..\..\..\source\SkyXEngine.h" /> diff --git a/proj/sxmaterialeditor/vs2013/sxmaterialeditor.vcxproj.filters b/proj/sxmaterialeditor/vs2013/sxmaterialeditor.vcxproj.filters index 0ced6a793416d96ef5773161055a275c763b3706..e38e4d4de3f91e31b52d6a7b63ee94bdba8a6aee 100644 --- a/proj/sxmaterialeditor/vs2013/sxmaterialeditor.vcxproj.filters +++ b/proj/sxmaterialeditor/vs2013/sxmaterialeditor.vcxproj.filters @@ -45,6 +45,12 @@ <ClCompile Include="..\..\..\source\common\string.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\..\source\sxmaterialeditor\SXMaterialEditor.rc"> @@ -91,6 +97,12 @@ <ClInclude Include="..\..\..\source\common\array.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <Image Include="resource\save.bmp"> diff --git a/proj/sxmtllight/vs2013/sxmtllight.vcxproj b/proj/sxmtllight/vs2013/sxmtllight.vcxproj index f32c0d568160b553684ee7c5f9039891a376b30e..4014c0d4cf35e7a336a2e5f080eed5308f69544f 100644 --- a/proj/sxmtllight/vs2013/sxmtllight.vcxproj +++ b/proj/sxmtllight/vs2013/sxmtllight.vcxproj @@ -93,7 +93,9 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\mtllight\light.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> @@ -121,7 +123,9 @@ <ClCompile Include="..\..\..\source\mtllight\sxmtllight_dll.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\mtllight\light.h" /> <ClInclude Include="..\..\..\source\mtllight\material.h" /> <ClInclude Include="..\..\..\source\mtllight\ml_data.h" /> diff --git a/proj/sxmtllight/vs2013/sxmtllight.vcxproj.filters b/proj/sxmtllight/vs2013/sxmtllight.vcxproj.filters index 448c8e3ff4ddf74ac0a25796620daf5bbd849e8b..4990307c104a7da2d9c51939f38654e07ea7ab7f 100644 --- a/proj/sxmtllight/vs2013/sxmtllight.vcxproj.filters +++ b/proj/sxmtllight/vs2013/sxmtllight.vcxproj.filters @@ -23,6 +23,12 @@ <ClCompile Include="..\..\..\source\common\string.cpp"> <Filter>Source</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <Filter Include="Source"> @@ -54,5 +60,11 @@ <ClInclude Include="..\..\..\source\common\string.h"> <Filter>Headers</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Headers</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Headers</Filter> + </ClInclude> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxparticles/vs2013/sxparticles.vcxproj b/proj/sxparticles/vs2013/sxparticles.vcxproj index 08adde773b47738fa7fc7a54516f51f6c7356aa0..014e113104e62aa3911d304f39ba004bf1d658f9 100644 --- a/proj/sxparticles/vs2013/sxparticles.vcxproj +++ b/proj/sxparticles/vs2013/sxparticles.vcxproj @@ -93,7 +93,9 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\particles\effect.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> @@ -110,7 +112,9 @@ <ClCompile Include="..\..\..\source\particles\sxparticles_dll.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\particles\effect.h" /> <ClInclude Include="..\..\..\source\particles\emitter.h" /> <ClInclude Include="..\..\..\source\particles\PESet.h" /> diff --git a/proj/sxparticles/vs2013/sxparticles.vcxproj.filters b/proj/sxparticles/vs2013/sxparticles.vcxproj.filters index e62fcdcac7460073f33419e1f3e1f3de6b5fbf87..ecdb3694a068c26b086a2dd8273b3b6b77a5e86b 100644 --- a/proj/sxparticles/vs2013/sxparticles.vcxproj.filters +++ b/proj/sxparticles/vs2013/sxparticles.vcxproj.filters @@ -33,6 +33,12 @@ <ClCompile Include="..\..\..\source\common\string.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\source\particles\effect.h"> @@ -50,5 +56,11 @@ <ClInclude Include="..\..\..\source\common\string.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxparticleseditor/vs2013/sxparticleseditor.vcxproj b/proj/sxparticleseditor/vs2013/sxparticleseditor.vcxproj index 4061dcb57db03465415fc14d172ba81cc1204e99..0f58e6331522319d8ea1560d7897f361f97f95c5 100644 --- a/proj/sxparticleseditor/vs2013/sxparticleseditor.vcxproj +++ b/proj/sxparticleseditor/vs2013/sxparticleseditor.vcxproj @@ -90,7 +90,9 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\skyxengine.cpp" /> <ClCompile Include="..\..\..\source\sxparticleseditor\callback_common.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> @@ -110,7 +112,9 @@ <ClCompile Include="..\..\..\source\sxparticleseditor\sxparticleseditor.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\gdefines.h" /> <ClInclude Include="..\..\..\source\SkyXEngine.h" /> <ClInclude Include="..\..\..\source\sxparticleseditor\callback_common.h" /> diff --git a/proj/sxparticleseditor/vs2013/sxparticleseditor.vcxproj.filters b/proj/sxparticleseditor/vs2013/sxparticleseditor.vcxproj.filters index 994bf2bf5776c6d5df1e5c95cd1b8b6c08ffe2b6..9f8f4897b5e8f8c5c0e46d8d06d05fe249b669a9 100644 --- a/proj/sxparticleseditor/vs2013/sxparticleseditor.vcxproj.filters +++ b/proj/sxparticleseditor/vs2013/sxparticleseditor.vcxproj.filters @@ -39,6 +39,12 @@ <ClCompile Include="..\..\..\source\skyxengine.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\source\sxparticleseditor\resource.h"> @@ -68,6 +74,12 @@ <ClInclude Include="..\..\..\source\SkyXEngine.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\..\source\sxparticleseditor\sxparticleseditor.rc"> diff --git a/proj/sxphysics/vs2013/sxphysics.vcxproj b/proj/sxphysics/vs2013/sxphysics.vcxproj index 334ac37c21a03c935b8a5b3d26c79cca23aa0acf..0ab51ba448dec6e599d0a3c38265b3b071eb1ff5 100644 --- a/proj/sxphysics/vs2013/sxphysics.vcxproj +++ b/proj/sxphysics/vs2013/sxphysics.vcxproj @@ -20,14 +20,14 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v120_xp</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v120_xp</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> @@ -91,10 +91,16 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> + <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\physics\PhyWorld.cpp" /> <ClCompile Include="..\..\..\source\physics\sxphysics_dll.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> + <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\physics\PhyWorld.h" /> <ClInclude Include="..\..\..\source\physics\sxphysics.h" /> </ItemGroup> diff --git a/proj/sxphysics/vs2013/sxphysics.vcxproj.filters b/proj/sxphysics/vs2013/sxphysics.vcxproj.filters index c6d75bcbb01e0ed7534a5b4d628fe324bd9692c8..d00f250ee33f52a3afb52da86604de8a1a6534b5 100644 --- a/proj/sxphysics/vs2013/sxphysics.vcxproj.filters +++ b/proj/sxphysics/vs2013/sxphysics.vcxproj.filters @@ -21,6 +21,15 @@ <ClCompile Include="..\..\..\source\physics\PhyWorld.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\string.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\source\physics\sxphysics.h"> @@ -29,5 +38,14 @@ <ClInclude Include="..\..\..\source\physics\PhyWorld.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\string.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxrender/vs2013/sxrender.vcxproj b/proj/sxrender/vs2013/sxrender.vcxproj index 04f059f164f4b855517746a2ca1f9c1021092d16..604dec586d13245adccf6cbe0897f67cd7294c54 100644 --- a/proj/sxrender/vs2013/sxrender.vcxproj +++ b/proj/sxrender/vs2013/sxrender.vcxproj @@ -40,7 +40,7 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> + <LinkIncremental>false</LinkIncremental> <OutDir>../../../build/</OutDir> <TargetName>$(ProjectName)_d</TargetName> <SourcePath>$(VC_SourcePath);../../../source;../../../sdks/dx9sdk/Include</SourcePath> @@ -93,6 +93,9 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> + <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\render\camera_update.h" /> <ClInclude Include="..\..\..\source\render\editor\axes_static.h" /> <ClInclude Include="..\..\..\source\render\editor\grid.h" /> @@ -102,6 +105,9 @@ <ClInclude Include="..\..\..\source\render\sxrender.h" /> </ItemGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> + <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\render\camera_update.cpp" /> <ClCompile Include="..\..\..\source\render\editor\axes_static.cpp" /> <ClCompile Include="..\..\..\source\render\editor\grid.cpp" /> diff --git a/proj/sxrender/vs2013/sxrender.vcxproj.filters b/proj/sxrender/vs2013/sxrender.vcxproj.filters index 86c5a5eed4f2af1099096cc32e0bf89607e7d34b..3efef1c990ccc0989b4d8e1706f904968b11903a 100644 --- a/proj/sxrender/vs2013/sxrender.vcxproj.filters +++ b/proj/sxrender/vs2013/sxrender.vcxproj.filters @@ -36,6 +36,15 @@ <ClInclude Include="..\..\..\source\render\editor\grid.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\string.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\..\source\render\camera_update.cpp"> @@ -59,5 +68,14 @@ <ClCompile Include="..\..\..\source\render\editor\axes_static.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\string.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxscore/vs2013/sxscore.vcxproj b/proj/sxscore/vs2013/sxscore.vcxproj index fdc0b888f7270c2ff394451b01c24e8bf2cfb49d..f7fc15c067034388ece2bf73087aebd997af0273 100644 --- a/proj/sxscore/vs2013/sxscore.vcxproj +++ b/proj/sxscore/vs2013/sxscore.vcxproj @@ -11,11 +11,18 @@ </ProjectConfiguration> </ItemGroup> <ItemGroup> + <ClCompile Include="..\..\..\source\common\file_utils.cpp" /> + <ClCompile Include="..\..\..\source\common\string.cpp" /> + <ClCompile Include="..\..\..\source\common\string_utils.cpp" /> <ClCompile Include="..\..\..\source\score\sound.cpp" /> <ClCompile Include="..\..\..\source\score\sxscore.cpp" /> <ClCompile Include="..\..\..\source\score\sxscore_dll.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\common\array.h" /> + <ClInclude Include="..\..\..\source\common\file_utils.h" /> + <ClInclude Include="..\..\..\source\common\string.h" /> + <ClInclude Include="..\..\..\source\common\string_utils.h" /> <ClInclude Include="..\..\..\source\score\sound.h" /> <ClInclude Include="..\..\..\source\score\sxscore.h" /> </ItemGroup> diff --git a/proj/sxscore/vs2013/sxscore.vcxproj.filters b/proj/sxscore/vs2013/sxscore.vcxproj.filters index 8af11aed22310378c8b210782c5499bc369e0a90..86412f4c9aad92a7efe6d68b34f46708a668f9ca 100644 --- a/proj/sxscore/vs2013/sxscore.vcxproj.filters +++ b/proj/sxscore/vs2013/sxscore.vcxproj.filters @@ -24,6 +24,15 @@ <ClCompile Include="..\..\..\source\score\sound.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\source\common\string.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\file_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\source\common\string_utils.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\source\score\sxscore.h"> @@ -32,5 +41,17 @@ <ClInclude Include="..\..\..\source\score\sound.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\common\array.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\file_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\common\string_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> </Project> \ No newline at end of file diff --git a/proj/sxwincreator/vs2013/sxwincreator.vcxproj b/proj/sxwincreator/vs2013/sxwincreator.vcxproj index 630822be6b95d3b4ac2dbad8f1e8521106ef7861..72f9bf985e7dd67b418ea4620578192af83d8cec 100644 --- a/proj/sxwincreator/vs2013/sxwincreator.vcxproj +++ b/proj/sxwincreator/vs2013/sxwincreator.vcxproj @@ -93,29 +93,30 @@ <ResourceCompile Include="..\..\..\source\sxwincreator\SXWinCreator.rc" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\..\..\source\sxwincreator\about_sxwincreator.h" /> + <ClInclude Include="..\..\..\source\sxwincreator\callbacks.h" /> <ClInclude Include="..\..\..\source\sxwincreator\resource.h" /> + <ClInclude Include="..\..\..\source\sxwincreator\sxwincreator.h" /> + <ClInclude Include="..\..\..\source\sxwincreator\sx_param_wnd_data.h" /> + <ClInclude Include="..\..\..\source\sxwincreator\WindowOutput.h" /> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\..\source\sxwincreator\about_sxwincreator.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\..\source\sxwincreator\callbacks.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> - </ClCompile> - <ClCompile Include="..\..\..\source\sxwincreator\create_current_gui.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\..\source\sxwincreator\sxwincreator.cpp" /> <ClCompile Include="..\..\..\source\sxwincreator\sx_param_wnd_data.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\..\source\sxwincreator\WindowOutput.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> diff --git a/proj/sxwincreator/vs2013/sxwincreator.vcxproj.filters b/proj/sxwincreator/vs2013/sxwincreator.vcxproj.filters index d919036eccf2284be2fbb23ac1a6bd67874712e3..d865749c0dccbe1768aab8fcbcdf2715ca1c2162 100644 --- a/proj/sxwincreator/vs2013/sxwincreator.vcxproj.filters +++ b/proj/sxwincreator/vs2013/sxwincreator.vcxproj.filters @@ -23,6 +23,21 @@ <ClInclude Include="..\..\..\source\sxwincreator\resource.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\..\..\source\sxwincreator\about_sxwincreator.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\sxwincreator\callbacks.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\sxwincreator\sx_param_wnd_data.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\sxwincreator\WindowOutput.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\source\sxwincreator\sxwincreator.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\..\source\sxwincreator\WindowOutput.cpp"> @@ -34,9 +49,6 @@ <ClCompile Include="..\..\..\source\sxwincreator\callbacks.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\source\sxwincreator\create_current_gui.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\source\sxwincreator\sx_param_wnd_data.cpp"> <Filter>Source Files</Filter> </ClCompile> diff --git a/source/GRegisterIndex.h b/source/GRegisterIndex.h index 2f6cff81b9478e9ccd2f4351362f3fe0b59fed06..42f3bdc72f177e193fe8d7a20ad0af2f0d141a7c 100644 --- a/source/GRegisterIndex.h +++ b/source/GRegisterIndex.h @@ -99,6 +99,8 @@ See the license in LICENSE #define G_RI_STRING_PATH_GS_MTRLS 12 /*!< путь до материалов */ #define G_RI_STRING_PATH_GS_GUI 13 /*!< путь до gui */ +#define G_RI_STRING_PATH_EDITOR_CACHE 14 /*!< путь до кэша редакторов */ + //!@} #endif diff --git a/source/SXGUIWinApi/SXGUI.cpp b/source/SXGUIWinApi/SXGUI.cpp index 3a9b6bfe7cfbef4a5064dad0ca7117dd04d823a4..1e8c98ca071e862da262a07faab1a4a867f91180 100644 --- a/source/SXGUIWinApi/SXGUI.cpp +++ b/source/SXGUIWinApi/SXGUI.cpp @@ -1,244 +1,380 @@ -/****************************************************** -Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017 +/*********************************************************** +Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 See the license in LICENSE -******************************************************/ - -#include <SXGUIWinApi\SXGUI.h> -#include <SXGUIWinApi\SXGUI_base.h> -#include <SXGUIWinApi\SXGUI_base_wnd.h> -#include <SXGUIWinApi\SXGUI_static.h> -#include <SXGUIWinApi\SXGUI_button.h> -#include <SXGUIWinApi\SXGUI_img_button.h> -#include <SXGUIWinApi\SXGUI_edit.h> -#include <SXGUIWinApi\SXGUI_up_down.h> -#include <SXGUIWinApi\SXGUI_memo.h> -#include <SXGUIWinApi\SXGUI_combo_box.h> -#include <SXGUIWinApi\SXGUI_list_box.h> -#include <SXGUIWinApi\SXGUI_list_view.h> -#include <SXGUIWinApi\SXGUI_group_box.h> -#include <SXGUIWinApi\SXGUI_progress_bar.h> -#include <SXGUIWinApi\SXGUI_radio_button.h> -#include <SXGUIWinApi\SXGUI_check_box.h> -#include <SXGUIWinApi\SXGUI_track_bar.h> -#include <SXGUIWinApi\SXGUI_status_bar.h> -#include <SXGUIWinApi\SXGUI_hint.h> -#include <SXGUIWinApi\SXGUI_menu.h> -#include <SXGUIWinApi\SXGUI_toolbar.h> - -ISXGUIBaseWnd* SXGUICrBaseWnd( - const char* class_name, const char* caption, const char* menu, - WORD id, int x, int y, WORD width, WORD heigth, +***********************************************************/ + +#include "SXGUI.h" +#include "base.h" +#include "base_wnd.h" +#include "static.h" +#include "button.h" +#include "img_button.h" +#include "edit.h" +#include "updown.h" +#include "memo.h" +#include "combobox.h" +#include "listbox.h" +#include "listview.h" +#include "groupbox.h" +#include "progressbar.h" +#include "radiobutton.h" +#include "checkbox.h" +#include "trackbar.h" +#include "statusbar.h" +#include "hint.h" +#include "menu.h" +#include "toolbar.h" + +//########################################################################## + +SX_LIB_API void SXGUIinit() +{ + WNDCLASS wcButtonImg; + + wcButtonImg.style = CS_HREDRAW | CS_VREDRAW; + wcButtonImg.lpfnWndProc = DefWindowProc; + wcButtonImg.cbClsExtra = 0; + wcButtonImg.cbWndExtra = 0; + wcButtonImg.hInstance = GetModuleHandle(0); + wcButtonImg.hIcon = 0; + wcButtonImg.hCursor = 0; + wcButtonImg.hbrBackground = 0; + wcButtonImg.lpszMenuName = 0; + wcButtonImg.lpszClassName = SXGUI_DEF_BUTTONIMG; + + RegisterClass(&wcButtonImg); + + + WNDCLASS wcGroupBox; + + wcGroupBox.style = CS_HREDRAW | CS_VREDRAW; + wcGroupBox.lpfnWndProc = DefWindowProc; + wcGroupBox.cbClsExtra = 0; + wcGroupBox.cbWndExtra = 0; + wcGroupBox.hInstance = GetModuleHandle(0); + wcGroupBox.hIcon = 0; + wcGroupBox.hCursor = 0; + wcGroupBox.hbrBackground = 0; + wcGroupBox.lpszMenuName = 0; + wcGroupBox.lpszClassName = SXGUI_DEF_GROUPBOX; + + RegisterClass(&wcGroupBox); + + + INITCOMMONCONTROLSEX icex; + + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_BAR_CLASSES; + InitCommonControlsEx(&icex); + + DialogOwnSelectDirInit(); + DialogOwnSelectFileInit(); +} + +//########################################################################## + +int g_iCountCreateWnd = 0; + +SX_LIB_API ISXGUIBaseWnd* SXGUICrBaseWnd( + const char *szCaption, + int iPosX, int iPosY, int iWidth, int iHeight, + DWORD dwExstyle, DWORD dwStyle, + HWND hParent, WNDPROC lpfnHandler, + ID idObj + ) +{ + char szClassName[64]; + sprintf(szClassName, "SXGUICrBaseWnd_$d", g_iCountCreateWnd); + ++g_iCountCreateWnd; + + return new CGUIBaseWnd(szClassName, szCaption, + iPosX, iPosY, iWidth, iHeight, + 0, 0, 0, + dwExstyle, CS_HREDRAW | CS_VREDRAW, dwStyle, + hParent, (lpfnHandler == 0 ? WndProcAllDefault : lpfnHandler), idObj); +} + +SX_LIB_API ISXGUIBaseWnd* SXGUICrBaseWndEx( + const char* class_name, const char *szCaption, + int iPosX, int iPosY, int iWidth, int iHeight, HICON icon, HCURSOR cursor, HBRUSH brush, - DWORD exstyle, DWORD wndstyle, DWORD style, - HWND parent, WNDPROC handler + DWORD dwExstyle, DWORD wndstyle, DWORD dwStyle, + HWND hParent, WNDPROC lpfnHandler, + ID idObj ) { - return new SXGUIBaseWnd(class_name, caption, menu, - id, x, y, width, heigth, + return new CGUIBaseWnd(class_name, szCaption, + iPosX, iPosY, iWidth, iHeight, icon, cursor, brush, - exstyle, wndstyle, style, - parent, (handler == 0 ? WndProcAllDefault : handler)); + dwExstyle, wndstyle, dwStyle, + hParent, (lpfnHandler == 0 ? WndProcAllDefault : lpfnHandler), idObj); } +//########################################################################## -ISXGUIStatic* SXGUICrStaticEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIStatic* SXGUICrStaticEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIStatic(caption, x, y, width, heigth, parent, handler, id); + return new CGUIStatic(szCaption, iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } -ISXGUIStatic* SXGUICrStatic(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIStatic* SXGUICrStatic(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIStatic(caption, x, y, width, heigth, parent, handler, id); + return new CGUIStatic(szCaption, iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } -ISXGUIStatic* SXGUICrStaticLine(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, bool vertical) +SX_LIB_API ISXGUIStatic* SXGUICrStaticLine(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj, bool vertical) { - return new SXGUIStatic(x, y, width, heigth, parent, handler, id, vertical); + return new CGUIStatic(iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj, vertical); } +//########################################################################## -ISXGUIButton* SXGUICrButtonEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIButton* SXGUICrButtonEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIButton(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIButton(szCaption, iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIButton* SXGUICrButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, int image, HWND parent, WNDPROC handler, DWORD id) + +SX_LIB_API ISXGUIButton* SXGUICrButton(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, SXGUI_BUTTON_IMAGE type_image, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIButton(caption, x, y, width, heigth, image, parent, handler, id); + return new CGUIButton(szCaption, iPosX, iPosY, iWidth, iHeight, type_image, hParent, lpfnHandler, idObj); } +//########################################################################## -ISXGUIButtonImg* SXGUICrButtonImgLoad(const char* path, WORD x, WORD y, WORD width, WORD heigth, DWORD alpha_color, DWORD bk_color, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIButtonImg* SXGUICrButtonImgLoad(const char* path, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwAlphaColor, DWORD dwBkColor, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIButtonImg(path, x, y, width, heigth, alpha_color, bk_color, parent, handler, id); + return new CGUIButtonImg(path, iPosX, iPosY, iWidth, iHeight, dwAlphaColor, dwBkColor, hParent, lpfnHandler, idObj); } -ISXGUIButtonImg* SXGUICrButtonImgRes(WORD button, WORD x, WORD y, WORD width, WORD heigth, DWORD alpha_color, DWORD bk_color, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIButtonImg* SXGUICrButtonImgRes(UINT uButton, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwAlphaColor, DWORD dwBkColor, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIButtonImg(button, x, y, width, heigth, alpha_color, bk_color, parent, handler, id); + return new CGUIButtonImg(uButton, iPosX, iPosY, iWidth, iHeight, dwAlphaColor, dwBkColor, hParent, lpfnHandler, idObj); } -ISXGUIEdit* SXGUICrEditEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +//########################################################################## + +SX_LIB_API ISXGUIEdit* SXGUICrEditEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIEdit(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIEdit(szCaption, iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIEdit* SXGUICrEdit(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIEdit* SXGUICrEdit(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIEdit(caption, x, y, width, heigth, parent, handler, id); + return new CGUIEdit(szCaption, iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } +//########################################################################## -ISXGUIUpDown* SXGUICrUpDownEx(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id, HWND buddy) +SX_LIB_API ISXGUIUpDown* SXGUICrUpDownEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj, HWND buddy) { - return new SXGUIUpDown(x, y, width, heigth, exstyle, style, parent, handler, id, buddy); + return new CGUIUpDown(iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj, buddy); } -ISXGUIUpDown* SXGUICrUpDown(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, HWND buddy, bool align_left) +SX_LIB_API ISXGUIUpDown* SXGUICrUpDown(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj, HWND buddy, bool align_left) { - return new SXGUIUpDown(x, y, width, heigth, parent, handler, id, buddy, align_left); + return new CGUIUpDown(iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj, buddy, align_left); } +//########################################################################## -ISXGUIMemo* SXGUICrMemoEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIMemo* SXGUICrMemoEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIMemo(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIMemo(szCaption, iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIMemo* SXGUICrMemo(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIMemo* SXGUICrMemo(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIMemo(caption, x, y, width, heigth, parent, handler, id); + return new CGUIMemo(szCaption, iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } +//########################################################################## -ISXGUIComboBox* SXGUICrComboBoxEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIComboBox* SXGUICrComboBoxEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIComboBox(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIComboBox(iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -//Їыруш: (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS -ISXGUIComboBox* SXGUICrComboBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +//Їыруш: (hParent != 0 ? WS_CHILD : 0) | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS +SX_LIB_API ISXGUIComboBox* SXGUICrComboBox(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIComboBox(caption, x, y, width, heigth, parent, handler, id); + return new CGUIComboBox(iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } +//########################################################################## -ISXGUIListBox* SXGUICrListBoxEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIListBox* SXGUICrListBoxEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIListBox(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIListBox(iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIListBox* SXGUICrListBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, bool miltiple_sel) +SX_LIB_API ISXGUIListBox* SXGUICrListBox(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj, bool miltiple_sel) { - return new SXGUIListBox(caption, x, y, width, heigth, parent, handler, id, miltiple_sel); + return new CGUIListBox(iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj, miltiple_sel); } -ISXGUIListView* SXGUICrListViewEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +//########################################################################## + +SX_LIB_API ISXGUIListView* SXGUICrListViewEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIListView(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIListView(iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIListView* SXGUICrListView(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIListView* SXGUICrListView(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIListView(caption, x, y, width, heigth, parent, handler, id); + return new CGUIListView(iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } +//########################################################################## + +SX_LIB_API ISXGUIHint* SXGUICrHint(HWND hParent) +{ + return new CGUIHint(hParent); +} -ISXGUIHint* SXGUICrHint(HWND parent) +SX_LIB_API ISXGUIHint* SXGUICrHintEx(HWND hParent, const char *szText, UINT uInit, UINT uAutopop) { - return new SXGUIHint(parent); + CGUIHint *pHint = new CGUIHint(hParent); + pHint->setText(szText); + pHint->setDelayTime(uInit, uAutopop); + + return pHint; } +//########################################################################## -ISXGUIGroupBox* SXGUICrGroupBoxEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIGroupBox* SXGUICrGroupBoxEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIGroupBox(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIGroupBox(szCaption, iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIGroupBox* SXGUICrGroupBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIGroupBox* SXGUICrGroupBox(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIGroupBox(caption, x, y, width, heigth, parent, handler, id); + return new CGUIGroupBox(szCaption, iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } +//########################################################################## -ISXGUIProgressBar* SXGUICrProgressBarEx(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIProgressBar* SXGUICrProgressBarEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIProgressBar(x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIProgressBar(iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIProgressBar* SXGUICrProgressBar(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, bool vertical, bool smooth) +SX_LIB_API ISXGUIProgressBar* SXGUICrProgressBar(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj, bool vertical, bool smooth) { - return new SXGUIProgressBar(x, y, width, heigth, parent, handler, id, vertical, smooth); + return new CGUIProgressBar(iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj, vertical, smooth); } +//########################################################################## -ISXGUIRadioButton* SXGUICrRadioButtonEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIRadioButton* SXGUICrRadioButtonEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIRadioButton(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIRadioButton(szCaption, iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIRadioButton* SXGUICrRadioButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIRadioButton* SXGUICrRadioButton(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIRadioButton(caption, x, y, width, heigth, parent, handler, id); + return new CGUIRadioButton(szCaption, iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } +//########################################################################## -ISXGUICheckBox* SXGUICrCheckBoxEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUICheckBox* SXGUICrCheckBoxEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUICheckBox(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUICheckBox(szCaption, iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUICheckBox* SXGUICrCheckBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, bool cb_3_state) +SX_LIB_API ISXGUICheckBox* SXGUICrCheckBox(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj, bool cb_3_state) { - return new SXGUICheckBox(caption, x, y, width, heigth, parent, handler, id, cb_3_state); + return new CGUICheckBox(szCaption, iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj, cb_3_state); } +//########################################################################## -ISXGUITrackBar* SXGUICrTrackBarEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUITrackBar* SXGUICrTrackBarEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUITrackBar(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUITrackBar(szCaption, iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUITrackBar* SXGUICrTrackBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUITrackBar* SXGUICrTrackBar(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUITrackBar(caption, x, y, width, heigth, parent, handler, id); + return new CGUITrackBar(szCaption, iPosX, iPosY, iWidth, iHeight, hParent, lpfnHandler, idObj); } +//########################################################################## -ISXGUIStatusBar* SXGUICrStatusBarEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIStatusBar* SXGUICrStatusBarEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIStatusBar(caption, x, y, width, heigth, exstyle, style, parent, handler, id); + return new CGUIStatusBar(szCaption, iPosX, iPosY, iWidth, iHeight, dwExstyle, dwStyle, hParent, lpfnHandler, idObj); } -ISXGUIStatusBar* SXGUICrStatusBar(const char* caption, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIStatusBar* SXGUICrStatusBar(const char *szCaption, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIStatusBar(caption, parent, handler, id); + return new CGUIStatusBar(szCaption, hParent, lpfnHandler, idObj); } +//########################################################################## -ISXGUIMenu* SXGUICrMenu() +SX_LIB_API ISXGUIMenuWindow* SXGUICrMenuWindow() { - return new SXGUIMenu(); + return new CGUIMenuWindow(); } -ISXGUIMenu* SXGUICrMenuEx(WORD menu) +SX_LIB_API ISXGUIMenuWindow* SXGUICrMenuWindowEx(UINT uResMenu) { - return new SXGUIMenu(menu); + return new CGUIMenuWindow(uResMenu); } +//########################################################################## -ISXGUIPopupMenu* SXGUICrPopupMenuEx(WORD menu) +SX_LIB_API ISXGUIPopupMenu* SXGUICrPopupMenuEx(UINT uResMenu) { - return new SXGUIPopupMenu(menu); + return new CGUIPopupMenu(uResMenu); } -ISXGUIPopupMenu* SXGUICrPopupMenu() +SX_LIB_API ISXGUIPopupMenu* SXGUICrPopupMenu() { - return new SXGUIPopupMenu(); + return new CGUIPopupMenu(); } +//########################################################################## -ISXGUIToolBar* SXGUICrToolBar(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) +SX_LIB_API ISXGUIToolBar* SXGUICrToolBar(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj) { - return new SXGUIToolBar(0, x, y, width, heigth, 0, 0, parent, handler, id); + return new CGUIToolBar(0, iPosX, iPosY, iWidth, iHeight, 0, 0, hParent, lpfnHandler, idObj); } + +//########################################################################## + +bool gui_func::scrollbar::InitScroolBars(ISXGUIControl *pControl, bool h, bool v) +{ + return ShowScrollBar(pControl->getHWND(), SB_HORZ, h ? 1 : 0) && ShowScrollBar(pControl->getHWND(), SB_VERT, v ? 1 : 0); +} + +bool gui_func::scrollbar::existsScrollBar(ISXGUIControl *pControl, SXGUI_SCROLL_TYPE scroll_type) +{ + long style = GetWindowLong(pControl->getHWND(), GWL_STYLE); + if (scroll_type == SXGUI_SCROLL_TYPE_V && style & WS_VSCROLL) + return true; + else if (scroll_type == SXGUI_SCROLL_TYPE_H && style & WS_HSCROLL) + return true; + return false; +} + +bool gui_func::scrollbar::ScrollLine(ISXGUIControl *pControl, SXGUI_SCROLL_TYPE scroll_type, SXGUI_SCROLL_DIR dir, int iCountString) +{ + long _scroll = scroll_type == SXGUI_SCROLL_TYPE_V ? WM_VSCROLL : WM_HSCROLL; + long _dir = 0; + if (_scroll == WM_VSCROLL) + _dir = dir == SXGUI_SCROLL_DIR_DOWN ? SB_LINEDOWN : SB_LINEUP /*SB_BOTTOM :SB_TOP*/; + else + _dir = dir == SXGUI_SCROLL_DIR_RIGTH ? SB_LINERIGHT : SB_LINELEFT /*SB_RIGHT :SB_LEFT*/; + + bool bf = true; + for (int i = 0; i<iCountString; i++) + { + bf = SendMessage(pControl->getHWND(), _scroll, _dir, 0); + } + + return bf;//SendMessage(Control->GetHWND(),_scroll,_dir,LPARAM(count)) == 0 ? true : false; +} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI.h b/source/SXGUIWinApi/SXGUI.h index fcad9b61f2ee4a196cadfab05742597c04e4ef7e..71295c6aa276c757df4fc3b10b646aff2b73257e 100644 --- a/source/SXGUIWinApi/SXGUI.h +++ b/source/SXGUIWinApi/SXGUI.h @@ -1,8 +1,8 @@ -/****************************************************** -Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017 +/*********************************************************** +Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 See the license in LICENSE -******************************************************/ +***********************************************************/ /*! \file @@ -10,23 +10,11 @@ See the license in LICENSE */ /*! \defgroup sxguiwinapi sxguiwinapi - библиотека графического пользовательского интерфейса реализованного на WinApi - \note Для начала нужно инициализировать как внутренние библиотеки так и новые компоненты зарегистрировать: -\code - -SXGUIRegClass::RegButtonImg(); -SXGUIRegClass::RegGroupBox(); - -INITCOMMONCONTROLSEX icex; - -icex.dwSize = sizeof(INITCOMMONCONTROLSEX); -icex.dwICC = ICC_BAR_CLASSES; -InitCommonControlsEx(&icex); -\endcode -@{ -*/ + \note Для начала нужно инициализировать вызвать функции инициализации #SXGUIinit +@{*/ -#ifndef __sxguiwinapi -#define __sxguiwinapi +#ifndef __SXGUIWINAPI_H +#define __SXGUIWINAPI_H #include <gdefines.h> @@ -47,177 +35,189 @@ InitCommonControlsEx(&icex); #define SX_LIB_API extern "C" __declspec (dllimport) #endif -/*! \name Определения для полос прокрутки (Scrool bar) -@{*/ +//########################################################################## -#define SXGUI_SCROLL_TYPE_HORZ 0 /*!< горизонтальный тип */ -#define SXGUI_SCROLL_TYPE_VERT 1 /*!< вертикальный тип */ +SX_LIB_API void SXGUIinit(); -#define SXGUI_SCROLL_DIR_UP 0 /*!< направление вверх */ -#define SXGUI_SCROLL_DIR_DOWN 1 /*!< направление вниз */ - -#define SXGUI_SCROLL_DIR_LEFT 0 /*!< направление влево */ -#define SXGUI_SCROLL_DIR_RIGTH 1 /*!< направление вправо */ - -//!@} - -//! максимальное количество обработчиков -#define SXGUI_COUNT_HANDLERS_MSG_IN_ARR 256 +//########################################################################## //! тип обработчика -typedef LRESULT(*HandlerMsg) (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +typedef LRESULT(*HandlerFunc) (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //! структура данных для обработчика -struct SXHandlerMsgStruct +struct CHandlerData { - HandlerMsg Handler; //!< сама функция, которая будет вызываться - UINT Msg; //!< код сообщения - WPARAM WParam; //!< WParam сообщения - bool BFCondiderWParam; //!< проверять WParam? - LPARAM LParam; //!< LParam сообщения - bool BFCondiderLParam; //!< проверять LParam - bool IsMainFunction; //!< главный ли это обработчик? true - значение возвращенное фунцией - возвращается WndProc, иначе нет + HandlerFunc m_fnHandler;//!< сама функция, которая будет вызываться + UINT m_uMsg; //!< код сообщения + WPARAM m_wParam; //!< WParam сообщения + bool m_needAllowW; //!< проверять WParam? + LPARAM m_lParam; //!< LParam сообщения + bool m_needAllowL; //!< проверять LParam + bool m_isMainFunction; //!< главный ли это обработчик? true - значение возвращенное фунцией - возвращается WndProc, иначе нет }; -//! структура, логическая, для определения тянуться ли стороны элемента за сторонами родителя -struct SXRectBool +//!Выравнивание текста в элементе +enum SXGUI_TEXT_ALIGN { - SXRectBool() - { - this->top = false; - this->left = false; - this->bottom = false; - this->right = false; - } - SXRectBool(bool _top, bool _left, bool _bottom, bool _right) - { - this->top = _top; - this->left = _left; - this->bottom = _bottom; - this->right = _right; - } - bool top; - bool left; - bool bottom; - bool right; + SXGUI_TEXT_ALIGN_LEFT = 0, /*!< по левому краю */ + SXGUI_TEXT_ALIGN_RIGHT, /*!< по правому краю */ + SXGUI_TEXT_ALIGN_CENTER, /*!< по центру */ }; -/*! \name Выравнивание текста в элементе -@{*/ - -#define SXGUI_TEXT_ALIGN_LEFT 0 /*!< по левому краю */ -#define SXGUI_TEXT_ALIGN_RIGHT 1 /*!< по правому краю */ -#define SXGUI_TEXT_ALIGN_CENTER 2 /*!< по центру */ +//! Стороны элемента +enum SXGUI_SIDE +{ + SXGUI_SIDE_TOP = 0, /*!< верх */ + SXGUI_SIDE_BOTTOM, /*!< низ */ + SXGUI_SIDE_RIGHT, /*!< правая сторона */ + SXGUI_SIDE_LEFT, /*!< левая сторона */ -//!@} + SXGUI_SIDE_COUNT +}; //############################################################################# -/*! -первый базовый класс, единственным родителем не используется, -определяет объект как контрол, то есть содержит в себе минимум данных для управления объектом +/*! Первый базовый класс, единственным родителем не используется, +определяет объект как control, то есть содержит в себе минимум данных для управления объектом */ struct ISXGUIControl : public IBaseObject { virtual ~ISXGUIControl(){}; - virtual void Init(HWND window_handle, HWND parent_handle, WNDPROC handler) = 0; //!< запоминаем дескрипторы, и устанавливаем новый обработчик - virtual HWND Parent() = 0; //!< возвращает HWND родителя - virtual bool Parent(HWND parent_handle) = 0; //!< устанавливает родителя + //! запоминаем дескрипторы, и устанавливаем новый обработчик + //virtual void init(HWND hWindow, HWND hParent, WNDPROC lpfnWndProc) = 0; - virtual HWND GetHWND() = 0; //!< возвращает свой HWND - virtual void Visible(bool bf) = 0; //!< установка видимости контрола - virtual bool Visible() = 0; //!< видим ли? + //! возвращает HWND родителя + virtual HWND getParent() = 0; - virtual void SetFocus() = 0; //!< установить фокус - virtual bool Focus() = 0; //!< установлен ли фокус? - - WNDPROC OldProc; //!< старый обработчик + //! устанавливает родителя + virtual bool setParent(HWND hParent) = 0; - /*! \name Пользовательские данные - @{*/ + //! возвращает свой HWND + virtual HWND getHWND() = 0; - virtual void * GetUserPtr() = 0; //!< получить пользовательские данные - virtual void * SetUserPtr(void *) = 0; //!< установить пользовательские данные - //!@} + //! установка видимости контрола + virtual void setVisible(bool isVisible) = 0; + + //! возвращает видим ли элемент + virtual bool getVisible() = 0; + + + //! установить фокус + virtual void setFocus() = 0; + + //! установлен ли фокус? + virtual bool getFocus() = 0; + + //! возвращает предыдущий обработчик + virtual WNDPROC getPrevWndProc() = 0; + + + //! получить пользовательские данные + virtual void* getUserPtr() = 0; + + //! установить пользовательские данные, возвращает предыдущее значение + virtual void* setUserPtr(void *ptr) = 0; }; +//############################################################################# -//! смотреть #ISXGUIHint +//! см. #ISXGUIHint struct ISXGUIHint; /*! Компонент - второй в очереди родитель, часто наследование идет именно от него, -более расширенное управление большинством элементов*/ +более расширенное управление большинством возможностей +*/ struct ISXGUIComponent : public virtual ISXGUIControl { virtual ~ISXGUIComponent(){}; /*! устанавливает необходимые данные для управления элементом - \note Необходимо вызывать после инициализации, то есть когда HWND уже получен*/ - virtual void InitComponent() = 0; + \note Необходимо вызывать после инициализации, то есть когда HWND уже получен + */ + virtual void initComponent() = 0; + + //! действителен ли элемент + virtual bool getEnable() = 0; + + //! установка действительности элемента + virtual void setEnable(bool isEnable) = 0; - virtual bool Enable() = 0; //!< действителен ли элемент - virtual void Enable(bool bf) = 0; //!< установка действительности элемента //! установка шрифта (с указанием значений) - virtual void SetFont( - const char* name, //!< имя шрифта, если name == 0 то не изменияем название шрифта, если name[0] == 0 то дефолтный шрифт gui - int height, //!< высота, если -1 то не учитываются - int width, //!< ширина, если -1 то не учитываются - int weight, //!< толщина от 1 до 1000 (400 - нормальный, 700 - полужирный), если -1 то не учитываются, 0 - толщина по умолчанию - int italic, //!< использовать ли стиль "наклонный", 1 - да, 0 - нет, -1 не учитываются - int underline, //!< использовать ли стиль "подчеркнутый", 1 - да, 0 - нет, -1 не учитываются - int strike_out //!< использовать ли стиль "зачеркнутый", 1 - да, 0 - нет, -1 не учитываются + virtual void setFont( + const char *szName, //!< имя шрифта, если name == 0 то не изменияем название шрифта, если name[0] == 0 то дефолтный шрифт gui + int iHeight, //!< высота, если -1 то не учитываются + int iWidth, //!< ширина, если -1 то не учитываются + int iWeight = -1, //!< толщина от 1 до 1000 (400 - нормальный, 700 - полужирный), если -1 то не учитываются, 0 - толщина по умолчанию + int iItalic = -1, //!< использовать ли стиль "наклонный", 1 - да, 0 - нет, -1 не учитываются + int iUnderline = -1,//!< использовать ли стиль "подчеркнутый", 1 - да, 0 - нет, -1 не учитываются + int iStrikeOut = -1 //!< использовать ли стиль "зачеркнутый", 1 - да, 0 - нет, -1 не учитываются ) = 0; - - virtual void SetFont(HFONT hfont) = 0; //!< установка шрифта из дескриптора - virtual HFONT GetFont() = 0; //!< возвращает дексриптор шрифта + //! установка шрифта из дескриптора + virtual void setHFont(HFONT hFont) = 0; + + //! возвращает дексриптор шрифта + virtual HFONT getHFont() = 0; - virtual bool IsParentFont() = 0; //!< наследуется ли шрифт родителя - virtual HFONT ParentFont() = 0; //!< получает родительский шрифт + + //! наследуется ли шрифт родителя + virtual bool hasParentFont() = 0; + + //! возвращает дескриптор родительскиго шрифта + virtual HFONT getParentHFont() = 0; //! модификация стилей - virtual bool ModifyStyle( - long style_add, //!< добавляемые стили, иначе 0 - long style_del //!< удаляемые стили, иначе 0 + virtual bool modifyStyle( + long lStyleAdd, //!< добавляемые стили, иначе 0 + long lStyleDel //!< удаляемые стили, иначе 0 ) = 0; //! миодицикация расширенных стилей - virtual bool ModifyExStyle( - long style_add, //!< добавляемые стили, иначе 0 - long style_del //!< удаляемые стили, иначе 0 + virtual bool modifyExStyle( + long lStyleAdd, //!< добавляемые стили, иначе 0 + long lStyleDel //!< удаляемые стили, иначе 0 ) = 0; //! устанавливает область окна RECT элемента в глобальных координатах - virtual bool SetWinRect( - RECT* rect, //!< устанавливаемый RECT - bool alignment_screen_space //!< использовать ли только работчую область (рабочий стол кроме панели задач) + virtual bool setWinRect( + const RECT *pRect, //!< устанавливаемый RECT + bool isBoundScreen //!< использовать ли только рабочую область (рабочий стол кроме панели задач) ) = 0; + //! возвращает область окна RECT элемента в глобальных координатах - virtual void GetWinRect(RECT* rect) = 0; + virtual void getWinRect(RECT *pRect) = 0; //! устанавливает клиентскую область RECT элемента в глобальных координатах - virtual bool SetClientRect( - RECT* rect, //!< устанавливаемый RECT - bool alignment_screen_space //!< использовать ли только рабочую область (рабочий стол кроме панели задач) + virtual bool setClientRect( + const RECT *pRect, //!< устанавливаемый RECT + bool isBoundScreen //!< использовать ли только рабочую область (рабочий стол кроме панели задач) ) = 0; + //! возвращает клиентскую область RECT элемента в глобальных координатах - virtual void GetClientRect(RECT* rect) = 0; + virtual void getClientRect(RECT *pRect) = 0; + /*! \name Всплывающая подсказка \note Первая установка видимости ShowHint(true) либо первая устновка текста #SetHintText инициализируют объект подсказки, до первого вызова функции #GetHintText записывают/возвращают 0 @{*/ - virtual void ShowHint(bool bf) = 0; //!< установка состояния видимости подсказки - virtual bool ShowHint() = 0; //!< возвращает: видима ли подсказка? + //! установка состояния видимости подсказки + virtual void setShowHint(bool isShowHint) = 0; - virtual void SetHintText(const char* text) = 0; //!< установить текст подсказки - virtual const char* GetHintText() = 0; //!< возвращает текст текущей подсказки - virtual void GetHintText(char* buf) = 0; //!< в buf записывает текст текущей подсказки + //! возвращает: видима ли подсказка? + virtual bool getShowHint() = 0; + + + //! установить текст подсказки + virtual void setHintText(const char *szText) = 0; + + //! возвращает текст текущей подсказки + virtual const char* getHintText() = 0; //!@} @@ -225,109 +225,141 @@ struct ISXGUIComponent : public virtual ISXGUIControl /*! \name Методы для цветов элемента @{*/ - //set/get цвет текста - virtual void SetColorText(BYTE r, BYTE g, BYTE b) = 0; //!< покомпонентная установка цвета текста - virtual void SetColorText(DWORD color) = 0; //!< установка цвета текста - virtual DWORD GetColorText() = 0; //!< возвращает текущее значение цвета текста + //! установка цвета текста + virtual void setColorText(DWORD dwColor) = 0; + + //! возвращает текущее значение цвета текста + virtual DWORD getColorText() = 0; + - //set/get прозрачность заднего фона текста - virtual void SetTransparentTextBk(bool bf) = 0; //!< установка прозрачности заднего фона - virtual bool GetTransparentTextBk() = 0; //!< установлена ли прозрачность заднего фона? + //! установка прозрачности заднего фона + virtual void setTransparentTextBk(bool isTransparent) = 0; - //set/get цвет заднего фона текста - virtual void SetColorTextBk(BYTE r, BYTE g, BYTE b) = 0;//!< покомпонентная установка цвета заднего фона текста - virtual void SetColorTextBk(DWORD color) = 0; //!< установка цвета заднего фона текста - virtual DWORD GetColorTextBk() = 0; //!< возвращает текущее значение цвета заднего фона текста + //! установлена ли прозрачность заднего фона? + virtual bool getTransparentTextBk() = 0; - //set/get цвет фона элемента - virtual bool SetColorBrush(BYTE r, BYTE g, BYTE b) = 0; //!< покомпонентная установка цвета фона - virtual bool SetColorBrush(DWORD color) = 0; //!< установка цвета фона - virtual DWORD GetColorBrush() = 0; //!< возвращает текущее значение цвета фона - virtual HBRUSH GetBrush() = 0; //!< возвращает дескриптор "кисти" фона + + //! установка цвета заднего фона текста + virtual void setColorTextBk(DWORD dwColor) = 0; + + //! возвращает текущее значение цвета заднего фона текста + virtual DWORD getColorTextBk() = 0; + + + //! установка цвета фона + virtual bool setColorBrush(DWORD dwColor) = 0; + + //! возвращает текущее значение цвета фона + virtual DWORD getColorBrush() = 0; + + //! возвращает дескриптор "кисти" фона + virtual HBRUSH getBrush() = 0; //!@} + /*! \name Функции для работы с обработчиками - Пример добавления основного обработчика: Wnd->AddHandler(MouseWheel,WM_MOUSEWHEEL,0,0,0,0,true);\n - Пример добавления второстепенного обработчика: Wnd->AddHandler(MouseWheel,WM_MOUSEWHEEL); \note функция обработчик должна соответствовать стандартной функции обработчику WinApi - \note main функция-обработчик может быть только одна и должна быть вообще, + \note main функция-обработчик может быть только одна, но если ее нет то в качестве возвращаемого значения будет использовано значение вызова функции: - для окон DefWindowProc(hwnd, msg, wParam, lParam), - для остальных компонентов CallWindowProc(Component->OldProc,hwnd, msg, wParam, lParam) @{*/ //! добавление обработчика - virtual bool AddHandler( - HandlerMsg Handler, //!< функция обработчик - UINT Msg, //!< сообщение реакция на которое обрабатывает функция обработчик + virtual void addHandler( + HandlerFunc fnHandler, //!< функция обработчик + UINT uMsg, //!< сообщение реакция на которое обрабатывает функция обработчик WPARAM wParam, //!< wParam функции обработчика при котором следует производить вызов функции обработчика - bool considerWparam,//!< учитывать ли wParam? если true то прежде вызова функции обработчика будет сравнение на равенство поступившего аргумента wParam с тем что указано было при вызове этой функции + bool needAllowW, //!< учитывать ли wParam? если true то прежде вызова функции обработчика будет сравнение на равенство поступившего аргумента wParam с тем что указано было при вызове этой функции LPARAM lParam, //!< lParam функции обработчика при котором следует производить вызов функции обработчика - bool considerLparam,//!< учитывать ли lParam? если true то прежде вызова функции обработчика будет сравнение на равенство поступившего аргумента lParam с тем что указано было при вызове этой функции + bool needAllowL, //!< учитывать ли lParam? если true то прежде вызова функции обработчика будет сравнение на равенство поступившего аргумента lParam с тем что указано было при вызове этой функции bool isMain //!< главная ли эта функция обработчик? если true то ее возвращаемое значение будет послано как результат обработки сообщения ) = 0; /*! добавление второстепенного обработчика \note Все что необъявлено из функции #AddHandler не учитывается */ - virtual bool AddHandler( - HandlerMsg Handler, //!< функция обработчик - UINT Msg //!< сообщение реакция на которое обрабатывает функция обработчик + virtual void addHandler( + HandlerFunc fnHandler, //!< функция обработчик + UINT uMsg //!< сообщение реакция на которое обрабатывает функция обработчик ) = 0; - //key - ключ в массиве обработчиков - virtual HandlerMsg GetHandlerFunction(int key) = 0; //!< возвращает функцию обработчик по порядковому номеру - virtual int GetCountKeyArrHandler() = 0; //!< количество ключей в массиве обработчиков + //! возвращает обработчик по id + virtual CHandlerData* getHandler(ID idHandler) = 0; - //все что касается данных сообщения - virtual UINT GetMsgHandler(int key) = 0; //!< код сообщения обработчика, по порядковому номеру key в общем массиве обработчиков для данного элемента - virtual WPARAM GetWParamHandler(int key) = 0; //!< wParam обработчика, по порядковому номеру key в общем массиве обработчиков для данного элемента - virtual bool GetConsiderWParamHandler(int key) = 0; //!< учитывать WParam? по порядковому номеру key в общем массиве обработчиков для данного элемента - virtual LPARAM GetLParamHandler(int key) = 0; //!< lParam обработчика, по порядковому номеру key в общем массиве обработчиков для данного элемента - virtual bool GetConsiderLParamHandler(int key) = 0; //!< учитывать LParam? по порядковому номеру key в общем массиве обработчиков для данного элемента + //! количество ключей в массиве обработчиков + virtual int getCountHandlers() = 0; - virtual bool IsMainFunction(int key) = 0; //!< это главная функция? по порядковому номеру key в общем массиве обработчиков для данного элемента - virtual LRESULT ExecuteHandler(int key, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) = 0; //!< вызвать функцию обработчик + //! вызвать функцию обработчик + virtual LRESULT executeHandler(ID idHandler, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) = 0; //!@} + /*! \name Обновление позиций относительно родителя @{*/ - virtual void UpdateSize() = 0; //!< обновление координат и размеров элемента относительно его родителя, обычно вызывается установленными обработчиками - virtual void UpdateRect() = 0; //!< обновление внутрненних данных для #UpdateSize + //! обновление координат и размеров элемента относительно его родителя, обычно вызывается установленными обработчиками + virtual void updateSize() = 0; + + //! обновление внутрненних данных для #UpdateSize + virtual void updateRect() = 0; - SXRectBool GAlign; //!< данные регулирующие размеры элемента при изменении размеров его родителя, каждый компонент SXRectBool установленный в true привязывает сторону элемента к его родителю изменяя ее при манипуляциях с изменением стороны с родителем + + //! закрепление сторон элемента за позициями его родителя, если сторона закреплена, то будет реагировать на изменения размеров родителя, по умолчанию все false + virtual void setFollowParentSides(bool canTop, bool canBottom, bool canRight, bool canLeft) = 0; + + //! закрепление стороны элемента за позициями его родителя + virtual void setFollowParentSide(SXGUI_SIDE side, bool can) = 0; + + //! закреплена ли сторона за родителем? + virtual bool getFollowParentSide(SXGUI_SIDE side) = 0; //!@} + /*! \name Данные регулирующие будет ли передвигаться определнная сторона при изменении размеров с этой стороны \note true - можно тянуть за сторону изменяя размер, false - тянуть за сторону не получится @{*/ - bool BFSizingChangeTop; //!< верх - bool BFSizingChangeBottom; //!< низ - bool BFSizingChangeRight; //!< право - bool BFSizingChangeLeft; //!< лево + //! установка возможности растягивать элемент за стороны, по умолчанию все true + virtual void setStretchSides(bool canTop, bool canBottom, bool canRight, bool canLeft) = 0; + + //! установка возможности растягивать элемент за сторонe + virtual void setStretchSide(SXGUI_SIDE side, bool can) = 0; + + //! возвращает можно ли растягивать элемент за сторону + virtual bool getStretchSide(SXGUI_SIDE side) = 0; //!@} - //bool BFMinSize; //!< установлен ли минимальный размер? если да то меньше чем #MinSizeX и #MinSizeY не будет уменьшаться - WORD MinSizeX; //!< минимальный размер окна по ширине - WORD MinSizeY; //!< минимальный размер окна по высоте + //! установить минимальные размеры окна, установливать надо оба, один работать не будет, по умолчанию 0 - нет минмума + virtual void setMixSize(UINT uMinWidth, UINT uMinHeght) = 0; + + //! возвращает минимальную ширину + virtual UINT getMinWidth() = 0; + + //! возвращает минимальную высоту + virtual UINT getMinHeight() = 0; }; -/*! третий (если нужен текст) родитель, непосредтсвенно не используется, -характеризует элемент как содержащий единый текст (аля кэпшен) текстовый компонент -*/ +//########################################################################## + +/*! Элемент содержащий текст, название */ struct ISXGUITextual : public virtual ISXGUIComponent { virtual ~ISXGUITextual(){}; - virtual bool SetText(const char* text) = 0; //!< установка текста - virtual void GetText(char* buf, int size) = 0; //!< записывает в buf текущий текст элемента, не больше size - virtual int GetTextLen() = 0; //!< возвращает размер строки + + //! установка текста + virtual bool setText(const char *szStr) = 0; + + //! записывает в buf текущий текст элемента, не больше size + virtual void getText(char *szBuf, int iSize) = 0; + + //! возвращает размер строки + virtual int getTextLen() = 0; }; //############################################################################# @@ -335,10 +367,10 @@ struct ISXGUITextual : public virtual ISXGUIComponent /*! \defgroup sxguiwinapi_elements Элементы интерфейса \note Инициализировав элемент можно установить на него стандартные обработчики: \code -SXGUIBaseHandlers::InitHandlerMsg(HWND); +gui_func::base_handlers::InitHandlerMsg(HWND); \endcode \note Во многих функциях создания элементов используются одни и теже именования аргументов: - - const char* caption - название окна + - const char *szCaption - название окна - WORD x, - позиция по оси x - WORD y, - позиция по оси y - WORD width, - ширина @@ -348,8 +380,8 @@ SXGUIBaseHandlers::InitHandlerMsg(HWND); - DWORD exstyle, - расширенные стили WS_EX_ - DWORD wndstyle, - стили окна CS_ - DWORD style, - стили элемента WS_ - - HWND parent, - дескриптор родителя - - WNDPROC handler = 0 - функция обработчик, если 0 то будет назначен DefWindowProc + - HWND hParent, - дескриптор родителя + - WNDPROC lpfnHandler = 0 - функция обработчик, если 0 то будет назначен DefWindowProc @{*/ //! размер текста подсказки #ISXGUIHint @@ -360,133 +392,200 @@ struct ISXGUIHint : public IBaseObject { virtual ~ISXGUIHint(){} - //! установка времени ожидания и показа - virtual void SetDelayTime( - DWORD init, //!< сколько ждать до появления подсказки после наведения курсора - DWORD autopop //!< время показа + //! установка времени ожидания и показа (время в милисекундах) + virtual void setDelayTime( + UINT uInit, //!< сколько ждать до появления подсказки после наведения курсора + UINT uAutopop //!< время показа ) = 0; - virtual bool Parent(HWND parent) = 0; //!< устанавливает родителя (при наведении на родителя всплывает эта подсказка) - virtual HWND Parent() = 0; //!< возвращает родителя + //! устанавливает родителя (при наведении на родителя всплывает эта подсказка) + virtual bool setParent(HWND hParent) = 0; + + //! возвращает родителя + virtual HWND getParent() = 0; + + //! возвращает свой HWND + virtual HWND getHWND() = 0; + + //! установка видимости + virtual void setVisible(bool isVisible) = 0; + + //! видно ли? + virtual bool getVisible() = 0; + - virtual HWND GetHWND() = 0; //!< возвращает свой HWND + //! установка текста подсказки + virtual void setText(const char *szStr) = 0; - virtual void Visible(bool bf) = 0; //!< установка видимости - virtual bool Visible() = 0; //!< видно ли? + //! возвращает указатель на текущий текст подсказки, очищается при вызове деструктора + virtual const char* getText() = 0; - virtual void SetText(const char* text) = 0; //!< установка текста подсказки - virtual const char* GetText() = 0; //!< возвращает указатель на текущий текст подсказки, очищается при вызове деструктора - virtual void GetText(char* buf) = 0; //!< записывает в buf текущий текст подсказки + //! записывает в buf текущий текст подсказки + virtual void getText(char *szBuf) = 0; }; //! создание объекта "Hint" для элемента parent -SX_LIB_API ISXGUIHint* SXGUICrHint(HWND parent); +SX_LIB_API ISXGUIHint* SXGUICrHint(HWND hParent); + +//! создание объекта "Hint" для элемента parent +SX_LIB_API ISXGUIHint* SXGUICrHintEx(HWND hParent, const char *szText, UINT uInit = 1000, UINT uAutopop = 10000); + +//############################################################################# + +//! стиль обычного окна, имеющего название, кнопки свернуть/развернуть/закрыть и возможность растягивать +#define SXGUI_WND_FULL_OPT WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION + +//! стиль окна только с рабочей областью +#define SXGUI_WND_AREA WS_CHILD + +//! стиль окна с рабочей областью и рамкой +#define SXGUI_WND_AREA_BORDER WS_CHILD | WS_BORDER + +//! стиль диалогового окна, с названием и кнопкой закрыть +#define SXGUI_WND_DIALOG WS_DLGFRAME | WS_SYSMENU | WS_CAPTION + +//! стиль диалогового окна, с названием и кнопками свернуть/закрыть +#define SXGUI_WND_DIALOG_MINIMIZE WS_DLGFRAME | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION + +//! стиль диалогового окна с меньшим по высоте заголовоком, с названием и кнопкой закрыть +#define SXGUI_WND_MINDIALOG WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_OVERLAPPED -//////////////////////////////////////////////////////////////////////////// /*! элемент "Window" - окно. По дефолту обработчиком назначается DefWindowProc, -чтобы функционировали свойства SXGUIComponent необходимо указать стандартный для всех элементов обработчик WndProcAllDefault +чтобы функционировали свойства ISXGUIComponent необходимо указать стандартный для всех элементов обработчик WndProcAllDefault */ struct ISXGUIBaseWnd : public virtual ISXGUITextual { virtual ~ISXGUIBaseWnd(){}; - - //set/get цвет фона элемента - virtual bool SetColorBrush(BYTE r, BYTE g, BYTE b) = 0; //!< покомпонентная установка цвета фона - virtual bool SetColorBrush(DWORD color) = 0; //!< установка цвета фона - virtual DWORD GetColorBrush() = 0; //!< возвращает текущее значение цвета фона - virtual HBRUSH GetBrush() = 0; //!< возвращает дескриптор "кисти" фона /*! \name Прозрачность окна - \note Коэфициент прозрачности лежит в пределах [0,255] где 0 - полностью прозрачное, 255 - полностью непрозрачное + \note Коэфициент прозрачности лежит в пределах [0,1] где 0 - полностью прозрачное, 1 - полностью непрозрачное @{*/ - virtual bool Alpha(WORD alpha) = 0; //!< установить коэфициент прозрачности - virtual WORD Alpha() = 0; //!< возвращает коэфициент прозрачности - virtual bool AlphaBlend(bool bf) = 0; //!< установка прозрачного стиля (true - использовать коэфициент прозрачности, false - не использовать) - virtual bool AlphaBlend() = 0; //!< установлен ли прозрачный стиль? + //! установить коэфициент прозрачности + virtual bool setAlpha(float fAlpha) = 0; + + //! возвращает коэфициент прозрачности + virtual float getAlpha() = 0; + + //! установка прозрачного стиля (true - использовать коэфициент прозрачности, false - не использовать) + virtual bool setAlphaBlend(bool isBlend) = 0; + + //! установлен ли прозрачный стиль? + virtual bool getAlphaBlend() = 0; //!@} }; //! создает экземплляр объекта "Window", и возвращает указатель SX_LIB_API ISXGUIBaseWnd* SXGUICrBaseWnd( - const char* class_name, //!< имя класса окна - const char* caption, //!< название окна - const char* menu, //!< имя ресурса меню класса, которое как имя показывается в файле ресурса, 0 - в случае отсутствия - WORD menu_id, //!< идентификатор меню в ресурсах, 0 - в случае отсутствия - int x, //!< позиция по оси x - int y, //!< позиция по оси y - WORD width, //!< ширина - WORD heigth, //!< высота - HICON icon, //!< дескриптор иконки, 0 - в случае отсутствия - HCURSOR cursor, //!< дескриптор курсора, 0 - в случае отсутствия - HBRUSH brush, //!< дескриптор кисти окна (цвета фона), 0 - в случае отсутствия - DWORD exstyle, //!< расширенные стили WS_EX_ - DWORD wndstyle, //!< стили окна CS_ - DWORD style, //!< стили элемента WS_ - HWND parent, //!< дескриптор родителя - WNDPROC handler = 0 //!< функция обработчик, если 0 то будет назначен DefWindowProc + const char *szCaption, //!< название окна + int iX, //!< позиция по оси x + int iY, //!< позиция по оси y + int width, //!< ширина + int heigth, //!< высота + DWORD dwExStyle, //!< расширенные стили WS_EX_ + DWORD dwStyle, //!< стили элемента WS_ + HWND hParent, //!< дескриптор родителя + WNDPROC lpfnHandler = 0,//!< функция обработчик, если 0 то будет назначен общий WndProcAllDefault + ID idObj = -1 ); -//////////////////////////////////////////////////////////////////////////// +//! создает экземплляр объекта "Window", и возвращает указатель +SX_LIB_API ISXGUIBaseWnd* SXGUICrBaseWndEx( + const char *szClassName,//!< имя класса окна + const char *szCaption, //!< название окна + int iX, //!< позиция по оси x + int iY, //!< позиция по оси y + int width, //!< ширина + int heigth, //!< высота + HICON hIcon, //!< дескриптор иконки, 0 - в случае отсутствия + HCURSOR hCursor, //!< дескриптор курсора, 0 - в случае отсутствия + HBRUSH hBbrush, //!< дескриптор кисти окна (цвета фона), 0 - в случае отсутствия + DWORD dwExStyle, //!< расширенные стили WS_EX_ + DWORD dwWndStyle, //!< стили окна CS_ + DWORD dwStyle, //!< стили элемента WS_ + HWND hParent, //!< дескриптор родителя + WNDPROC lpfnHandler = 0,//!< функция обработчик, если 0 то будет назначен общий WndProcAllDefault + ID idObj = -1 + ); + +//############################################################################# + +#define SXGUI_DEF_STATIC "STATIC" //! элемент "Static" простое текстовое поле без возможности пользовательского редактирования, также можно создать при помощи него линию горизонтальную/вертикальную struct ISXGUIStatic : public virtual ISXGUITextual { virtual ~ISXGUIStatic(){} - virtual int Align() = 0; //!< возвращает тип выравнивания текста SXGUI_TEXT_ALIGN_ - virtual bool Align(int align) = 0; //!< устанавливает выравнивание текста SXGUI_TEXT_ALIGN_ - virtual bool WordWrap() = 0; //!< установлен ли автоперенос строк - virtual bool WordWrap(bool bf) = 0; //!< манипуляция со свойством автоперенос строк + //! возвращает тип выравнивания текста #SXGUI_TEXT_ALIGN + virtual SXGUI_TEXT_ALIGN getAlign() = 0; + + //! устанавливает выравнивание текста #SXGUI_TEXT_ALIGN + virtual bool setAlign(SXGUI_TEXT_ALIGN align) = 0; + + + //! установлен ли автоперенос строк + virtual bool getWordWrap() = 0; + + //! манипуляция со свойством автоперенос строк + virtual bool setWordWrap(bool isWordWrap) = 0; }; //! создает экземплляр объекта "Static", и возвращает указатель -SX_LIB_API ISXGUIStatic* SXGUICrStaticEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIStatic* SXGUICrStaticEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExStyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler = 0, ID idObj = -1); //! создает экземплляр объекта "Static", и возвращает указатель -SX_LIB_API ISXGUIStatic* SXGUICrStatic(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIStatic* SXGUICrStatic(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler = 0, ID idObj = -1); /*! создает экземплляр объекта "Static" который представлен линией, и возвращает указатель - \param vertical - вертикальная линия (true) или горизонтальная (false) + \param isVertical - вертикальная линия (true), горизонтальная (false) */ -SX_LIB_API ISXGUIStatic* SXGUICrStaticLine(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, bool vertical); - -//////////////////////////////////////////////////////////////////////////// +SX_LIB_API ISXGUIStatic* SXGUICrStaticLine(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler = 0, ID idObj = -1, bool isVertical = false); -/*! \name Типы загружаемого фона элемента #ISXGUIButton -@{*/ - -#define SXGUI_BUTTON_IMAGE_NONE 0 /*!< не использовать загружаемый фон */ -#define SXGUI_BUTTON_IMAGE_ICON 1 /*!< загружать иконку (.ico) */ -#define SXGUI_BUTTON_IMAGE_BITMAT 2 /*!< загружать изображение (.bmp) */ +//############################################################################# -//!@} +//! Типы загружаемого фона элемента #ISXGUIButton +enum SXGUI_BUTTON_IMAGE +{ + SXGUI_BUTTON_IMAGE_NONE = 0, /*!< не использовать загружаемый фон */ + SXGUI_BUTTON_IMAGE_ICON = 1, /*!< загружать иконку (.ico) */ + SXGUI_BUTTON_IMAGE_BITMAT = 2, /*!< загружать изображение (.bmp) */ +}; //! элемент "button" - кнопка struct ISXGUIButton : public virtual ISXGUITextual { virtual ~ISXGUIButton(){} - virtual bool SetIconInFile(const char* path) = 0; //!< загрузка на фон иконки (.ico) - virtual bool SetBmpInFile(const char* path) = 0; //!< загрузка на фон изображения (.bmp) - virtual bool SetIconInResourse(WORD id) = 0; //!< подгрузка на фон иконки (.ico) из ресурсов - virtual bool SetBmpInResourse(WORD id) = 0; //!< подгрузка на фон изображения (.bmp) из ресурсов + //! загрузка на фон иконки (.ico) + virtual bool setIconFromFile(const char *szPath) = 0; + + //! загрузка на фон изображения (.bmp) + virtual bool setBmpFromFile(const char *szPath) = 0; + + //! подгрузка на фон иконки (.ico) из ресурсов + virtual bool setIconFromResourse(UINT idRes) = 0; + + //! подгрузка на фон изображения (.bmp) из ресурсов + virtual bool setBmpFromResourse(UINT idRes) = 0; }; //! создает экземплляр объекта "button", и возвращает указатель -SX_LIB_API ISXGUIButton* SXGUICrButtonEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIButton* SXGUICrButtonEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); /*! создает экземплляр объекта "button", и возвращает указатель \param image тип загружаемого фона из возможных вариантов SXGUI_BUTTON_IMAGE_*/ -SX_LIB_API ISXGUIButton* SXGUICrButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, int image, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIButton* SXGUICrButton(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, SXGUI_BUTTON_IMAGE type_image, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# + +#define SXGUI_DEF_BUTTONIMG "SXGUIBUTTONIMG" //! обработчик для элемента #ISXGUIButtonImg -SX_LIB_API LRESULT WndProcButtonImgDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +SX_LIB_API LRESULT WndProcButtonImgDefault(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); #define SXGUI_BI_SIZE_LINE 1 /*!< толщина рамки элемента #ISXGUIButtonImg */ @@ -508,244 +607,370 @@ struct ISXGUIButtonImg : public virtual ISXGUIComponent virtual ~ISXGUIButtonImg(){} //! перезагрузка изображения (.bmp) path - путь до изображения - virtual void ReInitImage(const char* path) = 0; + virtual void reInitImage(const char *szPath) = 0; - //! в buf записывает путь до текущего загруженного изображения - virtual void GetPathForImg(char* buf) = 0; + //! в szBuf записывает путь до текущего загруженного изображения + virtual void getPathForImg(char *szBuf) = 0; //! установка необходимых обработчиков, вызывать сразу после создания - virtual void InitCallBack() = 0; + virtual void initCallBack() = 0; - virtual void SetColorFrame(BYTE r, BYTE g, BYTE b) = 0; //!< покомпонентная установка цвета рамки - virtual void SetColorFrame(DWORD color) = 0; //!< установка цвета рамки - virtual DWORD GetColorFrame() = 0; //!< возвращает текущее значение цвета рамки - virtual void SetColorBk(BYTE r, BYTE g, BYTE b) = 0; //!< покомпонентная установка цвета заднего фона - virtual void SetColorBk(DWORD color) = 0; //!< установка цвета заднего фона - virtual DWORD GetColorBk() = 0; //!< возвращает текущее значение цвета заднего фона + //! установка цвета рамки + virtual void setColorFrame(DWORD dwColor) = 0; + + //! возвращает текущее значение цвета рамки + virtual DWORD getColorFrame() = 0; - virtual void SetColorAlpha(BYTE r, BYTE g, BYTE b) = 0; //!< покомпонентная установка отсекаемого цвета в изображении - virtual void SetColorAlpha(DWORD color) = 0; //!< установка отсекаемого цвета в изображении - virtual DWORD GetColorAlpha() = 0; //!< возвращает текущее значение отсекаемого цвета в изображении - - virtual void SetEnable(bool bf) = 0; //!< установка состояния кнопки (активна/пассивна) - virtual bool GetEnable() = 0; //!< возвращает состояния кнопки (активна/пассивна) + //! установка цвета заднего фона + virtual void setColorBk(DWORD dwColor) = 0; + + //! возвращает текущее значение цвета заднего фона + virtual DWORD getColorBk() = 0; + + + //! установка отсекаемого цвета в изображении + virtual void setColorAlpha(DWORD dwColor) = 0; + + //! возвращает текущее значение отсекаемого цвета в изображении + virtual DWORD getColorAlpha() = 0; - virtual void SetEnableActive(bool bf) = 0; //!< установка состояния активности кнопки (включена/выключена) - virtual bool GetEnableActive() = 0; //!< включено ли изменение активности кнопки? - virtual void SetParentGroup(bool bf) = 0; //!< установить входит/не входит кнопка в группу остальных таких же кнопок своего родителя - virtual bool GetParentGroup() = 0; //!< входит ли кнопка в группу остальных таких же кнопок своего родителя? + //! установка состояния активности кнопки (включена/выключена) + virtual void setActive(bool isActive) = 0; + + //! включено ли изменение активности кнопки? + virtual bool getActive() = 0; + + + //! установить входит/не входит кнопка в группу остальных таких же кнопок своего родителя + virtual void setParentGroup(bool isInParentGroup) = 0; + + //! входит ли кнопка в группу остальных таких же кнопок своего родителя? + virtual bool getParentGroup() = 0; }; /*! создает экземплляр объекта "ButtonImg", и возвращает указатель - \param path путь до загружаемого изображения (.bmp) - \param alpha_color исключаемый цвет - \param bk_color цвет фона кнопки + \param szPath путь до загружаемого изображения (.bmp) + \param dwAlphaColor исключаемый цвет + \param bkColor цвет фона кнопки */ -SX_LIB_API ISXGUIButtonImg* SXGUICrButtonImgLoad(const char* path, WORD x, WORD y, WORD width, WORD heigth, DWORD alpha_color, DWORD bk_color, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIButtonImg* SXGUICrButtonImgLoad(const char *szPath, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwAlphaColor, DWORD bkColor, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); /*! создает экземплляр объекта "ButtonImg", и возвращает указатель - \param button идентификатор ресурса подгружаемого изображения (.bmp) - \param alpha_color исключаемый цвет - \param bk_color цвет фона кнопки + \param uButton идентификатор ресурса подгружаемого изображения (.bmp) + \param dwAlphaColor исключаемый цвет + \param bkColor цвет фона кнопки */ -SX_LIB_API ISXGUIButtonImg* SXGUICrButtonImgRes(WORD button, WORD x, WORD y, WORD width, WORD heigth, DWORD alpha_color, DWORD bk_color, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIButtonImg* SXGUICrButtonImgRes(UINT uButton, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwAlphaColor, DWORD bkColor, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "Edit" - текстовове поле с возможностью пользовательского редактирования struct ISXGUIEdit : public virtual ISXGUITextual { virtual ~ISXGUIEdit(){} - virtual bool ReadOnly() = 0; //!< установлено ли свойство "только для чтения" - virtual bool ReadOnly(bool bf) = 0; //!< манипулирует свойством "только для чтения", возвращает результат действия - //дефолтово скрытый текст заменяется на * - virtual bool Password() = 0; //!< установлено ли свойств скрытия текста - virtual bool Password(bool bf) = 0; //!< манипулирует свойством скрытия текста + //! установлено ли свойство "только для чтения" + virtual bool getReadOnly() = 0; + + //! манипулирует свойством "только для чтения", возвращает результат действия + virtual bool setReadOnly(bool isReadOnly) = 0; - virtual int Align() = 0; //!< возвращает флаг выравнивания текста SXGUI_TEXT_ALIGN_ - virtual bool Align(int align) = 0; //!< устанавливает выравнивание SXGUI_TEXT_ALIGN_ + + //! установлено ли свойств скрытия текста, текст заменяется на * + virtual bool getStatePassword() = 0; + + //! манипулирует свойством скрытия текста, текст заменяется на * + virtual bool setStatePassword(bool IsStatePassword) = 0; + + + //! возвращает флаг выравнивания текста #SXGUI_TEXT_ALIGN + virtual int getAlign() = 0; + + //! устанавливает выравнивание #SXGUI_TEXT_ALIGN + virtual bool setAlign(int align) = 0; }; //! создает экземплляр объекта "Edit", и возвращает указатель -SX_LIB_API ISXGUIEdit* SXGUICrEditEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIEdit* SXGUICrEditEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); //! создает экземплляр объекта "Edit", и возвращает указатель -SX_LIB_API ISXGUIEdit* SXGUICrEdit(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIEdit* SXGUICrEdit(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "UpDown" - кнопки увеличения/уменьшения, обычно используется совместно с элементом "Edit" (#ISXGUIEdit) struct ISXGUIUpDown : public virtual ISXGUIComponent { virtual ~ISXGUIUpDown(){} - virtual void SetMinMax(long min, long max) = 0; //!< установка минимального и максимального значений - virtual long SetPos(long pos) = 0; //!< устанавливает текущую позицию (число) + //! установка минимального и максимального значений + virtual void setMinMax(int iMin, int iMax) = 0; + + //! устанавливает текущую позицию (число) + virtual long setPos(int iPos) = 0; + + + //! возвращает минимальное число + virtual long getMin() = 0; - virtual long GetMin() = 0; //!< возвращает минимальное число - virtual long GetMax() = 0; //!< возвращает максимальное число - virtual long GetPos() = 0; //!< возвращает текущую позицию (число) + //! возвращает максимальное число + virtual long getMax() = 0; - virtual HWND SetBuddy(HWND buddy) = 0; //!< устанавливает контроль/управление над значением в дескприторе buddy элемента - virtual HWND GetBuddy() = 0; //!< возвращает HWND элемента над которым осуществляется контроль/управление + //! возвращает текущую позицию (число) + virtual long getPos() = 0; + + + //! устанавливает контроль/управление над значением в дескприторе buddy элемента + virtual HWND setBuddy(HWND hBuddy) = 0; + + //! возвращает HWND элемента над которым осуществляется контроль/управление + virtual HWND getBuddy() = 0; }; //! создает экземплляр объекта "UpDown", и возвращает указатель -SX_LIB_API ISXGUIUpDown* SXGUICrUpDownEx(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id, HWND buddy); +SX_LIB_API ISXGUIUpDown* SXGUICrUpDownEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1, HWND hBuddy = 0); /*! создает экземплляр объекта "UpDown", и возвращает указатель - \param buddy HWND элемента (обычно "Edit" #ISXGUIEdit) над которым устанавливается контроль и управление - \param align_left true - выравнивание по левому краю, false - выравнивание по правому краю + \param hBuddy HWND элемента (обычно "Edit" #ISXGUIEdit) над которым устанавливается контроль и управление + \param isAlignLeft true - выравнивание по левому краю, false - выравнивание по правому краю */ -SX_LIB_API ISXGUIUpDown* SXGUICrUpDown(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, HWND buddy, bool align_left); +SX_LIB_API ISXGUIUpDown* SXGUICrUpDown(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1, HWND hBuddy = 0, bool isAlignLeft = false); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "Memo" - текстовое поле с возможностью создания новых строк struct ISXGUIMemo : public virtual ISXGUIEdit { virtual ~ISXGUIMemo(){} - virtual bool WordWrap() = 0; //!< установлен ли автоперенос слов - virtual bool WordWrap(bool bf) = 0; //!< установка свойства автопереноса слов - - //SXGUIFuctinon - virtual bool ScrollBars(bool h, bool v) = 0; //!< - virtual bool ScrollBarV() = 0; //!< - virtual bool ScrollBarH() = 0; //!< - virtual bool ScrollLine(WORD scroll, WORD dir, int count) = 0; //!< + + //! установлен ли автоперенос слов + virtual bool getWordWrap() = 0; + + //! установка свойства автопереноса слов + virtual bool setWordWrap(bool isWordWrap) = 0; }; //! создает экземплляр объекта "Memo", и возвращает указатель -SX_LIB_API ISXGUIMemo* SXGUICrMemoEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIMemo* SXGUICrMemoEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); //! создает экземплляр объекта "Memo", и возвращает указатель -SX_LIB_API ISXGUIMemo* SXGUICrMemo(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIMemo* SXGUICrMemo(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "ComboBox" - раскрывающийся список с возможностью едиинчного выбора struct ISXGUIComboBox : public virtual ISXGUIComponent { virtual ~ISXGUIComboBox(){} - virtual bool InsertItem(int index, const char* text) = 0; //!< вставка текста в строку - virtual bool DeleteItem(int index) = 0; //!< удаление строки - virtual int GetCount() = 0; //!< количество строк + //! вставка текста в строку + virtual bool insertItem(ID idItem, const char *szStr) = 0; + + //! удаление строки + virtual bool deleteItem(ID idItem) = 0; + + //! количество строк + virtual int getCount() = 0; + + + //! выделяет определенную строку + virtual bool setSel(ID idItem) = 0; + + //! номер выделенной строки + virtual ID getSel() = 0; + + + //! установка для строки userdata + virtual bool setItemData(ID idItem, LPARAM lData) = 0; + + //! получение userdata + virtual LPARAM getItemData(ID idItem) = 0; + + + //! удаляет все элементы + virtual bool clear() = 0; + - virtual bool SetSel(int index) = 0; //!< выделяет определенную строку - virtual int GetSel() = 0; //!< номер выделенной строки + //! вставка текста в строку, подобие замены + virtual bool setItemText(ID idItem, const char *szStr) = 0; - virtual bool SetItemData(int index, LPARAM data) = 0; //!< установка для строки userdata (32 бита) - virtual LPARAM GetItemData(int index) = 0; //!< получение userdata + //! получить текст из строки + virtual void getItemText(ID idItem, char *szBuf) = 0; - virtual bool Clear() = 0; //!< удаляет все элементы + //! получить длину текста из строки + virtual int getItemTextLength(ID idItem) = 0; - virtual bool SetItemText(int index, const char* text) = 0; //!< вставка текста в строку, подобие замены - virtual void GetItemText(int index, char* buf) = 0; //!< получить текст из строки - virtual int GetItemTextLength(int index) = 0; //!< получить длину текста из строки - virtual bool AddItem(const char* text) = 0; //!< добавляет в конец новую строку + //! добавляет в конец новую строку + virtual bool addItem(const char *szStr) = 0; }; //! создает экземплляр объекта "ComboBox", и возвращает указатель -SX_LIB_API ISXGUIComboBox* SXGUICrComboBoxEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIComboBox* SXGUICrComboBoxEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); /*! создает экземплляр объекта "ComboBox", и возвращает указатель \note Параметр style: (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS */ -SX_LIB_API ISXGUIComboBox* SXGUICrComboBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIComboBox* SXGUICrComboBox(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "ListBox" - список с возможностью выбора (как единичного так и множественного) struct ISXGUIListBox : public virtual ISXGUIComponent { virtual ~ISXGUIListBox(){} - virtual bool MultipleSel() = 0; //!< установленно ли свойство множественного выделения строк - virtual bool InsertItem(int index, const char* text) = 0;//!< вставить текст в строку с номером index - virtual bool AddItem(const char* text) = 0; //!< добавить строку в конец списка - virtual int GetCountItem() = 0; //!< возвращает количество строк + //! установленно ли свойство множественного выделения строк + virtual bool getStateMultiSel() = 0; + + /*! установка состояния мультивыделения + \todo протестировать изменение состояния мультивыделения + */ + virtual void setStateMultiSel(bool isMultiSel) = 0; + + + //! вставить текст в строку с номером index + virtual bool insertItem(ID idString, const char *szText) = 0; + + //! добавить строку в конец списка + virtual bool addItem(const char *szText) = 0; + + //! возвращает количество строк + virtual int getItemCount() = 0; + + + //! удалить строку с номером index + virtual bool deleteItem(ID idString) = 0; + - virtual bool DeleteItem(int index) = 0; //!< удалить строку с номером index + //! выделить строку с номером index + virtual bool setSel(ID idString) = 0; + virtual int getSel() = 0; - virtual bool SetSel(int index) = 0; //!< выделить строку с номером index - virtual int GetSel() = 0; - virtual bool SetItemData(int index, LPARAM data) = 0; //!< установить userdata для строки с номером index - virtual LPARAM GetItemData(int index) = 0; //!< возвращает userdata + //! установить userdata для строки с номером index + virtual bool setItemData(ID idString, LPARAM lData) = 0; - virtual bool Clear() = 0; //!< очистить + //! возвращает userdata + virtual LPARAM getItemData(ID idString) = 0; - virtual bool SetTextItem(int index, const char* text) = 0;//!< установить текст в строке с номером index - virtual void GetItemText(int index, char* buf) = 0; //!< возвращает текст из строки - virtual int GetItemTextLength(int index) = 0; //!< возвращает длину текста в строке + //! очистить + virtual bool clear() = 0; - virtual int GetMultipleSelCount() = 0; //!< возвращает количество выделенных строк, если #GetMultipleSel() == true - virtual bool SetMultipleSel(int index, bool sel) = 0; //!< устанавливает выделена/не выделена строка - virtual bool GetMultipleSel(int index) = 0; //!< возвращает выделена ли строка + //! установить текст в строке с номером index + virtual bool setItemText(ID idString, const char *szText) = 0; - virtual void GetMultipleSelArr(int** arr) = 0; //!< возвращает массив с номерами выделенных строк + //! возвращает текст из строки + virtual void getItemText(ID idString, char *szBuf) = 0; - //SXGUIFuctinon - virtual bool ScrollBars(bool h, bool v) = 0; - virtual bool ScrollBarV() = 0; - virtual bool ScrollBarH() = 0; - virtual bool ScrollLine(WORD scroll, WORD dir, int count) = 0; + + //! возвращает длину текста в строке + virtual int getItemTextLength(ID idString) = 0; + + + //! возвращает количество выделенных строк, если #GetMultipleSel() == true + virtual int getMultiSelCount() = 0; + + //! устанавливает выделена/не выделена строка + virtual bool setMultiSel(ID idString, bool sel) = 0; + + //! возвращает выделена ли строка + virtual bool getMultiSel(ID idString) = 0; + + /*! инициализирует ppArr и записывает массив с номерами выделенных строк, возвращает размер массива + \todo придумать как упростить, и желательно перевести на String + */ + virtual int getMultiSelArr(int **ppArr) = 0; }; //! создает экземплляр объекта "ListBox", и возвращает указатель -SX_LIB_API ISXGUIListBox* SXGUICrListBoxEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIListBox* SXGUICrListBoxEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); //! создает экземплляр объекта "ListBox", и возвращает указатель -SX_LIB_API ISXGUIListBox* SXGUICrListBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, bool miltiple_sel); +SX_LIB_API ISXGUIListBox* SXGUICrListBox(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1, bool isMiltipleSel = false); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "ListView" - таблица с возможностью выбора struct ISXGUIListView : public virtual ISXGUIComponent { virtual ~ISXGUIListView(){} - virtual int InsertColumn(char* text, int col, int width) = 0; //!< вставить столбец по индексу - virtual int AddColumn(char* text, int width) = 0; //!< добавить (последним) столбец - virtual void DeleteColumn(int col) = 0; //!< удалить столбец по индексу - virtual int GetCountColumns() = 0; //!< количество столбцов + /*! вставить столбец по индексу + \todo надо заюзать выделение на стеке через alloca или calloc, а сейчас new + */ + virtual int insertColumn(const char *szText, int iColumn, int iWidth) = 0; - virtual int AddString(long data = -1) = 0; //!< добавить строку - virtual void DeleteString(int str) = 0; //!< удалить строку - virtual int GetCountString() = 0; //!< количество строк + //! добавить (последним) столбец + virtual int addColumn(const char *szText, int iWidth) = 0; - virtual void SetTextItem(char* text, int col, int str) = 0; //!< установить текст в ячейку - virtual void GetTextItem(char* text, int col, int str, int sizebuff) = 0; //!< получить текст из ячейки + //! удалить столбец по индексу + virtual void deleteColumn(int iColumn) = 0; - virtual void SetDataItem(int str, long data) = 0; - virtual long GetDataItem(int str) = 0; + //! количество столбцов + virtual int getColumnsCount() = 0; - virtual int GetSelString(int start = -1) = 0; //!< возвращает индекс первого найденного выделения после start (-1 - значит сначала искать) - virtual void SetSelString(int str) = 0; //!< выделение строки по индексу - virtual int GetSelColumn() = 0; //!< возвращает индекс выделеного столбца - virtual void SetSelColumn(int col) = 0; //!< выделение столбца по индексу - virtual void Clear() = 0; //!< очистка всей таблицы - virtual void ClearStrings() = 0; //!< очистка только строк + //! добавить строку + virtual int addString(LPARAM lData = -1) = 0; + + //! удалить строку + virtual void deleteString(int iString) = 0; + + //! количество строк + virtual int getStringCount() = 0; + + + //! установить текст в ячейку + virtual void setItemText(char *szText, int iColumn, int iString) = 0; + + //! получить текст из ячейки + virtual void getItemText(char *szText, int iColumn, int iString, int iSizeBuff) = 0; + + + //! установить userdata на строку + virtual void setItemData(int iString, LPARAM lData) = 0; + + //! возвращает userdata строки iString + virtual LPARAM getItemData(int iString) = 0; + + + //! возвращает индекс первого найденного выделения после start (-1 - значит сначала искать) + virtual int getSelString(int iStart = -1) = 0; + + //! выделение строки по индексу + virtual void setSelString(int iString) = 0; + + //! возвращает индекс выделеного столбца + virtual int getSelColumn() = 0; + + //! выделение столбца по индексу + virtual void setSelColumn(int iColumn) = 0; + + + //! очистка всей таблицы + virtual void clear() = 0; + + //! очистка только строк + virtual void clearStrings() = 0; }; -//! создает экземплляр объекта "istView", и возвращает указатель -SX_LIB_API ISXGUIListView* SXGUICrListViewEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +//! создает экземплляр объекта "ListView", и возвращает указатель +SX_LIB_API ISXGUIListView* SXGUICrListViewEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//! создает экземплляр объекта "istView", и возвращает указатель -SX_LIB_API ISXGUIListView* SXGUICrListView(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); +//! создает экземплляр объекта "ListView", и возвращает указатель +SX_LIB_API ISXGUIListView* SXGUICrListView(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); + +//############################################################################# -//////////////////////////////////////////////////////////////////////////// +#define SXGUI_DEF_GROUPBOX "SXGUIGROUPBOX" -//! обработчик для элемента #ISXGUIGroupBox -SX_LIB_API LRESULT WndProcGroupBoxPaint(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +//! обработчик WM_PAINT для GroupBox +SX_LIB_API LRESULT WndProcGroupBoxPaint(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //! элемент "GroupBox" - контейнер для других элементов, с рамкой и необязательным заголовком, класс переопределен, вся занимаемая область данным элементом принадлжеит ему, и как следствие InvalidateRect приведет к обновлению всей области struct ISXGUIGroupBox : public virtual ISXGUITextual @@ -754,134 +979,179 @@ struct ISXGUIGroupBox : public virtual ISXGUITextual }; //! создает экземплляр объекта "GroupBox", и возвращает указатель -SX_LIB_API ISXGUIGroupBox* SXGUICrGroupBoxEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIGroupBox* SXGUICrGroupBoxEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); //! создает экземплляр объекта "GroupBox", и возвращает указатель -SX_LIB_API ISXGUIGroupBox* SXGUICrGroupBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIGroupBox* SXGUICrGroupBox(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "ProgressBar" - полоса состояния/прогресса выполнения чего либо struct ISXGUIProgressBar : public virtual ISXGUIComponent { virtual ~ISXGUIProgressBar(){} - //получить/установить позицию прогресса - virtual int GetPos() = 0; //!< возвращает текущую позицию - virtual int SetPos(int pos) = 0; //!< возвращает старую позицию - //получить/установить размер шага прогресса - virtual int GetStep() = 0; //!< возвращает текущий размер шага - virtual int SetStep(int step) = 0; //!< возвращает старый размер шага + //! возвращает текущую позицию прогресса + virtual int getPos() = 0; + + //! устанавливает новую и возвращает старую позицию прогресса + virtual int setPos(int pos) = 0; + + + //! возвращает текущий размер шага + virtual int getStep() = 0; + + //! устанавливает новый и возвращает старый размер шага + virtual int setStep(int step) = 0; + + + //! установить позицию по количеству шагов, возвращает предшествующую позицию + virtual int setPosSteps(int steps) = 0; + + //! увеличить позицию на один шаг, возвращает предшествующую позицию + virtual int setOneStep() = 0; - //возвращают предшествующую позицию - virtual int SetPosSteps(int steps) = 0; //!< установить позицию по количеству шагов - virtual int SetOneStep() = 0; //!< увеличить позицию на один шаг /*! устанавливает позицию минимума и максимума прогресса - \return При удачном выполнении возвращает true, иначе false */ - virtual bool SetMinMax(int min, int max) = 0; + \return При удачном выполнении возвращает true, иначе false + */ + virtual bool setMinMax(int min, int max) = 0; + + + //! возвращают минимальную позицию прогресса + virtual int getMin() = 0; - virtual int GetMin() = 0; //!< возвращают минимальную позицию прогресса - virtual int GetMax() = 0; //!< возвращают максимальную позицию прогресса + //! возвращают максимальную позицию прогресса + virtual int getMax() = 0; - virtual bool SetBarColor(BYTE r, BYTE g, BYTE b) = 0; //!< установить цвет полоски? при удачном выполнении возвращает true, иначе false - virtual DWORD GetBarColor() = 0; //!< получить цвет полоски + //! установить цвет полоски? при удачном выполнении возвращает true, иначе false + virtual bool setColorBar(DWORD dwColor) = 0; - //установить/получить цвет фона - virtual bool SetBkColor(BYTE r, BYTE g, BYTE b) = 0; //установить цвет фона, при удачном выполнении возвращает true, иначе false - virtual DWORD GetBkColor() = 0; //!< получить цвет фона + //! получить цвет полоски + virtual DWORD getColorBar() = 0; + + + //! установить цвет фона, при удачном выполнении возвращает true, иначе false + virtual bool setColorBk(DWORD dwColor) = 0; + + //! возвращает цвет фона + virtual DWORD getColorBk() = 0; }; //! создает экземплляр объекта "GroupBox", и возвращает указатель -SX_LIB_API ISXGUIProgressBar* SXGUICrProgressBarEx(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIProgressBar* SXGUICrProgressBarEx(int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); /*! создает экземплляр объекта "GroupBox", и возвращает указатель \param vertical true - вертикальное размещение, false - горизонтальное \param smooth true - сплошная заливка полосы, false - заливка полосы одинаковыми секциями/прямоугольниками */ -SX_LIB_API ISXGUIProgressBar* SXGUICrProgressBar(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, bool vertical, bool smooth); +SX_LIB_API ISXGUIProgressBar* SXGUICrProgressBar(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1, bool isVertical = false, bool isSmooth = true); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "RadioButton" - переключа́тель (с необязательной подписью), позволяет выбрать одну опцию из предопределенного набора (таких же RadioButton'ов у одного родителя) struct ISXGUIRadioButton : public virtual ISXGUIButton { virtual ~ISXGUIRadioButton(){} - virtual void SetCheck(bool check) = 0; //!< установка отметки - virtual bool GetCheck() = 0; //!< отмечен ли? + + //! установка отметки + virtual void setCheck(bool check) = 0; + + //! возвращает отмечен ли + virtual bool getCheck() = 0; }; //! создает экземплляр объекта "RadioButton", и возвращает указатель -SX_LIB_API ISXGUIRadioButton* SXGUICrRadioButtonEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIRadioButton* SXGUICrRadioButtonEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); //! создает экземплляр объекта "RadioButton", и возвращает указатель -SX_LIB_API ISXGUIRadioButton* SXGUICrRadioButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); - -//////////////////////////////////////////////////////////////////////////// +SX_LIB_API ISXGUIRadioButton* SXGUICrRadioButton(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -/*! \name Состояния выделения элемента #ISXGUICheckBox -@{*/ -#define SXGUI_CHECKBOX_UNCHECKED BST_UNCHECKED /*!< не отмечен */ -#define SXGUI_CHECKBOX_CHECKED BST_CHECKED /*!< отмечен */ -#define SXGUI_CHECKBOX_INDETERMINATE BST_INDETERMINATE /*!< неопределен */ +//############################################################################# -//!@} +//! Состояния выделения элемента #ISXGUICheckBox +enum SXGUI_CHECKBOX_STATE +{ + SXGUI_CHECKBOX_STATE_UNCHECKED = BST_UNCHECKED, /*!< не отмечен */ + SXGUI_CHECKBOX_STATE_CHECKED = BST_CHECKED, /*!< отмечен */ + SXGUI_CHECKBOX_STATE_INDETERMINATE = BST_INDETERMINATE, /*!< неопределен */ +}; //! элемент "CheckBox" - "галочка" (с необязательной подписью) с возможностью выбора состояния отметки struct ISXGUICheckBox : public virtual ISXGUIButton { virtual ~ISXGUICheckBox(){} - virtual void SetCheck(int check) = 0; //!< установка состояния отметки SXGUI_CHECKBOX_ - virtual int GetCheck() = 0; //!< возвращает состояние отметки SXGUI_CHECKBOX_ + + //! установка состояния отметки #SXGUI_CHECKBOX_STATE + virtual void setCheckEx(SXGUI_CHECKBOX_STATE check) = 0; + + //! установка состояния отметки + virtual void setCheck(bool isCheck) = 0; + + //! возвращает состояние отметки SXGUI_CHECKBOX_STATE + virtual SXGUI_CHECKBOX_STATE getCheck() = 0; }; //! создает экземплляр объекта "CheckBox", и возвращает указатель -SX_LIB_API ISXGUICheckBox* SXGUICrCheckBoxEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUICheckBox* SXGUICrCheckBoxEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); /*! создает экземплляр объекта "CheckBox", и возвращает указатель - \param cb_3_state - может ли элемент иметь третье состояние "неопределенный"? + \param is3State - может ли элемент иметь третье состояние "неопределенный"? */ -SX_LIB_API ISXGUICheckBox* SXGUICrCheckBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, bool cb_3_state); +SX_LIB_API ISXGUICheckBox* SXGUICrCheckBox(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1, bool is3State = false); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "TrackBar" - ползунок struct ISXGUITrackBar : public virtual ISXGUIComponent { virtual ~ISXGUITrackBar(){} - virtual void SetPos(int pos) = 0; //!< устанавливает позицию - virtual int GetPos() = 0; //!< возвращает текущую позицию - virtual void SetMinMax(int min, int max) = 0; //!< устанавливает минимальное (левое) и максимальное (правое) значения позиции - virtual int GetMin() = 0; //!< возвращает текущее минимальное (левое) значение позиции - virtual int GetMax() = 0; //!< возвращает текущее максимальное (правое) значение позиции + //! устанавливает позицию + virtual void setPos(int iPos) = 0; + + //! возвращает текущую позицию + virtual int getPos() = 0; + + + //! устанавливает минимальное (левое) и максимальное (правое) значения позиции + virtual void setMinMax(int iMin, int iMax) = 0; + + //! возвращает текущее минимальное (левое) значение позиции + virtual int getMin() = 0; + + //! возвращает текущее максимальное (правое) значение позиции + virtual int getMax() = 0; + /*! установка риски в позиции (между минимумом и максимумом) \note Элемент trackbar создает две крайние риски сам (если пределы от минуса (-100 к примеру) до плюса (100 к примеру) то тогда будет создана третья риска в нуле) */ - virtual bool SetTick(int pos) = 0; - virtual int GetTick(int index) = 0; //!< возвращает позициюю риски (между минимумом и максимумом) по индексу риски + virtual bool setTick(int iPos) = 0; + + //! возвращает позициюю риски (между минимумом и максимумом) по индексу риски + virtual int getTick(int iIndex) = 0; - virtual void SetTickFrequency(int freq) = 0; //!< установка промежутков между рисками, значения указываются в интервалах приращения (пунктах) + //! установка промежутков между рисками, значения указываются в интервалах приращения (пунктах) + virtual void setTickFrequency(int iFreq) = 0; }; //! создает экземплляр объекта "TrackBar", и возвращает указатель -SX_LIB_API ISXGUITrackBar* SXGUICrTrackBarEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUITrackBar* SXGUICrTrackBarEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); //! создает экземплляр объекта "TrackBar", и возвращает указатель -SX_LIB_API ISXGUITrackBar* SXGUICrTrackBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUITrackBar* SXGUICrTrackBar(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// - -/*! \name Выравнивание составных частей внутри #ISXGUIStatusBar при изменении размеров -@{*/ - -#define SXGUI_STATUSBAR_ALIGNRS_NONE 0 /*!< без изменений */ -#define SXGUI_STATUSBAR_ALIGNRS_PERCENT 1 /*!< в процентном соотношениям к текущему состоянию */ -#define SXGUI_STATUSBAR_ALIGNRS_EQUALLY 2 /*!< равномерно одинаково */ +//############################################################################# -//!@} +//! Выравнивание составных частей внутри #ISXGUIStatusBar при изменении размеров +enum SXGUI_STATUSBAR_ALIGN_RESIZE +{ + SXGUI_STATUSBAR_ALIGN_RESIZE_NONE = 0, /*!< без изменений */ + SXGUI_STATUSBAR_ALIGN_RESIZE_PERCENT = 1, /*!< в процентном соотношениям к текущему состоянию */ + SXGUI_STATUSBAR_ALIGN_RESIZE_EQUALLY = 2, /*!< равномерно одинаково */ +}; //! элемент "StatusBar" - горизонтальная полоса в нижней части родительского окна, в ней может отображать различные виды информации о состоянии struct ISXGUIStatusBar : public virtual ISXGUIComponent @@ -889,36 +1159,44 @@ struct ISXGUIStatusBar : public virtual ISXGUIComponent virtual ~ISXGUIStatusBar(){} //! установка количества частей и их размеров - virtual bool SetCountParts( - int count, //!< количество частей, оно же размер arr - int* arr //!< массив с размерами в пикселях по ширине каждой части + virtual bool setPartsCount( + int iCount, //!< количество частей, размер pArr + int *pArr //!< массив с размерами в пикселях по ширине каждой части ) = 0; - virtual int GetCountParts(int **arr) = 0; //!< инициализирует arr (если arr != 0) и записывает в него позиции (правая сторона клиентской области) каждой части, возвращает количество частей + //! инициализирует arr (если arr != 0) и записывает в него позиции (правая сторона клиентской области) каждой части, возвращает количество частей + virtual int getPartsCount(int **ppArr) = 0; //! устанавливает в часть текст - virtual bool SetTextParts( - int pos, //!< номер части - const char* text //!< текст + virtual bool setPartText( + int iPos, //!< номер части + const char *szText //!< текст ) = 0; - //!< в buf записывает текст части pos, len - размер buf - virtual bool GetTextParts(int pos, char* buf, int len) = 0; + //! в szBuf записывает текст части iPos, iLenBuf - размер szBuf + virtual bool getPartText(int iPos, char *szBuf, int iLenBuf) = 0; + + //! обновление с учетом установленного выравнивания, вызывать при изменении размеров + virtual void update() = 0; + + //! аналогично #Update + virtual void updateSize() = 0; - virtual void Update() = 0; //!< обновление с учетом установленного выравнивания, вызывать при изменении размеров - virtual void UpdateSize() = 0; //!< аналогично #Update - virtual void SetAlignRS(int alignrs) = 0; //!< устанавливает выравнивание при изменении размеров SXGUI_STATUSBAR_ALIGNRS_ - virtual int GetAlignRS() = 0; //!< возвращает выравнивание при изменении размеров SXGUI_STATUSBAR_ALIGNRS_ + //! устанавливает выравнивание при изменении размеров SXGUI_STATUSBAR_ALIGNRS_ + virtual void setAlignReSize(SXGUI_STATUSBAR_ALIGN_RESIZE align_resize) = 0; + + //! возвращает выравнивание при изменении размеров SXGUI_STATUSBAR_ALIGNRS_ + virtual SXGUI_STATUSBAR_ALIGN_RESIZE getAlignReSize() = 0; }; //! создает экземплляр объекта "StatusBar", и возвращает указатель -SX_LIB_API ISXGUIStatusBar* SXGUICrStatusBarEx(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIStatusBar* SXGUICrStatusBarEx(const char *szCaption, int iPosX, int iPosY, int iWidth, int iHeight, DWORD dwExstyle, DWORD dwStyle, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); //! создает экземплляр объекта "StatusBar", и возвращает указатель -SX_LIB_API ISXGUIStatusBar* SXGUICrStatusBar(const char* caption, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIStatusBar* SXGUICrStatusBar(const char *szCaption, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// +//############################################################################# //! элемент "ToolBar" - панель инструментов struct ISXGUIToolBar : public virtual ISXGUIComponent @@ -927,11 +1205,11 @@ struct ISXGUIToolBar : public virtual ISXGUIComponent }; //! создает экземплляр объекта "ToolBar", и возвращает указатель -SX_LIB_API ISXGUIToolBar* SXGUICrToolBar(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); +SX_LIB_API ISXGUIToolBar* SXGUICrToolBar(int iPosX, int iPosY, int iWidth, int iHeight, HWND hParent, WNDPROC lpfnHandler, ID idObj = -1); -//////////////////////////////////////////////////////////////////////////// +//************************************************************************** -/*! \name Состояния элементов меню #ISXGUIMenu и #ISXGUIPopupMenu +/*! \name Состояния элементов меню @{*/ #define SXGUI_MENU_PART_STATE_ENABLED 0 /*!< действительно */ @@ -940,246 +1218,270 @@ SX_LIB_API ISXGUIToolBar* SXGUICrToolBar(WORD x, WORD y, WORD width, WORD heigth //!@} -//! элемент "Menu" - строка меню окна -struct ISXGUIMenu : public IBaseObject +struct ISXGUIMenuBase : public IBaseObject { - virtual ~ISXGUIMenu(){} + virtual ~ISXGUIMenuBase(){} //! вставить элемент меню - virtual bool InsertItem( - int index, //!< индекс позиции + virtual bool insertItem( + int iIndex, //!< индекс позиции const char* text, //!< текст элемента - WORD id, //!< идентификатор элемента меню - WORD id_sub_menu //!< идентификатор подменю + ID idUnit, //!< идентификатор элемента меню + ID idSubUnit //!< идентификатор подменю ) = 0; //! вставить контекстное меню - virtual bool InsertPopupItem( - int index, //!< индекс позиции + virtual bool insertPopupItem( + int iIndex, //!< индекс позиции const char* text, //!< текст элемента - WORD id, //!< идентификатор элемента меню - WORD id_sub_menu //!< идентификатор подменю + ID idUnit, //!< идентификатор элемента меню + ID idSubUnit //!< идентификатор подменю ) = 0; //! вставить разделитель - virtual bool InsertSeparator( - int index, //!< индекс позиции - WORD id, //!< идентификатор элемента меню - WORD id_sub_menu //!< идентификатор подменю + virtual bool insertSeparator( + int iIndex, //!< индекс позиции + ID idUnit, //!< идентификатор элемента меню + ID idSubUnit //!< идентификатор подменю ) = 0; - virtual bool DeleteItem(WORD id) = 0; //!< удалить элемент меню по его id + //! удалить элемент меню по его id + virtual bool deleteItem(ID idUnit) = 0; + + //! возвращает дескриптор подменю по его id + virtual HMENU getSubMenu(ID idUnit) = 0; + - virtual HMENU GetSubMenu(WORD id) = 0; //!< возвращает дескриптор подменю по его id + //! выделить элемент меню + virtual bool setCheckItem(ID idUnit, bool isCheck) = 0; - virtual bool CheckItem(WORD id, bool check) = 0; //!< выделить элемент меню - virtual bool EnableItem(WORD id, int enable) = 0; //!< установить действительность элементу меню + //! установить действительность элементу меню + virtual bool setEnableItem(ID idUnit, int isEnable) = 0; + + + //! выделен ли элемент меню idUnit + virtual bool getCheckedItem(ID idUnit) = 0; + + //! действителен ли элемент меню idUnit + virtual int getEnabledItem(ID idUnit) = 0; - virtual bool GetCheckedItem(WORD id) = 0; //!< выделен ли элемент меню id - virtual int GetEnabledItem(WORD id) = 0; //!< действителен ли элемент меню id //! возвращает дескриптор меню - virtual HMENU GetHMENU() = 0; + virtual HMENU getHMENU() = 0; +}; + +//! элемент "Menu" - строка меню окна +struct ISXGUIMenuWindow : public virtual ISXGUIMenuBase +{ + virtual ~ISXGUIMenuWindow(){} //! установить меню окну hwnd - virtual bool SetToWindow(HWND hwnd) = 0; + virtual bool setToWindow(HWND hWnd) = 0; }; //! создает экземплляр объекта "Menu", и возвращает указатель -SX_LIB_API ISXGUIMenu* SXGUICrMenu(); +SX_LIB_API ISXGUIMenuWindow* SXGUICrMenuWindow(); -//! создает экземплляр объекта "Menu" из ресурсов по идентификатору menu, и возвращает указатель -SX_LIB_API ISXGUIMenu* SXGUICrMenuEx(WORD menu); +//! создает экземплляр объекта "Menu" из ресурсов по идентификатору uResMenu, и возвращает указатель +SX_LIB_API ISXGUIMenuWindow* SXGUICrMenuWindowEx(UINT uResMenu); -//////////////////////////////////////////////////////////////////////////// +//************************************************************************** //! элемент "PopupMenu" - контекстное меню -struct ISXGUIPopupMenu : public IBaseObject +struct ISXGUIPopupMenu : public virtual ISXGUIMenuBase { virtual ~ISXGUIPopupMenu(){} - - //! вставить элемент меню - virtual bool InsertItem( - int index, //!< индекс позиции - const char* text, //!< текст элемента - WORD id, //!< идентификатор элемента меню - WORD id_sub_menu //!< идентификатор подменю - ) = 0; - - //! вставить контекстное меню - virtual bool InsertPopupItem( - int index, //!< индекс позиции - const char* text, //!< текст элемента - WORD id, //!< идентификатор элемента меню - WORD id_sub_menu //!< идентификатор подменю - ) = 0; - - //! вставить разделитель - virtual bool InsertSeparator( - int index, //!< индекс позиции - WORD id, //!< идентификатор элемента меню - WORD id_sub_menu //!< идентификатор подменю - ) = 0; - - virtual bool DeleteItem(WORD id) = 0; //!< удалить элемент меню по его id - - virtual HMENU GetSubMenu(WORD id) = 0; //!< возвращает дескриптор подменю по его id - - virtual bool CheckItem(WORD id, bool check) = 0; //!< выделить элемент меню - virtual bool EnableItem(WORD id, int enable) = 0; //!< установить действительность элементу меню - - virtual bool GetCheckedItem(WORD id) = 0; //!< выделен ли элемент меню id - virtual int GetEnabledItem(WORD id) = 0; //!< действителен ли элемент меню id - - //! возвращает дескриптор меню - virtual HMENU GetHMENU() = 0; //! показать меню - virtual bool Track( - HWND hwnd, //!< дескриптор элемента для которого вызывается меню - int x, //!< позиция по оси x (screen space) - int y //!< позиция по оси y (screen space) + virtual bool track( + HWND hWnd, //!< дескриптор элемента для которого вызывается меню + int iPosX, //!< позиция по оси x (screen space) + int iPosY //!< позиция по оси y (screen space) ) = 0; }; //! создает экземплляр объекта "PopupMenu", и возвращает указатель SX_LIB_API ISXGUIPopupMenu* SXGUICrPopupMenu(); -//! создает экземплляр объекта "PopupMenu" из ресурсов по идентификатору menu, и возвращает указатель -SX_LIB_API ISXGUIPopupMenu* SXGUICrPopupMenuEx(WORD menu); +//! создает экземплляр объекта "PopupMenu" из ресурсов по идентификатору uResMenu, и возвращает указатель +SX_LIB_API ISXGUIPopupMenu* SXGUICrPopupMenuEx(UINT uResMenu); //!@} sxguiwinapi_elements //############################################################################# -//! Стандартный обработчик событий для всех элементов -SX_LIB_API LRESULT CALLBACK WndProcAllDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +//! Стандартный обработчик событий для всех элементов, исполняет всю очередь событий +SX_LIB_API LRESULT CALLBACK WndProcAllDefault(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //############################################################################# -//! функции управения элементами -namespace SXGUIFuctinon -{ - /*! \name Операции с полосами прокрутки (Scroll bar) элемента - @{*/ - - //! установка прокрутки - SX_LIB_API bool ScroolBars( - ISXGUIControl *Control, //!< элемент которому устанавливается - bool h, //!< устанавливать ли горизонтальную полосу прокрутки? - bool v //!< устанавливать ли вертикальную полосу прокрутки? - ); - - SX_LIB_API bool ScrollBarV(ISXGUIControl *Control); //!< устанвлена ли вертикальная полоса прокрутки? - SX_LIB_API bool ScrollBarH(ISXGUIControl *Control); //!< устанвлена ли горизонтальная полоса прокрутки? - - SX_LIB_API bool ScrollLine( - ISXGUIControl *Control, //!< элемент - int scroll, //!< какую полосу прокручивать? SXGUI_SCROLL_TYPE_ - int dir, //!< в какую сторону прокручивать, SXGUI_SCROLL_DIR_ - int count //!< на сколько строк прокрутить - ); - - //!@} +/*! \name Типы диалогов выбора файлов +@{*/ - /*! \name Операции с текстом (caption) элемента - @{*/ +#define SXGUI_DIALOG_FILE_OPEN 0 /*!< открыватие файла */ +#define SXGUI_DIALOG_FILE_SAVE 1 /*!< сохранение файла */ - SX_LIB_API bool SetText(ISXGUIControl*const Control, const char* text); //!< установка текста контролу - SX_LIB_API void GetText(ISXGUIControl *Control, char* buf, int count); //!< в buf записывает текст контрола, count - длина buf - SX_LIB_API int GetTextLen(ISXGUIControl *Control); //!< возвращает длину текста контрола +//!@} - //!@} +//! типы scrollbars +enum SXGUI_SCROLL_TYPE +{ + SXGUI_SCROLL_TYPE_H = 0, /*!< горизонтальный тип */ + SXGUI_SCROLL_TYPE_V = 1, /*!< вертикальный тип */ }; -//############################################################################# - -//! функции обработки определенного события посылаемого родительскому элементу у всех его дочерних элементов -namespace SXGUIEnumChildWindow +//! направления прокрутки scrollbars +enum SXGUI_SCROLL_DIR { - //! для класса SXGUIButtonImg, обработка события активации кнопки и в последствии дезактивации остальных кнопкок - SX_LIB_API BOOL CALLBACK EnumChildProcUpdateImgButton(HWND hwnd, LPARAM lParam); + SXGUI_SCROLL_DIR_UP = 0, /*!< направление вверх */ + SXGUI_SCROLL_DIR_DOWN = 1, /*!< направление вниз */ - //! событие WM_SIZE - SX_LIB_API BOOL CALLBACK EnumChildProcUpdateSize(HWND hwnd, LPARAM lParam); + SXGUI_SCROLL_DIR_LEFT = 3, /*!< направление влево */ + SXGUI_SCROLL_DIR_RIGTH = 4, /*!< направление вправо */ +}; - //! событие WM_MOVE - SX_LIB_API BOOL CALLBACK EnumChildProcUpdateRect(HWND hwnd, LPARAM lParam); +//! тип обработчика для диалогов с превью, szPath - целевой путь, szBuf в который будет записан путь до превью, возвращает true если удалось +typedef bool (*HandlerDialogOwndGetPreview) (const char *szPath, char *szBuf); - //! событие WM_MOUSEMOVE - SX_LIB_API BOOL CALLBACK EnumChildProcMouseMove(HWND hwnd, LPARAM lParam); -}; +typedef bool(*HandlerDialogOwndGetPreview2) (const char *szPath, void **pBuf, int *pSizeBuf, int *pWidth, int *pHeight); + +//! тип обработчика для диалогов с информацией для выделенного объекта, szPath - целевой путь, szBuf в который будет записана информация, возвращает true если удалось +typedef bool (*HandlerDialogOwndGetInfo) (const char *szPath, char *szBuf); -//! пространство имен с базовыми функциями обработчиками сообщений, используется #WndProcAllDefault -namespace SXGUIBaseHandlers +//! функции для управления gui +namespace gui_func { - /*! установка основных обработчиков, без которых SXGUIWinApi будет работать не стабильно, а возможно и не будет работать, - если возвращает 0 значит все в норме, иначе возвращает номер того обработчика который не удалось установить, - данная функция вызывается только если не требуется каких либо дополнительных действий при обработке зарезервированных сообщений - */ - SX_LIB_API int InitHandlerMsg(ISXGUIComponent* Component); + //! Операции с полосами прокрутки (Scroll bar) элемента + namespace scrollbar + { + //! установка прокрутки + SX_LIB_API bool InitScroolBars( + ISXGUIControl *pControl, //!< элемент которому устанавливается + bool canH, //!< устанавливать ли горизонтальную полосу прокрутки? + bool canV //!< устанавливать ли вертикальную полосу прокрутки? + ); + + //! устанвлена ли scrollbar + SX_LIB_API bool existsScrollBar(ISXGUIControl *pControl, SXGUI_SCROLL_TYPE scroll_type); + + //! прокрутка содержимого элемента + SX_LIB_API bool ScrollLine( + ISXGUIControl *pControl, //!< элемент + SXGUI_SCROLL_TYPE scroll_type, //!< какую полосу прокручивать? SXGUI_SCROLL_TYPE_ + SXGUI_SCROLL_DIR dir, //!< в какую сторону прокручивать, SXGUI_SCROLL_DIR_ + int iCountString //!< на сколько строк прокрутить + ); + }; + + //! Операции с текстом (caption) элемента + namespace text + { + //! установка текста контролу + SX_LIB_API bool SetText(ISXGUIControl*const Control, const char* text); - //! обработчик события WM_SIZE - SX_LIB_API LRESULT SizeChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + //! в buf записывает текст контрола, count - длина buf + SX_LIB_API void GetText(ISXGUIControl *Control, char* buf, int count); - /*! обработчик событий WM_CTLCOLORSTATIC WM_CTLCOLOREDIT WM_CTLCOLORBTN WM_CTLCOLORLISTBOX, - то есть обработка цветов дочерних элементов окна (static, edit,button, listbox) - */ - SX_LIB_API LRESULT CtlColorChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + //! возвращает длину текста контрола + SX_LIB_API int GetTextLen(ISXGUIControl *Control); + }; - //! обработчик события WM_SIZING - SX_LIB_API LRESULT SizingChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + //! функции обработки определенного события посылаемого родительскому элементу у всех его дочерних элементов + namespace enum_child + { + //! для класса SXGUIButtonImg, обработка события активации кнопки и в последствии дезактивации остальных кнопкок + SX_LIB_API BOOL CALLBACK EnumChildProcUpdateImgButton(HWND hwnd, LPARAM lParam); - //! обработчик события WM_MOVE - SX_LIB_API LRESULT MoveChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + //! событие WM_SIZE + SX_LIB_API BOOL CALLBACK EnumChildProcUpdateSize(HWND hwnd, LPARAM lParam); - //! обработчик события WM_MOUSEMOVE - SX_LIB_API LRESULT MouseMoveChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + //! событие WM_MOVE + SX_LIB_API BOOL CALLBACK EnumChildProcUpdateRect(HWND hwnd, LPARAM lParam); - //! обработчик события WM_SETCURSOR - SX_LIB_API LRESULT SetCursorChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + //! событие WM_MOUSEMOVE + SX_LIB_API BOOL CALLBACK EnumChildProcMouseMove(HWND hwnd, LPARAM lParam); + }; - //! обработчик события WM_COMMAND SC_MAXIMIZE - SX_LIB_API LRESULT MaximuzeWinChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + //! пространство имен с базовыми функциями обработчиками сообщений, используется #WndProcAllDefault + namespace base_handlers + { + /*! установка основных обработчиков, без которых SXGUIWinApi будет работать не стабильно, а возможно и не будет работать, + если возвращает 0 значит все в норме, иначе возвращает номер того обработчика который не удалось установить, + данная функция вызывается только если не требуется каких либо дополнительных действий при обработке зарезервированных сообщений + */ + SX_LIB_API void InitHandlerMsg(ISXGUIComponent* Component); - //! обработчик события WM_DESTROY - SX_LIB_API LRESULT WinDestroy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -}; + //! обработчик события WM_SIZE + SX_LIB_API LRESULT SizeChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -//############################################################################# + /*! обработчик событий WM_CTLCOLORSTATIC WM_CTLCOLOREDIT WM_CTLCOLORBTN WM_CTLCOLORLISTBOX, + то есть обработка цветов дочерних элементов окна (static, edit,button, listbox) + */ + SX_LIB_API LRESULT CtlColorChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -//! пространство имен с функциями регистрации классов созданные вручную -namespace SXGUIRegClass -{ - //! регистрация класса "ButtonImg" #ISXGUIButtonImg - SX_LIB_API bool RegButtonImg(); - //! регистрация класса "GroupBox" #ISXGUIGroupBox - SX_LIB_API bool RegGroupBox(); -}; + //! обработчик события WM_SIZING + SX_LIB_API LRESULT SizingChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -//############################################################################# + //! обработчик события WM_MOVE + SX_LIB_API LRESULT MoveChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -/*! \name Типы диалогов выбора файлов -@{*/ + //! обработчик события WM_MOUSEMOVE + SX_LIB_API LRESULT MouseMoveChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -#define SXGUI_DIALOG_FILE_OPEN 0 /*!< открыватие файла */ -#define SXGUI_DIALOG_FILE_SAVE 1 /*!< сохранение файла */ + //! обработчик события WM_SETCURSOR + SX_LIB_API LRESULT SetCursorChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -//!@} + //! обработчик события WM_COMMAND SC_MAXIMIZE + SX_LIB_API LRESULT MaximuzeWinChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -//! функции диалогов -namespace SXGUIDialogs -{ - /*! диалог выбора файла - \note path или name должен быть не 0, иначе результат вызова диалога некуда будет записать и как следствие диалог не будет вызван - */ - SX_LIB_API void SelectFile( - int type, //!< тип диалога SXGUI_DIALOG_FILE_ - char* path, //!< если не 0 то запишется путь до файла - char* name, //!< если не 0 то запишется имя файла - const char* stdpath, //!< путь относительно которого открывать диалог - const char* filter //!< фильтр расширений - ); + //! обработчик события WM_DESTROY + SX_LIB_API LRESULT WinDestroy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + }; + + //! функции диалогов + namespace dialogs + { + /*! диалог выбора файла + \note path или name должен быть не 0, иначе результат вызова диалога некуда будет записать и как следствие диалог не будет вызван + */ + SX_LIB_API void SelectFileStd( + int type, //!< тип диалога SXGUI_DIALOG_FILE_ + char* path, //!< если не 0 то запишется путь до файла + char* name, //!< если не 0 то запишется имя файла + const char* stdpath, //!< путь относительно которого открывать диалог + const char* filter //!< фильтр расширений + ); + + /*! свой диалог выбора директории + \note szOutName должен быть не 0, иначе результат вызова диалога некуда будет записать + */ + SX_LIB_API bool SelectDirOwn( + char *szOutName, //!< имя выбранной директории + char *szOutPath, //!< полный путь вместе с выбранной директорией + const char *szStartPath, //!< начальный путь + const char *szDialogName = 0,//!< название окна, если надо + bool canExplore = true, //!< возможно ли перемещаться по директориям, если нужен выбор только из одной директории то false + bool canCreateNew = true, //!< возможно ли создание новой директории + const char *szDownPath = 0, //!< путь ниже которого нельзя заходить + HandlerDialogOwndGetPreview lpfnHandlerPreview = 0 //!< если требуется предпросмотр тогда нужно указать обработчик #HandlerDialogOwndSelDir, который получит аргумент с полным текущим путем, а должен вернуть полный путь на bmp файл + ); + + /*! свой диалог выбора директории + \note szOutName должен быть не 0, иначе результат вызова диалога некуда будет записать + */ + SX_LIB_API bool SelectFileOwn( + char *szOutName, //!< имя выбранной директории + char *szOutPath, //!< полный путь вместе с выбранной директорией + const char *szStartPath, //!< начальный путь + const char *szFilterExt, //!< расширение файлов, которые надо отобразить, либо 0 или "" если нужны все файлы + const char *szDialogName = 0,//!< название окна, если надо + bool canExplore = true, //!< возможно ли перемещаться по директориям, если нужен выбор только из одной директории то false + const char *szDownPath = 0, //!< путь ниже которого нельзя заходить, + HWND hWndLock = 0, //!< окно для блокировки во время работы диалога + HandlerDialogOwndGetPreview2 lpfnHandlerPreview = 0, //!< если требуется предпросмотр тогда нужно указать обработчик #HandlerDialogOwndSelDir, который получит аргумент с полным текущим путем, а должен вернуть полный путь на bmp файл + HandlerDialogOwndGetInfo lpfnHandlerInfo = 0 + ); + }; }; #endif diff --git a/source/SXGUIWinApi/SXGUI_base_wnd.cpp b/source/SXGUIWinApi/SXGUI_base_wnd.cpp deleted file mode 100644 index 621a6fb6113f84e18d6f769fd74606bedb663814..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_base_wnd.cpp +++ /dev/null @@ -1,106 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_base_wnd.h> - -SXGUIBaseWnd::SXGUIBaseWnd( - const char* class_name,const char* caption,const char* menu, - WORD id,int x,int y,WORD width,WORD heigth, - HICON icon,HCURSOR cursor, HBRUSH brush, - DWORD exstyle,DWORD wndstyle,DWORD style, - HWND parent,WNDPROC handler - ) -{ - WNDCLASS wc; - - wc.style = wndstyle; - wc.lpfnWndProc = DefWindowProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle(0); - wc.hIcon = icon != 0 ? icon : LoadCursor(GetModuleHandle(0), IDC_ARROW); - wc.hCursor = cursor; - wc.hbrBackground = brush != 0 ? brush : (HBRUSH)GetStockObject(WHITE_BRUSH); - wc.lpszMenuName = menu; - wc.lpszClassName = class_name; - - if(!RegisterClass(&wc)) - { - MessageBox(0, "������ ��� ����������� ������ ����!", class_name, 0); - } - - this->WindowHandle = CreateWindowEx( - exstyle, - class_name, - caption, - style|WS_CLIPCHILDREN | WS_CLIPSIBLINGS, - x,y,width,heigth, - parent, - HMENU(id), - GetModuleHandle(0), - 0); - - if (!this->WindowHandle) - { - MessageBox(0, "������ �������� ����!!!", caption, 0); - } - this->Init(this->WindowHandle, parent, handler); - SetWindowLong(this->WindowHandle, GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); - ShowWindow(this->WindowHandle, SW_SHOW); - UpdateWindow(this->WindowHandle); -} - -SXGUIBaseWnd::~SXGUIBaseWnd() -{ - -} - -bool SXGUIBaseWnd::AlphaBlend(bool bf) -{ - return this->ModifyExStyle(bf ? WS_EX_LAYERED : 0,!bf ? WS_EX_LAYERED : 0); -} - -bool SXGUIBaseWnd::AlphaBlend() -{ - long style = GetWindowLong(this->WindowHandle, GWL_EXSTYLE); - return (style & WS_EX_LAYERED); -} - -bool SXGUIBaseWnd::Alpha(WORD alpha) -{ - return SetLayeredWindowAttributes(this->WindowHandle, 0, alpha, LWA_ALPHA); -} - -WORD SXGUIBaseWnd::Alpha() -{ - WORD alpha = 0; - if (!GetLayeredWindowAttributes(this->WindowHandle, 0, (BYTE*)&alpha, 0)) - return -1; - return alpha; -} - -bool SXGUIBaseWnd::SetColorBrush(BYTE r,BYTE g,BYTE b) -{ - return SetColorBrush(RGB(r, g, b)); -} - -bool SXGUIBaseWnd::SetColorBrush(DWORD color) -{ - DWORD color2 = SetClassLong(this->WindowHandle, GCL_HBRBACKGROUND, (LONG)CreateSolidBrush(color)); - InvalidateRect(this->WindowHandle, 0, TRUE); - return color2 > 0 ? true : false; -} - -DWORD SXGUIBaseWnd::GetColorBrush() -{ - HBRUSH hbrush = (HBRUSH)GetClassLong(this->WindowHandle, GCL_HBRBACKGROUND); - LOGBRUSH lbr; - ZeroMemory(&lbr,sizeof(LOGBRUSH)); - GetObject(hbrush,sizeof(LOGBRUSH),&lbr); - return (lbr.lbColor); -} - -HBRUSH SXGUIBaseWnd::GetBrush() -{ - //return GetClassLongPtr(this->WindowHandle,GCLP_HBRBACKGROUND); - return (HBRUSH)GetClassLong(this->WindowHandle, GCL_HBRBACKGROUND); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_base_wnd.h b/source/SXGUIWinApi/SXGUI_base_wnd.h deleted file mode 100644 index bd7c13023a5170ce324452e1eedb33fc8b9e77ef..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_base_wnd.h +++ /dev/null @@ -1,33 +0,0 @@ - -#ifndef SXGUI_BASE_WND_H -#define SXGUI_BASE_WND_H - -#include <SXGUIWinApi\SXGUI_base.h> -#include <SXGUIWinApi\SXGUI_menu.h> - -#pragma once - -class SXGUIBaseWnd : public SXGUITextual, public virtual ISXGUIBaseWnd -{ -public: - SXGUIBaseWnd( - const char* class_name,const char* caption,const char* menu, - WORD id,int x,int y,WORD width,WORD heigth, - HICON icon,HCURSOR cursor, HBRUSH brush, - DWORD exstyle,DWORD wndstyle,DWORD style, - HWND parent,WNDPROC handler - ); - ~SXGUIBaseWnd(); - - bool SetColorBrush(BYTE r,BYTE g,BYTE b); - bool SetColorBrush(DWORD color); - DWORD GetColorBrush(); - HBRUSH GetBrush(); - - bool Alpha(WORD alpha); - WORD Alpha(); - bool AlphaBlend(bool bf); - bool AlphaBlend(); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_button.cpp b/source/SXGUIWinApi/SXGUI_button.cpp deleted file mode 100644 index 566d1cea53e991c544a973e973a6e13f9c1f0111..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_button.cpp +++ /dev/null @@ -1,110 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_button.h> - -SXGUIButton::SXGUIButton() -{ - -} - -SXGUIButton::SXGUIButton(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - "Button", - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIButton::SXGUIButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, int image, HWND parent, WNDPROC handler, DWORD id) -{ - DWORD image_style = BS_TEXT; - - if (image == SXGUI_BUTTON_IMAGE_ICON) - image_style = BS_ICON; - else if (image == SXGUI_BUTTON_IMAGE_BITMAT) - image_style = BS_BITMAP; - - this->WindowHandle = CreateWindowEx( - 0, - "BUTTON", - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | image_style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->WindowHandle, parent, (handler == 0 ? WndProcAllDefault : handler)); - ISXGUIComponent* component = dynamic_cast<ISXGUIComponent*>(this); - SetWindowLong(this->WindowHandle, GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -bool SXGUIButton::SetIconInFile(const char* path) -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(!(style & BS_ICON)) - return false; - - HICON icon = (HICON)LoadImage(NULL,path,IMAGE_ICON,0,0,LR_LOADFROMFILE); - - if(icon == 0) - return false; - - SendMessage(this->GetHWND(),BM_SETIMAGE,IMAGE_ICON,(LPARAM)icon); - return true; -} - -bool SXGUIButton::SetBmpInFile(const char* path) -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(!(style & BS_BITMAP)) - return false; - - HBITMAP bmp = (HBITMAP)LoadImage(NULL,path,IMAGE_BITMAP,0,0,LR_LOADFROMFILE); - - if(bmp == 0) - return false; - - SendMessage(this->GetHWND(),BM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp); - return true; -} - - -bool SXGUIButton::SetIconInResourse(WORD id) -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(!(style & BS_ICON)) - return false; - - HICON icon = LoadCursor(GetModuleHandle(0),MAKEINTRESOURCE(id)); - - if(icon == 0) - return false; - - SendMessage(this->GetHWND(),BM_SETIMAGE,IMAGE_ICON,(LPARAM)icon); - return true; -} - -bool SXGUIButton::SetBmpInResourse(WORD id) -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(!(style & BS_BITMAP)) - return false; - - HBITMAP bmp = LoadBitmap(GetModuleHandle(0),MAKEINTRESOURCE(id)); - - if(bmp == 0) - return false; - - SendMessage(this->GetHWND(),BM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp); - return true; -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_check_box.cpp b/source/SXGUIWinApi/SXGUI_check_box.cpp deleted file mode 100644 index 84411ba16e23d50cd1af52829b5f3fe2abba1436..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_check_box.cpp +++ /dev/null @@ -1,53 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_check_box.h> - -#pragma once - -SXGUICheckBox::SXGUICheckBox() -{ - -} - -SXGUICheckBox::SXGUICheckBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - "BUTTON", - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUICheckBox::SXGUICheckBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id,bool cb_3_state) -{ - this->WindowHandle = CreateWindowEx( - 0, - "BUTTON", - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | (cb_3_state ? BS_AUTO3STATE : BS_AUTOCHECKBOX), - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -void SXGUICheckBox::SetCheck(int check) -{ - SendMessage(this->GetHWND(),BM_SETCHECK,check,0); -} - -int SXGUICheckBox::GetCheck() -{ - return SendMessage(this->GetHWND(), BM_GETCHECK, 0, 0); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_check_box.h b/source/SXGUIWinApi/SXGUI_check_box.h deleted file mode 100644 index d3eb25beeecf9780e8407c37a617d767812bae11..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_check_box.h +++ /dev/null @@ -1,19 +0,0 @@ - -#ifndef SXGUI_CHECK_BOX_H -#define SXGUI_CHECK_BOX_H - -#include "SXGUI_base.h" -#include "SXGUI_button.h" - -class SXGUICheckBox : public SXGUIButton, public virtual ISXGUICheckBox -{ -public: - SXGUICheckBox(); - SXGUICheckBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUICheckBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id,bool cb_3_state); - - void SetCheck(int check); - int GetCheck(); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_combo_box.cpp b/source/SXGUIWinApi/SXGUI_combo_box.cpp deleted file mode 100644 index b6396ae0795165711e8b55c48d8418bd41865600..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_combo_box.cpp +++ /dev/null @@ -1,119 +0,0 @@ - -#include "SXGUI_combo_box.h" - -SXGUIComboBox::SXGUIComboBox() -{ - -} - -SXGUIComboBox::SXGUIComboBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - "COMBOBOX", - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(), parent, (handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIComboBox::SXGUIComboBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - "COMBOBOX", - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(), parent, (handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -bool SXGUIComboBox::InsertItem(int index,const char* text) -{ - if (SendMessage(this->GetHWND(), CB_INSERTSTRING, (WPARAM)index, (LPARAM)text) < 0) - return false; - return true; -} - -bool SXGUIComboBox::DeleteItem(int index) -{ - if (SendMessage(this->GetHWND(), CB_DELETESTRING, WPARAM(index), 0) < 0) - return false; - return true; -} - -int SXGUIComboBox::GetCount() -{ - return SendMessage(this->GetHWND(), CB_GETCOUNT, 0, 0); -} - -bool SXGUIComboBox::SetSel(int index) -{ - if (SendMessage(this->GetHWND(), CB_SETCURSEL, WPARAM(index), 0) < 0) - return false; - return true; -} - -int SXGUIComboBox::GetSel() -{ - return SendMessage(this->GetHWND(), CB_GETCURSEL, 0, 0); -} - - -bool SXGUIComboBox::Clear() -{ - if (!SendMessage(this->GetHWND(), CB_RESETCONTENT, 0, 0)) - return false; - return true; -} - -bool SXGUIComboBox::SetItemData(int index,LPARAM data) -{ - if (!SendMessage(this->GetHWND(), CB_SETITEMDATA, WPARAM(index), data)) - return false; - return true; -} - -LPARAM SXGUIComboBox::GetItemData(int index) -{ - return SendMessage(this->GetHWND(), CB_GETITEMDATA, WPARAM(index), 0); -} - -bool SXGUIComboBox::SetItemText(int index,const char* text) -{ - LPARAM data = this->GetItemData(index); - if(!this->DeleteItem(index)) - return false; - if(!this->InsertItem(index,text)) - return false; - if(!this->SetItemData(index,data)) - return false; - return true; -} - -void SXGUIComboBox::GetItemText(int index,char* buf) -{ - SendMessage(this->GetHWND(), CB_GETLBTEXT, WPARAM(index), LPARAM(buf)); -} - -int SXGUIComboBox::GetItemTextLength(int index) -{ - return SendMessage(this->GetHWND(), CB_GETLBTEXTLEN, WPARAM(index), 0); -} - -bool SXGUIComboBox::AddItem(const char* text) -{ - return this->InsertItem(-1,text); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_combo_box.h b/source/SXGUIWinApi/SXGUI_combo_box.h deleted file mode 100644 index 35a20522a7ce5791f7768106b0c83683427093d7..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_combo_box.h +++ /dev/null @@ -1,34 +0,0 @@ - -#ifndef SXGUI_COMBO_BOX_H -#define SXGUI_COMBO_BOX_H - -#include "SXGUI_base.h" - -class SXGUIComboBox : public SXGUIComponent, public virtual ISXGUIComboBox -{ -public: - SXGUIComboBox(); - SXGUIComboBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - - SXGUIComboBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id); - - bool InsertItem(int index,const char* text); //������� ������ � ������ - bool DeleteItem(int index); //�������� ������ - - int GetCount(); //���������� ����� - - bool SetSel(int index); //�������� ������������ ������ - int GetSel(); //����� ���������� ������ - - bool SetItemData(int index,LPARAM data); //��������� ��� ������ userdata (32 ����) - LPARAM GetItemData(int index); //��������� userdata - - bool Clear(); //������� ��� �������� - - bool SetItemText(int index,const char* text); //������� ������ � ������, ������� ������ - void GetItemText(int index,char* buf); //�������� ����� �� ������ - int GetItemTextLength(int index); //�������� ����� ������ �� ������ - bool AddItem(const char* text); //��������� � ����� ����� ������ -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_edit.cpp b/source/SXGUIWinApi/SXGUI_edit.cpp deleted file mode 100644 index 73a1920d9e5a9add91a40cad172050347fd5afed..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_edit.cpp +++ /dev/null @@ -1,97 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_edit.h> - -#pragma once - -SXGUIEdit::SXGUIEdit() {} -SXGUIEdit::~SXGUIEdit() {} - -SXGUIEdit::SXGUIEdit(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - "EDIT", - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIEdit::SXGUIEdit(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - "EDIT", - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOHSCROLL, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -bool SXGUIEdit::ReadOnly() -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(style & ES_READONLY) - return true; - else - return false; -} - -bool SXGUIEdit::ReadOnly(bool bf) -{ - long p = bf ? 1 : 0; - SendMessage(this->GetHWND(), EM_SETREADONLY, bf ? 1 : 0, 0); - return this->ReadOnly() == bf; -} - -int SXGUIEdit::Align() -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(style & ES_RIGHT) - return SXGUI_TEXT_ALIGN_RIGHT; - else if(style & ES_CENTER) - return SXGUI_TEXT_ALIGN_CENTER; - else - return SXGUI_TEXT_ALIGN_LEFT; -} - -bool SXGUIEdit::Align(int align) -{ - if (align == SXGUI_TEXT_ALIGN_LEFT) - return this->ModifyStyle(ES_LEFT,0); - else if (align == SXGUI_TEXT_ALIGN_RIGHT) - return this->ModifyStyle(ES_RIGHT,0); - else if (align == SXGUI_TEXT_ALIGN_CENTER) - return this->ModifyStyle(ES_CENTER,0); - return false; -} - -bool SXGUIEdit::Password() -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(style & ES_PASSWORD) - return true; - else - return false; -} - -bool SXGUIEdit::Password(bool bf) -{ - long p = bf ? 1 : 0; - SendMessage(this->GetHWND(), EM_SETPASSWORDCHAR, bf ? '*' : 0, 0); - this->SetFocus(); - UpdateWindow(this->GetHWND()); - return this->Password() == bf; -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_group_box.h b/source/SXGUIWinApi/SXGUI_group_box.h deleted file mode 100644 index b641d2675481eb5b3479024dc1f332e7c1d19d91..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_group_box.h +++ /dev/null @@ -1,28 +0,0 @@ -//---------------------------------------- -// ����: SXGUI_group_box.h -// ������� ��������: ����������� group box -// Project S.I.P for SkyXEngine (09,2012) -//---------------------------------------- - -#ifndef SXGUI_GROUP_BOX_H -#define SXGUI_GROUP_BOX_H - -#include <SXGUIWinApi\SXGUI_base.h> - -#pragma once - -class SXGUIGroupBox : public SXGUITextual, public virtual ISXGUIGroupBox -{ -public: - SXGUIGroupBox(); - ~SXGUIGroupBox(); - void Release(){ mem_del(this); } - SXGUIGroupBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIGroupBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id); - -//private: - char* StrText; - int LenStrText; -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_hint.h b/source/SXGUIWinApi/SXGUI_hint.h deleted file mode 100644 index 7a83cac371c4e5bbf1c263201c21e193d6518763..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_hint.h +++ /dev/null @@ -1,42 +0,0 @@ - -#ifndef SXGUI_HINT_H -#define SXGUI_HINT_H - -#include <windows.h> -#include <commctrl.h> - -#include "SXGUI_base.h" -#include "SXGUI.h" - -class SXGUIHint : public virtual ISXGUIHint -{ -public: - SXGUIHint(); - SXGUIHint(HWND parent); - ~SXGUIHint(); - void Release(){ mem_del(this); } - //autopop - ����� ������ - //init - ������� ���� ��������� ��������� ����� ��������� ������� - void SetDelayTime(DWORD init,DWORD autopop); - - bool Parent(HWND parent); - HWND Parent(); - - HWND GetHWND(); - - void Visible(bool bf); - bool Visible(); - - void SetText(const char* text); //��������� ������ ��������� - const char* GetText(); //���������� ��������� �� ����� ���������, ��������� ��� ������ ����������� - void GetText(char* buf); - -protected: - HWND WindowHandle; - HWND ParentHandle; - TOOLINFO Hint; - char hint[SX_HINT_COUNT_BUF_SIZE]; - bool IsVisible; -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_img_button.h b/source/SXGUIWinApi/SXGUI_img_button.h deleted file mode 100644 index 737fb924ac9b017ea698265737d1c765d068739d..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_img_button.h +++ /dev/null @@ -1,67 +0,0 @@ - -#ifndef SXGUI_IMG_BUTTON_H -#define SXGUI_IMG_BUTTON_H - -#include <SXGUIWinApi\SXGUI_base.h> - -#pragma once - -class SXGUIButtonImg : public SXGUIComponent, public virtual ISXGUIButtonImg -{ -public: - SXGUIButtonImg(); - SXGUIButtonImg(const char* path,WORD x,WORD y,WORD width,WORD heigth,DWORD alpha_color,DWORD bk_color,HWND parent,WNDPROC handler,DWORD id); - SXGUIButtonImg(WORD button,WORD x,WORD y,WORD width,WORD heigth,DWORD alpha_color,DWORD bk_color,HWND parent,WNDPROC handler,DWORD id); - void Release(){ mem_del(this); } - ~SXGUIButtonImg(); - - void ReInitImage(const char* path); - - void InitCallBack(); - - void GetPathForImg(char* buf); - - void SetColorFrame(BYTE r, BYTE g, BYTE b); - void SetColorFrame(DWORD color); - DWORD GetColorFrame(); - - void SetColorBk(BYTE r, BYTE g, BYTE b); - void SetColorBk(DWORD color); - DWORD GetColorBk(); - - void SetColorAlpha(BYTE r, BYTE g, BYTE b); - void SetColorAlpha(DWORD color); - DWORD GetColorAlpha(); - - void SetEnable(bool bf); //!< ��������� ��������� ������ (�������/��������) - bool GetEnable(); //!< ���������� ��������� ������ (�������/��������) - - void SetEnableActive(bool bf); //!< ��������� ��������� ���������� ������ (��������/���������) - bool GetEnableActive(); //!< �������� �� ��������� ���������� ������? - - void SetParentGroup(bool bf); //!< ���������� ������/�� ������ ������ � ������ ��������� ����� �� ������ ������ �������� - bool GetParentGroup(); - - BITMAP Bitmap; - HANDLE HBitMap; - - bool IsImages; - - DWORD AlphaColor; //!< ���� ������� ����� �������� - DWORD BkColor; //!< ���� ���� ������ - DWORD FrameColor; //!< ���� ���� ������ - - WORD Pos; //!< ������� � ������� ������� ������ - bool PosBf[3]; //!< ����� �� ����������� ��������� - - bool EnableState; //!< ��������� ������ (�������/��������) - - bool EnableBf; //!< �������� �� ��������� ���������� ������ - bool EnableGroup; //!< �������� �� ������ � ������ ���� �������� ��������� ��������, ��� ���������� ����� �������������� ������ ��� �������� ������ ������ - - -private: - char PathForImg[1024]; -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_list_box.cpp b/source/SXGUIWinApi/SXGUI_list_box.cpp deleted file mode 100644 index 6656ae2945d2a93450588d199aab18490497f180..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_list_box.cpp +++ /dev/null @@ -1,191 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_list_box.h> - -#pragma once - -SXGUIListBox::SXGUIListBox() -{ - -} - -SXGUIListBox::SXGUIListBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - "LISTBOX", - 0, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIListBox::SXGUIListBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id,bool miltiple_sel) -{ - this->WindowHandle = CreateWindowEx( - 0, - "LISTBOX", - 0, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | LBS_HASSTRINGS | LBS_NOTIFY | WS_VSCROLL | WS_BORDER | (miltiple_sel ? LBS_EXTENDEDSEL : 0), - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(), parent, (handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -bool SXGUIListBox::MultipleSel() -{ - long style = GetWindowLong(this->GetHWND(), GWL_STYLE); - if(style & LBS_EXTENDEDSEL) - return true; - else - return false; -} - - -bool SXGUIListBox::InsertItem(int index,const char* text) -{ - if(!SendMessage(this->GetHWND(),LB_INSERTSTRING,WPARAM(index),LPARAM(text))) - return false; - return true; -} - -bool SXGUIListBox::AddItem(const char* text) -{ - if(!SendMessage(this->GetHWND(),LB_ADDSTRING,0,LPARAM(text))) - return false; - return true; -} - -bool SXGUIListBox::DeleteItem(int index) -{ - if(!SendMessage(this->GetHWND(),LB_DELETESTRING,WPARAM(index),0)) - return false; - return true; -} - -int SXGUIListBox::GetCountItem() -{ - return SendMessage(this->GetHWND(),LB_GETCOUNT,0,0); -} - -bool SXGUIListBox::SetSel(int index) -{ - return SendMessage(this->GetHWND(), LB_SETCURSEL, (WPARAM)index, 0); -} - -int SXGUIListBox::GetSel() -{ - return SendMessage(this->GetHWND(),LB_GETCURSEL,0,0); -} - - -bool SXGUIListBox::SetItemData(int index,LPARAM data) -{ - if(!SendMessage(this->GetHWND(),LB_SETITEMDATA,WPARAM(index),data)) - return false; - return true; -} - -LPARAM SXGUIListBox::GetItemData(int index) -{ - return SendMessage(this->GetHWND(),LB_GETITEMDATA,WPARAM(index),0); -} - -bool SXGUIListBox::Clear() -{ - if(!SendMessage(this->GetHWND(),LB_RESETCONTENT,0,0)) - return false; - return true; -} - -bool SXGUIListBox::SetTextItem(int index,const char* text) -{ - LPARAM data = this->GetItemData(index); - int sel = this->GetSel(); - /*if(!this->DeleteItem(index)) - return false; - if(!this->InsertItem(index,text)) - return false; - return this->SetItemData(index,data);*/ - - this->DeleteItem(index); - this->InsertItem(index,text); - if(sel == index) - { - this->SetSel(index); - } - return this->SetItemData(index,data); -} - -void SXGUIListBox::GetItemText(int index,char* buf) -{ - SendMessage(this->GetHWND(),LB_GETTEXT,WPARAM(index),LPARAM(buf)); -} - -int SXGUIListBox::GetItemTextLength(int index) -{ - return SendMessage(this->GetHWND(),LB_GETTEXTLEN,WPARAM(index),0); -} - - -int SXGUIListBox::GetMultipleSelCount() -{ - return SendMessage(this->GetHWND(),LB_GETSELCOUNT,0,0); -} - -bool SXGUIListBox::SetMultipleSel(int index,bool sel) -{ - if(!SendMessage(this->GetHWND(),LB_SETSEL,WPARAM(sel ? 1 : 0),LPARAM(index))) - return false; - return true; -} - -bool SXGUIListBox::GetMultipleSel(int index) -{ - if(!SendMessage(this->GetHWND(),LB_GETSEL,WPARAM(index),0)) - return false; - return true; -} - -void SXGUIListBox::GetMultipleSelArr(int** arr) -{ - if (!arr) - return; - - int count = this->GetMultipleSelCount(); - if(count <= 0) - return; - *arr = new int[count]; - SendMessage(this->GetHWND(),LB_GETSELITEMS,WPARAM(count),LPARAM(*arr)); -} - - -bool SXGUIListBox::ScrollBars(bool h,bool v) -{ - return SXGUIFuctinon::ScroolBars(this,h,v); -} - -bool SXGUIListBox::ScrollBarV() -{ - return SXGUIFuctinon::ScrollBarV(this);; -} - -bool SXGUIListBox::ScrollBarH() -{ - return SXGUIFuctinon::ScrollBarH(this); -} - -bool SXGUIListBox::ScrollLine(WORD scroll,WORD dir,int count) -{ - return SXGUIFuctinon::ScrollLine(this,scroll,dir,count); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_list_box.h b/source/SXGUIWinApi/SXGUI_list_box.h deleted file mode 100644 index 9d377757c17491fda15e73260beaa4c6c9d15e91..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_list_box.h +++ /dev/null @@ -1,52 +0,0 @@ - -#ifndef SXGUI_LIST_BOX_H -#define SXGUI_LIST_BOX_H - -#include <SXGUIWinApi\SXGUI_base.h> - -#pragma once - -class SXGUIListBox : public SXGUIComponent, public virtual ISXGUIListBox -{ -public: - SXGUIListBox(); - SXGUIListBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIListBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id,bool miltiple_sel); - - bool MultipleSel(); //������������ �� �������� �������������� ��������� ����� - - bool InsertItem(int index,const char* text); //�������� ����� � ������ � ������� index - bool AddItem(const char* text); //�������� ������ � ����� ������ - int GetCountItem(); //���������� ���������� ����� - - bool DeleteItem(int index); //������� ������ � ������� index - - bool SetSel(int index); //�������� ������ � ������� index - int GetSel(); - - bool SetItemData(int index,LPARAM data); //���������� userdata ��� ������ � ������� index - LPARAM GetItemData(int index); //���������� userdata - - bool Clear(); //�������� - - bool SetTextItem(int index,const char* text);//���������� ����� � ������ � ������� index - void GetItemText(int index,char* buf); //���������� ����� �� ������ - - int GetItemTextLength(int index); //���������� ����� ������ � ������ - - //��������������� �����, ���� this->MultipleSel() == true - int GetMultipleSelCount(); //���������� ���������� ���������� ����� - - bool SetMultipleSel(int index,bool sel); //������������� ��������/�� �������� ������ - bool GetMultipleSel(int index); //���������� �������� �� ������ - - void GetMultipleSelArr(int** arr); //���������� ������ � �������� ���������� ����� - - //SXGUIFuctinon - bool ScrollBars(bool h,bool v); - bool ScrollBarV(); - bool ScrollBarH(); - bool ScrollLine(WORD scroll,WORD dir,int count); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_list_view.cpp b/source/SXGUIWinApi/SXGUI_list_view.cpp deleted file mode 100644 index 9aa9e32bac68a4b0c10910ef12b1051dc1e5250f..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_list_view.cpp +++ /dev/null @@ -1,174 +0,0 @@ - -#include "SXGUI_list_view.h" - -SXGUIListView::SXGUIListView() -{ - -} - -SXGUIListView::SXGUIListView(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - WC_LISTVIEW, - 0, - style, - x, y, width, heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - - //ListView_SetExtendedListViewStyleEx(this->WindowHandle, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB | LVS_EX_ONECLICKACTIVATE); - this->Init(this->GetHWND(), parent, handler); - SetWindowLong(GetHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIListView::SXGUIListView(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - WC_LISTVIEW, - 0, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | /*WS_VSCROLL | WS_HSCROLL | LVS_ALIGNLEFT |*/ LVS_SHOWSELALWAYS | WS_BORDER | LVS_REPORT | LVS_SINGLESEL, - x, y, width, heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - - ListView_SetExtendedListViewStyleEx(this->WindowHandle, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB | LVS_EX_ONECLICKACTIVATE); - this->Init(this->GetHWND(), parent, handler); - SetWindowLong(GetHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -int SXGUIListView::InsertColumn(char* text, int col, int width) -{ - RECT rcl; - ::GetClientRect(this->WindowHandle, &rcl); - - LVCOLUMN lvc; - memset(&lvc, 0, sizeof(LVCOLUMN)); - lvc.mask = LVCF_TEXT | LVCF_WIDTH; - lvc.cx = width; - lvc.pszText = text; - - return ListView_InsertColumn(this->WindowHandle, col, &lvc); -} - -int SXGUIListView::AddColumn(char* text, int width) -{ - return InsertColumn(text, GetCountColumns(), width); -} - -void SXGUIListView::DeleteColumn(int col) -{ - ListView_DeleteColumn(this->WindowHandle, col); -} - -int SXGUIListView::GetCountColumns() -{ - HWND hwndHeader = ListView_GetHeader(this->WindowHandle); - return ::SendMessage(hwndHeader, HDM_GETITEMCOUNT, 0, 0); -} - -int SXGUIListView::AddString(long data) -{ - LVITEM lvi; - memset(&lvi, 0, sizeof(LVCOLUMN)); - lvi.mask = LVIF_TEXT | LVIF_PARAM; - lvi.iItem = GetCountString(); - lvi.iSubItem = 0; - lvi.lParam = data; - return ListView_InsertItem(this->WindowHandle, &lvi); -} - -void SXGUIListView::DeleteString(int str) -{ - ListView_DeleteItem(this->WindowHandle, str); -} - -int SXGUIListView::GetCountString() -{ - return ListView_GetItemCount(this->WindowHandle); -} - -void SXGUIListView::SetTextItem(char* text, int col, int str) -{ - ListView_SetItemText(this->WindowHandle, str, col, text); -} - -void SXGUIListView::GetTextItem(char* text, int col, int str, int sizebuff) -{ - ListView_GetItemText(this->WindowHandle, str, col, text, sizebuff); -} - -void SXGUIListView::SetDataItem(int str, long data) -{ - LVITEM lvi; - lvi.iItem = str; - lvi.iSubItem = 0; - - ListView_GetItem(this->WindowHandle, &lvi); - - lvi.mask = lvi.mask | LVIF_PARAM; - lvi.iSubItem = 0; - lvi.lParam = data; - BOOL res = ListView_SetItem(this->WindowHandle, &lvi); - int qwerty = 0; -} - -long SXGUIListView::GetDataItem(int str) -{ - LVITEM lvi; - lvi.iItem = str; - lvi.iSubItem = 0; - - BOOL res = ListView_GetItem(this->WindowHandle, &lvi); - return lvi.lParam; -} - -int SXGUIListView::GetSelString(int start) -{ - return ::SendMessage(this->WindowHandle, LVM_GETNEXTITEM, start, LVNI_SELECTED); -} - -void SXGUIListView::SetSelString(int str) -{ - ListView_SetItemState(this->WindowHandle, str, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); - this->SetFocus(); -} - -int SXGUIListView::GetSelColumn() -{ - return ListView_GetSelectedColumn(this->WindowHandle); -} - -void SXGUIListView::SetSelColumn(int col) -{ - ListView_SetSelectedColumn(this->WindowHandle, col); -} - -void SXGUIListView::Clear() -{ - ClearStrings(); - ListView_DeleteAllItems(this->WindowHandle); - - while (GetCountColumns() > 0) - { - DeleteColumn(0); - } -} - -void SXGUIListView::ClearStrings() -{ - int countstr = GetCountString(); - for (int i = 0; i < countstr; ++i) - { - DeleteString(0); - } - //BOOL bf = TabCtrl_DeleteAllItems(this->WindowHandle); - //int qwerty = 0; -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_list_view.h b/source/SXGUIWinApi/SXGUI_list_view.h deleted file mode 100644 index ff4252e266654fa8fcaf076fa90498f5ba2a58e0..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_list_view.h +++ /dev/null @@ -1,39 +0,0 @@ - -#ifndef SXGUI_LIST_VIEW_H -#define SXGUI_LIST_VIEW_H - -#include "SXGUI_base.h" - -class SXGUIListView : public SXGUIComponent, public virtual ISXGUIListView -{ -public: - SXGUIListView(); - SXGUIListView(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id); - SXGUIListView(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id); - - int InsertColumn(char* text, int col, int width); - int AddColumn(char* text, int width); - void DeleteColumn(int col); - int GetCountColumns(); - - int AddString(long data = -1); - void DeleteString(int str); - int GetCountString(); - - void SetTextItem(char* text, int col, int str); - void GetTextItem(char* text, int col, int str, int sizebuff); - - void SetDataItem(int str, long data); - long GetDataItem(int str); - - int GetSelString(int start = -1); - void SetSelString(int str); - - int GetSelColumn(); - void SetSelColumn(int col); - - void Clear(); - void ClearStrings(); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_memo.cpp b/source/SXGUIWinApi/SXGUI_memo.cpp deleted file mode 100644 index 6306b56cf0e43ba2325558c65b5cf654a1b53f73..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_memo.cpp +++ /dev/null @@ -1,78 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_memo.h> - -#pragma once - -SXGUIMemo::SXGUIMemo() -{ - -} - -SXGUIMemo::SXGUIMemo(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - "EDIT", - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIMemo::SXGUIMemo(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - "EDIT", - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | WS_BORDER | ES_AUTOVSCROLL | ES_LEFT | ES_WANTRETURN | ES_MULTILINE, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -bool SXGUIMemo::ScrollBars(bool h,bool v) -{ - return SXGUIFuctinon::ScroolBars(this,h,v); -} - -bool SXGUIMemo::ScrollBarV() -{ - return SXGUIFuctinon::ScrollBarV(this); -} - -bool SXGUIMemo::ScrollBarH() -{ - return SXGUIFuctinon::ScrollBarH(this); -} - - -bool SXGUIMemo::WordWrap() -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if((style & ES_AUTOVSCROLL) && !(style & ES_AUTOHSCROLL)) - return true; - return false; -} - -bool SXGUIMemo::WordWrap(bool bf) -{ - return this->ModifyStyle(bf ? ES_AUTOVSCROLL : 0,!bf ? ES_AUTOVSCROLL : 0); -} - -bool SXGUIMemo::ScrollLine(WORD scroll,WORD dir,int count) -{ - return SXGUIFuctinon::ScrollLine(this,scroll,dir,count); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_memo.h b/source/SXGUIWinApi/SXGUI_memo.h deleted file mode 100644 index 27a5652e09f6821a96477a685b677f0b245a3b14..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_memo.h +++ /dev/null @@ -1,26 +0,0 @@ - -#ifndef SXGUI_MEMO_H -#define SXGUI_MEMO_H - -#include <SXGUIWinApi\SXGUI_edit.h> - -#pragma once - -class SXGUIMemo : public SXGUIEdit, public virtual ISXGUIMemo -{ -public: - SXGUIMemo(); - SXGUIMemo(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIMemo(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id); - - bool WordWrap(); //���������� �� ����������� ���� - bool WordWrap(bool bf); //������������ ��������� ����������� ���� - - //SXGUIFuctinon - bool ScrollBars(bool h,bool v); - bool ScrollBarV(); - bool ScrollBarH(); - bool ScrollLine(WORD scroll,WORD dir,int count); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_menu.h b/source/SXGUIWinApi/SXGUI_menu.h deleted file mode 100644 index b979dd760f7833077711294e49981379df03dfc4..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_menu.h +++ /dev/null @@ -1,72 +0,0 @@ - -#ifndef SXGUI_MENU_H -#define SXGUI_MENU_H - -#include <SXGUIWinApi\SXGUI_base.h> - -#pragma once - -class SXGUIMenu : public virtual ISXGUIMenu -{ -public: - SXGUIMenu(); - SXGUIMenu(WORD menu); - void Release(){ mem_del(this); } - ~SXGUIMenu(); - - bool InsertItem(int index,const char* text,WORD id,WORD id_sub_menu); - bool InsertPopupItem(int index,const char* text,WORD id,WORD id_sub_menu); - bool InsertSeparator(int index,WORD id,WORD id_sub_menu); - - bool DeleteItem(WORD id); - - HMENU GetSubMenu(WORD id); - - bool CheckItem(WORD id,bool check); - bool EnableItem(WORD id, int enable); - - bool GetCheckedItem(WORD id); - int GetEnabledItem(WORD id); - - - HMENU GetHMENU(); - bool SetToWindow(HWND hwnd); - -protected: - HMENU MenuHandle; -}; - -///////////////////////// - -class SXGUIPopupMenu : public virtual ISXGUIPopupMenu -{ -public: - SXGUIPopupMenu(WORD menu); - SXGUIPopupMenu(); - void Release(){ mem_del(this); } - ~SXGUIPopupMenu(); - - bool InsertItem(int index,const char* text,WORD id,WORD id_sub_menu); - bool InsertPopupItem(int index,const char* text,WORD id,WORD id_sub_menu); - bool InsertSeparator(int index,WORD id,WORD id_sub_menu); - - bool DeleteItem(WORD id); - - HMENU GetSubMenu(WORD id); - - bool CheckItem(WORD id,bool check); - bool EnableItem(WORD id, int enable); - - bool GetCheckedItem(WORD id); - int GetEnabledItem(WORD id); - - bool Track(HWND hwnd,int x,int y); - - - HMENU GetHMENU(); - -protected: - HMENU MenuHandle; -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_progress_bar.cpp b/source/SXGUIWinApi/SXGUI_progress_bar.cpp deleted file mode 100644 index 057261cd5e9d1f5319b8082ea77bc33e510d33c9..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_progress_bar.cpp +++ /dev/null @@ -1,117 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_progress_bar.h> - -#pragma once - -SXGUIProgressBar::SXGUIProgressBar() -{ - -} - -SXGUIProgressBar::SXGUIProgressBar(WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - PROGRESS_CLASS, - 0, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - OldProc = DefWindowProc; - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIProgressBar::SXGUIProgressBar(WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id,bool vertical,bool smooth) -{ - this->WindowHandle = CreateWindowEx( - 0, - PROGRESS_CLASS, - 0, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | (smooth ? PBS_SMOOTH : 0) | (vertical ? PBS_VERTICAL : 0), - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - //SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - ISXGUIComponent* component = dynamic_cast<ISXGUIComponent*>(this); - SetWindowLong(GetHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -int SXGUIProgressBar::GetPos() -{ - return SendMessage(this->GetHWND(),PBM_GETPOS,0,0); -} - -int SXGUIProgressBar::SetPos(int pos) -{ - return SendMessage(this->GetHWND(),PBM_SETPOS,WPARAM(pos),0); -} - -int SXGUIProgressBar::GetStep() -{ - int step = SendMessage(this->GetHWND(),PBM_SETSTEP,WPARAM(0),0); - - SendMessage(this->GetHWND(),PBM_SETSTEP,WPARAM(step),0); - return step; -} - -int SXGUIProgressBar::SetStep(int step) -{ - return SendMessage(this->GetHWND(),PBM_SETSTEP,WPARAM(step),0); -} - -int SXGUIProgressBar::SetPosSteps(int steps) -{ - return SendMessage(this->GetHWND(),PBM_DELTAPOS,WPARAM(steps),0); -} - -int SXGUIProgressBar::SetOneStep() -{ - return SendMessage(this->GetHWND(),PBM_STEPIT,0,0); -} - -bool SXGUIProgressBar::SetMinMax(int min,int max) -{ - return SendMessage(this->GetHWND(),PBM_SETRANGE32,WPARAM(min),LPARAM(max)); -} - - -int SXGUIProgressBar::GetMin() -{ - return SendMessage(this->GetHWND(),PBM_GETRANGE,WPARAM(1),0); -} - -int SXGUIProgressBar::GetMax() -{ - return SendMessage(this->GetHWND(),PBM_GETRANGE,WPARAM(0),0); -} - -bool SXGUIProgressBar::SetBarColor(BYTE r, BYTE g, BYTE b) -{ - return SendMessage(this->GetHWND(),PBM_SETBARCOLOR,0,LPARAM(RGB(r,g,b))); -} - -bool SXGUIProgressBar::SetBkColor(BYTE r, BYTE g, BYTE b) -{ - return SendMessage(this->GetHWND(),PBM_SETBKCOLOR,1,LPARAM(RGB(r,g,b))); -} - -DWORD SXGUIProgressBar::GetBarColor() -{ - COLORREF color = SendMessage(this->GetHWND(),PBM_SETBARCOLOR,0,0); - return color; -} - -DWORD SXGUIProgressBar::GetBkColor() -{ - COLORREF color = SendMessage(this->GetHWND(),PBM_SETBKCOLOR,0,0); - return color; -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_progress_bar.h b/source/SXGUIWinApi/SXGUI_progress_bar.h deleted file mode 100644 index 851f157b36b3003c29a0e5438df5bfc28b34fbe9..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_progress_bar.h +++ /dev/null @@ -1,45 +0,0 @@ - -#ifndef SXGUI_PROGRESS_BAR_H -#define SXGUI_PROGRESS_BAR_H - -#include <SXGUIWinApi\SXGUI_base.h> - -#pragma once - -class SXGUIProgressBar : public SXGUIComponent, public virtual ISXGUIProgressBar -{ -public: - SXGUIProgressBar(); - SXGUIProgressBar(WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIProgressBar(WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id,bool vertical,bool smooth); - - //��������/���������� ������� ��������� - int GetPos(); //���������� ������� ������� - int SetPos(int pos); //���������� ������ ������� - - //��������/���������� ������ ���� ��������� - int GetStep(); //���������� ������� ������ ���� - int SetStep(int step); //���������� ������ ������ ���� - - //���������� �������������� ������� - int SetPosSteps(int steps); //���������� ������� �� ���������� ����� - int SetOneStep(); //��������� ������� �� ���� ��� - - //������������� ������� �������� � ��������� ��������� - //��� ������� ���������� ���������� true, ����� false - bool SetMinMax(int min,int max); - - //���������� �����������/������������ ������� ��������� - int GetMin(); - int GetMax(); - - //����������/�������� ���� ������� (���������� ���� ��������� ������� RGB(51,153,255)) - bool SetBarColor(BYTE r, BYTE g, BYTE b); //��� ������� ���������� ���������� true, ����� false - DWORD GetBarColor(); - - //����������/�������� ���� ���� (���������� ���� ����� ����� ���� ��������) - bool SetBkColor(BYTE r, BYTE g, BYTE b); //��� ������� ���������� ���������� true, ����� false - DWORD GetBkColor(); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_radio_button.cpp b/source/SXGUIWinApi/SXGUI_radio_button.cpp deleted file mode 100644 index 0d391efc2aed699ec74d68b066fef492ed3a5209..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_radio_button.cpp +++ /dev/null @@ -1,53 +0,0 @@ - -#include "SXGUI_radio_button.h" - -#pragma once - -SXGUIRadioButton::SXGUIRadioButton() -{ - -} - -SXGUIRadioButton::SXGUIRadioButton(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - "BUTTON", - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIRadioButton::SXGUIRadioButton(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - "BUTTON", - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | BS_AUTORADIOBUTTON, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -void SXGUIRadioButton::SetCheck(bool check) -{ - SendMessage(this->GetHWND(),BM_SETCHECK,(check ? BST_CHECKED : BST_UNCHECKED),0); -} - -bool SXGUIRadioButton::GetCheck() -{ - return SendMessage(this->GetHWND(),BM_GETCHECK,0,0) ? true : false; -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_radio_button.h b/source/SXGUIWinApi/SXGUI_radio_button.h deleted file mode 100644 index 2e8283eeb78728b1db894c0fa58fcf6c95d928ed..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_radio_button.h +++ /dev/null @@ -1,21 +0,0 @@ - -#ifndef SXGUI_RADIO_BUTTON_H -#define SXGUI_RADIO_BUTTON_H - -#include "SXGUI_base.h" -#include "SXGUI_button.h" - -#pragma once - -class SXGUIRadioButton : public SXGUIButton, public virtual ISXGUIRadioButton -{ -public: - SXGUIRadioButton(); - SXGUIRadioButton(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIRadioButton(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id); - - void SetCheck(bool check); - bool GetCheck(); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_static.cpp b/source/SXGUIWinApi/SXGUI_static.cpp deleted file mode 100644 index 3db716e82549fa077e0d332040d79e089e124bc2..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_static.cpp +++ /dev/null @@ -1,93 +0,0 @@ - -#include "SXGUI_static.h" - -SXGUIStatic::SXGUIStatic() -{ - -} - -SXGUIStatic::SXGUIStatic(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - "STATIC", - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIStatic::SXGUIStatic(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - "STATIC", - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | SS_LEFT, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIStatic::SXGUIStatic(WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id,bool vertical) -{ - this->WindowHandle = CreateWindowEx( - WS_EX_TOPMOST, - "STATIC", - 0, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | SS_LEFT | (vertical ? SS_ETCHEDVERT : SS_ETCHEDHORZ), - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,handler); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -int SXGUIStatic::Align() -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(style & SS_RIGHT) - return SXGUI_TEXT_ALIGN_RIGHT; - else if(style & SS_CENTER) - return SXGUI_TEXT_ALIGN_CENTER; - else - return SXGUI_TEXT_ALIGN_LEFT; -} - -bool SXGUIStatic::Align(int align) -{ - if (align == SXGUI_TEXT_ALIGN_LEFT) - return this->ModifyStyle(SS_LEFT,0); - else if (align == SXGUI_TEXT_ALIGN_RIGHT) - return this->ModifyStyle(SS_RIGHT,0); - else if (align == SXGUI_TEXT_ALIGN_CENTER) - return this->ModifyStyle(SS_CENTER,0); - return false; -} - -bool SXGUIStatic::WordWrap() -{ - long style = GetWindowLong(this->GetHWND(),GWL_STYLE); - if(!(style & SS_LEFTNOWORDWRAP)) - return true; - return false; -} - -bool SXGUIStatic::WordWrap(bool bf) -{ - return this->ModifyStyle(!bf ? SS_LEFTNOWORDWRAP : 0,bf ? SS_LEFTNOWORDWRAP : 0); -} diff --git a/source/SXGUIWinApi/SXGUI_static.h b/source/SXGUIWinApi/SXGUI_static.h deleted file mode 100644 index fe5c7108a78d0cb065f2cd6f7e5b65a4affd6933..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_static.h +++ /dev/null @@ -1,24 +0,0 @@ - -#ifndef SXGUI_STATIC_H -#define SXGUI_STATIC_H - -#include "SXGUI_base.h" - -class SXGUIStatic : public SXGUITextual, public virtual ISXGUIStatic -{ -public: - SXGUIStatic(); - SXGUIStatic(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIStatic(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id); - - //������� ����� - SXGUIStatic(WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id,bool vertical); - - int Align(); //���������� ���� ������������ ������ - bool Align(int align); //������������� ������������ ������ - - bool WordWrap(); //���������� �� ����������� ����� - bool WordWrap(bool bf); //����������� �� ��������� ����������� ����� -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_status_bar.cpp b/source/SXGUIWinApi/SXGUI_status_bar.cpp deleted file mode 100644 index 467f1df1bfe396024e67fa98b34cf07dd2962e3b..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_status_bar.cpp +++ /dev/null @@ -1,206 +0,0 @@ - -#include "SXGUI_status_bar.h" - -SXGUIStatusBar::SXGUIStatusBar() -{ - -} - -SXGUIStatusBar::SXGUIStatusBar(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - STATUSCLASSNAME, - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); - - AlignReSizing = SXGUI_STATUSBAR_ALIGNRS_PERCENT; - ArrWidth = 0; - ArrCoef = 0; - CountArr = 0; - - this->GAlign.left = false; - this->GAlign.top = false; - this->GAlign.right = false; - this->GAlign.bottom = false; -} - -SXGUIStatusBar::SXGUIStatusBar(const char* caption,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - STATUSCLASSNAME, - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | TBS_AUTOTICKS | SBARS_SIZEGRIP | CCS_BOTTOM, - CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); - - AlignReSizing = SXGUI_STATUSBAR_ALIGNRS_PERCENT; - ArrWidth = 0; - ArrCoef = 0; - CountArr = 0; - - this->GAlign.left = false; - this->GAlign.top = false; - this->GAlign.right = false; - this->GAlign.bottom = false; - - ::GetClientRect(this->GetHWND(),&this->OldRect); -} - -SXGUIStatusBar::~SXGUIStatusBar() -{ - mem_delete_a(ArrCoef); - mem_delete_a(ArrWidth); -} - -bool SXGUIStatusBar::SetCountParts(int count, int *arr) -{ - CountArr = count; - mem_delete_a(ArrWidth); - ArrWidth = 0; - ArrWidth = arr; - - this->ComCoef(); - - if(SendMessage(this->GetHWND(),SB_SETPARTS,count,(LPARAM)arr)) - return true; - else - return false; -} - -void SXGUIStatusBar::ComCoef() -{ - WORD GWidth = 0; - RECT rect; - ::GetClientRect(this->GetHWND(),&rect); - GWidth = rect.right; - float OnePercent = 100.0 / float(GWidth); - - mem_delete_a(ArrCoef); - ArrCoef = new float[CountArr]; - - for(int i=0;i<CountArr;i++) - { - ArrCoef[i] = OnePercent * ((ArrWidth[i] != -1 ? ArrWidth[i] : GWidth) - (i > 0 ? ArrWidth[i-1] : 0)); - } -} - -bool SXGUIStatusBar::SetTextParts(int pos, const char* text) -{ - SendMessage(this->GetHWND(),SB_SETTEXT,pos,(LPARAM)text); - return true; -} - -int SXGUIStatusBar::GetCountParts(int** arr) -{ - int CountParts = SendMessage(this->GetHWND(), SB_GETPARTS, 0, 0); - int *parts = new int[CountParts]; - - int tmpcp = SendMessage(this->GetHWND(), SB_GETPARTS, CountParts, (LPARAM)parts); - - if(arr != 0) - *arr = parts; - else - { - mem_delete_a(parts); - } - return CountParts; -} - -bool SXGUIStatusBar::GetTextParts(int pos, char* buf, int len) -{ - int CountSym = SendMessage(this->GetHWND(), SB_GETTEXTLENGTH, pos, 0); - if (len < CountSym) - return false; - - if (!SendMessage(this->GetHWND(), SB_GETTEXT, pos, (LPARAM)buf)) - return false; - - return true; -} - -void SXGUIStatusBar::SetAlignRS(int alignrs) -{ - AlignReSizing = alignrs; -} - -int SXGUIStatusBar::GetAlignRS() -{ - return AlignReSizing; -} - -void SXGUIStatusBar::Update() -{ - //RECT OldRect; - RECT NewRect; - //::GetClientRect(this->GetHWND(),&this->OldRect); - SendMessage(this->GetHWND(),WM_SIZE,0,0); - ::GetClientRect(this->GetHWND(),&NewRect); - - int width = NewRect.right - OldRect.right; - /*if(width != 0) - MessageBox(0,ToPointChar(width),0,0);*/ - int *Arr; - - WORD CountParts = this->GetCountParts(&Arr); - int *NewArr = new int[CountParts]; - - bool UpdateOldRect = true; - - WORD tmpCountParts = (Arr[CountParts-1] == -1 ? CountParts - 1 : CountParts); - if (AlignReSizing == SXGUI_STATUSBAR_ALIGNRS_PERCENT) - { - for(int i=0;i<tmpCountParts;i++) - { - float coef = ArrCoef[i] / 100.0; - //MessageBox(0,ToPointChar(coef),0,0); - float part_width = Arr[i] - (i > 0 ? Arr[i-1] : 0); - float new_part_width = part_width + (int(width * coef)); - //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(coef)),ToPointChar(new_part_width),0); - NewArr[i] = new_part_width + (i > 0 ? NewArr[i-1] : 0); - if(Arr[i] == NewArr[i]) - UpdateOldRect = false; - //MessageBox(0,ToPointChar(ToString(Arr[i]) + "|" + ToString(NewArr[i])),0,0); - } - } - else if (AlignReSizing == SXGUI_STATUSBAR_ALIGNRS_EQUALLY) - { - for(int i=0;i<tmpCountParts;i++) - NewArr[i] = Arr[i] + (width / CountParts); - } - else - { - for(int i=0;i<tmpCountParts;i++) - NewArr[i] = Arr[i]; - } - - if(Arr[CountParts-1] == -1) - NewArr[CountParts-1] = Arr[CountParts-1]; - - if(UpdateOldRect) - ::GetClientRect(this->GetHWND(),&this->OldRect); - - SendMessage(this->GetHWND(),SB_SETPARTS,CountParts,(LPARAM)NewArr); - mem_delete_a(Arr); - mem_delete_a(NewArr); -} - -void SXGUIStatusBar::UpdateSize() -{ - this->Update(); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_status_bar.h b/source/SXGUIWinApi/SXGUI_status_bar.h deleted file mode 100644 index 4ae85488caa08c292125757d820a383e4b1d7f0a..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_status_bar.h +++ /dev/null @@ -1,40 +0,0 @@ - -#ifndef SXGUI_STATUS_BAR_H -#define SXGUI_STATUS_BAR_H - -#include "SXGUI_base.h" - -class SXGUIStatusBar : public SXGUIComponent, public virtual ISXGUIStatusBar -{ -public: - SXGUIStatusBar(); - SXGUIStatusBar(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIStatusBar(const char* caption,HWND parent,WNDPROC handler,DWORD id); - void Release(){ mem_del(this); } - ~SXGUIStatusBar(); - - bool SetCountParts(int count, int *arr); - int GetCountParts(int **arr); - bool SetTextParts(int pos, const char* text); - bool GetTextParts(int pos, char* buf, int len); - - void Update(); - void UpdateSize(); - - void SetAlignRS(int alignrs); - int GetAlignRS(); - -protected: - - int AlignReSizing; - - RECT OldRect; - - void ComCoef(); - - float* ArrCoef; - int* ArrWidth; - WORD CountArr; -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_toolbar.cpp b/source/SXGUIWinApi/SXGUI_toolbar.cpp deleted file mode 100644 index 5374c12c9a9ddf553a3e39169fde6365053cdbb8..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_toolbar.cpp +++ /dev/null @@ -1,66 +0,0 @@ - -#include "SXGUI_toolbar.h" - -SXGUIToolBar::SXGUIToolBar() -{ - -} - -SXGUIToolBar::SXGUIToolBar(const char* caption,WORD x,WORD y,WORD width,WORD heigth,WORD width_element,WORD heigth_element,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - TOOLBARCLASSNAME, - caption, - (parent != 0 ? WS_CHILD : 0) | TBSTYLE_FLAT | WS_BORDER | CCS_NOMOVEY | CCS_NORESIZE | TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,handler); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); - - HimList = ImageList_Create (width_element, heigth_element, ILC_COLOR24 | ILC_MASK, 1, 256); - SendMessage(this->GetHWND(), TB_SETIMAGELIST, 0, (LPARAM)HimList); - ShowWindow(this->GetHWND(), SW_SHOW); -} - -SXGUIToolBar::~SXGUIToolBar() -{ - ImageList_Destroy(HimList); -} - -void SXGUIToolBar::AddButton(WORD num,WORD id,const char* hint,WORD id_resource,DWORD mask) -{ - TBBUTTON tbb[1]; - tbb[0].iBitmap = num; - tbb[0].idCommand = id; - tbb[0].fsState = TBSTATE_ENABLED; - tbb[0].fsStyle = TBSTYLE_BUTTON; - tbb[0].dwData = 0; - tbb[0].iString = (INT_PTR)hint; - - HBITMAP HBitmap = LoadBitmap (GetModuleHandle(NULL), MAKEINTRESOURCE(id_resource)); - ImageList_AddMasked (HimList, HBitmap, mask); - - SendMessage (this->GetHWND(), TB_ADDBUTTONS, 1, (LPARAM)&tbb); - SendMessage (this->GetHWND(), TB_SETMAXTEXTROWS, 0, 0); - SendMessage(this->GetHWND(), TB_ADDSTRING, 0, (LPARAM)hint); - ShowWindow (this->GetHWND(), SW_SHOW); -} - -void SXGUIToolBar::AddSeparator(WORD num) -{ - TBBUTTON tbb[1]; - tbb[0].iBitmap = num; - tbb[0].idCommand = 0; - tbb[0].fsState = TBSTATE_ENABLED; - tbb[0].fsStyle = TBSTYLE_SEP; - tbb[0].dwData = 0; - - SendMessage (this->GetHWND(), TB_ADDBUTTONS, 1, (LPARAM)&tbb); - SendMessage (this->GetHWND(), TB_SETMAXTEXTROWS, 0, 0); - ShowWindow (this->GetHWND(), SW_SHOW); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_toolbar.h b/source/SXGUIWinApi/SXGUI_toolbar.h deleted file mode 100644 index b34aed22204d815647626af9d20294d3ea424457..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_toolbar.h +++ /dev/null @@ -1,22 +0,0 @@ - -#ifndef SXGUI_TOOLBAR_H -#define SXGUI_TOOLBAR_H - -#include "SXGUI_base.h" - -class SXGUIToolBar : public SXGUIComponent, public virtual ISXGUIToolBar -{ -public: - SXGUIToolBar(); - SXGUIToolBar(const char* caption,WORD x,WORD y,WORD width,WORD heigth,WORD width_element,WORD heigth_element,HWND parent,WNDPROC handler,DWORD id); - void Release(){ mem_del(this); } - ~SXGUIToolBar(); - - void AddButton(WORD num,WORD id,const char* hint,WORD id_resource,DWORD mask); - void AddSeparator(WORD num); - -private: - HIMAGELIST HimList; -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_track_bar.cpp b/source/SXGUIWinApi/SXGUI_track_bar.cpp deleted file mode 100644 index 9591d8a6429f5e8c4328d84cc0707d9cb34c5cb9..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_track_bar.cpp +++ /dev/null @@ -1,104 +0,0 @@ - -#include "SXGUI_track_bar.h" - -SXGUITrackBar::SXGUITrackBar() -{ - -} - -SXGUITrackBar::SXGUITrackBar(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - TRACKBAR_CLASS, - caption, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUITrackBar::SXGUITrackBar(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id) -{ - this->WindowHandle = CreateWindowEx( - 0, - TRACKBAR_CLASS, - caption, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | TBS_AUTOTICKS, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -void SXGUITrackBar::SetPos(int pos) -{ - SendMessage(this->GetHWND(),TBM_SETPOS,WPARAM(TRUE),LPARAM(pos)); -} - -int SXGUITrackBar::GetPos() -{ - return SendMessage(this->GetHWND(),TBM_GETPOS,0,0); -} - -void SXGUITrackBar::SetMinMax(int min,int max) -{ - SendMessage(this->GetHWND(),TBM_SETRANGE,WPARAM(TRUE),MAKELPARAM(min,max)); -} - -int SXGUITrackBar::GetMin() -{ - return SendMessage(this->GetHWND(),TBM_GETRANGEMIN,0,0); -} - -int SXGUITrackBar::GetMax() -{ - return SendMessage(this->GetHWND(),TBM_GETRANGEMAX,0,0); -} - -bool SXGUITrackBar::SetTick(int pos) -{ - if(!SendMessage(this->GetHWND(),TBM_SETTIC,0,LPARAM(pos))) - return false; - return true; -} - -int SXGUITrackBar::GetTick(int index) -{ - return SendMessage(this->GetHWND(),TBM_GETTIC,WPARAM(index),0); -} - -void SXGUITrackBar::SetTickFrequency(int freq) -{ - SendMessage(this->GetHWND(),TBM_SETTICFREQ,WPARAM(freq),0); -} - -bool SXGUITrackBar::SetBuddies(HWND hwnd_left,HWND hwnd_right) -{ - if(!hwnd_left && !hwnd_left) - return false; - - SendMessage(this->GetHWND(),TBM_SETBUDDY,WPARAM(TRUE),LPARAM(hwnd_left)); - SendMessage(this->GetHWND(),TBM_SETBUDDY,WPARAM(FALSE),LPARAM(hwnd_right)); - - return true; -} - -HWND SXGUITrackBar::GetLeftBuddy() -{ - return HWND(SendMessage(this->GetHWND(),TBM_GETBUDDY,WPARAM(TRUE),0)); -} - -HWND SXGUITrackBar::GetRightBuddy() -{ - return HWND(SendMessage(this->GetHWND(),TBM_GETBUDDY,WPARAM(FALSE),0)); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_track_bar.h b/source/SXGUIWinApi/SXGUI_track_bar.h deleted file mode 100644 index ea21983fb6da38bbaad29ffae7af26606ce2db80..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_track_bar.h +++ /dev/null @@ -1,31 +0,0 @@ - -#ifndef SXGUI_TRACK_BAR_H -#define SXGUI_TRACK_BAR_H - -#include "SXGUI_base.h" - -class SXGUITrackBar : public SXGUIComponent, public virtual ISXGUITrackBar -{ -public: - SXGUITrackBar(); - SXGUITrackBar(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUITrackBar(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id); - - void SetPos(int pos); - int GetPos(); - - void SetMinMax(int min,int max); - int GetMin(); - int GetMax(); - - bool SetTick(int pos); - int GetTick(int index); - - void SetTickFrequency(int freq); - - bool SetBuddies(HWND hwnd_left,HWND hwnd_right); - HWND GetLeftBuddy(); - HWND GetRightBuddy(); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_up_down.cpp b/source/SXGUIWinApi/SXGUI_up_down.cpp deleted file mode 100644 index d9f1089d4601643ca31d2f2e0c560ea3fca6760d..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_up_down.cpp +++ /dev/null @@ -1,103 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_up_down.h> - -#pragma once - -SXGUIUpDown::SXGUIUpDown() -{ - -} - -SXGUIUpDown::~SXGUIUpDown() -{ - -} - -SXGUIUpDown::SXGUIUpDown(WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id,HWND buddy) -{ - this->WindowHandle = CreateWindowEx( - exstyle, - UPDOWN_CLASS, - 0, - style, - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - SendMessage(this->GetHWND(), UDM_SETRANGE32, -65535, 65535); - SendMessage(this->GetHWND(), UDM_SETPOS32, 0, 0); - if(buddy) - this->SetBuddy(buddy); - - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -SXGUIUpDown::SXGUIUpDown(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, HWND buddy, bool align_left) -{ - /*this->GetHWND() = CreateUpDownControl( - WS_CHILD | WS_BORDER | WS_VISIBLE | UDS_WRAP | UDS_SETBUDDYINT | UDS_ARROWKEYS | (left_right == 1 ?UDS_ALIGNRIGHT : UDS_ALIGNLEFT), - x,y,width,heigth, - parent, 0, GetModuleHandle(0), buddy, - 0, 0, 0 - );*/ - this->WindowHandle = CreateWindowEx( - 0, - UPDOWN_CLASS, - 0, - (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | UDS_WRAP | UDS_SETBUDDYINT | UDS_ARROWKEYS | (align_left ? UDS_ALIGNRIGHT : UDS_ALIGNLEFT), - x,y,width,heigth, - parent, - (HMENU)id, - GetModuleHandle(0), - 0); - SendMessage(this->GetHWND(), UDM_SETRANGE32, -65535, 65535); - SendMessage(this->GetHWND(), UDM_SETPOS32, 0, 0); - if(buddy) - this->SetBuddy(buddy); - - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); -} - -void SXGUIUpDown::SetMinMax(long min,long max) -{ - SendMessage(this->GetHWND(), UDM_SETRANGE32, min, max); -} - -long SXGUIUpDown::SetPos(long pos) -{ - return SendMessage(this->GetHWND(), UDM_SETPOS32, 0, pos); -} - -long SXGUIUpDown::GetMin() -{ - long min = 0; - SendMessage(this->GetHWND(), UDM_GETRANGE32, (WPARAM)&min, 0); - return min; -} - -long SXGUIUpDown::GetMax() -{ - long max = 0; - SendMessage(this->GetHWND(), UDM_GETRANGE32, 0, (LPARAM)&max); - return max; -} - -long SXGUIUpDown::GetPos() -{ - return SendMessage(this->GetHWND(), UDM_GETPOS32, 0, 0); -} - -HWND SXGUIUpDown::SetBuddy(HWND buddy) -{ - return (HWND)SendMessage(this->GetHWND(), UDM_SETBUDDY, (WPARAM)buddy, 0); -} - -HWND SXGUIUpDown::GetBuddy() -{ - return (HWND)SendMessage(this->GetHWND(), UDM_GETBUDDY, 0, 0); -} \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_up_down.h b/source/SXGUIWinApi/SXGUI_up_down.h deleted file mode 100644 index d6479427a87b14961dc31f8eff1f8ef8655cfdec..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/SXGUI_up_down.h +++ /dev/null @@ -1,28 +0,0 @@ - -#ifndef SXGUI_UP_DOWN_H -#define SXGUI_UP_DOWN_H - -#include <SXGUIWinApi\SXGUI_base.h> - -#pragma once - -class SXGUIUpDown : public SXGUIComponent, public virtual ISXGUIUpDown -{ -public: - SXGUIUpDown(); - ~SXGUIUpDown(); - SXGUIUpDown(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, DWORD id, HWND buddy); - SXGUIUpDown(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, DWORD id, HWND buddy, bool align_left); - - void SetMinMax(long min,long max); - long SetPos(long pos); - - long GetMin(); - long GetMax(); - long GetPos(); - - HWND SetBuddy(HWND buddy); - HWND GetBuddy(); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/base.cpp b/source/SXGUIWinApi/base.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dee156bff2bf051014b6243e47c30b2b57c0379d --- /dev/null +++ b/source/SXGUIWinApi/base.cpp @@ -0,0 +1,1103 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "base.h" + + +CGUIControl::CGUIControl() +{ + m_hWindow = 0; + m_hParent = 0; + m_id = -1; +} + +CGUIControl::~CGUIControl() +{ + ::DestroyWindow(m_hWindow); +} + +CGUIControl::CGUIControl(HWND window_handle, HWND parent_handle, WNDPROC handler) +{ + m_hWindow = window_handle; + m_hParent = parent_handle; + if (handler != 0) + m_lpfnPrevProc = (WNDPROC)SetWindowLong(m_hWindow, GWL_WNDPROC, (LONG)handler); +} + +void CGUIControl::init(HWND window_handle, HWND parent_handle, WNDPROC handler, ID idObj) +{ + m_hWindow = window_handle; + m_hParent = parent_handle; + + if (handler != 0) + { + if ((WNDPROC)GetWindowLong(m_hWindow, GWL_WNDPROC) != handler) + { + DWORD ptrf = SetWindowLong(m_hWindow, GWL_WNDPROC, (LONG)handler); + m_lpfnPrevProc = (WNDPROC)ptrf; + } + } + + m_id = idObj; +} + +HWND CGUIControl::getParent() +{ + return m_hParent; +} + +bool CGUIControl::setParent(HWND parent_handle) +{ + HWND OldParent = GetParent(m_hWindow); + HWND tmp_parent = SetParent(m_hWindow, parent_handle); + if (tmp_parent = OldParent) + { + m_hParent = parent_handle; + return true; + } + return false; +} + +HWND CGUIControl::getHWND() +{ + return m_hWindow; +} + +void CGUIControl::setFocus() +{ + ::SetFocus(m_hWindow); +} + +bool CGUIControl::getFocus() +{ + return GetFocus() == m_hWindow ? true : false; +} + +void CGUIControl::setVisible(bool bf) +{ + ShowWindow(m_hWindow, bf ? SW_SHOW : SW_HIDE); +} + +bool CGUIControl::getVisible() +{ + return IsWindowVisible(m_hWindow); +} + +WNDPROC CGUIControl::getPrevWndProc() +{ + return m_lpfnPrevProc; +} + +void* CGUIControl::getUserPtr() +{ + return(m_pUserPtr); +} +void* CGUIControl::setUserPtr(void *ptr) +{ + void * oldPtr = m_pUserPtr; + m_pUserPtr = ptr; + return(oldPtr); +} + +//########################################################################## + +CGUIComponent::CGUIComponent() +{ + m_pHint = 0; + + m_aFollowParentSide[SXGUI_SIDE_TOP] = false; + m_aFollowParentSide[SXGUI_SIDE_BOTTOM] = false; + m_aFollowParentSide[SXGUI_SIDE_RIGHT] = false; + m_aFollowParentSide[SXGUI_SIDE_LEFT] = false; + + m_rcParentScreen.top = m_rcParentScreen.bottom = m_rcParentScreen.left = m_rcParentScreen.right = 0; + m_isTransparentTextBk = true; + + m_aStrethSide[SXGUI_SIDE_TOP] = true; + m_aStrethSide[SXGUI_SIDE_BOTTOM] = true; + m_aStrethSide[SXGUI_SIDE_RIGHT] = true; + m_aStrethSide[SXGUI_SIDE_LEFT] = true; + + m_iMinSizeWidth = m_iMinSizeHeight = 0; + //Font = 0; +} + +CGUIComponent::~CGUIComponent() +{ + mem_delete(m_pHint); + //delete Font; + //Font = 0; +} + +void CGUIComponent::initComponent() +{ + COLORREF color_bk = GetBkColor(GetDC(m_hWindow)); + COLORREF color_text = GetTextColor(GetDC(m_hWindow)); + COLORREF color_brush = GetDCBrushColor(GetDC(m_hWindow)); + + m_dwColorText = color_text; + m_dwColorTextBk = color_bk; + m_dwColorBrush = color_brush; + + m_hBrush = CreateSolidBrush(m_dwColorBrush); + + GetWindowRect(getParent(), &m_rcParentScreen); + + GetWindowRect(m_hWindow, &m_rcWinScreen); + MapWindowPoints(getParent(), HWND_DESKTOP, (LPPOINT)&m_rcWinScreen, 2); + + RECT rc; + GetWindowRect(m_hWindow, &rc); + + m_rcOffsetParent.top = m_rcOffsetParent.bottom = m_rcOffsetParent.left = m_rcOffsetParent.right = 0; + + //MinSizeX = rc.right - rc.left; + //MinSizeY = rc.bottom - rc.top; + + //HFONT HandleFont; + //SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, &HandleFont, 0); + + HFONT HandleFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); + SendMessage( + m_hWindow, + WM_SETFONT, + WPARAM(HandleFont), + 0); + DeleteObject(HandleFont); + //Font = new SXFont(); + //SetFont(Font); +} + +bool CGUIComponent::getEnable() +{ + return ((IsWindowEnabled(getHWND()) == 0) ? false : true); +} + +void CGUIComponent::setEnable(bool bf) +{ + EnableWindow(getHWND(), (bf ? 1 : 0)); +} + +bool CGUIComponent::setWinRect(const RECT* rect, bool alignment_screen_space) +{ + RECT wrect; + SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); + UINT width_screen = wrect.right; + UINT heigth_screen = wrect.bottom; + + //MessageBox(0,ToPointChar(ToString(width_screen) + "|" + ToString(heigth_screen)),0,0); + + WORD x = rect->left; + WORD y = rect->top; + WORD width = rect->right - rect->left; + WORD heigth = rect->bottom - rect->top; + //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(heigth)),"wh",0); + if (alignment_screen_space) + { + x = x < width_screen ? x : width_screen; + y = y < heigth_screen ? y : heigth_screen; + //MessageBox(0,ToPointChar(ToString(rect->right) + "|" + ToString(rect->bottom)),"wh",0); + width = rect->right <= width_screen ? width : width_screen - x; + heigth = rect->bottom <= heigth_screen ? heigth : heigth_screen - y; + + /*if(x < 0) + x = 0; + if(y < 0) + y = 0;*/ + } + //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(heigth)),"wh",0); + BOOL bf = MoveWindow(getHWND(), x, y, width, heigth, true); + return bf == TRUE ? true : false; +} + +void CGUIComponent::getWinRect(RECT* rect) +{ + GetWindowRect(getHWND(), rect); +} + +bool CGUIComponent::setClientRect(const RECT* rect, bool alignment_screen_space) +{ + RECT wrect; + SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); + long width_screen = wrect.right; + long heigth_screen = wrect.bottom; + + //MessageBox(0,ToPointChar(ToString(width_screen) + "|" + ToString(heigth_screen)),0,0); + + long x = rect->left; + long y = rect->top; + long width = rect->right - rect->left; + long heigth = rect->bottom - rect->top; + //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(heigth)),"wh",0); + if (alignment_screen_space) + { + x = x < width_screen ? x : width_screen; + y = y < heigth_screen ? y : heigth_screen; + //MessageBox(0,ToPointChar(ToString(rect->right) + "|" + ToString(rect->bottom)),"wh",0); + width = rect->right <= width_screen ? width : width_screen - x; + heigth = rect->bottom <= heigth_screen ? heigth : heigth_screen - y; + } + //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(heigth)),"wh",0); + BOOL bf = MoveWindow(getHWND(), x, y, width, heigth, TRUE); + /*RECT* qwerr = GetClientRect(); + if(x != qwerr->left || y != qwerr->top || width != qwerr->right - qwerr->left || heigth != qwerr->bottom - qwerr->top) + MessageBox(0,0,0,0);*/ + return bf == TRUE ? true : false; +} + +void CGUIComponent::getClientRect(RECT* rect) +{ + GetWindowRect(getHWND(), rect); + MapWindowPoints(NULL, getParent(), (LPPOINT)rect, 2); +} + +void CGUIComponent::setFont(const char* name, int height, int width, int weight, int italic, int underline, int strike_out) +{ + HFONT hfont = getHFont(); + LOGFONT LogFont; + ZeroMemory(&LogFont, sizeof(&LogFont)); + GetObject(hfont, sizeof(LOGFONT), &LogFont); + if (name != 0) + strcpy(LogFont.lfFaceName, name); + + if (height != -1) + LogFont.lfHeight = height; + + if (width != -1) + LogFont.lfWidth = width; + + if (weight != -1) + LogFont.lfWeight = weight; + + if (italic != -1) + LogFont.lfItalic = italic; + + if (underline != -1) + LogFont.lfUnderline = underline; + + if (strike_out != -1) + LogFont.lfStrikeOut = strike_out; + DeleteObject(hfont); + hfont = ::CreateFontIndirect(&LogFont); + SendMessage(getHWND(), WM_SETFONT, WPARAM(hfont), 1); +} + +void CGUIComponent::setHFont(HFONT hfont) +{ + SendMessage(getHWND(), WM_SETFONT, WPARAM(hfont), 1); +} +/* +void CGUIComponent::GetFont(SXFont* font) +{ +if(font) +{ +Font->SetHandleFont((HFONT)SendMessage(m_hWindow, WM_GETFONT, 0, 0)); +memcpy(font,Font,sizeof(SXFont)); +} +//return (HFONT)SendMessage(m_hWindow, WM_GETFONT, 0, 0); +}*/ + +HFONT CGUIComponent::getHFont() +{ + return (HFONT)SendMessage(m_hWindow, WM_GETFONT, 0, 0); +} + +//����� �� ����� ����������� ��� ������ ������� ����� ������ +//����� ������� ������ �� ��������� � ��� ... � ��� +/*void CGUIComponent::SetFont(SXFont* font) +{ +if(font) +{ +memcpy(Font,font,sizeof(SXFont)); +//Font->SetHandleFont(font->GetHandleFont()); +SendMessage(m_hWindow,WM_SETFONT,WPARAM(font->GetHandleFont()),0); +} +}*/ + +HFONT CGUIComponent::getParentHFont() +{ + return (HFONT)SendMessage(getParent(), WM_GETFONT, 0, 0); +} + +bool CGUIComponent::hasParentFont() +{ + HFONT ChildHFont = getHFont(); + HFONT ParentHFont = getParentHFont(); + LOGFONT ChildLF, ParentLF; + ZeroMemory(&ChildLF, sizeof(&ChildLF)); + GetObject(ChildHFont, sizeof(LOGFONT), &ChildLF); + ZeroMemory(&ParentLF, sizeof(&ParentLF)); + GetObject(ParentHFont, sizeof(LOGFONT), &ParentLF); + if (ChildLF.lfCharSet != ParentLF.lfCharSet) + return false; + if (ChildLF.lfClipPrecision != ParentLF.lfClipPrecision) + return false; + if (ChildLF.lfEscapement != ParentLF.lfEscapement) + return false; + if (ChildLF.lfHeight != ParentLF.lfHeight) + return false; + if (ChildLF.lfItalic != ParentLF.lfItalic) + return false; + if (ChildLF.lfOrientation != ParentLF.lfOrientation) + return false; + if (ChildLF.lfOutPrecision != ParentLF.lfOutPrecision) + return false; + if (ChildLF.lfPitchAndFamily != ParentLF.lfPitchAndFamily) + return false; + if (ChildLF.lfQuality != ParentLF.lfQuality) + return false; + if (ChildLF.lfStrikeOut != ParentLF.lfStrikeOut) + return false; + if (ChildLF.lfUnderline != ParentLF.lfUnderline) + return false; + if (ChildLF.lfWeight != ParentLF.lfWeight) + return false; + if (ChildLF.lfWidth != ParentLF.lfWidth) + return false; + if (strcmp(ChildLF.lfFaceName, ParentLF.lfFaceName) != 0) + return false; + return true; +} + + +bool CGUIComponent::modifyStyle(long style_add, long style_del) +{ + + if (style_add) + { + if (!SetWindowLong(getHWND(), GWL_STYLE, GetWindowLong(getHWND(), GWL_STYLE) | style_add)) + return false; + } + + if (style_del) + { + if (!SetWindowLong(getHWND(), GWL_STYLE, GetWindowLong(getHWND(), GWL_STYLE)&~style_del)) + return false; + } + return true; +} + +bool CGUIComponent::modifyExStyle(long style_add, long style_del) +{ + + if (style_add) + { + if (!SetWindowLong(getHWND(), GWL_EXSTYLE, GetWindowLong(getHWND(), GWL_EXSTYLE) | style_add)) + return false; + } + + if (style_del) + { + if (!SetWindowLong(getHWND(), GWL_EXSTYLE, GetWindowLong(getHWND(), GWL_EXSTYLE)&~style_del)) + return false; + } + return true; +} + +void CGUIComponent::setShowHint(bool bf) +{ + if (m_pHint != 0) + m_pHint->setVisible(bf); + else + { + m_pHint = new CGUIHint(getHWND()); + m_pHint->setVisible(bf); + } +} + +bool CGUIComponent::getShowHint() +{ + if (m_pHint != 0) + return m_pHint->getVisible(); + return false; +} + +void CGUIComponent::setHintText(const char* text) +{ + if (m_pHint == 0) + m_pHint = new CGUIHint(getHWND()); + m_pHint->setText(text); +} + +const char* CGUIComponent::getHintText() +{ + if (m_pHint != 0) + return m_pHint->getText(); + return 0; +} + +void CGUIComponent::updateSize() +{ + char classname[256]; + GetClassName(getHWND(), classname, 256); + if (strcmp(classname, WC_LISTVIEW) == 0) + int qwerty = 0; + RECT rect; + RECT win_screen_rect; + BOOL bf = GetWindowRect(getHWND(), &rect); + + GetWindowRect(getHWND(), &win_screen_rect); + //MapWindowPoints(m_hParent, HWND_DESKTOP, (LPPOINT)&win_screen_rect, 2); + + RECT NewParentRect; + GetWindowRect(getParent(), &NewParentRect); + + //if(NewParentRect.top != m_rcParentScreen.top) + //MessageBox(0,ToPointChar(NewParentRect.top),ToPointChar(m_rcParentScreen.top),0); + + //���������� ��������� � ������������ �������� + //MapWindowPoints(NULL, m_hParent, (LPPOINT)&rect, 2); + + if (abs(m_rcOffsetParent.left) > 30000 || abs(m_rcOffsetParent.right) > 30000 || abs(m_rcOffsetParent.top) > 30000 || abs(m_rcOffsetParent.bottom) > 30000) + return; + + //�������� �� ���� ������������ + RECT offset; + offset.left = m_rcOffsetParent.left ? m_rcOffsetParent.left : NewParentRect.left - m_rcParentScreen.left; + offset.right = m_rcOffsetParent.right ? m_rcOffsetParent.right : NewParentRect.right - m_rcParentScreen.right; + offset.top = m_rcOffsetParent.top ? m_rcOffsetParent.top : NewParentRect.top - m_rcParentScreen.top; + offset.bottom = m_rcOffsetParent.bottom ? m_rcOffsetParent.bottom : NewParentRect.bottom - m_rcParentScreen.bottom; + + //MessageBox(0,ToPointChar(offset.top),ToPointChar(m_rcParentScreen.top),0); + + + if (m_aFollowParentSide[SXGUI_SIDE_LEFT]) //rect.left + { + if (m_aFollowParentSide[SXGUI_SIDE_RIGHT]) + rect.right -= offset.left; + /*else + rect.right += offset.left;*/ + } + else + { + rect.left = rect.left - offset.left; + rect.right -= offset.left; + } + + if (m_aFollowParentSide[SXGUI_SIDE_TOP]) //rect.top + { + //MessageBox(0,ToPointChar(offset.top),ToPointChar(rect.top),0); + //rect.top = rect.top + offset.top; + if (m_aFollowParentSide[SXGUI_SIDE_BOTTOM]) + rect.bottom -= offset.top; + } + else + { + rect.top = rect.top - offset.top; + rect.bottom -= offset.top; + } + + if (m_aFollowParentSide[SXGUI_SIDE_RIGHT]) //rect.right + { + rect.right = rect.right + offset.right; + if (!m_aFollowParentSide[SXGUI_SIDE_LEFT]) //rect.left + rect.left += offset.right; + } + + if (m_aFollowParentSide[SXGUI_SIDE_BOTTOM]) //rect.bottom + { + + rect.bottom = rect.bottom + offset.bottom; + if (!m_aFollowParentSide[SXGUI_SIDE_TOP]) //rect.top + rect.top += offset.bottom; + } + + MapWindowPoints(NULL, getParent(), (LPPOINT)&rect, 2); + + + //MapWindowPoints(m_hParent, HWND_DESKTOP, (LPPOINT)&m_rcWinScreen, 2); + //MessageBox(0,ToPointChar(rect.bottom - rect.top),ToPointChar(rect.bottom - rect.top),0); + + bf = MoveWindow(getHWND(), rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, true); + //SetWinRect(&rect,true); + GetWindowRect(getParent(), &m_rcParentScreen); + GetWindowRect(getHWND(), &m_rcWinScreen); + + m_rcOffsetParent.top = m_rcOffsetParent.bottom = m_rcOffsetParent.left = m_rcOffsetParent.right = 0; + + DWORD err = GetLastError(); + int qweerty = 0; +} + +void CGUIComponent::updateRect() +{ + //MessageBox(0,"UpdateRect","UpdateRect",0); + RECT tmprect; + GetWindowRect(getParent(), &tmprect); + m_rcOffsetParent.top = tmprect.top - m_rcParentScreen.top; + m_rcOffsetParent.left = tmprect.left - m_rcParentScreen.left; + m_rcOffsetParent.bottom = tmprect.bottom - m_rcParentScreen.bottom; + m_rcOffsetParent.right = tmprect.right - m_rcParentScreen.right; + //MessageBox(0,ToPointChar(tmprect.top - m_rcParentScreen.top),ToPointChar(0),0); + GetWindowRect(getParent(), &m_rcParentScreen); + //GetWindowRect(m_hWindow,&m_rcWinScreen); +} + +void CGUIComponent::setColorText(DWORD color) +{ + m_dwColorText = color; + InvalidateRect(getHWND(), 0, 1); +} + +DWORD CGUIComponent::getColorText() +{ + return m_dwColorText; +} + +void CGUIComponent::setTransparentTextBk(bool bf) +{ + m_isTransparentTextBk = bf; + InvalidateRect(getHWND(), 0, 1); +} + +bool CGUIComponent::getTransparentTextBk() +{ + return m_isTransparentTextBk; +} + +void CGUIComponent::setColorTextBk(DWORD color) +{ + m_dwColorTextBk = color; + InvalidateRect(getHWND(), 0, 1); +} + +DWORD CGUIComponent::getColorTextBk() +{ + return m_dwColorTextBk; +} + + +bool CGUIComponent::setColorBrush(DWORD color) +{ + m_dwColorBrush = color; + + DeleteObject(m_hBrush); + m_hBrush = CreateSolidBrush(m_dwColorBrush); + InvalidateRect(getHWND(), 0, 1); + return true; +} + +DWORD CGUIComponent::getColorBrush() +{ + return m_dwColorBrush; +} + +HBRUSH CGUIComponent::getBrush() +{ + return m_hBrush; +} + +void CGUIComponent::addHandler(HandlerFunc Handler, UINT Msg, WPARAM wParam, bool considerWparam, LPARAM lParam, bool considerLparam, bool isMain) +{ + CHandlerData oHandler; + oHandler.m_fnHandler = Handler; + oHandler.m_uMsg = Msg; + oHandler.m_wParam = wParam; + oHandler.m_needAllowW = considerWparam; + oHandler.m_lParam = lParam; + oHandler.m_needAllowL = considerLparam; + oHandler.m_isMainFunction = isMain; + + m_aHandlers.push_back(oHandler); +} + +void CGUIComponent::addHandler(HandlerFunc Handler, UINT Msg) +{ + CHandlerData oHandler; + oHandler.m_fnHandler = Handler; + oHandler.m_uMsg = Msg; + oHandler.m_wParam = 0; + oHandler.m_needAllowW = false; + oHandler.m_lParam = 0; + oHandler.m_needAllowL = false; + oHandler.m_isMainFunction = false; + + m_aHandlers.push_back(oHandler); +} + +CHandlerData* CGUIComponent::getHandler(ID idHandler) +{ + if (idHandler >= 0 && m_aHandlers.size() > idHandler) + return &(m_aHandlers[idHandler]); + + return 0; +} + +int CGUIComponent::getCountHandlers() +{ + return m_aHandlers.size(); +} + +LRESULT CGUIComponent::executeHandler(ID idHandler, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + if (idHandler >= 0 && m_aHandlers.size() > idHandler) + return (m_aHandlers[idHandler].m_fnHandler)(hWnd, uMsg, wParam, lParam); + + return 0; +} + +void CGUIComponent::setMixSize(UINT uMinWidth, UINT uMinHeght) +{ + m_iMinSizeWidth = uMinWidth; + m_iMinSizeHeight = uMinHeght; +} + +UINT CGUIComponent::getMinWidth() +{ + return m_iMinSizeWidth; +} + +UINT CGUIComponent::getMinHeight() +{ + return m_iMinSizeHeight; +} + +void CGUIComponent::setStretchSides(bool canTop, bool canBottom, bool canRight, bool canLeft) +{ + m_aStrethSide[SXGUI_SIDE_TOP] = canTop; + m_aStrethSide[SXGUI_SIDE_BOTTOM] = canBottom; + m_aStrethSide[SXGUI_SIDE_RIGHT] = canRight; + m_aStrethSide[SXGUI_SIDE_LEFT] = canLeft; +} + +void CGUIComponent::setStretchSide(SXGUI_SIDE side, bool can) +{ + m_aStrethSide[side] = can; +} + +bool CGUIComponent::getStretchSide(SXGUI_SIDE side) +{ + return m_aStrethSide[side]; +} + + +void CGUIComponent::setFollowParentSides(bool canTop, bool canBottom, bool canRight, bool canLeft) +{ + m_aFollowParentSide[SXGUI_SIDE_TOP] = canTop; + m_aFollowParentSide[SXGUI_SIDE_BOTTOM] = canBottom; + m_aFollowParentSide[SXGUI_SIDE_RIGHT] = canRight; + m_aFollowParentSide[SXGUI_SIDE_LEFT] = canLeft; +} + +void CGUIComponent::setFollowParentSide(SXGUI_SIDE side, bool can) +{ + m_aFollowParentSide[side] = can; +} + +bool CGUIComponent::getFollowParentSide(SXGUI_SIDE side) +{ + return m_aFollowParentSide[side]; +} + +//########################################################################## + +CGUITextual::CGUITextual() +{ + +} + +CGUITextual::~CGUITextual() +{ + +} + +bool CGUITextual::setText(const char* text) +{ + return gui_func::text::SetText(this, text); +} + +/*const char* CGUITextual::GetText() +{ +return gui_func::text::GetTextOut(this); +}*/ + +void CGUITextual::getText(char* buf, int size) +{ + gui_func::text::GetText(this, buf, size); +} + +int CGUITextual::getTextLen() +{ + return gui_func::text::GetTextLen(this); +} + +//########################################################################## + +BOOL IsEdit(HWND hWnd) +{ + if (hWnd == NULL) + return FALSE; + + TCHAR szClassName[6]; + return ::GetClassNameA(hWnd, szClassName, 6) && + stricmp(szClassName, "Edit") == 0; +} + + +LRESULT CALLBACK WndProcAllDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + ISXGUIComponent *Component = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); + + if (Component) + { + if (msg == WM_LBUTTONDOWN || msg == WM_RBUTTONDOWN || msg == WM_MBUTTONDOWN) + { + Component->setFocus(); + } + + if (msg == WM_KEYDOWN) + { + if (wParam == 'A' && (GetKeyState(VK_CONTROL) & 0x80)) + { + // User pressed Ctrl-A. Let's select-all + if (IsEdit(hwnd)) + { + SendMessage(hwnd, EM_SETSEL, 0, -1); + return(1); + } + } + } + HandlerFunc MainFunction = 0; //������� �������-����������, �� �������� � ����� ������������ + Array<HandlerFunc> SecondFunction; //������ �������������� ������������ �� ���������, �� �������� �� ������ ������ + //int CountSecond = 0; //���������� �������������� �������-������������ + //�������������� ������������� ������ + for (int i = 0; i<Component->getCountHandlers(); i++) + { + CHandlerData *pHandler = Component->getHandler(i); + if (pHandler->m_uMsg == msg) + { + if ( + (!(pHandler->m_needAllowW) || (pHandler->m_needAllowW && pHandler->m_wParam == wParam)) && + (!(pHandler->m_needAllowL) || (pHandler->m_needAllowL && pHandler->m_lParam == lParam)) + ) + { + if (pHandler->m_isMainFunction) + MainFunction = pHandler->m_fnHandler; + else + SecondFunction.push_back(pHandler->m_fnHandler); + } + } + } + + //�������� ��� �������������� ������� ����������� + for (int i = 0, il = SecondFunction.size(); i < il; ++i) + { + SecondFunction[i](hwnd, msg, wParam, lParam); + } + + //���� ���� ������� ������� ������� �� �������� �� � ���������� �� �������� + if (MainFunction) + return MainFunction(hwnd, msg, wParam, lParam); + + return CallWindowProc(Component->getPrevWndProc(), hwnd, msg, wParam, lParam); + } + + return CallWindowProc(Component->getPrevWndProc(), hwnd, msg, wParam, lParam); +} + +//########################################################################## + +/*bool gui_func::text::ScroolBars(ISXGUIControl *Control, bool h, bool v) +{ + return ShowScrollBar(Control->getHWND(), SB_HORZ, h ? 1 : 0) && ShowScrollBar(Control->getHWND(), SB_VERT, v ? 1 : 0); +} + +bool gui_func::text::ScrollBarV(ISXGUIControl *Control) +{ + long style = GetWindowLong(Control->getHWND(), GWL_STYLE); + if (style & WS_VSCROLL) + return true; + return false; +} + +bool gui_func::text::ScrollBarH(ISXGUIControl *Control) +{ + long style = GetWindowLong(Control->getHWND(), GWL_STYLE); + if (style & WS_HSCROLL) + return true; + return false; +} + +bool gui_func::text::ScrollLine(ISXGUIControl *Control, int scroll, int dir, int count) +{ + long _scroll = scroll == SXGUI_SCROLL_TYPE_VERT ? WM_VSCROLL : WM_HSCROLL; + long _dir = 0; + if (_scroll == WM_VSCROLL) + _dir = dir == SXGUI_SCROLL_DIR_DOWN ? SB_LINEDOWN : SB_LINEUP ; + else + _dir = dir == SXGUI_SCROLL_DIR_RIGTH ? SB_LINERIGHT : SB_LINELEFT ; + + bool bf = true; + for (int i = 0; i<count; i++) + { + bf = SendMessage(Control->getHWND(), _scroll, _dir, 0); + } + + return bf;//SendMessage(Control->getHWND(),_scroll,_dir,LPARAM(count)) == 0 ? true : false; +} +*/ +bool gui_func::text::SetText(ISXGUIControl*const Control, const char* text) +{ + if (!SetWindowText(Control->getHWND(), text)) + return false; + else + return true; +} + +void gui_func::text::GetText(ISXGUIControl *Control, char* buf, int count) +{ + GetWindowText(Control->getHWND(), buf, count); +} + +int gui_func::text::GetTextLen(ISXGUIControl *Control) +{ + return GetWindowTextLength(Control->getHWND()); +} + +//########################################################################## + +BOOL CALLBACK gui_func::enum_child::EnumChildProcUpdateImgButton(HWND hwnd, LPARAM lParam) +{ + ISXGUIComponent *Component = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); + + if (Component) + { + char ClassName[256]; + int error = GetClassName(hwnd, ClassName, 256); + if (error && strcmp(ClassName, "SXGUIBUTTONIMG") == 0 && Component) + SendMessage(hwnd, WM_KILLFOCUS, 0, lParam); + } + + return TRUE; +} + +BOOL CALLBACK gui_func::enum_child::EnumChildProcUpdateSize(HWND hwnd, LPARAM lParam) +{ + ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong(hwnd, GWL_USERDATA); + if (Component) + Component->updateSize(); + + return TRUE; +} + +BOOL CALLBACK gui_func::enum_child::EnumChildProcUpdateRect(HWND hwnd, LPARAM lParam) +{ + ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong(hwnd, GWL_USERDATA); + if (Component) + Component->updateRect(); + + return TRUE; +} + +BOOL CALLBACK gui_func::enum_child::EnumChildProcMouseMove(HWND hwnd, LPARAM lParam) +{ + ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong(hwnd, GWL_USERDATA); + + if (Component) + { + POINT p; + GetCursorPos(&p); + RECT rect; + GetWindowRect(hwnd, &rect); + + if (Component && !((p.x >= rect.left && p.x <= rect.right) && (p.y >= rect.top && p.y <= rect.bottom))) + { + SendMessage(Component->getHWND(), WM_NCMOUSEMOVE, lParam, 0); + } + } + + return TRUE; +} + +//########################################################################## + +void gui_func::base_handlers::InitHandlerMsg(ISXGUIComponent* Component) +{ + Component->addHandler(gui_func::base_handlers::CtlColorChange, WM_CTLCOLORSTATIC, 0, 0, 0, 0, true); + Component->addHandler(gui_func::base_handlers::CtlColorChange, WM_CTLCOLOREDIT, 0, 0, 0, 0, true); + Component->addHandler(gui_func::base_handlers::CtlColorChange, WM_CTLCOLORBTN, 0, 0, 0, 0, true); + Component->addHandler(gui_func::base_handlers::CtlColorChange, WM_CTLCOLORLISTBOX, 0, 0, 0, 0, true); + + Component->addHandler(gui_func::base_handlers::SizeChange, WM_SIZE, 0, 0, 0, 0, true); + Component->addHandler(gui_func::base_handlers::SizingChange, WM_SIZING, 0, 0, 0, 0, true); + Component->addHandler(gui_func::base_handlers::WinDestroy, WM_DESTROY, 0, 0, 0, 0, true); + + Component->addHandler(gui_func::base_handlers::MoveChange, WM_MOVE, 0, 0, 0, 0, true); + Component->addHandler(gui_func::base_handlers::MouseMoveChange, WM_MOUSEMOVE, 0, 0, 0, 0, true); + Component->addHandler(gui_func::base_handlers::MaximuzeWinChange, WM_SYSCOMMAND, SC_MAXIMIZE, true, 0, 0, true); + Component->addHandler(gui_func::base_handlers::SetCursorChange, WM_SETCURSOR, 0, 0, 0, 0, true); +} + +LRESULT gui_func::base_handlers::CtlColorChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong((HWND)lParam, GWL_USERDATA); + + if (Component) + { + if (Component->getTransparentTextBk()) + SetBkMode((HDC)wParam, TRANSPARENT); + else + SetBkColor((HDC)wParam, Component->getColorTextBk()); + SetTextColor((HDC)wParam, Component->getColorText()); + return (long)Component->getBrush(); + } + return((LRESULT)INVALID_HANDLE_VALUE); +} + +LRESULT gui_func::base_handlers::SizeChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + EnumChildWindows(hwnd, (WNDENUMPROC)&gui_func::enum_child::EnumChildProcUpdateSize, lParam); + return TRUE; +} + +LRESULT gui_func::base_handlers::SizingChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong(hwnd, GWL_USERDATA); + + if (!Component) + return TRUE; + + RECT rc; + GetWindowRect(hwnd, &rc); + POINT p; + GetCursorPos(&p); + + RECT lpRect = *((LPRECT)lParam); + + if (Component) + { + + if (!Component->getStretchSide(SXGUI_SIDE_TOP)) + lpRect.top = rc.top; + + if (!Component->getStretchSide(SXGUI_SIDE_LEFT)) + lpRect.left = rc.left; + + if (!Component->getStretchSide(SXGUI_SIDE_RIGHT)) + lpRect.right = rc.right; + + if (!Component->getStretchSide(SXGUI_SIDE_BOTTOM)) + lpRect.bottom = rc.bottom; + + if (Component->getMinWidth() != 0 && Component->getMinHeight() != 0) + { + if (lpRect.right - lpRect.left < Component->getMinWidth() && Component->getStretchSide(SXGUI_SIDE_RIGHT)) + { + lpRect.right += Component->getMinWidth() - (lpRect.right - lpRect.left); + } + + if (lpRect.bottom - lpRect.top < Component->getMinHeight() && Component->getStretchSide(SXGUI_SIDE_BOTTOM)) + { + lpRect.bottom += Component->getMinHeight() - (lpRect.bottom - lpRect.top); + } + } + } + + *((LPRECT)lParam) = lpRect; + + return TRUE; +} + +LRESULT gui_func::base_handlers::MoveChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + EnumChildWindows(hwnd, (WNDENUMPROC)&gui_func::enum_child::EnumChildProcUpdateRect, lParam); + return TRUE; +} + +LRESULT gui_func::base_handlers::MouseMoveChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + EnumChildWindows(hwnd, (WNDENUMPROC)&gui_func::enum_child::EnumChildProcMouseMove, lParam); + return ::DefWindowProc(hwnd, msg, wParam, lParam); +} + +LRESULT gui_func::base_handlers::SetCursorChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + EnumChildWindows(hwnd, (WNDENUMPROC)&gui_func::enum_child::EnumChildProcMouseMove, lParam); + return ::DefWindowProc(hwnd, msg, wParam, lParam); +} + +LRESULT gui_func::base_handlers::MaximuzeWinChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + EnumChildWindows(hwnd, (WNDENUMPROC)&gui_func::enum_child::EnumChildProcUpdateSize, lParam); + return DefWindowProc(hwnd, msg, wParam, lParam); +} + +LRESULT gui_func::base_handlers::WinDestroy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + PostQuitMessage(0); + return ::DefWindowProc(hwnd, msg, wParam, lParam); +} + +//########################################################################## + +void gui_func::dialogs::SelectFileStd(int type, char* path, char* name, const char* stdpath, const char* filter) +{ + OPENFILENAME ofn; + + char tpath[1024]; + char tname[256]; + + if (!path && !name) + return; + + if (path) + tpath[0] = tpath[1] = 0; + + if (name) + tname[0] = tname[1] = 0; + + ZeroMemory(&ofn, sizeof(OPENFILENAME)); + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hInstance = GetModuleHandle(0); + ofn.hwndOwner = 0; + ofn.lpstrFilter = filter; + ofn.lpstrFile = tpath; + ofn.nMaxFile = sizeof(tpath); + ofn.lpstrInitialDir = stdpath; + + if (name) + { + ofn.lpstrFileTitle = tname; + ofn.nMaxFileTitle = sizeof(tname); + } + + ofn.Flags = 0; + + //if (path) + ofn.Flags |= OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; + + /*if (name) + ofn.Flags |= OFN_FILEMUSTEXIST;*/ + + char bf[256]; + GetCurrentDirectory(256, bf); + BOOL Result = FALSE; + if (type == SXGUI_DIALOG_FILE_OPEN) + Result = GetOpenFileName(&ofn); + else if (type == SXGUI_DIALOG_FILE_SAVE) + Result = GetSaveFileName(&ofn); + + SetCurrentDirectory(bf); + + if (Result) + { + if (path) + strcpy(path, tpath); + + if (name) + strcpy(name, tname); + } +} + +SX_LIB_API bool gui_func::dialogs::SelectDirOwn(char *szOutName, char *szOutPath, const char *szStartPath, const char *szDialogName, bool canExplore, bool canCreateNew, const char *szDownPath, HandlerDialogOwndGetPreview lpfnHandlerPreview) +{ + return DialogOwnSelectDirRun(szOutName, szOutPath, szStartPath, szDialogName, canExplore, canCreateNew, szDownPath, lpfnHandlerPreview); +} + +SX_LIB_API bool gui_func::dialogs::SelectFileOwn(char *szOutName, char *szOutPath, const char *szStartPath, const char *szFilterExt, const char *szDialogName, bool canExplore, const char *szDownPath, HWND hWndLock, HandlerDialogOwndGetPreview2 lpfnHandlerPreview, HandlerDialogOwndGetInfo lpfnHandlerInfo) +{ + return DialogOwnSelectFileRun(szOutName, szOutPath, szStartPath, szFilterExt, szDialogName, canExplore, szDownPath, hWndLock, lpfnHandlerPreview, lpfnHandlerInfo); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/base.h b/source/SXGUIWinApi/base.h new file mode 100644 index 0000000000000000000000000000000000000000..d36217d16d97f12348c98df597db43ebd4a1169a --- /dev/null +++ b/source/SXGUIWinApi/base.h @@ -0,0 +1,207 @@ + +/*********************************************************** +Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_BASE_H +#define __SXGUI_BASE_H + +#include "hint.h" +#include "SXGUI.h" +#include "dialog_select_dir.h" +#include "dialog_select_file.h" +#include <common/array.h> + + +//первый базовый класс, единственным родителем не используется +//определяет объект как контрол, то есть содержит в себе минимум данных для +//управления объектом +class CGUIControl : public virtual ISXGUIControl +{ +public: + CGUIControl(); + CGUIControl(HWND hWindow, HWND hParent, WNDPROC lpfnHandler); + ~CGUIControl(); + + void Release(){ mem_del(this); } + + + void init(HWND hWindow, HWND hParent, WNDPROC lpfnHandler, ID idObj); //запоминаем дескрипторы, и устанавливаем новый обработчик + + HWND getParent(); //возвращает HWND родителя + bool setParent(HWND hParent); //устанавливает родителя + + HWND getHWND(); + + void setVisible(bool isVisible); //установка видимости контрола + bool getVisible(); //видим ли контрол? + + void setFocus(); //установить фокус на контрол + bool getFocus(); //установлен ли фокус на контроле? + + WNDPROC getPrevWndProc(); + + void* getUserPtr(); + void* setUserPtr(void *prt); + +private: + void *m_pUserPtr; + ID m_id; + +protected: + HWND m_hParent; + HWND m_hWindow; + WNDPROC m_lpfnPrevProc; //!< старый обработчик + +}; + +//########################################################################## + +#define COMPONENT_PRECOD_HANDLER_ID(id, retval){if!(id >= 0 && m_aHandlers.size() > id)return retval;} + +//второй в очереди родитель, часто наследование идет именно от него +//более расширенное управление большинством элементов +class CGUIComponent : public CGUIControl, public virtual ISXGUIComponent +{ +public: + CGUIComponent(); + ~CGUIComponent(); + + void Release(){ mem_del(this); } + //устанавливает необходимые данные для управления элементом + void initComponent(); //необходимо вызывать после инициализации + + //действителен ли элемент + bool getEnable(); + void setEnable(bool isEnable); + + //работа со шрифтом + //если name == 0 то не изменияем название шрифта, + //если name[0] == 0 то дефолтный шрифт gui + //если остальные значения в -1 то не учитываются + void setFont(const char *szName, int iHeight, int iWidth, int iWeight, int iItalic, int iUnderline, int iStrikeOut); + void setHFont(HFONT hFont); + HFONT getHFont(); + + bool hasParentFont(); //наследуется ли шрифт родителя + HFONT getParentHFont(); //получает родительский шрифт + + //работа со стилями (в т.ч. специальным) + //style_add - добавляемые стили + //style_del - удаляемые + bool modifyStyle(long lStyleAdd, long lStyleDel); + bool modifyExStyle(long lStyleAdd, long lStyleDel); + + //устанавливает/возвращает область окна RECT элемента в глобальных координатах + bool setWinRect(const RECT *pRect, bool alignment_screen_space); //alignment_screen_space - использовать ли только работчую область (рабочий стол кроме панели задач) + RECT* getWinRect(); + void getWinRect(RECT *pRect); + + //устанавливает/возвращает клиентскую область RECT элемента в глобальных координатах + bool setClientRect(const RECT *pRect, bool isBoundScreen); //alignment_screen_space - использовать ли только работчую область (рабочий стол кроме панели задач) + void getClientRect(RECT *pRect); + + //!!!первоначально нужно единожды включить видимость подсказки, ибо в этот момент она инициализируется + //видимость подсказки + void setShowHint(bool isShowHint); + bool getShowHint(); + + //работа с текстом подсказки для элемента + void setHintText(const char *szStr); + const char* getHintText(); + void getHintText(char *szBuf); + + //функции для цветов + //set/get цвет текста + void setColorText(DWORD dwColor); + DWORD getColorText(); + + //set/get прозрачность заднего фона текста + void setTransparentTextBk(bool isTransparent); + bool getTransparentTextBk(); + + //set/get цвет заднего фона + void setColorTextBk(DWORD dwColor); + DWORD getColorTextBk(); + + //set/get цвет заднего фона элемента + bool setColorBrush(DWORD dwColor); + DWORD getColorBrush(); + HBRUSH getBrush(); + + //все что касается обработчиков функций + /////////////////////////////////////// + + //добавление обработчика + void addHandler(HandlerFunc Handler, UINT uMsg, WPARAM wParam, bool considerWparam, LPARAM lParam, bool considerLparam, bool isMain); + void addHandler(HandlerFunc Handler, UINT uMsg); //все что необъявлено из функции выше не учитывается + + CHandlerData* getHandler(ID idHandler); //возвращает обработчик + int getCountHandlers(); //количество ключей в массиве обработчиков + + LRESULT executeHandler(ID idHandler, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //выполняет функцию обработчик, в аргументы отправляет свои аргументы + /////////////////////////////////////// + + void updateSize(); + void updateRect(); + + void setMixSize(UINT uMinWidth, UINT uMinHeght); + UINT getMinWidth(); + UINT getMinHeight(); + + void setStretchSides(bool canTop, bool canBottom, bool canRight, bool canLeft); + void setStretchSide(SXGUI_SIDE side, bool can); + bool getStretchSide(SXGUI_SIDE side); + + void setFollowParentSides(bool canTop, bool canBottom, bool canRight, bool canLeft); + void setFollowParentSide(SXGUI_SIDE side, bool can); + bool getFollowParentSide(SXGUI_SIDE side); + + +protected: + + //данные необходимые для UpdateSize + RECT m_rcParentScreen; //!< координаты родителя + RECT m_rcOffsetParent; //!< на сколько был изменен родитель + RECT m_rcWinScreen; //!< координаты текущего окна относительно рабочего стола + + //! всплывающая подсказка + ISXGUIHint *m_pHint; + + //! массив обработчиков сообщений + Array<CHandlerData> m_aHandlers; + + DWORD m_dwColorBrush; //цвет заливки формы + HBRUSH m_hBrush; + + DWORD m_dwColorText; //цвет текста + bool m_isTransparentTextBk; //используется прозрачность? если true то заднего фона у текста не будет + DWORD m_dwColorTextBk; //цвет заднего фона у текста + + int m_iMinSizeWidth; //!< минимальный размер окна по ширине + int m_iMinSizeHeight; //!< минимальный размер окна по высоте + + bool m_aStrethSide[SXGUI_SIDE_COUNT]; + bool m_aFollowParentSide[SXGUI_SIDE_COUNT]; +}; + +//########################################################################## + +//третий (если нужен текст) родитель, непосредтсвенно не используется +//характеризует элемент как содержащий единый текст (caption), текстовый компонент +class CGUITextual : public CGUIComponent, public virtual ISXGUITextual +{ +public: + CGUITextual(); + ~CGUITextual(); + + void Release(){ mem_del(this); } + + bool setText(const char* text); + void getText(char* buf, int size); + int getTextLen(); +}; + + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/base_wnd.cpp b/source/SXGUIWinApi/base_wnd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e261be40aceb83f0a8b7128bcbae7ec0b6ceafea --- /dev/null +++ b/source/SXGUIWinApi/base_wnd.cpp @@ -0,0 +1,107 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "base_wnd.h" + +CGUIBaseWnd::CGUIBaseWnd( + const char* class_name,const char* caption, + int x,int y,int width,int heigth, + HICON icon,HCURSOR cursor, HBRUSH brush, + DWORD exstyle,DWORD wndstyle,DWORD style, + HWND parent, WNDPROC handler, ID idObj + ) +{ + WNDCLASS wc; + + wc.style = wndstyle; + wc.lpfnWndProc = DefWindowProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = GetModuleHandle(0); + wc.hIcon = icon != 0 ? icon : LoadCursor(GetModuleHandle(0), IDC_ARROW); + wc.hCursor = cursor; + wc.hbrBackground = brush != 0 ? brush : (HBRUSH)GetStockObject(WHITE_BRUSH); + wc.lpszMenuName = 0; + wc.lpszClassName = class_name; + + if(!RegisterClass(&wc)) + { + MessageBox(0, "������ ��� ����������� ������ ����!", class_name, 0); + } + + m_hWindow = CreateWindowEx( + exstyle, + class_name, + caption, + (parent != 0 ? WS_CHILD : 0) | style | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, + x,y,width,heigth, + parent, + (idObj > 0 ? (HMENU)idObj : 0), + GetModuleHandle(0), + 0); + + if (!m_hWindow) + { + MessageBox(0, "������ �������� ����!!!", caption, 0); + } + this->init(m_hWindow, parent, handler, idObj); + SetWindowLong(m_hWindow, GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); + if (style & WS_VISIBLE) + ShowWindow(m_hWindow, SW_SHOW); + UpdateWindow(m_hWindow); +} + +CGUIBaseWnd::~CGUIBaseWnd() +{ + +} + +bool CGUIBaseWnd::setAlphaBlend(bool bf) +{ + return this->modifyExStyle(bf ? WS_EX_LAYERED : 0,!bf ? WS_EX_LAYERED : 0); +} + +bool CGUIBaseWnd::getAlphaBlend() +{ + long style = GetWindowLong(m_hWindow, GWL_EXSTYLE); + return (style & WS_EX_LAYERED); +} + +bool CGUIBaseWnd::setAlpha(float fAlpha) +{ + return SetLayeredWindowAttributes(m_hWindow, 0, (BYTE)(fAlpha * 255.f), LWA_ALPHA); +} + +float CGUIBaseWnd::getAlpha() +{ + WORD alpha = 0; + if (!GetLayeredWindowAttributes(m_hWindow, 0, (BYTE*)&alpha, 0)) + return -1; + return float(alpha) / 255.f; +} + +bool CGUIBaseWnd::setColorBrush(DWORD color) +{ + DWORD color2 = SetClassLong(m_hWindow, GCL_HBRBACKGROUND, (LONG)CreateSolidBrush(color)); + InvalidateRect(m_hWindow, 0, TRUE); + return color2 > 0 ? true : false; +} + +DWORD CGUIBaseWnd::getColorBrush() +{ + HBRUSH hbrush = (HBRUSH)GetClassLong(m_hWindow, GCL_HBRBACKGROUND); + LOGBRUSH lbr; + ZeroMemory(&lbr,sizeof(LOGBRUSH)); + GetObject(hbrush,sizeof(LOGBRUSH),&lbr); + return (lbr.lbColor); +} + +HBRUSH CGUIBaseWnd::getBrush() +{ + //return GetClassLongPtr(m_hWindow,GCLP_HBRBACKGROUND); + return (HBRUSH)GetClassLong(m_hWindow, GCL_HBRBACKGROUND); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/base_wnd.h b/source/SXGUIWinApi/base_wnd.h new file mode 100644 index 0000000000000000000000000000000000000000..6bddf5a0349df5749c5d489a73d0723a6f66e9a9 --- /dev/null +++ b/source/SXGUIWinApi/base_wnd.h @@ -0,0 +1,36 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_BASE_WND_H +#define __SXGUI_BASE_WND_H + +#include "base.h" +#include "menu.h" + + +class CGUIBaseWnd : public CGUITextual, public virtual ISXGUIBaseWnd +{ +public: + CGUIBaseWnd( + const char* class_name, const char* caption, + int x, int y, int width, int heigth, + HICON icon,HCURSOR cursor, HBRUSH brush, + DWORD exstyle,DWORD wndstyle,DWORD style, + HWND parent,WNDPROC handler, ID idObj + ); + ~CGUIBaseWnd(); + + bool setColorBrush(DWORD color); + DWORD getColorBrush(); + HBRUSH getBrush(); + + bool setAlpha(float fAlpha); + float getAlpha(); + bool setAlphaBlend(bool isBlend); + bool getAlphaBlend(); +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/button.cpp b/source/SXGUIWinApi/button.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c7bd239a31a963748ae61b97d79372ecc5db0477 --- /dev/null +++ b/source/SXGUIWinApi/button.cpp @@ -0,0 +1,115 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "button.h" + +CGUIButton::CGUIButton() +{ + +} + +CGUIButton::CGUIButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + "Button", + caption, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIButton::CGUIButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, SXGUI_BUTTON_IMAGE type_image, HWND parent, WNDPROC handler, ID idObj) +{ + DWORD image_style = BS_TEXT; + + if (type_image == SXGUI_BUTTON_IMAGE_ICON) + image_style = BS_ICON; + else if (type_image == SXGUI_BUTTON_IMAGE_BITMAT) + image_style = BS_BITMAP; + + m_hWindow = CreateWindowEx( + 0, + "BUTTON", + caption, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | image_style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(m_hWindow, parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + ISXGUIComponent* component = dynamic_cast<ISXGUIComponent*>(this); + SetWindowLong(m_hWindow, GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +bool CGUIButton::setIconFromFile(const char* path) +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(!(style & BS_ICON)) + return false; + + HICON icon = (HICON)LoadImage(NULL,path,IMAGE_ICON,0,0,LR_LOADFROMFILE); + + if(icon == 0) + return false; + + SendMessage(this->getHWND(),BM_SETIMAGE,IMAGE_ICON,(LPARAM)icon); + return true; +} + +bool CGUIButton::setBmpFromFile(const char* path) +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(!(style & BS_BITMAP)) + return false; + + HBITMAP bmp = (HBITMAP)LoadImage(NULL,path,IMAGE_BITMAP,0,0,LR_LOADFROMFILE); + + if(bmp == 0) + return false; + + SendMessage(this->getHWND(),BM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp); + return true; +} + + +bool CGUIButton::setIconFromResourse(UINT idRes) +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(!(style & BS_ICON)) + return false; + + HICON icon = LoadCursor(GetModuleHandle(0), MAKEINTRESOURCE(idRes)); + + if(icon == 0) + return false; + + SendMessage(this->getHWND(),BM_SETIMAGE,IMAGE_ICON,(LPARAM)icon); + return true; +} + +bool CGUIButton::setBmpFromResourse(UINT idRes) +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(!(style & BS_BITMAP)) + return false; + + HBITMAP bmp = LoadBitmap(GetModuleHandle(0), MAKEINTRESOURCE(idRes)); + + if(bmp == 0) + return false; + + SendMessage(this->getHWND(),BM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp); + return true; +} \ No newline at end of file diff --git a/source/SXGUIWinApi/button.h b/source/SXGUIWinApi/button.h new file mode 100644 index 0000000000000000000000000000000000000000..918ae052a2e5bfac56dc25de7d90f123c5d49c7c --- /dev/null +++ b/source/SXGUIWinApi/button.h @@ -0,0 +1,27 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_BUTTON_H +#define __SXGUI_BUTTON_H + +#include "base.h" + + +class CGUIButton : public CGUITextual, public virtual ISXGUIButton +{ +public: + CGUIButton(); + CGUIButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, SXGUI_BUTTON_IMAGE type_image, HWND parent, WNDPROC handler, ID idObj); + + bool setIconFromFile(const char* path); + bool setBmpFromFile(const char* path); + + bool setIconFromResourse(UINT idRes); + bool setBmpFromResourse(UINT idRes); +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/checkbox.cpp b/source/SXGUIWinApi/checkbox.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc767c4dfcce34fdf618dbbc5741d710a9555fde --- /dev/null +++ b/source/SXGUIWinApi/checkbox.cpp @@ -0,0 +1,62 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "checkbox.h" + + +CGUICheckBox::CGUICheckBox() +{ + +} + +CGUICheckBox::CGUICheckBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + "BUTTON", + caption, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(m_hWindow, parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUICheckBox::CGUICheckBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj, bool cb_3_state) +{ + m_hWindow = CreateWindowEx( + 0, + "BUTTON", + caption, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | (cb_3_state ? BS_AUTO3STATE : BS_AUTOCHECKBOX), + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(m_hWindow, parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +void CGUICheckBox::setCheckEx(SXGUI_CHECKBOX_STATE check) +{ + SendMessage(m_hWindow, BM_SETCHECK, check, 0); +} + +void CGUICheckBox::setCheck(bool isCheck) +{ + SendMessage(m_hWindow, BM_SETCHECK, isCheck, 0); +} + +SXGUI_CHECKBOX_STATE CGUICheckBox::getCheck() +{ + return (SXGUI_CHECKBOX_STATE)SendMessage(this->getHWND(), BM_GETCHECK, 0, 0); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/checkbox.h b/source/SXGUIWinApi/checkbox.h new file mode 100644 index 0000000000000000000000000000000000000000..d1e9431b41b80ccbaefc2bf43c6b5ff693eb51c1 --- /dev/null +++ b/source/SXGUIWinApi/checkbox.h @@ -0,0 +1,26 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_CHECK_BOX_H +#define __SXGUI_CHECK_BOX_H + +#include "base.h" +#include "button.h" + + +class CGUICheckBox : public CGUIButton, public virtual ISXGUICheckBox +{ +public: + CGUICheckBox(); + CGUICheckBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUICheckBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj, bool cb_3_state); + + void setCheckEx(SXGUI_CHECKBOX_STATE check); + void setCheck(bool isCheck); + SXGUI_CHECKBOX_STATE getCheck(); +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/combobox.cpp b/source/SXGUIWinApi/combobox.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b43470c69596e64ebc31b3bee6d97f11ed0ba2cb --- /dev/null +++ b/source/SXGUIWinApi/combobox.cpp @@ -0,0 +1,124 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "combobox.h" + +CGUIComboBox::CGUIComboBox() +{ + +} + +CGUIComboBox::CGUIComboBox(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + "COMBOBOX", + 0, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIComboBox::CGUIComboBox(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + "COMBOBOX", + 0, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +bool CGUIComboBox::insertItem(int index,const char* text) +{ + if (SendMessage(this->getHWND(), CB_INSERTSTRING, (WPARAM)index, (LPARAM)text) < 0) + return false; + return true; +} + +bool CGUIComboBox::deleteItem(int index) +{ + if (SendMessage(this->getHWND(), CB_DELETESTRING, WPARAM(index), 0) < 0) + return false; + return true; +} + +int CGUIComboBox::getCount() +{ + return SendMessage(this->getHWND(), CB_GETCOUNT, 0, 0); +} + +bool CGUIComboBox::setSel(int index) +{ + if (SendMessage(this->getHWND(), CB_SETCURSEL, WPARAM(index), 0) < 0) + return false; + return true; +} + +int CGUIComboBox::getSel() +{ + return SendMessage(this->getHWND(), CB_GETCURSEL, 0, 0); +} + + +bool CGUIComboBox::clear() +{ + if (!SendMessage(this->getHWND(), CB_RESETCONTENT, 0, 0)) + return false; + return true; +} + +bool CGUIComboBox::setItemData(int index,LPARAM data) +{ + if (!SendMessage(this->getHWND(), CB_SETITEMDATA, WPARAM(index), data)) + return false; + return true; +} + +LPARAM CGUIComboBox::getItemData(int index) +{ + return SendMessage(this->getHWND(), CB_GETITEMDATA, WPARAM(index), 0); +} + +bool CGUIComboBox::setItemText(int index,const char* text) +{ + LPARAM data = getItemData(index); + if(!deleteItem(index)) + return false; + if(!insertItem(index,text)) + return false; + if(!setItemData(index,data)) + return false; + return true; +} + +void CGUIComboBox::getItemText(int index,char* buf) +{ + SendMessage(this->getHWND(), CB_GETLBTEXT, WPARAM(index), LPARAM(buf)); +} + +int CGUIComboBox::getItemTextLength(int index) +{ + return SendMessage(this->getHWND(), CB_GETLBTEXTLEN, WPARAM(index), 0); +} + +bool CGUIComboBox::addItem(const char* text) +{ + return this->insertItem(-1,text); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/combobox.h b/source/SXGUIWinApi/combobox.h new file mode 100644 index 0000000000000000000000000000000000000000..50db5a5704c06aaefea8a07eabcab6985c1a74ac --- /dev/null +++ b/source/SXGUIWinApi/combobox.h @@ -0,0 +1,40 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_COMBO_BOX_H +#define __SXGUI_COMBO_BOX_H + +#include "base.h" + + +class CGUIComboBox : public CGUIComponent, public virtual ISXGUIComboBox +{ +public: + CGUIComboBox(); + CGUIComboBox(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + + CGUIComboBox(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj); + + bool insertItem(int index,const char* text); //������� ������ � ������ + bool deleteItem(int index); //�������� ������ + + int getCount(); //���������� ����� + + bool setSel(int index); //�������� ������������ ������ + int getSel(); //����� ���������� ������ + + bool setItemData(int index,LPARAM data); //��������� ��� ������ userdata (32 ����) + LPARAM getItemData(int index); //��������� userdata + + bool clear(); //������� ��� �������� + + bool setItemText(int index,const char* text); //������� ������ � ������, ������� ������ + void getItemText(int index,char* buf); //�������� ����� �� ������ + int getItemTextLength(int index); //�������� ����� ������ �� ������ + bool addItem(const char* text); //��������� � ����� ����� ������ +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/dialog_select_dir.cpp b/source/SXGUIWinApi/dialog_select_dir.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16033f14ff9b89fdf2e69cc3729664c15d120e8f --- /dev/null +++ b/source/SXGUIWinApi/dialog_select_dir.cpp @@ -0,0 +1,387 @@ + +#include "dialog_select_dir.h" + + +namespace dialog_seldir +{ + ISXGUIBaseWnd *pSelectDirectory; + ISXGUIBaseWnd *pPreView; + ISXGUIListBox *pListBox; + ISXGUIStatic *pStaticCreateNew; + ISXGUIEdit *pEditCreateNew; + ISXGUIButton *pButtonCreateNew; + ISXGUIButton *pButtonCancel; + ISXGUIButton *pButtonSelect; + ISXGUIEdit *pEditCurrentPath; + ISXGUIStatic *pStaticCurrentPath; + + void InitAllElements(); + + void InitDataListBox(const char *szPath); + + void DeleteAllElements(); + + String sCurrPath; + String sSelName; + String sDownDir; + + HandlerDialogOwndGetPreview lpfnHandlerPreview = 0; + + bool canExplore; +}; + +//########################################################################## + +LRESULT ListBox_LUP(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (dialog_seldir::lpfnHandlerPreview) + InvalidateRect(dialog_seldir::pPreView->getHWND(), 0, TRUE); + + return 0; +} + +LRESULT ListBox_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (!dialog_seldir::canExplore) + return 0; + + int iSel = dialog_seldir::pListBox->getSel(); + + if (iSel < 0) + return 0; + + int iNesting = FileCountNesting(dialog_seldir::sCurrPath.c_str()); + + char szSel[MAX_PATH]; + dialog_seldir::pListBox->getItemText(iSel, szSel); + + if (iNesting > 0 && iSel == 0 && strcmp(szSel,"..") == 0) + { + String sPrevPath = FileGetPrevDir(dialog_seldir::sCurrPath.c_str()); + dialog_seldir::InitDataListBox(sPrevPath.c_str()); + } + else + { + //dialog_seldir::sCurrPath = dialog_seldir::sCurrPath + "/" + szSel; + dialog_seldir::InitDataListBox((FileAppendSlash(dialog_seldir::sCurrPath.c_str()) + szSel).c_str()); + } + + return 0; +} + +LRESULT EditCurrentPath_Enter(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + char szPath[1024]; + dialog_seldir::pEditCurrentPath->getText(szPath, 1024); + + if (!FileExistsInPath(szPath, dialog_seldir::sDownDir.c_str())) + { + char szMessage[1024]; + sprintf(szMessage, "Unresolved explore down path [%s]", dialog_seldir::sDownDir.c_str()); + MessageBox(hWnd, szMessage, 0, 0); + dialog_seldir::pEditCurrentPath->setText(dialog_seldir::sCurrPath.c_str()); + return 0; + } + + if (FileExistsDir(szPath)) + dialog_seldir::InitDataListBox(szPath); + else + { + char szMessage[1024]; + sprintf(szMessage, "Directory [%s] is not exists", szPath); + MessageBox(hWnd, szMessage, 0, 0); + } + return 0; +} + +LRESULT EditCurrentPath_Input(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + char szPath[1024]; + dialog_seldir::pEditCurrentPath->getText(szPath, 1024); + + const char *szBase = FileBaseName(szPath); + dialog_seldir::pListBox->setSel(-1); + if (strlen(szBase) == 0) + return 0; + + char szDir[MAX_PATH]; + char *szFound = 0; + for (int i = 0; i < dialog_seldir::pListBox->getItemCount(); ++i) + { + dialog_seldir::pListBox->getItemText(i, szDir); + + if ((szFound = strstr(szDir, szBase)) && (szFound - szDir) == 0) + { + //gui_func::scrollbar::ScrollLine(dialog_seldir::pListBox, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_UP, dialog_seldir::pListBox->getItemCount()); + //gui_func::scrollbar::ScrollLine(dialog_seldir::pListBox, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_DOWN, i); + + dialog_seldir::pListBox->setSel(i); + + break; + } + } + + return 0; +} + +LRESULT SelectDirectory_Exit(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + dialog_seldir::pSelectDirectory->setVisible(false); + return 0; +} + +LRESULT ButtonCreateNew_Click(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + char szNewDir[1024]; + dialog_seldir::pEditCreateNew->getText(szNewDir, 1024); + + if (strlen(szNewDir) == 0) + { + MessageBox(hWnd, "Input name for new directory", 0, 0); + } + else + { + String sNewPath = dialog_seldir::sCurrPath + szNewDir; + if (FileExistsDir(sNewPath.c_str())) + MessageBox(hWnd, "This directory is exists, input other name", 0, 0); + else + { + CreateDirectory(sNewPath.c_str(), NULL); + dialog_seldir::pEditCreateNew->setText(""); + dialog_seldir::InitDataListBox(dialog_seldir::sCurrPath.c_str()); + } + } + + return 0; +} + +LRESULT ButtonSelect_Click(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + int iSel = dialog_seldir::pListBox->getSel(); + + if (iSel < 0) + { + MessageBox(hWnd, "No select directory", 0, 0); + return 0; + } + + char szSelDir[1024]; + dialog_seldir::pListBox->getItemText(iSel, szSelDir); + dialog_seldir::sSelName = szSelDir; + dialog_seldir::pSelectDirectory->setVisible(false); + + return 0; +} + +LRESULT CALLBACK PreviewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + PAINTSTRUCT ps; + HDC hdc; + HDC hmdc; + HBITMAP hBitmap; + BITMAP bm; + + switch (message) + { + case WM_PAINT: + + char szPreview[1024]; + int iSel = dialog_seldir::pListBox->getSel(); + if (iSel < 0) + return DefWindowProc(hWnd, message, wParam, lParam); + + char szSel[1024]; + dialog_seldir::pListBox->getItemText(iSel, szSel); + + if (!dialog_seldir::lpfnHandlerPreview || !dialog_seldir::lpfnHandlerPreview((FileAppendSlash(dialog_seldir::sCurrPath.c_str()) + szSel).c_str(), szPreview)) + return DefWindowProc(hWnd, message, wParam, lParam); + + hdc = BeginPaint(hWnd, &ps); + + hmdc = CreateCompatibleDC(hdc); + hBitmap = (HBITMAP)LoadImage(GetModuleHandle(0), szPreview, IMAGE_BITMAP, DIALOG_OWN_SELDIR_PREVIEW_WIDTH, DIALOG_OWN_SELDIR_PREVIEW_HEIGHT, LR_LOADFROMFILE); + SelectObject(hmdc, hBitmap); + GetObject(hBitmap, sizeof(bm), &bm); + BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hmdc, 0, 0, SRCCOPY); + DeleteDC(hmdc); + DeleteObject(hBitmap); + EndPaint(hWnd, &ps); + break; + } + + return(DefWindowProc(hWnd, message, wParam, lParam)); +} + +//########################################################################## + +void dialog_seldir::InitAllElements() +{ + RECT wrect; + SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); + int iCenterX = (wrect.right - DIALOG_OWN_SELDIR_WIDTH) / 2; + int iCentery = (wrect.bottom - DIALOG_OWN_SELDIR_HEIGHT) / 2; + + dialog_seldir::pSelectDirectory = SXGUICrBaseWndEx("Select Direction", "Select Direction", iCenterX, iCentery, DIALOG_OWN_SELDIR_WIDTH, DIALOG_OWN_SELDIR_HEIGHT, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, SXGUI_WND_DIALOG & WS_VISIBLE, 0, WndProcAllDefault); + gui_func::base_handlers::InitHandlerMsg(dialog_seldir::pSelectDirectory); + dialog_seldir::pSelectDirectory->addHandler(SelectDirectory_Exit, WM_CLOSE, 0, 0, 0, 0, true); + + dialog_seldir::pPreView = SXGUICrBaseWndEx("SelDirPreView", "Preview", DIALOG_OWN_SELDIR_WIDTH, 25, DIALOG_OWN_SELDIR_PREVIEW_WIDTH, DIALOG_OWN_SELDIR_PREVIEW_HEIGHT, 0, LoadCursor(NULL, IDC_ARROW), CreateSolidBrush(RGB(200, 200, 200)), 0, CS_HREDRAW | CS_VREDRAW, WS_VISIBLE | WS_BORDER, dialog_seldir::pSelectDirectory->getHWND(), PreviewWndProc); + dialog_seldir::pPreView->setFollowParentSide(SXGUI_SIDE_LEFT, true); + + dialog_seldir::pListBox = SXGUICrListBox(5, 50, 280, 255, dialog_seldir::pSelectDirectory->getHWND(), 0, 0, false); + dialog_seldir::pListBox->setFont("Courier New", -11, 0, 400, 0, 0, 0); + dialog_seldir::pListBox->setColorText(RGB(0, 0, 0)); + dialog_seldir::pListBox->setColorTextBk(RGB(255, 255, 255)); + dialog_seldir::pListBox->setTransparentTextBk(true); + dialog_seldir::pListBox->setColorBrush(RGB(255, 255, 255)); + dialog_seldir::pListBox->setFollowParentSide(SXGUI_SIDE_LEFT, true); + dialog_seldir::pListBox->addHandler(ListBox_Click, WM_LBUTTONDBLCLK); + dialog_seldir::pListBox->addHandler(ListBox_LUP, WM_LBUTTONUP); + + dialog_seldir::pStaticCreateNew = SXGUICrStatic("Create new:", 5, 5, 100, 15, dialog_seldir::pSelectDirectory->getHWND(), 0, 0); + dialog_seldir::pStaticCreateNew->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_seldir::pStaticCreateNew->setColorText(RGB(0, 0, 0)); + dialog_seldir::pStaticCreateNew->setColorTextBk(RGB(255, 255, 255)); + dialog_seldir::pStaticCreateNew->setTransparentTextBk(true); + dialog_seldir::pStaticCreateNew->setColorBrush(RGB(220, 220, 220)); + dialog_seldir::pStaticCreateNew->setFollowParentSide(SXGUI_SIDE_LEFT, true); + + dialog_seldir::pEditCreateNew = SXGUICrEdit("", 5, 25, 252, 15, dialog_seldir::pSelectDirectory->getHWND(), 0, 0); + dialog_seldir::pEditCreateNew->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_seldir::pEditCreateNew->setColorText(RGB(0, 0, 0)); + dialog_seldir::pEditCreateNew->setColorTextBk(RGB(255, 255, 255)); + dialog_seldir::pEditCreateNew->setTransparentTextBk(true); + dialog_seldir::pEditCreateNew->setColorBrush(RGB(255, 255, 255)); + dialog_seldir::pEditCreateNew->addHandler(ButtonCreateNew_Click, WM_KEYDOWN, VK_RETURN, 1, 0, 0, true); + dialog_seldir::pEditCreateNew->setFollowParentSide(SXGUI_SIDE_LEFT, true); + + dialog_seldir::pButtonCreateNew = SXGUICrButton("Ok", 260, 25, 25, 15, SXGUI_BUTTON_IMAGE_NONE, dialog_seldir::pSelectDirectory->getHWND(), 0, 0); + dialog_seldir::pButtonCreateNew->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_seldir::pButtonCreateNew->addHandler(ButtonCreateNew_Click, WM_LBUTTONUP, 0, 0, 0, 0, true); + dialog_seldir::pButtonCreateNew->setFollowParentSide(SXGUI_SIDE_LEFT, true); + + dialog_seldir::pButtonCancel = SXGUICrButton("Cancel", 5, 345, 100, 20, SXGUI_BUTTON_IMAGE_NONE, dialog_seldir::pSelectDirectory->getHWND(), 0, 0); + dialog_seldir::pButtonCancel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_seldir::pButtonCancel->addHandler(SelectDirectory_Exit, WM_LBUTTONUP, 0, 0, 0, 0, true); + dialog_seldir::pButtonCancel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + + dialog_seldir::pButtonSelect = SXGUICrButton("Select", 185, 345, 100, 20, SXGUI_BUTTON_IMAGE_NONE, dialog_seldir::pSelectDirectory->getHWND(), 0, 0); + dialog_seldir::pButtonSelect->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_seldir::pButtonSelect->addHandler(ButtonSelect_Click, WM_LBUTTONUP, 0, 0, 0, 0, true); + dialog_seldir::pButtonSelect->setFollowParentSide(SXGUI_SIDE_LEFT, true); + + dialog_seldir::pEditCurrentPath = SXGUICrEdit("0", 5, 310, 280, 15, dialog_seldir::pSelectDirectory->getHWND(), 0, 0); + dialog_seldir::pEditCurrentPath->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_seldir::pEditCurrentPath->setColorText(RGB(0, 0, 0)); + dialog_seldir::pEditCurrentPath->setColorTextBk(RGB(255, 255, 255)); + dialog_seldir::pEditCurrentPath->setTransparentTextBk(true); + dialog_seldir::pEditCurrentPath->setColorBrush(RGB(255, 255, 255)); + dialog_seldir::pEditCurrentPath->addHandler(EditCurrentPath_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + dialog_seldir::pEditCurrentPath->addHandler(EditCurrentPath_Input, WM_KEYUP); + dialog_seldir::pEditCurrentPath->setFollowParentSide(SXGUI_SIDE_LEFT, true); + + dialog_seldir::pStaticCurrentPath = SXGUICrStatic("Current path:", 5, 290, 100, 15, dialog_seldir::pSelectDirectory->getHWND(), 0, 0); + dialog_seldir::pStaticCurrentPath->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_seldir::pStaticCurrentPath->setColorText(RGB(0, 0, 0)); + dialog_seldir::pStaticCurrentPath->setColorTextBk(RGB(255, 255, 255)); + dialog_seldir::pStaticCurrentPath->setTransparentTextBk(true); + dialog_seldir::pStaticCurrentPath->setColorBrush(RGB(220, 220, 220)); + dialog_seldir::pStaticCurrentPath->setFollowParentSide(SXGUI_SIDE_LEFT, true); +} + +void dialog_seldir::InitDataListBox(const char *szPath) +{ + dialog_seldir::pListBox->clear(); + dialog_seldir::sCurrPath = FileAppendSlash(szPath); + dialog_seldir::sSelName = ""; + int iNesting = FileCountNesting(dialog_seldir::sCurrPath.c_str()); + if (iNesting > 0 && dialog_seldir::canExplore && !(dialog_seldir::sDownDir.length() > 0 && dialog_seldir::sDownDir == dialog_seldir::sCurrPath)) + dialog_seldir::pListBox->addItem(".."); + Array<String> aStrings = FileGetListDirs(dialog_seldir::sCurrPath.c_str()); + for (int i = 0; i < aStrings.size(); ++i) + { + dialog_seldir::pListBox->addItem(aStrings[i].c_str()); + } + + dialog_seldir::pEditCurrentPath->setText(FileCanonizePathS(dialog_seldir::sCurrPath.c_str()).c_str()); +} + +void dialog_seldir::DeleteAllElements() +{ + mem_delete(dialog_seldir::pListBox); + mem_delete(dialog_seldir::pStaticCreateNew); + mem_delete(dialog_seldir::pEditCreateNew); + mem_delete(dialog_seldir::pButtonCreateNew); + mem_delete(dialog_seldir::pButtonCancel); + mem_delete(dialog_seldir::pButtonSelect); + mem_delete(dialog_seldir::pEditCurrentPath); + mem_delete(dialog_seldir::pStaticCurrentPath); + mem_delete(dialog_seldir::pSelectDirectory); +} + +//########################################################################## + +void DialogOwnSelectDirInit() +{ + dialog_seldir::InitAllElements(); + //dialog_seldir::pSelectDirectory->setVisible(false); +} + +bool DialogOwnSelectDirRun(char *szOutName, char *szOutPath, const char *szStartPath, const char *szDialogName, bool canExplore, bool canCreateNew, const char *szDownPath, HandlerDialogOwndGetPreview lpfnHandlerPreview) +{ + if (!FileExistsDir(szStartPath)) + { + char szMessage[1024]; + sprintf(szMessage, "Start path [%s] is not exists", szStartPath); + MessageBox(0, szMessage, "Select Direction", 0); + } + + dialog_seldir::lpfnHandlerPreview = lpfnHandlerPreview; + + if (szDownPath) + dialog_seldir::sDownDir = FileAppendSlash(szDownPath); + else + dialog_seldir::sDownDir = ""; + + dialog_seldir::pButtonCreateNew->setEnable(canCreateNew); + dialog_seldir::pEditCreateNew->setEnable(canCreateNew); + + dialog_seldir::canExplore = canExplore; + dialog_seldir::InitDataListBox(szStartPath); + + RECT wrect; + SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); + int iCenterX = (wrect.right - (dialog_seldir::lpfnHandlerPreview ? DIALOG_OWN_SELDIR_WITH_PREVIEW_WIDTH : DIALOG_OWN_SELDIR_WIDTH)) / 2; + int iCentery = (wrect.bottom - DIALOG_OWN_SELDIR_HEIGHT) / 2; + MoveWindow(dialog_seldir::pSelectDirectory->getHWND(), iCenterX, iCentery, (dialog_seldir::lpfnHandlerPreview ? DIALOG_OWN_SELDIR_WITH_PREVIEW_WIDTH : DIALOG_OWN_SELDIR_WIDTH), DIALOG_OWN_SELDIR_HEIGHT, true); + + if (szDialogName) + dialog_seldir::pSelectDirectory->setText(szDialogName); + + dialog_seldir::pSelectDirectory->setVisible(true); + + dialog_seldir::pEditCurrentPath->setEnable(dialog_seldir::canExplore); + + MSG msg; + ::ZeroMemory(&msg, sizeof(MSG)); + + while (dialog_seldir::pSelectDirectory->getVisible()) + { + if (::PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + } + + if (dialog_seldir::sSelName.length() == 0) + return false; + + if (szOutName) + sprintf(szOutName, "%s", dialog_seldir::sSelName.c_str()); + + if (szOutPath) + sprintf(szOutPath, "%s%s", dialog_seldir::sCurrPath.c_str(), dialog_seldir::sSelName.c_str()); + + return true; +} \ No newline at end of file diff --git a/source/SXGUIWinApi/dialog_select_dir.h b/source/SXGUIWinApi/dialog_select_dir.h new file mode 100644 index 0000000000000000000000000000000000000000..e072a682cf6c8e064327a6910423503147cfddef --- /dev/null +++ b/source/SXGUIWinApi/dialog_select_dir.h @@ -0,0 +1,29 @@ + +#ifndef __DIALOG_SELECT_DIR_H +#define __DIALOG_SELECT_DIR_H + +#include "sxgui.h" +#include <common/file_utils.h> + + +//! ������ ������ ������� ������ ���������� +#define DIALOG_OWN_SELDIR_WIDTH 295 + +//! ������ ������ ������� ������ ���������� +#define DIALOG_OWN_SELDIR_HEIGHT 400 + +#define DIALOG_OWN_SELDIR_PREVIEW_WIDTH 400 +#define DIALOG_OWN_SELDIR_PREVIEW_HEIGHT 250 + +//! ������ ������ ������� ������ ���������� � �������������� +#define DIALOG_OWN_SELDIR_WITH_PREVIEW_WIDTH (10 + DIALOG_OWN_SELDIR_WIDTH + DIALOG_OWN_SELDIR_PREVIEW_WIDTH) + + +//! ������������� ������ ������� ������ ����� +void DialogOwnSelectDirInit(); + +//! ������ ������ ������� ������ ����� +bool DialogOwnSelectDirRun(char *szOutName, char *szOutPath, const char *szStartPath, const char *szDialogName = 0, bool canExplore = true, bool canCreateNew = true, const char *szDownPath = 0, HandlerDialogOwndGetPreview lpfnHandlerPreview = 0); + + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/dialog_select_file.cpp b/source/SXGUIWinApi/dialog_select_file.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0b771430b56341f465d6baeb35d7b70568871a58 --- /dev/null +++ b/source/SXGUIWinApi/dialog_select_file.cpp @@ -0,0 +1,566 @@ + +#include "dialog_select_file.h" + +namespace dialog_selfile +{ + ISXGUIBaseWnd *SelectFile; + ISXGUIStatic *StaticDirectories; + ISXGUIListBox *ListBoxDirectories; + ISXGUIStatic *StaticFiles; + ISXGUIListBox *ListBoxFiles; + ISXGUIStatic *StaticPreview; + ISXGUIBaseWnd *WindowPreview; + ISXGUIStatic *StaticDirFullPath; + ISXGUIStatic *StaticFileFullPath; + ISXGUIEdit *EditDirFullPath; + ISXGUIButton *ButtonCancel; + ISXGUIButton *ButtonSelect; + ISXGUIStatic *StaticInformation; + ISXGUIStatic *StaticInformationText; + ISXGUIEdit *EditFileFullPath; + + void InitAllElements(); + + void DeleteAllElements(); + + void InitDataListBoxDirs(const char *szPath); + void InitDataListBoxFiles(const char *szPath); + + + String sCurrPath; + String sSelName; + String sDownDir; + String sFilterExt; + + HandlerDialogOwndGetPreview2 lpfnHandlerPreview = 0; + HandlerDialogOwndGetInfo lpfnHandlerInfo = 0; + + bool canExplore; +}; + +//########################################################################## + +LRESULT SelFile_ListBoxDirs_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (!dialog_selfile::canExplore) + return 0; + + int iSel = dialog_selfile::ListBoxDirectories->getSel(); + + if (iSel < 0) + return 0; + + int iNesting = FileCountNesting(dialog_selfile::sCurrPath.c_str()); + + char szSel[MAX_PATH]; + dialog_selfile::ListBoxDirectories->getItemText(iSel, szSel); + + if (iNesting > 0 && iSel == 0 && strcmp(szSel, "..") == 0) + { + String sPrevPath = FileGetPrevDir(dialog_selfile::sCurrPath.c_str()); + dialog_selfile::InitDataListBoxDirs(sPrevPath.c_str()); + dialog_selfile::InitDataListBoxFiles(sPrevPath.c_str()); + } + else + { + //dialog_selfile::sCurrPath = dialog_selfile::sCurrPath + "/" + szSel; + dialog_selfile::InitDataListBoxDirs((FileAppendSlash(dialog_selfile::sCurrPath.c_str()) + szSel).c_str()); + dialog_selfile::InitDataListBoxFiles((FileAppendSlash(dialog_selfile::sCurrPath.c_str()) + szSel).c_str()); + } + + return 0; +} + +LRESULT SelFile_ListBoxFiles_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (!dialog_selfile::canExplore) + return 0; + + int iSel = dialog_selfile::ListBoxFiles->getSel(); + + if (iSel < 0) + return 0; + + char szSel[MAX_PATH]; + dialog_selfile::ListBoxFiles->getItemText(iSel, szSel); + + dialog_selfile::EditFileFullPath->setText((FileAppendSlash(dialog_selfile::sCurrPath.c_str()) + szSel).c_str()); + InvalidateRect(dialog_selfile::WindowPreview->getHWND(), 0, TRUE); + + if (dialog_selfile::lpfnHandlerInfo) + { + char szBuf[1024]; + if (dialog_selfile::lpfnHandlerInfo((FileAppendSlash(dialog_selfile::sCurrPath.c_str()) + szSel).c_str(), szBuf)) + dialog_selfile::StaticInformationText->setText(szBuf); + else + dialog_selfile::StaticInformationText->setText(""); + } + + return 0; +} + +LRESULT SelFile_EditDirFullPath_Enter(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + char szPath[1024]; + dialog_selfile::EditDirFullPath->getText(szPath, 1024); + + if (!FileExistsInPath(szPath, dialog_selfile::sDownDir.c_str())) + { + char szMessage[1024]; + sprintf(szMessage, "Unresolved explore down path [%s]", dialog_selfile::sDownDir.c_str()); + MessageBox(hWnd, szMessage, 0, 0); + dialog_selfile::EditDirFullPath->setText(dialog_selfile::sCurrPath.c_str()); + return 0; + } + + if (FileExistsDir(szPath)) + dialog_selfile::InitDataListBoxDirs(szPath); + else + { + char szMessage[1024]; + sprintf(szMessage, "Directory [%s] is not exists", szPath); + MessageBox(hWnd, szMessage, 0, 0); + } + return 0; +} + +/*LRESULT SelFile_EditDirFullPath_Input(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + char szPath[1024]; + dialog_selfile::EditDirFullPath->getText(szPath, 1024); + + const char *szBase = FileBaseName(szPath); + dialog_selfile::ListBoxDirectories->setSel(-1); + if (strlen(szBase) == 0) + return 0; + + char szDir[MAX_PATH]; + char *szFound = 0; + for (int i = 0; i < dialog_selfile::ListBoxDirectories->getItemCount(); ++i) + { + dialog_selfile::ListBoxDirectories->getItemText(i, szDir); + + if ((szFound = strstr(szDir, szBase)) && (szFound - szDir) == 0) + { + //gui_func::scrollbar::ScrollLine(dialog_selfile::pListBox, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_UP, dialog_selfile::pListBox->getItemCount()); + //gui_func::scrollbar::ScrollLine(dialog_selfile::pListBox, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_DOWN, i); + + dialog_selfile::ListBoxDirectories->setSel(i); + SelFile_ListBoxDirs_Click(hWnd, uMsg, wParam, lParam); + + break; + } + } + + return 0; +}*/ + +//LRESULT SelFile_EditFileFullPath_Input(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + +LRESULT SelFile_EditFileFullPath_Enter(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + char szPath[1024]; + dialog_selfile::EditFileFullPath->getText(szPath, 1024); + + if (!FileExistsInPath(szPath, dialog_selfile::sDownDir.c_str())) + { + char szMessage[1024]; + sprintf(szMessage, "Unresolved explore down path [%s]", dialog_selfile::sDownDir.c_str()); + MessageBox(hWnd, szMessage, 0, 0); + dialog_selfile::EditDirFullPath->setText(dialog_selfile::sCurrPath.c_str()); + return 0; + } + + if (FileExistsFile(szPath)) + { + dialog_selfile::InitDataListBoxDirs(FileGetPrevDir(szPath).c_str()); + dialog_selfile::InitDataListBoxFiles(FileGetPrevDir(szPath).c_str()); + dialog_selfile::EditFileFullPath->setText(szPath); + //SelFile_EditFileFullPath_Input(hWnd, uMsg, wParam, lParam); + + dialog_selfile::EditFileFullPath->getText(szPath, 1024); + const char *szBase = FileBaseName(szPath); + + char szDir[MAX_PATH]; + char *szFound = 0; + for (int i = 0; i < dialog_selfile::ListBoxFiles->getItemCount(); ++i) + { + dialog_selfile::ListBoxFiles->getItemText(i, szDir); + + if ((szFound = strstr(szDir, szBase)) && (szFound - szDir) == 0) + { + //gui_func::scrollbar::ScrollLine(dialog_selfile::pListBox, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_UP, dialog_selfile::pListBox->getItemCount()); + //gui_func::scrollbar::ScrollLine(dialog_selfile::pListBox, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_DOWN, i); + + dialog_selfile::ListBoxFiles->setSel(i); + SelFile_ListBoxFiles_Click(hWnd, uMsg, wParam, lParam); + + break; + } + } + } + else + { + char szMessage[1024]; + sprintf(szMessage, "File [%s] is not exists", szPath); + MessageBox(hWnd, szMessage, 0, 0); + } + return 0; +} + +/*LRESULT SelFile_EditFileFullPath_Input(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + char szPath[1024]; + dialog_selfile::EditFileFullPath->getText(szPath, 1024); + + const char *szBase = FileBaseName(szPath); + dialog_selfile::ListBoxFiles->setSel(-1); + if (strlen(szBase) == 0) + return 0; + + char szDir[MAX_PATH]; + char *szFound = 0; + for (int i = 0; i < dialog_selfile::ListBoxFiles->getItemCount(); ++i) + { + dialog_selfile::ListBoxFiles->getItemText(i, szDir); + + if ((szFound = strstr(szDir, szBase)) && (szFound - szDir) == 0) + { + //gui_func::scrollbar::ScrollLine(dialog_selfile::pListBox, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_UP, dialog_selfile::pListBox->getItemCount()); + //gui_func::scrollbar::ScrollLine(dialog_selfile::pListBox, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_DOWN, i); + + dialog_selfile::ListBoxFiles->setSel(i); + SelFile_ListBoxFiles_Click(hWnd, uMsg, wParam, lParam); + + break; + } + } + + return 0; +}*/ + +LRESULT SelectFile_Exit(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + dialog_selfile::SelectFile->setVisible(false); + return 0; +} + +LRESULT SelFile_ButtonSelect_Click(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + int iSel = dialog_selfile::ListBoxFiles->getSel(); + + if (iSel < 0) + { + MessageBox(hWnd, "No select file", 0, 0); + return 0; + } + + char szSelDir[1024]; + dialog_selfile::ListBoxFiles->getItemText(iSel, szSelDir); + dialog_selfile::sSelName = szSelDir; + dialog_selfile::SelectFile->setVisible(false); + + return 0; +} + +LRESULT CALLBACK SelFile_PreviewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + PAINTSTRUCT ps; + HDC hdc; + HDC hmdc; + HBITMAP hBitmap; + BITMAP bm; + + switch (message) + { + case WM_PAINT: + + int iSel = dialog_selfile::ListBoxFiles->getSel(); + if (iSel < 0) + return DefWindowProc(hWnd, message, wParam, lParam); + + char szSel[1024]; + dialog_selfile::ListBoxFiles->getItemText(iSel, szSel); + + void *pBuf = 0; + int iSizeBuf = 0; + int iWidth = 0; + int iHeight = 0; + + if (!dialog_selfile::lpfnHandlerPreview || !dialog_selfile::lpfnHandlerPreview((FileAppendSlash(dialog_selfile::sCurrPath.c_str()) + szSel).c_str(), &pBuf, &iSizeBuf, &iWidth, &iHeight)) + return DefWindowProc(hWnd, message, wParam, lParam); + + hdc = BeginPaint(hWnd, &ps); + + /*hmdc = CreateCompatibleDC(hdc); + hBitmap = (HBITMAP)LoadImage(GetModuleHandle(0), szPreview, IMAGE_BITMAP, DIALOG_OWN_SELFILE_PREVIEW_WIDTH, DIALOG_OWN_SELFILE_PREVIEW_HEIGHT, LR_LOADFROMFILE); + SelectObject(hmdc, hBitmap); + GetObject(hBitmap, sizeof(bm), &bm); + BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hmdc, 0, 0, SRCCOPY); + DeleteDC(hmdc); + DeleteObject(hBitmap);*/ + + BITMAPINFO bmi; + memset(&bmi, 0, sizeof(bmi)); + bmi.bmiHeader.biSize = sizeof(BITMAPINFO); + bmi.bmiHeader.biWidth = iWidth; + bmi.bmiHeader.biHeight = -iHeight; + bmi.bmiHeader.biPlanes = 1; + bmi.bmiHeader.biBitCount = 32; + bmi.bmiHeader.biCompression = BI_RGB; + bmi.bmiHeader.biSizeImage = iSizeBuf; + + // + // �������� SetDIBitsToDevice. + // + + int iRet = SetDIBitsToDevice(hdc, + 0, 0, + iWidth, iHeight, + 0, 0, + 0, iHeight, + pBuf, + &bmi, + DIB_RGB_COLORS); + + DWORD error = GetLastError(); + + EndPaint(hWnd, &ps); + break; + } + + return(DefWindowProc(hWnd, message, wParam, lParam)); +} + +//########################################################################## + +void dialog_selfile::InitAllElements() +{ + RECT wrect; + SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); + int iCenterX = (wrect.right - DIALOG_OWN_SELFILE_WIDTH) / 2; + int iCentery = (wrect.bottom - DIALOG_OWN_SELFILE_HEIGHT) / 2; + + dialog_selfile::SelectFile = SXGUICrBaseWndEx("Select_file", "Select_file", iCenterX, iCentery, DIALOG_OWN_SELFILE_WIDTH, DIALOG_OWN_SELFILE_HEIGHT, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, SXGUI_WND_DIALOG, 0, WndProcAllDefault); + gui_func::base_handlers::InitHandlerMsg(dialog_selfile::SelectFile); + dialog_selfile::SelectFile->addHandler(SelectFile_Exit, WM_CLOSE, 0, 0, 0, 0, true); + + dialog_selfile::StaticDirectories = SXGUICrStatic("Directories:", 5, 5, 60, 15, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::StaticDirectories->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::StaticDirectories->setColorText(RGB(0, 0, 0)); + dialog_selfile::StaticDirectories->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::StaticDirectories->setTransparentTextBk(true); + dialog_selfile::StaticDirectories->setColorBrush(RGB(220, 220, 220)); + dialog_selfile::ListBoxDirectories = SXGUICrListBox(5, 25, 200, 320, dialog_selfile::SelectFile->getHWND(), 0, 0, false); + dialog_selfile::ListBoxDirectories->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::ListBoxDirectories->setColorText(RGB(0, 0, 0)); + dialog_selfile::ListBoxDirectories->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::ListBoxDirectories->setTransparentTextBk(true); + dialog_selfile::ListBoxDirectories->setColorBrush(RGB(255, 255, 255)); + dialog_selfile::ListBoxDirectories->addHandler(SelFile_ListBoxDirs_Click, WM_LBUTTONUP); + + dialog_selfile::StaticFiles = SXGUICrStatic("Files:", 215, 5, 50, 15, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::StaticFiles->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::StaticFiles->setColorText(RGB(0, 0, 0)); + dialog_selfile::StaticFiles->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::StaticFiles->setTransparentTextBk(true); + dialog_selfile::StaticFiles->setColorBrush(RGB(220, 220, 220)); + dialog_selfile::ListBoxFiles = SXGUICrListBox(215, 25, 250, 320, dialog_selfile::SelectFile->getHWND(), 0, 0, false); + dialog_selfile::ListBoxFiles->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::ListBoxFiles->setColorText(RGB(0, 0, 0)); + dialog_selfile::ListBoxFiles->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::ListBoxFiles->setTransparentTextBk(true); + dialog_selfile::ListBoxFiles->setColorBrush(RGB(255, 255, 255)); + dialog_selfile::ListBoxFiles->addHandler(SelFile_ListBoxFiles_Click, WM_LBUTTONUP); + + dialog_selfile::StaticPreview = SXGUICrStatic("Preview:", 470, 5, 50, 15, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::StaticPreview->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::StaticPreview->setColorText(RGB(0, 0, 0)); + dialog_selfile::StaticPreview->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::StaticPreview->setTransparentTextBk(true); + dialog_selfile::StaticPreview->setColorBrush(RGB(220, 220, 220)); + + dialog_selfile::WindowPreview = SXGUICrBaseWndEx("WindowPreview", "WindowPreview", 470, 25, DIALOG_OWN_SELFILE_PREVIEW_SIZE, DIALOG_OWN_SELFILE_PREVIEW_SIZE, 0, 0, CreateSolidBrush(RGB(200, 200, 200)), 0, CS_HREDRAW | CS_VREDRAW, WS_CHILD | WS_VISIBLE | WS_BORDER, dialog_selfile::SelectFile->getHWND(), SelFile_PreviewWndProc); + + dialog_selfile::StaticDirFullPath = SXGUICrStatic("Dir full path:", 5, 345, 60, 15, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::StaticDirFullPath->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::StaticDirFullPath->setColorText(RGB(0, 0, 0)); + dialog_selfile::StaticDirFullPath->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::StaticDirFullPath->setTransparentTextBk(true); + dialog_selfile::StaticDirFullPath->setColorBrush(RGB(220, 220, 220)); + dialog_selfile::StaticFileFullPath = SXGUICrStatic("File full path:", 5, 365, 60, 15, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::StaticFileFullPath->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::StaticFileFullPath->setColorText(RGB(0, 0, 0)); + dialog_selfile::StaticFileFullPath->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::StaticFileFullPath->setTransparentTextBk(true); + dialog_selfile::StaticFileFullPath->setColorBrush(RGB(220, 220, 220)); + dialog_selfile::EditDirFullPath = SXGUICrEdit("0", 65, 345, 400, 15, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::EditDirFullPath->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::EditDirFullPath->setColorText(RGB(0, 0, 0)); + dialog_selfile::EditDirFullPath->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::EditDirFullPath->setTransparentTextBk(true); + dialog_selfile::EditDirFullPath->setColorBrush(RGB(255, 255, 255)); + dialog_selfile::EditDirFullPath->addHandler(SelFile_EditDirFullPath_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + //dialog_selfile::EditDirFullPath->addHandler(SelFile_EditDirFullPath_Input, WM_KEYUP); + + dialog_selfile::ButtonCancel = SXGUICrButton("Cancel", 245, 395, 100, 20, SXGUI_BUTTON_IMAGE_NONE, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::ButtonCancel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::ButtonCancel->addHandler(SelectFile_Exit, WM_LBUTTONUP, 0, 0, 0, 0, true); + + dialog_selfile::ButtonSelect = SXGUICrButton("Select", 365, 395, 100, 20, SXGUI_BUTTON_IMAGE_NONE, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::ButtonSelect->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::ButtonSelect->addHandler(SelFile_ButtonSelect_Click, WM_LBUTTONUP, 0, 0, 0, 0, true); + + dialog_selfile::StaticInformation = SXGUICrStatic("Information:", 470, 285, 60, 15, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::StaticInformation->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::StaticInformation->setColorText(RGB(0, 0, 0)); + dialog_selfile::StaticInformation->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::StaticInformation->setTransparentTextBk(true); + dialog_selfile::StaticInformation->setColorBrush(RGB(220, 220, 220)); + dialog_selfile::StaticInformationText = SXGUICrStatic("0", 470, 305, 256, 110, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::StaticInformationText->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::StaticInformationText->setColorText(RGB(0, 0, 0)); + dialog_selfile::StaticInformationText->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::StaticInformationText->setTransparentTextBk(true); + dialog_selfile::StaticInformationText->setColorBrush(RGB(255, 255, 255)); + dialog_selfile::EditFileFullPath = SXGUICrEdit("0", 65, 365, 400, 15, dialog_selfile::SelectFile->getHWND(), 0, 0); + dialog_selfile::EditFileFullPath->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + dialog_selfile::EditFileFullPath->setColorText(RGB(0, 0, 0)); + dialog_selfile::EditFileFullPath->setColorTextBk(RGB(255, 255, 255)); + dialog_selfile::EditFileFullPath->setTransparentTextBk(true); + dialog_selfile::EditFileFullPath->setColorBrush(RGB(255, 255, 255)); + dialog_selfile::EditFileFullPath->addHandler(SelFile_EditFileFullPath_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + //dialog_selfile::EditFileFullPath->addHandler(SelFile_EditFileFullPath_Input, WM_KEYUP); +} + +void dialog_selfile::DeleteAllElements() +{ + mem_delete(dialog_selfile::StaticDirectories); + mem_delete(dialog_selfile::ListBoxDirectories); + mem_delete(dialog_selfile::StaticFiles); + mem_delete(dialog_selfile::ListBoxFiles); + mem_delete(dialog_selfile::StaticPreview); + mem_delete(dialog_selfile::WindowPreview); + mem_delete(dialog_selfile::StaticDirFullPath); + mem_delete(dialog_selfile::StaticFileFullPath); + mem_delete(dialog_selfile::EditDirFullPath); + mem_delete(dialog_selfile::ButtonCancel); + mem_delete(dialog_selfile::ButtonSelect); + mem_delete(dialog_selfile::StaticInformation); + mem_delete(dialog_selfile::StaticInformationText); + mem_delete(dialog_selfile::EditFileFullPath); + mem_delete(dialog_selfile::SelectFile); +} + +//########################################################################## + +void dialog_selfile::InitDataListBoxDirs(const char *szPath) +{ + dialog_selfile::ListBoxDirectories->clear(); + dialog_selfile::ListBoxFiles->clear(); + dialog_selfile::sCurrPath = FileCanonizePathS(FileAppendSlash(szPath).c_str()); + dialog_selfile::sSelName = ""; + int iNesting = FileCountNesting(dialog_selfile::sCurrPath.c_str()); + if (iNesting > 0 && dialog_selfile::canExplore && !(dialog_selfile::sDownDir.length() > 0 && dialog_selfile::sDownDir == dialog_selfile::sCurrPath)) + dialog_selfile::ListBoxDirectories->addItem(".."); + Array<String> aStrings = FileGetListDirs(dialog_selfile::sCurrPath.c_str()); + for (int i = 0; i < aStrings.size(); ++i) + { + dialog_selfile::ListBoxDirectories->addItem(aStrings[i].c_str()); + } + + dialog_selfile::EditDirFullPath->setText(FileCanonizePathS(dialog_selfile::sCurrPath.c_str()).c_str()); +} + +void dialog_selfile::InitDataListBoxFiles(const char *szPath) +{ + dialog_selfile::ListBoxFiles->clear(); + dialog_selfile::sSelName = ""; + String sPathFilter = FileAppendSlash(dialog_selfile::sCurrPath.c_str()) + (dialog_selfile::sFilterExt.length() > 0 ? (String("*.") + dialog_selfile::sFilterExt) : ""); + Array<String> aStrings = FileGetListFiles((FileAppendSlash(dialog_selfile::sCurrPath.c_str()) + "*" + dialog_selfile::sFilterExt).c_str()); + for (int i = 0; i < aStrings.size(); ++i) + { + dialog_selfile::ListBoxFiles->addItem(aStrings[i].c_str()); + } + + dialog_selfile::EditFileFullPath->setText(""); +} + +//########################################################################## + +void DialogOwnSelectFileInit() +{ + dialog_selfile::InitAllElements(); +} + +bool DialogOwnSelectFileRun(char *szOutName, char *szOutPath, const char *szStartPath, const char *szFilterExt, const char *szDialogName, bool canExplore, const char *szDownPath, HWND hWndLock, HandlerDialogOwndGetPreview2 lpfnHandlerPreview, HandlerDialogOwndGetInfo lpfnHandlerInfo) +{ + if (!FileExistsDir(szStartPath)) + { + char szMessage[1024]; + sprintf(szMessage, "Start path [%s] is not exists", szStartPath); + MessageBox(0, szMessage, "Select Direction", 0); + } + + dialog_selfile::lpfnHandlerPreview = lpfnHandlerPreview; + dialog_selfile::lpfnHandlerInfo = lpfnHandlerInfo; + + if (szDownPath) + dialog_selfile::sDownDir = FileCanonizePathS(FileAppendSlash(szDownPath).c_str()); + else + dialog_selfile::sDownDir = ""; + + if (szFilterExt) + dialog_selfile::sFilterExt = szFilterExt; + else + dialog_selfile::sFilterExt = ""; + + dialog_selfile::canExplore = canExplore; + dialog_selfile::InitDataListBoxDirs(szStartPath); + dialog_selfile::InitDataListBoxFiles(szStartPath); + + RECT wrect; + SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); + int iCenterX = (wrect.right - DIALOG_OWN_SELFILE_WIDTH) / 2; + int iCentery = (wrect.bottom - DIALOG_OWN_SELFILE_HEIGHT) / 2; + MoveWindow(dialog_selfile::SelectFile->getHWND(), iCenterX, iCentery, DIALOG_OWN_SELFILE_WIDTH, DIALOG_OWN_SELFILE_HEIGHT, true); + + if (szDialogName) + dialog_selfile::SelectFile->setText(szDialogName); + + dialog_selfile::SelectFile->setVisible(true); + + dialog_selfile::EditDirFullPath->setEnable(dialog_selfile::canExplore); + dialog_selfile::EditFileFullPath->setEnable(dialog_selfile::canExplore); + + if (hWndLock) + EnableWindow(hWndLock, FALSE); + + MSG msg; + ::ZeroMemory(&msg, sizeof(MSG)); + + while (dialog_selfile::SelectFile->getVisible()) + { + if (::PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + } + + dialog_selfile::StaticInformationText->setText(""); + + if (hWndLock) + EnableWindow(hWndLock, TRUE); + + if (dialog_selfile::sSelName.length() == 0) + return false; + + if (szOutName) + sprintf(szOutName, "%s", dialog_selfile::sSelName.c_str()); + + if (szOutPath) + sprintf(szOutPath, "%s%s", dialog_selfile::sCurrPath.c_str(), dialog_selfile::sSelName.c_str()); + + return true; +} \ No newline at end of file diff --git a/source/SXGUIWinApi/dialog_select_file.h b/source/SXGUIWinApi/dialog_select_file.h new file mode 100644 index 0000000000000000000000000000000000000000..4b42682181593548790a5fcede3d9e3ea8d70a3f --- /dev/null +++ b/source/SXGUIWinApi/dialog_select_file.h @@ -0,0 +1,25 @@ + +#ifndef __DIALOG_SELECT_FILE_H +#define __DIALOG_SELECT_FILE_H + +#include "sxgui.h" +#include <common/file_utils.h> + + +//! ������ ������ ������� ������ ���������� +#define DIALOG_OWN_SELFILE_WIDTH 735 + +//! ������ ������ ������� ������ ���������� +#define DIALOG_OWN_SELFILE_HEIGHT 450 + +#define DIALOG_OWN_SELFILE_PREVIEW_SIZE 256 + + +//! ������������� ������ ������� ������ ����� +void DialogOwnSelectFileInit(); + +//! ������ ������ ������� ������ ����� +bool DialogOwnSelectFileRun(char *szOutName, char *szOutPath, const char *szStartPath, const char *szFilterExt, const char *szDialogName = 0, bool canExplore = true, const char *szDownPath = 0, HWND hWndLock = 0, HandlerDialogOwndGetPreview2 lpfnHandlerPreview = 0, HandlerDialogOwndGetInfo lpfnHandlerInfo = 0); + + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/edit.cpp b/source/SXGUIWinApi/edit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..810023c56d9c7928d748a2863041a9d09ceb5627 --- /dev/null +++ b/source/SXGUIWinApi/edit.cpp @@ -0,0 +1,107 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "edit.h" + +CGUIEdit::CGUIEdit() +{ + +} + +CGUIEdit::~CGUIEdit() +{ + +} + +CGUIEdit::CGUIEdit(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + "EDIT", + caption, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + this->init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); +} + +CGUIEdit::CGUIEdit(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + "EDIT", + caption, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOHSCROLL, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + this->init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); +} + +bool CGUIEdit::getReadOnly() +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(style & ES_READONLY) + return true; + else + return false; +} + +bool CGUIEdit::setReadOnly(bool bf) +{ + long p = bf ? 1 : 0; + SendMessage(this->getHWND(), EM_SETREADONLY, bf ? 1 : 0, 0); + return getReadOnly() == bf; +} + +int CGUIEdit::getAlign() +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(style & ES_RIGHT) + return SXGUI_TEXT_ALIGN_RIGHT; + else if(style & ES_CENTER) + return SXGUI_TEXT_ALIGN_CENTER; + else + return SXGUI_TEXT_ALIGN_LEFT; +} + +bool CGUIEdit::setAlign(int align) +{ + if (align == SXGUI_TEXT_ALIGN_LEFT) + return modifyStyle(ES_LEFT,0); + else if (align == SXGUI_TEXT_ALIGN_RIGHT) + return modifyStyle(ES_RIGHT,0); + else if (align == SXGUI_TEXT_ALIGN_CENTER) + return modifyStyle(ES_CENTER,0); + return false; +} + +bool CGUIEdit::getStatePassword() +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(style & ES_PASSWORD) + return true; + else + return false; +} + +bool CGUIEdit::setStatePassword(bool bf) +{ + long p = bf ? 1 : 0; + SendMessage(this->getHWND(), EM_SETPASSWORDCHAR, bf ? '*' : 0, 0); + this->setFocus(); + UpdateWindow(this->getHWND()); + return getStatePassword() == bf; +} \ No newline at end of file diff --git a/source/SXGUIWinApi/edit.h b/source/SXGUIWinApi/edit.h new file mode 100644 index 0000000000000000000000000000000000000000..5b4e7679bd5c39aebef25a08f218e3c14438faee --- /dev/null +++ b/source/SXGUIWinApi/edit.h @@ -0,0 +1,32 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_EDIT_H +#define __SXGUI_EDIT_H + +#include "base.h" + + +class CGUIEdit : public CGUITextual, public virtual ISXGUIEdit +{ +public: + CGUIEdit(); + ~CGUIEdit(); + CGUIEdit(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIEdit(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj); + + bool getReadOnly(); //����������� �� �������� "������ ��� ������" + bool setReadOnly(bool bf); //������������ ��������� "������ ��� ������", ���������� ��������� �������� + + //��������� ������� ����� ���������� �� * + bool getStatePassword(); //����������� �� ������� ������� ������ + bool setStatePassword(bool bf); //������������ ��������� ������� ������ + + int getAlign(); //���������� ���� ������������ ������ + bool setAlign(int align); //������������� ������������ +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_group_box.cpp b/source/SXGUIWinApi/groupbox.cpp similarity index 57% rename from source/SXGUIWinApi/SXGUI_group_box.cpp rename to source/SXGUIWinApi/groupbox.cpp index b0c777a82dc4edfb8cbede636af88841f6c22f1f..d5b41fb3db35f99fc3c1f0ace870aea51b5fb516 100644 --- a/source/SXGUIWinApi/SXGUI_group_box.cpp +++ b/source/SXGUIWinApi/groupbox.cpp @@ -1,11 +1,15 @@ -#include <SXGUIWinApi\SXGUI_group_box.h> +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "groupbox.h" -#pragma once LRESULT WndProcGroupBoxPaint(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - SXGUIGroupBox *GroupBox = dynamic_cast<SXGUIGroupBox*>((ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA)); + CGUIGroupBox *GroupBox = dynamic_cast<CGUIGroupBox*>((ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA)); PAINTSTRUCT PaintStruct; HDC hdcp = BeginPaint(hwnd, &PaintStruct); @@ -45,26 +49,26 @@ LRESULT WndProcGroupBoxPaint(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) clrect2.left += 1; clrect2.right -= 1; - HBRUSH color_rect = CreateSolidBrush(GroupBox->GetColorBrush()); + HBRUSH color_rect = CreateSolidBrush(GroupBox->getColorBrush()); FillRect(hdcp, &clrectorigin, color_rect); - HFONT hFont = GroupBox->GetFont(); + HFONT hFont = GroupBox->getHFont(); if (!hFont) hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); SelectObject(hdcp, hFont); - long tmplen = GetWindowTextLength(GroupBox->GetHWND()); - if (GetWindowTextLength(GroupBox->GetHWND())+1 > GroupBox->LenStrText) + long tmplen = GetWindowTextLength(GroupBox->getHWND()); + if (GetWindowTextLength(GroupBox->getHWND())+1 > GroupBox->LenStrText) { - GroupBox->LenStrText = GetWindowTextLength(GroupBox->GetHWND())+1; + GroupBox->LenStrText = GetWindowTextLength(GroupBox->getHWND())+1; mem_delete(GroupBox->StrText); GroupBox->StrText = new char[GroupBox->LenStrText]; } - GetWindowText(GroupBox->GetHWND(), GroupBox->StrText, GroupBox->LenStrText); + GetWindowText(GroupBox->getHWND(), GroupBox->StrText, GroupBox->LenStrText); - SetTextColor(hdcp, GroupBox->GetColorText()); - SetBkColor(hdcp, GroupBox->GetColorTextBk()); + SetTextColor(hdcp, GroupBox->getColorText()); + SetBkColor(hdcp, GroupBox->getColorTextBk()); clrect.top -= 3; clrect.left += 10; @@ -86,56 +90,56 @@ LRESULT WndProcGroupBoxPaint(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return 1; } -SXGUIGroupBox::SXGUIGroupBox() +CGUIGroupBox::CGUIGroupBox() { LenStrText = 0; StrText = 0; } -SXGUIGroupBox::~SXGUIGroupBox() +CGUIGroupBox::~CGUIGroupBox() { mem_delete(StrText); } -SXGUIGroupBox::SXGUIGroupBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id) +CGUIGroupBox::CGUIGroupBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) { LenStrText = strlen(caption)+1; StrText = new char[LenStrText]; sprintf(StrText, "%s", caption); - this->WindowHandle = CreateWindowEx( + m_hWindow = CreateWindowEx( exstyle, - "SXGUIGROUPBOX", + SXGUI_DEF_GROUPBOX, caption, style, x,y,width,heigth, parent, - (HMENU)id, + (HMENU)idObj, GetModuleHandle(0), 0); - this->Init(this->GetHWND(),parent,(handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); + this->init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); } -SXGUIGroupBox::SXGUIGroupBox(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id) +CGUIGroupBox::CGUIGroupBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj) { LenStrText = strlen(caption)+1; StrText = new char[LenStrText]; sprintf(StrText, "%s", caption); - this->WindowHandle = CreateWindowEx( + m_hWindow = CreateWindowEx( 0, - "SXGUIGROUPBOX", + SXGUI_DEF_GROUPBOX, caption, (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE /*| BS_GROUPBOX*/, x,y,width,heigth, parent, - (HMENU)id, + (HMENU)idObj, GetModuleHandle(0), 0); - this->Init(this->GetHWND(), parent, (handler == 0 ? WndProcAllDefault : handler)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); - this->AddHandler(WndProcGroupBoxPaint, WM_PAINT,0,0,0,0,true); + this->init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); + this->addHandler(WndProcGroupBoxPaint, WM_PAINT,0,0,0,0,true); } diff --git a/source/SXGUIWinApi/groupbox.h b/source/SXGUIWinApi/groupbox.h new file mode 100644 index 0000000000000000000000000000000000000000..9e339f8b94fdc9c61205590f4ab6c59aaf0fffd2 --- /dev/null +++ b/source/SXGUIWinApi/groupbox.h @@ -0,0 +1,27 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_GROUP_BOX_H +#define __SXGUI_GROUP_BOX_H + +#include "base.h" + + +class CGUIGroupBox : public CGUITextual, public virtual ISXGUIGroupBox +{ +public: + CGUIGroupBox(); + ~CGUIGroupBox(); + void Release(){ mem_del(this); } + CGUIGroupBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIGroupBox(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj); + +//private: + char* StrText; + int LenStrText; +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/SXGUI_hint.cpp b/source/SXGUIWinApi/hint.cpp similarity index 73% rename from source/SXGUIWinApi/SXGUI_hint.cpp rename to source/SXGUIWinApi/hint.cpp index 4d90da749491a37beba57e9b03154fe3c5890db0..111f917b6b9e116db7f6467d9be2538feb2ae4f5 100644 --- a/source/SXGUIWinApi/SXGUI_hint.cpp +++ b/source/SXGUIWinApi/hint.cpp @@ -1,14 +1,20 @@ -#include <SXGUIWinApi\SXGUI_hint.h> +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ -#pragma once +#include "hint.h" -SXGUIHint::SXGUIHint() + +CGUIHint::CGUIHint() { WindowHandle = 0;ParentHandle = 0;IsVisible = false; + ZeroMemory(&Hint, sizeof(Hint)); + int qwert = 0; } -SXGUIHint::SXGUIHint(HWND parent) +CGUIHint::CGUIHint(HWND parent) { ParentHandle = parent; @@ -41,6 +47,8 @@ SXGUIHint::SXGUIHint(HWND parent) GetClientRect (ParentHandle, &rect); + ZeroMemory(&Hint, sizeof(Hint)); + hint[0] = 0; Hint.cbSize = TTTOOLINFO_V1_SIZE; @@ -60,23 +68,23 @@ SXGUIHint::SXGUIHint(HWND parent) IsVisible = true; } -SXGUIHint::~SXGUIHint() +CGUIHint::~CGUIHint() { ::DestroyWindow(this->WindowHandle); } -HWND SXGUIHint::GetHWND() +HWND CGUIHint::getHWND() { return WindowHandle; } -void SXGUIHint::SetDelayTime(DWORD init,DWORD autopop) +void CGUIHint::setDelayTime(UINT init, UINT autopop) { SendMessage(WindowHandle,TTM_SETDELAYTIME,TTDT_AUTOPOP,autopop); SendMessage(WindowHandle,TTM_SETDELAYTIME,TTDT_INITIAL,init); } -void SXGUIHint::SetText(const char* text) +void CGUIHint::setText(const char* text) { SendMessage(WindowHandle, TTM_DELTOOL, 0, (LPARAM) &Hint); sprintf(this->hint,"%s",text); @@ -85,18 +93,18 @@ void SXGUIHint::SetText(const char* text) //SendMessage(WindowHandle, TTM_SETTOOLINFO , 0, (LPARAM) &Hint); } -const char* SXGUIHint::GetText() +const char* CGUIHint::getText() { return Hint.lpszText; } -void SXGUIHint::GetText(char* buf) +void CGUIHint::getText(char* buf) { if(buf) sprintf(buf,"%s",Hint.lpszText); } -bool SXGUIHint::Parent(HWND parent) +bool CGUIHint::setParent(HWND parent) { HWND OldParent = GetParent(this->WindowHandle); HWND tmp_parent = SetParent(this->WindowHandle,parent); @@ -108,18 +116,18 @@ bool SXGUIHint::Parent(HWND parent) return false; } -HWND SXGUIHint::Parent() +HWND CGUIHint::getParent() { return this->WindowHandle; } -void SXGUIHint::Visible(bool bf) +void CGUIHint::setVisible(bool bf) { SendMessage(WindowHandle,TTM_ACTIVATE,bf ? 1 : 0,0); IsVisible = bf; } -bool SXGUIHint::Visible() +bool CGUIHint::getVisible() { return IsVisible; } \ No newline at end of file diff --git a/source/SXGUIWinApi/hint.h b/source/SXGUIWinApi/hint.h new file mode 100644 index 0000000000000000000000000000000000000000..3691d6afe9a130454f830b1571b60887a5012962 --- /dev/null +++ b/source/SXGUIWinApi/hint.h @@ -0,0 +1,48 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_HINT_H +#define __SXGUI_HINT_H + +#include <windows.h> +#include <commctrl.h> + +#include "base.h" +#include "SXGUI.h" + + +class CGUIHint : public virtual ISXGUIHint +{ +public: + CGUIHint(); + CGUIHint(HWND parent); + ~CGUIHint(); + void Release(){ mem_del(this); } + //autopop - ����� ������ + //init - ������� ���� ��������� ��������� ����� ��������� ������� + void setDelayTime(UINT init, UINT autopop); + + bool setParent(HWND parent); + HWND getParent(); + + HWND getHWND(); + + void setVisible(bool bf); + bool getVisible(); + + void setText(const char* text); //��������� ������ ��������� + const char* getText(); //���������� ��������� �� ����� ���������, ��������� ��� ������ ����������� + void getText(char* buf); + +protected: + HWND WindowHandle; + HWND ParentHandle; + TOOLINFO Hint; + char hint[SX_HINT_COUNT_BUF_SIZE]; + bool IsVisible; +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/sxgui_img_button.cpp b/source/SXGUIWinApi/img_button.cpp similarity index 76% rename from source/SXGUIWinApi/sxgui_img_button.cpp rename to source/SXGUIWinApi/img_button.cpp index 2e1eda0290b7026dbfce9ebbed8953b1569b7aa9..f8d3bafce874b50b3a1da34a923ada16969ff87d 100644 --- a/source/SXGUIWinApi/sxgui_img_button.cpp +++ b/source/SXGUIWinApi/img_button.cpp @@ -1,28 +1,32 @@ -#include <SXGUIWinApi\SXGUI_img_button.h> +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ -#pragma once +#include "img_button.h" -SXGUIButtonImg::SXGUIButtonImg() + +CGUIButtonImg::CGUIButtonImg() { } -SXGUIButtonImg::SXGUIButtonImg(const char* path,WORD x,WORD y,WORD width,WORD heigth,DWORD alpha_color,DWORD bk_color,HWND parent,WNDPROC handler,DWORD id) +CGUIButtonImg::CGUIButtonImg(const char* path, WORD x, WORD y, WORD width, WORD heigth, DWORD alpha_color, DWORD bk_color, HWND parent, WNDPROC handler, ID idObj) { - this->WindowHandle = CreateWindowEx( + m_hWindow = CreateWindowEx( 0, - "SXGUIBUTTONIMG", + SXGUI_DEF_BUTTONIMG, 0, (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE, x,y,width,heigth, parent, - (HMENU)id, + (HMENU)idObj, GetModuleHandle(0), 0); - this->Init(this->GetHWND(),parent,(handler != 0 ? handler : WndProcAllDefault)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); + this->init(this->getHWND(), parent, (handler != 0 ? handler : WndProcAllDefault), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); /*this->AddHandler(WndProcButtonImgDefault,WM_MOUSEMOVE,0,0,0,0,true); this->AddHandler(WndProcButtonImgDefault,WM_KILLFOCUS,0,0,0,0,true); @@ -53,21 +57,21 @@ SXGUIButtonImg::SXGUIButtonImg(const char* path,WORD x,WORD y,WORD width,WORD he sprintf(this->PathForImg,"%s",path); } -SXGUIButtonImg::SXGUIButtonImg(WORD button,WORD x,WORD y,WORD width,WORD heigth,DWORD alpha_color,DWORD bk_color,HWND parent,WNDPROC handler,DWORD id) +CGUIButtonImg::CGUIButtonImg(WORD button, WORD x, WORD y, WORD width, WORD heigth, DWORD alpha_color, DWORD bk_color, HWND parent, WNDPROC handler, ID idObj) { - this->WindowHandle = CreateWindowEx( + m_hWindow = CreateWindowEx( 0, - "SXGUIBUTTONIMG", + SXGUI_DEF_BUTTONIMG, 0, (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE, x,y,width,heigth, parent, - (HMENU)id, + (HMENU)idObj, GetModuleHandle(0), 0); - this->Init(this->GetHWND(),parent,(handler != 0 ? handler : WndProcAllDefault)); - SetWindowLong(GetHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); - this->InitComponent(); + this->init(this->getHWND(), parent, (handler != 0 ? handler : WndProcAllDefault), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); /*this->AddHandler(WndProcButtonImgDefault,WM_MOUSEMOVE,0,0,0,0,true); this->AddHandler(WndProcButtonImgDefault,WM_KILLFOCUS,0,0,0,0,true); @@ -90,7 +94,7 @@ SXGUIButtonImg::SXGUIButtonImg(WORD button,WORD x,WORD y,WORD width,WORD heigth, this->FrameColor = RGB(255,255,255); } -void SXGUIButtonImg::ReInitImage(const char* path) +void CGUIButtonImg::reInitImage(const char* path) { DeleteObject(HBitMap); HBitMap = LoadImage(NULL,path,IMAGE_BITMAP,0,0,LR_LOADFROMFILE); @@ -100,102 +104,87 @@ void SXGUIButtonImg::ReInitImage(const char* path) sprintf(this->PathForImg,"%s",path); } -void SXGUIButtonImg::InitCallBack() +void CGUIButtonImg::initCallBack() { - this->AddHandler(WndProcButtonImgDefault,WM_MOUSEMOVE,0,0,0,0,true); - this->AddHandler(WndProcButtonImgDefault,WM_KILLFOCUS,0,0,0,0,true); - this->AddHandler(WndProcButtonImgDefault,WM_NCMOUSEMOVE,0,0,0,0,true); - this->AddHandler(WndProcButtonImgDefault,WM_LBUTTONDOWN,0,0,0,0,true); - this->AddHandler(WndProcButtonImgDefault,WM_LBUTTONUP,0,0,0,0,true); - this->AddHandler(WndProcButtonImgDefault,WM_PAINT,0,0,0,0,true); + addHandler(WndProcButtonImgDefault,WM_MOUSEMOVE,0,0,0,0,true); + addHandler(WndProcButtonImgDefault,WM_KILLFOCUS,0,0,0,0,true); + addHandler(WndProcButtonImgDefault,WM_NCMOUSEMOVE,0,0,0,0,true); + addHandler(WndProcButtonImgDefault,WM_LBUTTONDOWN,0,0,0,0,true); + addHandler(WndProcButtonImgDefault,WM_LBUTTONUP,0,0,0,0,true); + addHandler(WndProcButtonImgDefault,WM_PAINT,0,0,0,0,true); } -SXGUIButtonImg::~SXGUIButtonImg() +CGUIButtonImg::~CGUIButtonImg() { DeleteObject(HBitMap); } -void SXGUIButtonImg::GetPathForImg(char* buf) +void CGUIButtonImg::getPathForImg(char* buf) { sprintf(buf,"%s",this->PathForImg); } -void SXGUIButtonImg::SetEnable(bool bf) +void CGUIButtonImg::setEnable(bool bf) { EnableState = bf; } -bool SXGUIButtonImg::GetEnable() +bool CGUIButtonImg::getEnable() { return EnableState; } -void SXGUIButtonImg::SetEnableActive(bool bf) +void CGUIButtonImg::setActive(bool bf) { EnableBf = bf; } -bool SXGUIButtonImg::GetEnableActive() +bool CGUIButtonImg::getActive() { return EnableBf; } -void SXGUIButtonImg::SetParentGroup(bool bf) +void CGUIButtonImg::setParentGroup(bool bf) { EnableGroup = bf; } -bool SXGUIButtonImg::GetParentGroup() +bool CGUIButtonImg::getParentGroup() { return EnableGroup; } -void SXGUIButtonImg::SetColorFrame(BYTE r, BYTE g, BYTE b) -{ - FrameColor = RGB(r, g, b); -} - -void SXGUIButtonImg::SetColorFrame(DWORD color) +void CGUIButtonImg::setColorFrame(DWORD color) { FrameColor = color; } -DWORD SXGUIButtonImg::GetColorFrame() +DWORD CGUIButtonImg::getColorFrame() { return FrameColor; } -void SXGUIButtonImg::SetColorBk(BYTE r, BYTE g, BYTE b) -{ - BkColor = RGB(r, g, b); -} - -void SXGUIButtonImg::SetColorBk(DWORD color) +void CGUIButtonImg::setColorBk(DWORD color) { BkColor = color; } -DWORD SXGUIButtonImg::GetColorBk() +DWORD CGUIButtonImg::getColorBk() { return BkColor; } -void SXGUIButtonImg::SetColorAlpha(BYTE r, BYTE g, BYTE b) -{ - AlphaColor = RGB(r, g, b); -} - -void SXGUIButtonImg::SetColorAlpha(DWORD color) +void CGUIButtonImg::setColorAlpha(DWORD color) { AlphaColor = color; } -DWORD SXGUIButtonImg::GetColorAlpha() +DWORD CGUIButtonImg::getColorAlpha() { return AlphaColor; } @@ -204,9 +193,9 @@ DWORD SXGUIButtonImg::GetColorAlpha() LRESULT WndProcButtonImgDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - //SXGUIButtonImg *Button = (SXGUIButtonImg *)GetWindowLong(hwnd,GWL_USERDATA); + //CGUIButtonImg *Button = (CGUIButtonImg *)GetWindowLong(hwnd,GWL_USERDATA); ISXGUIComponent *Component = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - SXGUIButtonImg *Button = dynamic_cast<SXGUIButtonImg*>(Component); + CGUIButtonImg *Button = dynamic_cast<CGUIButtonImg*>(Component); switch(msg) { case WM_MOUSEMOVE: @@ -215,7 +204,7 @@ LRESULT WndProcButtonImgDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara POINT global_pos_cursor; GetCursorPos(&global_pos_cursor); RECT grect; - Button->GetWinRect(&grect); + Button->getWinRect(&grect); if(global_pos_cursor.x >= grect.left && global_pos_cursor.x <= grect.right && global_pos_cursor.y >= grect.top && global_pos_cursor.y <= grect.bottom) { if(Button->Pos != SXGUI_BUTTONIMG_POS_ALLOC && !(Button->EnableBf && Button->EnableState)) @@ -283,7 +272,7 @@ LRESULT WndProcButtonImgDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara //���� ������ ������� � ������ //���� ������ ���� ��������� ������ ��� ������ ������ ��������, �������� �������� � ������������ ��������� ������ if(!Button->EnableState && Button->EnableGroup) - EnumChildWindows(Button->Parent(),(WNDENUMPROC)&SXGUIEnumChildWindow::EnumChildProcUpdateImgButton,-1); + EnumChildWindows(Button->getParent(), (WNDENUMPROC)&gui_func::enum_child::EnumChildProcUpdateImgButton, -1); POINT p; GetCursorPos(&p); RECT rect; @@ -307,9 +296,9 @@ LRESULT WndProcButtonImgDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara InvalidateRect(hwnd,0,TRUE); } if(Button->EnableState) - Button->SetFocus(); + Button->setFocus(); - SendMessage(Button->Parent(),WM_COMMAND,MAKEWPARAM(GetWindowLong(hwnd,GWL_ID),0),(LPARAM)hwnd); + SendMessage(Button->getParent(),WM_COMMAND,MAKEWPARAM(GetWindowLong(hwnd,GWL_ID),0),(LPARAM)hwnd); break; case WM_PAINT: @@ -426,5 +415,5 @@ LRESULT WndProcButtonImgDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara } //break; } - return CallWindowProc(Button->OldProc, hwnd, msg, wParam, lParam); + return CallWindowProc(Button->getPrevWndProc(), hwnd, msg, wParam, lParam); } \ No newline at end of file diff --git a/source/SXGUIWinApi/img_button.h b/source/SXGUIWinApi/img_button.h new file mode 100644 index 0000000000000000000000000000000000000000..f894a5450664807e4ee0fc08dbf24d16fc7ad449 --- /dev/null +++ b/source/SXGUIWinApi/img_button.h @@ -0,0 +1,68 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_IMG_BUTTON_H +#define __SXGUI_IMG_BUTTON_H + +#include "base.h" + + +class CGUIButtonImg : public CGUIComponent, public virtual ISXGUIButtonImg +{ +public: + CGUIButtonImg(); + CGUIButtonImg(const char* path, WORD x, WORD y, WORD width, WORD heigth, DWORD alpha_color, DWORD bk_color, HWND parent, WNDPROC handler, ID idObj); + CGUIButtonImg(WORD button, WORD x, WORD y, WORD width, WORD heigth, DWORD alpha_color, DWORD bk_color, HWND parent, WNDPROC handler, ID idObj); + void Release(){ mem_del(this); } + ~CGUIButtonImg(); + + void reInitImage(const char* path); + + void initCallBack(); + + void getPathForImg(char* buf); + + void setColorFrame(DWORD color); + DWORD getColorFrame(); + + void setColorBk(DWORD color); + DWORD getColorBk(); + + void setColorAlpha(DWORD color); + DWORD getColorAlpha(); + + void setEnable(bool bf); //!< ��������� ��������� ������ (�������/��������) + bool getEnable(); //!< ���������� ��������� ������ (�������/��������) + + void setActive(bool bf); //!< ��������� ��������� ���������� ������ (��������/���������) + bool getActive(); //!< �������� �� ��������� ���������� ������? + + void setParentGroup(bool bf); //!< ���������� ������/�� ������ ������ � ������ ��������� ����� �� ������ ������ �������� + bool getParentGroup(); + + BITMAP Bitmap; + HANDLE HBitMap; + + bool IsImages; + + DWORD AlphaColor; //!< ���� ������� ����� �������� + DWORD BkColor; //!< ���� ���� ������ + DWORD FrameColor; //!< ���� ���� ������ + + WORD Pos; //!< ������� � ������� ������� ������ + bool PosBf[3]; //!< ����� �� ����������� ��������� + + bool EnableState; //!< ��������� ������ (�������/��������) + + bool EnableBf; //!< �������� �� ��������� ���������� ������ + bool EnableGroup; //!< �������� �� ������ � ������ ���� �������� ��������� ��������, ��� ���������� ����� �������������� ������ ��� �������� ������ ������ + + +private: + char PathForImg[1024]; +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/listbox.cpp b/source/SXGUIWinApi/listbox.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e23e64d7084dff57f86042aa9d56b158cab3e9e6 --- /dev/null +++ b/source/SXGUIWinApi/listbox.cpp @@ -0,0 +1,182 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "listbox.h" + + +CGUIListBox::CGUIListBox() +{ + +} + +CGUIListBox::CGUIListBox(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + "LISTBOX", + 0, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIListBox::CGUIListBox(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj, bool miltiple_sel) +{ + m_hWindow = CreateWindowEx( + 0, + "LISTBOX", + 0, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | LBS_HASSTRINGS | LBS_NOTIFY | WS_VSCROLL | WS_BORDER | (miltiple_sel ? LBS_EXTENDEDSEL : 0), + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +bool CGUIListBox::getStateMultiSel() +{ + long style = GetWindowLong(this->getHWND(), GWL_STYLE); + if(style & LBS_EXTENDEDSEL) + return true; + else + return false; +} + +void CGUIListBox::setStateMultiSel(bool isMultiSel) +{ + modifyStyle((isMultiSel ? LBS_EXTENDEDSEL : 0), (isMultiSel ? LBS_EXTENDEDSEL : 0)); +} + + +bool CGUIListBox::insertItem(int index,const char* text) +{ + if(!SendMessage(this->getHWND(),LB_INSERTSTRING,WPARAM(index),LPARAM(text))) + return false; + return true; +} + +bool CGUIListBox::addItem(const char* text) +{ + if(!SendMessage(this->getHWND(),LB_ADDSTRING,0,LPARAM(text))) + return false; + return true; +} + +bool CGUIListBox::deleteItem(int index) +{ + if(!SendMessage(this->getHWND(),LB_DELETESTRING,WPARAM(index),0)) + return false; + return true; +} + +int CGUIListBox::getItemCount() +{ + return SendMessage(this->getHWND(),LB_GETCOUNT,0,0); +} + +bool CGUIListBox::setSel(int index) +{ + return SendMessage(this->getHWND(), LB_SETCURSEL, (WPARAM)index, 0); +} + +int CGUIListBox::getSel() +{ + return SendMessage(this->getHWND(),LB_GETCURSEL,0,0); +} + + +bool CGUIListBox::setItemData(int index,LPARAM data) +{ + if(!SendMessage(this->getHWND(),LB_SETITEMDATA,WPARAM(index),data)) + return false; + return true; +} + +LPARAM CGUIListBox::getItemData(int index) +{ + return SendMessage(this->getHWND(),LB_GETITEMDATA,WPARAM(index),0); +} + +bool CGUIListBox::clear() +{ + if(!SendMessage(this->getHWND(),LB_RESETCONTENT,0,0)) + return false; + return true; +} + +bool CGUIListBox::setItemText(int index, const char* text) +{ + LPARAM data = getItemData(index); + int sel = getSel(); + /*if(!this->DeleteItem(index)) + return false; + if(!this->InsertItem(index,text)) + return false; + return this->SetItemData(index,data);*/ + + deleteItem(index); + insertItem(index,text); + if(sel == index) + { + setSel(index); + } + return setItemData(index,data); +} + +void CGUIListBox::getItemText(int index,char* buf) +{ + SendMessage(this->getHWND(),LB_GETTEXT,WPARAM(index),LPARAM(buf)); +} + +int CGUIListBox::getItemTextLength(int index) +{ + return SendMessage(this->getHWND(),LB_GETTEXTLEN,WPARAM(index),0); +} + + +int CGUIListBox::getMultiSelCount() +{ + return SendMessage(this->getHWND(),LB_GETSELCOUNT,0,0); +} + +bool CGUIListBox::setMultiSel(int index,bool sel) +{ + if(!SendMessage(this->getHWND(),LB_SETSEL,WPARAM(sel ? 1 : 0),LPARAM(index))) + return false; + return true; +} + +bool CGUIListBox::getMultiSel(int index) +{ + if(!SendMessage(this->getHWND(),LB_GETSEL,WPARAM(index),0)) + return false; + return true; +} + +int CGUIListBox::getMultiSelArr(int **ppArr) +{ + if (!ppArr) + return 0; + + int iCount = getMultiSelCount(); + + if (iCount <= 0) + return iCount; + + *ppArr = new int[iCount]; + SendMessage(this->getHWND(), LB_GETSELITEMS, WPARAM(iCount), LPARAM(*ppArr)); + return iCount; +} diff --git a/source/SXGUIWinApi/listbox.h b/source/SXGUIWinApi/listbox.h new file mode 100644 index 0000000000000000000000000000000000000000..981dc722185b7878beaeed1a17f8799a74d7aa00 --- /dev/null +++ b/source/SXGUIWinApi/listbox.h @@ -0,0 +1,52 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_LIST_BOX_H +#define __SXGUI_LIST_BOX_H + +#include "base.h" + + +class CGUIListBox : public CGUIComponent, public virtual ISXGUIListBox +{ +public: + CGUIListBox(); + CGUIListBox(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIListBox(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj, bool miltiple_sel); + + bool getStateMultiSel(); //������������ �� �������� �������������� ��������� ����� + void setStateMultiSel(bool isMultiSel); + + bool insertItem(int index,const char* text); //�������� ����� � ������ � ������� index + bool addItem(const char* text); //�������� ������ � ����� ������ + int getItemCount(); //���������� ���������� ����� + + bool deleteItem(int index); //������� ������ � ������� index + + bool setSel(int index); //�������� ������ � ������� index + int getSel(); + + bool setItemData(int index,LPARAM data); //���������� userdata ��� ������ � ������� index + LPARAM getItemData(int index); //���������� userdata + + bool clear(); //�������� + + bool setItemText(int index, const char* text);//���������� ����� � ������ � ������� index + void getItemText(int index,char* buf); //���������� ����� �� ������ + + int getItemTextLength(int index); //���������� ����� ������ � ������ + + //��������������� �����, ���� this->MultipleSel() == true + int getMultiSelCount(); //���������� ���������� ���������� ����� + + bool setMultiSel(int index,bool sel); //������������� ��������/�� �������� ������ + bool getMultiSel(int index); //���������� �������� �� ������ + + + int getMultiSelArr(int **ppArr); //���������� ������ � �������� ���������� ����� +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/listview.cpp b/source/SXGUIWinApi/listview.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aee32578ef3f48c0da8c1ed607c443af70693b30 --- /dev/null +++ b/source/SXGUIWinApi/listview.cpp @@ -0,0 +1,187 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "listview.h" + + +CGUIListView::CGUIListView() +{ + +} + +CGUIListView::CGUIListView(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + WC_LISTVIEW, + 0, + style, + x, y, width, heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + + //ListView_SetExtendedListViewStyleEx(m_hWindow, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB | LVS_EX_ONECLICKACTIVATE); + this->init(this->getHWND(), parent, handler, idObj); + SetWindowLong(getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); +} + +CGUIListView::CGUIListView(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + WC_LISTVIEW, + 0, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | /*WS_VSCROLL | WS_HSCROLL | LVS_ALIGNLEFT |*/ LVS_SHOWSELALWAYS | WS_BORDER | LVS_REPORT | LVS_SINGLESEL, + x, y, width, heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + + ListView_SetExtendedListViewStyleEx(m_hWindow, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB | LVS_EX_ONECLICKACTIVATE); + this->init(this->getHWND(), parent, handler, idObj); + SetWindowLong(getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + this->initComponent(); +} + +int CGUIListView::insertColumn(const char* text, int col, int width) +{ + RECT rcl; + ::GetClientRect(m_hWindow, &rcl); + + /*char *szIStr = new char[strlen(text)]; + sprintf(szIStr, "%s", text);*/ + + LVCOLUMN lvc; + memset(&lvc, 0, sizeof(LVCOLUMN)); + lvc.mask = LVCF_TEXT | LVCF_WIDTH; + lvc.cx = width; + lvc.pszText = (char*)text; + + int iRes = ListView_InsertColumn(m_hWindow, col, &lvc); + + //delete[] szIStr; + + return iRes; +} + +int CGUIListView::addColumn(const char* text, int width) +{ + return insertColumn(text, getColumnsCount(), width); +} + +void CGUIListView::deleteColumn(int col) +{ + ListView_DeleteColumn(m_hWindow, col); +} + +int CGUIListView::getColumnsCount() +{ + HWND hwndHeader = ListView_GetHeader(m_hWindow); + return ::SendMessage(hwndHeader, HDM_GETITEMCOUNT, 0, 0); +} + +int CGUIListView::addString(LPARAM data) +{ + LVITEM lvi; + memset(&lvi, 0, sizeof(LVCOLUMN)); + lvi.mask = LVIF_TEXT | LVIF_PARAM; + lvi.iItem = getStringCount(); + lvi.iSubItem = 0; + lvi.lParam = data; + return ListView_InsertItem(m_hWindow, &lvi); +} + +void CGUIListView::deleteString(int str) +{ + ListView_DeleteItem(m_hWindow, str); +} + +int CGUIListView::getStringCount() +{ + return ListView_GetItemCount(m_hWindow); +} + +void CGUIListView::setItemText(char* text, int col, int str) +{ + ListView_SetItemText(m_hWindow, str, col, text); +} + +void CGUIListView::getItemText(char* text, int col, int str, int sizebuff) +{ + ListView_GetItemText(m_hWindow, str, col, text, sizebuff); +} + +void CGUIListView::setItemData(int str, LPARAM data) +{ + LVITEM lvi; + lvi.iItem = str; + lvi.iSubItem = 0; + + ListView_GetItem(m_hWindow, &lvi); + + lvi.mask = lvi.mask | LVIF_PARAM; + lvi.iSubItem = 0; + lvi.lParam = data; + BOOL res = ListView_SetItem(m_hWindow, &lvi); + int qwerty = 0; +} + +LPARAM CGUIListView::getItemData(int str) +{ + LVITEM lvi; + lvi.iItem = str; + lvi.iSubItem = 0; + + BOOL res = ListView_GetItem(m_hWindow, &lvi); + return lvi.lParam; +} + +int CGUIListView::getSelString(int start) +{ + return ::SendMessage(m_hWindow, LVM_GETNEXTITEM, start, LVNI_SELECTED); +} + +void CGUIListView::setSelString(int str) +{ + ListView_SetItemState(m_hWindow, str, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); + this->setFocus(); +} + +int CGUIListView::getSelColumn() +{ + return ListView_GetSelectedColumn(m_hWindow); +} + +void CGUIListView::setSelColumn(int col) +{ + ListView_SetSelectedColumn(m_hWindow, col); +} + +void CGUIListView::clear() +{ + clearStrings(); + ListView_DeleteAllItems(m_hWindow); + + while (getColumnsCount() > 0) + { + deleteColumn(0); + } +} + +void CGUIListView::clearStrings() +{ + int countstr = getStringCount(); + for (int i = 0; i < countstr; ++i) + { + deleteString(0); + } + //BOOL bf = TabCtrl_DeleteAllItems(m_hWindow); + //int qwerty = 0; +} \ No newline at end of file diff --git a/source/SXGUIWinApi/listview.h b/source/SXGUIWinApi/listview.h new file mode 100644 index 0000000000000000000000000000000000000000..0ff454d92b7283fee8cde2691812f1dc9f3fa797 --- /dev/null +++ b/source/SXGUIWinApi/listview.h @@ -0,0 +1,45 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_LIST_VIEW_H +#define __SXGUI_LIST_VIEW_H + +#include "base.h" + + +class CGUIListView : public CGUIComponent, public virtual ISXGUIListView +{ +public: + CGUIListView(); + CGUIListView(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIListView(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj); + + int insertColumn(const char* text, int col, int width); + int addColumn(const char* text, int width); + void deleteColumn(int col); + int getColumnsCount(); + + int addString(LPARAM data = -1); + void deleteString(int str); + int getStringCount(); + + void setItemText(char* text, int col, int str); + void getItemText(char* text, int col, int str, int sizebuff); + + void setItemData(int str, LPARAM data); + LPARAM getItemData(int str); + + int getSelString(int start = -1); + void setSelString(int str); + + int getSelColumn(); + void setSelColumn(int col); + + void clear(); + void clearStrings(); +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/memo.cpp b/source/SXGUIWinApi/memo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a19193d4690ba85eec88746b1e8e7f1de139bfd5 --- /dev/null +++ b/source/SXGUIWinApi/memo.cpp @@ -0,0 +1,62 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "memo.h" + + +CGUIMemo::CGUIMemo() +{ + +} + +CGUIMemo::CGUIMemo(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + "EDIT", + caption, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIMemo::CGUIMemo(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + "EDIT", + caption, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | WS_BORDER | ES_AUTOVSCROLL | ES_LEFT | ES_WANTRETURN | ES_MULTILINE, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + + +bool CGUIMemo::getWordWrap() +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if((style & ES_AUTOVSCROLL) && !(style & ES_AUTOHSCROLL)) + return true; + return false; +} + +bool CGUIMemo::setWordWrap(bool bf) +{ + return modifyStyle(bf ? ES_AUTOVSCROLL : 0,!bf ? ES_AUTOVSCROLL : 0); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/memo.h b/source/SXGUIWinApi/memo.h new file mode 100644 index 0000000000000000000000000000000000000000..95146997c05dd9afbc7dced49b1c739362d5afba --- /dev/null +++ b/source/SXGUIWinApi/memo.h @@ -0,0 +1,24 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_MEMO_H +#define __SXGUI_MEMO_H + +#include "edit.h" + + +class CGUIMemo : public CGUIEdit, public virtual ISXGUIMemo +{ +public: + CGUIMemo(); + CGUIMemo(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIMemo(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj); + + bool getWordWrap(); //���������� �� ����������� ���� + bool setWordWrap(bool bf); //������������ ��������� ����������� ���� +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/menu.cpp b/source/SXGUIWinApi/menu.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d055dd136985925bcb57d27bc2f487ad0aa3ad5 --- /dev/null +++ b/source/SXGUIWinApi/menu.cpp @@ -0,0 +1,247 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "menu.h" + + +CGUIMenuBase::CGUIMenuBase() +{ + MenuHandle = 0; +} + +CGUIMenuBase::~CGUIMenuBase() +{ + DestroyMenu(this->MenuHandle); +} + +bool CGUIMenuBase::insertItem(int index, const char* text, ID id, ID id_sub_menu) +{ + char str[256]; + sprintf(str,"%s",text); + MENUITEMINFO mi; + mi.cbSize=sizeof(MENUITEMINFO); + mi.fMask=MIIM_STRING|MIIM_ID; + mi.dwTypeData = str; + mi.wID=id; + + HMENU SubMenu = getSubMenu(id_sub_menu); + BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu ? SubMenu : MenuHandle,index,TRUE,&mi); + //DrawMenuBar(ParentHandle); + return bf ? true : false; +} + +bool CGUIMenuBase::insertPopupItem(int index, const char* text, ID id, ID id_sub_menu) +{ + char str[256]; + sprintf(str,"%s",text); + MENUINFO mi; + MENUITEMINFO mii; + HMENU SubMenu = CreatePopupMenu(); + mi.cbSize = sizeof(MENUINFO); + mi.fMask = MIM_STYLE; + mi.dwStyle = MNS_NOTIFYBYPOS; + SetMenuInfo(SubMenu, &mi); + + mii.cbSize = sizeof(MENUITEMINFO); + mii.fMask = MIIM_STRING | MIIM_SUBMENU | MIIM_FTYPE | MIIM_ID; + mii.fType = MFT_STRING; + mii.dwTypeData = str; + mii.wID = id; + mii.hSubMenu = SubMenu; + + HMENU SubMenu2 = getSubMenu(id_sub_menu); + BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu2 ? SubMenu2 : MenuHandle, index, TRUE, &mii); + //DrawMenuBar(ParentHandle); + return bf ? true : false; +} + +bool CGUIMenuBase::insertSeparator(int index, ID id, ID id_sub_menu) +{ + MENUITEMINFO mi; + mi.cbSize=sizeof(MENUITEMINFO); + mi.fMask=MIIM_ID | MIIM_FTYPE; + mi.wID=id; + mi.fType = MFT_SEPARATOR; + + HMENU SubMenu = getSubMenu(id_sub_menu); + BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu ? SubMenu : MenuHandle,index,TRUE,&mi); + //DrawMenuBar(ParentHandle); + return bf ? true : false; +} + +bool CGUIMenuBase::deleteItem(ID id) +{ + return DeleteMenu(this->MenuHandle,id,MF_BYCOMMAND) ? true : false; +} + +HMENU CGUIMenuBase::getSubMenu(ID id) +{ + MENUITEMINFO mi; + mi.cbSize=sizeof(MENUITEMINFO); + mi.fMask=MIIM_SUBMENU; + mi.hSubMenu = 0; + BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); + + return bf ? mi.hSubMenu : 0; +} + +bool CGUIMenuBase::setCheckItem(ID id, bool check) +{ + /*MENUITEMINFO mi; + mi.cbSize=sizeof(MENUITEMINFO); + mi.fMask=MIIM_STATE; + + if(!GetMenuItemInfo(MenuHandle,id,FALSE,&mi)) + return false; + + mi.fState |= (check ? MFS_CHECKED : MFS_UNCHECKED); + + if(!SetMenuItemInfo(MenuHandle,id,FALSE,&mi)) + return false; + return true;*/ + DWORD var = CheckMenuItem(MenuHandle,id,(check ? MF_CHECKED : MF_UNCHECKED)); + //DrawMenuBar(ParentHandle); + return ((var != 0xFFFFFFFF) || (var == -1)) ? true : false; +} + +bool CGUIMenuBase::getCheckedItem(ID id) +{ + MENUITEMINFO mi; + mi.cbSize=sizeof(MENUITEMINFO); + mi.fMask=MIIM_STATE; + BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); + if(mi.fState & MFS_CHECKED) + return true; + return false; +} + +bool CGUIMenuBase::setEnableItem(ID id, int enable) +{ + /*MENUITEMINFO mi; + mi.cbSize=sizeof(MENUITEMINFO); + mi.fMask=MIIM_STATE; + + if(!GetMenuItemInfo(MenuHandle,id,FALSE,&mi)) + return false; + + DWORD Enable = SXGUI_MENU_ENABLED; + + if(enable == SXGUI_MENU_DISABLED) + Enable = MFS_DISABLED; + else if(enable == SXGUI_MENU_GRAYED) + Enable = MFS_GRAYED; + else + Enable = MFS_ENABLED; + + mi.fState |= Enable; + + if(!SetMenuItemInfo(MenuHandle,id,FALSE,&mi)) + return false; + return true;*/ + + DWORD Enable = SXGUI_MENU_PART_STATE_ENABLED; + + if (enable == SXGUI_MENU_PART_STATE_DISABLED) + Enable = MFS_DISABLED; + else if (enable == SXGUI_MENU_PART_STATE_GRAYED) + Enable = MFS_GRAYED; + else + Enable = MFS_ENABLED; + + DWORD var = EnableMenuItem(MenuHandle,id,Enable);; + //DrawMenuBar(ParentHandle); + return ((var != 0xFFFFFFFF) || (var == -1)) ? true : false; +} + +int CGUIMenuBase::getEnabledItem(ID id) +{ + MENUITEMINFO mi; + mi.cbSize=sizeof(MENUITEMINFO); + mi.fMask=MIIM_STATE; + BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); + + if(mi.fState & MFS_DISABLED) + return SXGUI_MENU_PART_STATE_DISABLED; + else if(mi.fState & MFS_GRAYED) + return SXGUI_MENU_PART_STATE_GRAYED; + else + return SXGUI_MENU_PART_STATE_ENABLED; + + return -1; +} + +HMENU CGUIMenuBase::getHMENU() +{ + return this->MenuHandle; +} + +//########################################################################## + +CGUIMenuWindow::CGUIMenuWindow() +{ + MENUINFO mi; + MenuHandle = CreateMenu(); + mi.cbSize = sizeof(MENUINFO); + mi.fMask = MIM_STYLE; + mi.dwStyle = MNS_NOTIFYBYPOS; + SetMenuInfo(MenuHandle, &mi); +} + +CGUIMenuWindow::CGUIMenuWindow(UINT menu) +{ + MenuHandle = LoadMenu(GetModuleHandle(0), MAKEINTRESOURCE(menu)); +} + +bool CGUIMenuWindow::setToWindow(HWND hwnd) +{ + if(!hwnd) + return false; + if(!SetMenu(hwnd,MenuHandle)) + return false; + return true; +} + +//########################################################################## + +CGUIPopupMenu::CGUIPopupMenu(UINT menu) +{ + MenuHandle = LoadMenu(GetModuleHandle(0),MAKEINTRESOURCE(menu)); + MenuHandle = ::GetSubMenu(MenuHandle,0); +} + +CGUIPopupMenu::CGUIPopupMenu() +{ + MENUINFO mi; + MenuHandle = CreatePopupMenu(); + mi.cbSize = sizeof(MENUINFO); + mi.fMask = MIM_STYLE; + mi.dwStyle = MNS_NOTIFYBYPOS; + SetMenuInfo(MenuHandle, &mi); +} + +bool CGUIPopupMenu::track(HWND hwnd,int x,int y) +{ + int pos_x,pos_y; + + if((x == -1)&&(y==-1)) + { + POINT point; + GetCursorPos(&point); + pos_x = point.x; + pos_y = point.y; + } + else + { + pos_x=x; + pos_y=y; + } + if(!hwnd) + return false; + + if(!TrackPopupMenu(MenuHandle,TPM_LEFTALIGN,pos_x,pos_y,0,hwnd,0)) + return false; + return true; +} diff --git a/source/SXGUIWinApi/menu.h b/source/SXGUIWinApi/menu.h new file mode 100644 index 0000000000000000000000000000000000000000..2aa0efc1d65081e053b5ff1dd4c637ad580c1b78 --- /dev/null +++ b/source/SXGUIWinApi/menu.h @@ -0,0 +1,70 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_MENU_H +#define __SXGUI_MENU_H + +#include "base.h" + +class CGUIMenuBase : public virtual ISXGUIMenuBase +{ +public: + CGUIMenuBase(); + + ~CGUIMenuBase(); + + void Release(){ mem_del(this); } + + + bool insertItem(int index, const char* text, ID id, ID id_sub_menu); + bool insertPopupItem(int index, const char* text, ID id, ID id_sub_menu); + bool insertSeparator(int index, ID id, ID id_sub_menu); + + bool deleteItem(ID id); + + HMENU getSubMenu(ID id); + + bool setCheckItem(ID id, bool check); + bool setEnableItem(ID id, int enable); + + bool getCheckedItem(ID id); + int getEnabledItem(ID id); + + + HMENU getHMENU(); + bool setToWindow(HWND hwnd); + +protected: + HMENU MenuHandle; +}; + +//########################################################################## + +class CGUIMenuWindow : public CGUIMenuBase, public virtual ISXGUIMenuWindow +{ +public: + CGUIMenuWindow(); + CGUIMenuWindow(UINT menu); + + void Release(){ mem_del(this); } + + bool setToWindow(HWND hwnd); +}; + +//########################################################################## + +class CGUIPopupMenu : public CGUIMenuBase, public virtual ISXGUIPopupMenu +{ +public: + CGUIPopupMenu(); + CGUIPopupMenu(UINT menu); + + void Release(){ mem_del(this); } + + bool track(HWND hwnd,int x,int y); +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/progressbar.cpp b/source/SXGUIWinApi/progressbar.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cce17404e58b2f11695c963cd0f08a806afd6c33 --- /dev/null +++ b/source/SXGUIWinApi/progressbar.cpp @@ -0,0 +1,121 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "progressbar.h" + + +CGUIProgressBar::CGUIProgressBar() +{ + +} + +CGUIProgressBar::CGUIProgressBar(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + PROGRESS_CLASS, + 0, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + m_lpfnPrevProc = DefWindowProc; + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIProgressBar::CGUIProgressBar(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj, bool vertical, bool smooth) +{ + m_hWindow = CreateWindowEx( + 0, + PROGRESS_CLASS, + 0, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | (smooth ? PBS_SMOOTH : 0) | (vertical ? PBS_VERTICAL : 0), + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + //SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + ISXGUIComponent* component = dynamic_cast<ISXGUIComponent*>(this); + SetWindowLong(getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +int CGUIProgressBar::getPos() +{ + return SendMessage(this->getHWND(),PBM_GETPOS,0,0); +} + +int CGUIProgressBar::setPos(int pos) +{ + return SendMessage(this->getHWND(),PBM_SETPOS,WPARAM(pos),0); +} + +int CGUIProgressBar::getStep() +{ + int step = SendMessage(this->getHWND(),PBM_SETSTEP,WPARAM(0),0); + + SendMessage(this->getHWND(),PBM_SETSTEP,WPARAM(step),0); + return step; +} + +int CGUIProgressBar::setStep(int step) +{ + return SendMessage(this->getHWND(),PBM_SETSTEP,WPARAM(step),0); +} + +int CGUIProgressBar::setPosSteps(int steps) +{ + return SendMessage(this->getHWND(),PBM_DELTAPOS,WPARAM(steps),0); +} + +int CGUIProgressBar::setOneStep() +{ + return SendMessage(this->getHWND(),PBM_STEPIT,0,0); +} + +bool CGUIProgressBar::setMinMax(int min,int max) +{ + return SendMessage(this->getHWND(),PBM_SETRANGE32,WPARAM(min),LPARAM(max)); +} + + +int CGUIProgressBar::getMin() +{ + return SendMessage(this->getHWND(),PBM_GETRANGE,WPARAM(1),0); +} + +int CGUIProgressBar::getMax() +{ + return SendMessage(this->getHWND(),PBM_GETRANGE,WPARAM(0),0); +} + +bool CGUIProgressBar::setColorBar(DWORD dwColor) +{ + return SendMessage(this->getHWND(), PBM_SETBARCOLOR, 0, LPARAM(dwColor)); +} + +bool CGUIProgressBar::setColorBk(DWORD dwColor) +{ + return SendMessage(this->getHWND(), PBM_SETBKCOLOR, 1, LPARAM(dwColor)); +} + +DWORD CGUIProgressBar::getColorBar() +{ + COLORREF color = SendMessage(this->getHWND(),PBM_SETBARCOLOR,0,0); + return color; +} + +DWORD CGUIProgressBar::getColorBk() +{ + COLORREF color = SendMessage(this->getHWND(),PBM_SETBKCOLOR,0,0); + return color; +} \ No newline at end of file diff --git a/source/SXGUIWinApi/progressbar.h b/source/SXGUIWinApi/progressbar.h new file mode 100644 index 0000000000000000000000000000000000000000..8684973cdc29c43e8caad4541b57658f1a2b9f26 --- /dev/null +++ b/source/SXGUIWinApi/progressbar.h @@ -0,0 +1,49 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_PROGRESS_BAR_H +#define __SXGUI_PROGRESS_BAR_H + +#include "base.h" + + +class CGUIProgressBar : public CGUIComponent, public virtual ISXGUIProgressBar +{ +public: + CGUIProgressBar(); + CGUIProgressBar(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIProgressBar(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj, bool vertical, bool smooth); + + //��������/���������� ������� ��������� + int getPos(); //���������� ������� ������� + int setPos(int pos); //���������� ������ ������� + + //��������/���������� ������ ���� ��������� + int getStep(); //���������� ������� ������ ���� + int setStep(int step); //���������� ������ ������ ���� + + //���������� �������������� ������� + int setPosSteps(int steps); //���������� ������� �� ���������� ����� + int setOneStep(); //��������� ������� �� ���� ��� + + //������������� ������� �������� � ��������� ��������� + //��� ������� ���������� ���������� true, ����� false + bool setMinMax(int min,int max); + + //���������� �����������/������������ ������� ��������� + int getMin(); + int getMax(); + + //����������/�������� ���� ������� (���������� ���� ��������� ������� RGB(51,153,255)) + bool setColorBar(DWORD dwColor); //��� ������� ���������� ���������� true, ����� false + DWORD getColorBar(); + + //����������/�������� ���� ���� (���������� ���� ����� ����� ���� ��������) + bool setColorBk(DWORD dwColor); //��� ������� ���������� ���������� true, ����� false + DWORD getColorBk(); +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/radiobutton.cpp b/source/SXGUIWinApi/radiobutton.cpp new file mode 100644 index 0000000000000000000000000000000000000000..33a0aa8e9c338d812dfbd12f10a8a46b2ba07f14 --- /dev/null +++ b/source/SXGUIWinApi/radiobutton.cpp @@ -0,0 +1,57 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "radiobutton.h" + + +CGUIRadioButton::CGUIRadioButton() +{ + +} + +CGUIRadioButton::CGUIRadioButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + "BUTTON", + caption, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIRadioButton::CGUIRadioButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + "BUTTON", + caption, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | BS_AUTORADIOBUTTON, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +void CGUIRadioButton::setCheck(bool check) +{ + SendMessage(this->getHWND(),BM_SETCHECK,(check ? BST_CHECKED : BST_UNCHECKED),0); +} + +bool CGUIRadioButton::getCheck() +{ + return SendMessage(this->getHWND(),BM_GETCHECK,0,0) ? true : false; +} \ No newline at end of file diff --git a/source/SXGUIWinApi/radiobutton.h b/source/SXGUIWinApi/radiobutton.h new file mode 100644 index 0000000000000000000000000000000000000000..c769f2917eec12df12a0beedc776cac763eb5d4d --- /dev/null +++ b/source/SXGUIWinApi/radiobutton.h @@ -0,0 +1,25 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_RADIO_BUTTON_H +#define __SXGUI_RADIO_BUTTON_H + +#include "base.h" +#include "button.h" + + +class CGUIRadioButton : public CGUIButton, public virtual ISXGUIRadioButton +{ +public: + CGUIRadioButton(); + CGUIRadioButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIRadioButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj); + + void setCheck(bool check); + bool getCheck(); +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/static.cpp b/source/SXGUIWinApi/static.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4c06e5799f4ddcb85567d3520958d2ae42c2713f --- /dev/null +++ b/source/SXGUIWinApi/static.cpp @@ -0,0 +1,99 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "static.h" + + +CGUIStatic::CGUIStatic() +{ + +} + +CGUIStatic::CGUIStatic(const char* caption, int x, int y, int width, int heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + SXGUI_DEF_STATIC, + caption, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIStatic::CGUIStatic(const char* caption, int x, int y, int width, int heigth, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + SXGUI_DEF_STATIC, + caption, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | SS_LEFT, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIStatic::CGUIStatic(int x, int y, int width, int heigth, HWND parent, WNDPROC handler, ID idObj, bool vertical) +{ + m_hWindow = CreateWindowEx( + WS_EX_TOPMOST, + SXGUI_DEF_STATIC, + 0, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | SS_LEFT | (vertical ? SS_ETCHEDVERT : SS_ETCHEDHORZ), + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, handler, idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +SXGUI_TEXT_ALIGN CGUIStatic::getAlign() +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(style & SS_RIGHT) + return SXGUI_TEXT_ALIGN_RIGHT; + else if(style & SS_CENTER) + return SXGUI_TEXT_ALIGN_CENTER; + else + return SXGUI_TEXT_ALIGN_LEFT; +} + +bool CGUIStatic::setAlign(SXGUI_TEXT_ALIGN align) +{ + if (align == SXGUI_TEXT_ALIGN_LEFT) + return this->modifyStyle(SS_LEFT,0); + else if (align == SXGUI_TEXT_ALIGN_RIGHT) + return this->modifyStyle(SS_RIGHT,0); + else if (align == SXGUI_TEXT_ALIGN_CENTER) + return this->modifyStyle(SS_CENTER,0); + return false; +} + +bool CGUIStatic::getWordWrap() +{ + long style = GetWindowLong(this->getHWND(),GWL_STYLE); + if(!(style & SS_LEFTNOWORDWRAP)) + return true; + return false; +} + +bool CGUIStatic::setWordWrap(bool bf) +{ + return this->modifyStyle(!bf ? SS_LEFTNOWORDWRAP : 0,bf ? SS_LEFTNOWORDWRAP : 0); +} diff --git a/source/SXGUIWinApi/static.h b/source/SXGUIWinApi/static.h new file mode 100644 index 0000000000000000000000000000000000000000..36459758668cdac641a9f6d39cb3339a15807b14 --- /dev/null +++ b/source/SXGUIWinApi/static.h @@ -0,0 +1,29 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_STATIC_H +#define __SXGUI_STATIC_H + +#include "base.h" + +class CGUIStatic : public CGUITextual, public virtual ISXGUIStatic +{ +public: + CGUIStatic(); + CGUIStatic(const char* caption, int x, int y, int width, int heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIStatic(const char* caption, int x, int y, int width, int heigth, HWND parent, WNDPROC handler, ID idObj); + + //������� ����� + CGUIStatic(int x, int y, int width, int heigth, HWND parent, WNDPROC handler, ID idObj, bool vertical); + + SXGUI_TEXT_ALIGN getAlign(); //���������� ���� ������������ ������ + bool setAlign(SXGUI_TEXT_ALIGN align); //������������� ������������ ������ + + bool getWordWrap(); //���������� �� ����������� ����� + bool setWordWrap(bool bf); //����������� �� ��������� ����������� ����� +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/statusbar.cpp b/source/SXGUIWinApi/statusbar.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e74a74591623d4462564caebd079b2ea7ec1bf1 --- /dev/null +++ b/source/SXGUIWinApi/statusbar.cpp @@ -0,0 +1,213 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "statusbar.h" + + +CGUIStatusBar::CGUIStatusBar() +{ + +} + +CGUIStatusBar::CGUIStatusBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + STATUSCLASSNAME, + caption, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); + + AlignReSizing = SXGUI_STATUSBAR_ALIGN_RESIZE_PERCENT; + ArrWidth = 0; + ArrCoef = 0; + CountArr = 0; + + m_aFollowParentSide[SXGUI_SIDE_TOP] = false; + m_aFollowParentSide[SXGUI_SIDE_BOTTOM] = false; + m_aFollowParentSide[SXGUI_SIDE_RIGHT] = false; + m_aFollowParentSide[SXGUI_SIDE_LEFT] = false; +} + +CGUIStatusBar::CGUIStatusBar(const char* caption, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + STATUSCLASSNAME, + caption, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | TBS_AUTOTICKS | SBARS_SIZEGRIP | CCS_BOTTOM, + CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); + + AlignReSizing = SXGUI_STATUSBAR_ALIGN_RESIZE_PERCENT; + ArrWidth = 0; + ArrCoef = 0; + CountArr = 0; + + m_aFollowParentSide[SXGUI_SIDE_TOP] = false; + m_aFollowParentSide[SXGUI_SIDE_BOTTOM] = false; + m_aFollowParentSide[SXGUI_SIDE_RIGHT] = false; + m_aFollowParentSide[SXGUI_SIDE_LEFT] = false; + + ::GetClientRect(this->getHWND(),&this->OldRect); +} + +CGUIStatusBar::~CGUIStatusBar() +{ + mem_delete_a(ArrCoef); + mem_delete_a(ArrWidth); +} + +bool CGUIStatusBar::setPartsCount(int count, int *arr) +{ + CountArr = count; + mem_delete_a(ArrWidth); + ArrWidth = 0; + ArrWidth = arr; + + comCoef(); + + if(SendMessage(this->getHWND(),SB_SETPARTS,count,(LPARAM)arr)) + return true; + else + return false; +} + +void CGUIStatusBar::comCoef() +{ + WORD GWidth = 0; + RECT rect; + ::GetClientRect(this->getHWND(),&rect); + GWidth = rect.right; + float OnePercent = 100.0 / float(GWidth); + + mem_delete_a(ArrCoef); + ArrCoef = new float[CountArr]; + + for(int i=0;i<CountArr;i++) + { + ArrCoef[i] = OnePercent * ((ArrWidth[i] != -1 ? ArrWidth[i] : GWidth) - (i > 0 ? ArrWidth[i-1] : 0)); + } +} + +bool CGUIStatusBar::setPartText(int pos, const char* text) +{ + SendMessage(this->getHWND(),SB_SETTEXT,pos,(LPARAM)text); + return true; +} + +int CGUIStatusBar::getPartsCount(int **ppArr) +{ + int iCount = SendMessage(this->getHWND(), SB_GETPARTS, 0, 0); + int *aParts = new int[iCount]; + + int tmpcp = SendMessage(this->getHWND(), SB_GETPARTS, iCount, (LPARAM)aParts); + + if (ppArr != 0) + *ppArr = aParts; + else + { + mem_delete_a(aParts); + } + + return iCount; +} + +bool CGUIStatusBar::getPartText(int pos, char* buf, int len) +{ + int CountSym = SendMessage(this->getHWND(), SB_GETTEXTLENGTH, pos, 0); + if (len < CountSym) + return false; + + if (!SendMessage(this->getHWND(), SB_GETTEXT, pos, (LPARAM)buf)) + return false; + + return true; +} + +void CGUIStatusBar::setAlignReSize(SXGUI_STATUSBAR_ALIGN_RESIZE alignrs) +{ + AlignReSizing = alignrs; +} + +SXGUI_STATUSBAR_ALIGN_RESIZE CGUIStatusBar::getAlignReSize() +{ + return AlignReSizing; +} + +void CGUIStatusBar::update() +{ + //RECT OldRect; + RECT NewRect; + //::GetClientRect(this->getHWND(),&this->OldRect); + SendMessage(this->getHWND(),WM_SIZE,0,0); + ::GetClientRect(this->getHWND(),&NewRect); + + int width = NewRect.right - OldRect.right; + /*if(width != 0) + MessageBox(0,ToPointChar(width),0,0);*/ + int *Arr; + + WORD CountParts = getPartsCount(&Arr); + int *NewArr = new int[CountParts]; + + bool UpdateOldRect = true; + + WORD tmpCountParts = (Arr[CountParts-1] == -1 ? CountParts - 1 : CountParts); + if (AlignReSizing == SXGUI_STATUSBAR_ALIGN_RESIZE_PERCENT) + { + for(int i=0;i<tmpCountParts;i++) + { + float coef = ArrCoef[i] / 100.0; + //MessageBox(0,ToPointChar(coef),0,0); + float part_width = Arr[i] - (i > 0 ? Arr[i-1] : 0); + float new_part_width = part_width + (int(width * coef)); + //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(coef)),ToPointChar(new_part_width),0); + NewArr[i] = new_part_width + (i > 0 ? NewArr[i-1] : 0); + if(Arr[i] == NewArr[i]) + UpdateOldRect = false; + //MessageBox(0,ToPointChar(ToString(Arr[i]) + "|" + ToString(NewArr[i])),0,0); + } + } + else if (AlignReSizing == SXGUI_STATUSBAR_ALIGN_RESIZE_EQUALLY) + { + for(int i=0;i<tmpCountParts;i++) + NewArr[i] = Arr[i] + (width / CountParts); + } + else + { + for(int i=0;i<tmpCountParts;i++) + NewArr[i] = Arr[i]; + } + + if(Arr[CountParts-1] == -1) + NewArr[CountParts-1] = Arr[CountParts-1]; + + if(UpdateOldRect) + ::GetClientRect(this->getHWND(),&this->OldRect); + + SendMessage(this->getHWND(),SB_SETPARTS,CountParts,(LPARAM)NewArr); + mem_delete_a(Arr); + mem_delete_a(NewArr); +} + +void CGUIStatusBar::updateSize() +{ + update(); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/statusbar.h b/source/SXGUIWinApi/statusbar.h new file mode 100644 index 0000000000000000000000000000000000000000..67b8b94b8df5051ee4f19706a68e2f9c622ecbb3 --- /dev/null +++ b/source/SXGUIWinApi/statusbar.h @@ -0,0 +1,48 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_STATUS_BAR_H +#define __SXGUI_STATUS_BAR_H + +#include "base.h" + +class CGUIStatusBar : public CGUIComponent, public virtual ISXGUIStatusBar +{ +public: + CGUIStatusBar(); + CGUIStatusBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUIStatusBar(const char* caption, HWND parent, WNDPROC handler, ID idObj); + + ~CGUIStatusBar(); + + void Release(){ mem_del(this); } + + + bool setPartsCount(int count, int *arr); + int getPartsCount(int **arr); + bool setPartText(int pos, const char* text); + bool getPartText(int pos, char* buf, int len); + + void update(); + void updateSize(); + + void setAlignReSize(SXGUI_STATUSBAR_ALIGN_RESIZE alignrs); + SXGUI_STATUSBAR_ALIGN_RESIZE getAlignReSize(); + +protected: + + SXGUI_STATUSBAR_ALIGN_RESIZE AlignReSizing; + + RECT OldRect; + + void comCoef(); + + float* ArrCoef; + int* ArrWidth; + WORD CountArr; +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/sxgui_base.cpp b/source/SXGUIWinApi/sxgui_base.cpp deleted file mode 100644 index 814335f567d9c4295e6eff8dcb24206ec7ece319..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/sxgui_base.cpp +++ /dev/null @@ -1,1221 +0,0 @@ - -#pragma once -#include <SXGUIWinApi\SXGUI_base.h> - - -SXGUIControl::SXGUIControl() -{ - WindowHandle = 0; - ParentHandle = 0; -} - -SXGUIControl::~SXGUIControl() -{ - ::DestroyWindow(this->WindowHandle); -} - -SXGUIControl::SXGUIControl(HWND window_handle,HWND parent_handle,WNDPROC handler) -{ - WindowHandle = window_handle; - ParentHandle = parent_handle; - if(handler != 0) - OldProc = (WNDPROC)SetWindowLong(WindowHandle, GWL_WNDPROC, (LONG)handler); -} - -void SXGUIControl::Init(HWND window_handle, HWND parent_handle, WNDPROC handler) -{ - WindowHandle = window_handle; - ParentHandle = parent_handle; - - if(handler != 0) - { - if ((WNDPROC)GetWindowLong(WindowHandle, GWL_WNDPROC) != handler) - { - DWORD ptrf = SetWindowLong(WindowHandle, GWL_WNDPROC, (LONG)handler); - OldProc = (WNDPROC)ptrf; - } - } - -} - -HWND SXGUIControl::Parent() -{ - return ParentHandle; -} - -bool SXGUIControl::Parent(HWND parent_handle) -{ - HWND OldParent = GetParent(this->WindowHandle); - HWND tmp_parent = SetParent(this->WindowHandle,parent_handle); - if(tmp_parent = OldParent) - { - ParentHandle = parent_handle; - return true; - } - return false; -} - -HWND SXGUIControl::GetHWND() -{ - return WindowHandle; -} - -void SXGUIControl::SetFocus() -{ - ::SetFocus(WindowHandle); -} - -bool SXGUIControl::Focus() -{ - return GetFocus() == WindowHandle ? true : false; -} - -void SXGUIControl::Visible(bool bf) -{ - ShowWindow(WindowHandle,bf ? SW_SHOW : SW_HIDE); -} - -bool SXGUIControl::Visible() -{ - return IsWindowVisible(WindowHandle); -} - -void * SXGUIControl::GetUserPtr() -{ - return(UserPtr); -} -void * SXGUIControl::SetUserPtr(void * ptr) -{ - void * oldPtr = UserPtr; - UserPtr = ptr; - return(oldPtr); -} - -/////////////////// - -SXGUIComponent::SXGUIComponent() -{ - Hint = 0; - CountKeyArrHandler = 0; - GAlign = SXRectBool(); - ParentRect.top = ParentRect.bottom = ParentRect.left = ParentRect.right = 0; - TransparenTextBf = true; - - BFSizingChangeTop = true; - BFSizingChangeBottom = true; - BFSizingChangeRight = true; - BFSizingChangeLeft = true; - - MinSizeX = MinSizeY = 0; - //this->Font = 0; -} - -SXGUIComponent::~SXGUIComponent() -{ - mem_delete(this->Hint); - //delete this->Font; - //this->Font = 0; -} - -void SXGUIComponent::InitComponent() -{ - COLORREF color_bk = GetBkColor(GetDC(this->WindowHandle)); - COLORREF color_text = GetTextColor(GetDC(this->WindowHandle)); - COLORREF color_brush = GetDCBrushColor(GetDC(this->WindowHandle)); - - ColorText = color_text; - ColorTextBk = color_bk; - ColorBrush = color_brush; - - HBrush = CreateSolidBrush(ColorBrush); - - GetWindowRect(this->Parent(),&ParentRect); - - GetWindowRect(this->WindowHandle, &WinScreenRect); - MapWindowPoints(this->Parent(), HWND_DESKTOP, (LPPOINT)&WinScreenRect, 2); - - RECT rc; - GetWindowRect(this->WindowHandle, &rc); - - OffsetParentRect.top = OffsetParentRect.bottom = OffsetParentRect.left = OffsetParentRect.right = 0; - - //MinSizeX = rc.right - rc.left; - //MinSizeY = rc.bottom - rc.top; - - //HFONT HandleFont; - //SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, &HandleFont, 0); - - HFONT HandleFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT); - SendMessage( - this->WindowHandle, - WM_SETFONT, - WPARAM(HandleFont), - 0); - DeleteObject(HandleFont); - //this->Font = new SXFont(); - //this->SetFont(this->Font); -} - -bool SXGUIComponent::Enable() -{ - return ((IsWindowEnabled(this->GetHWND()) == 0) ? false : true); -} - -void SXGUIComponent::Enable(bool bf) -{ - EnableWindow(this->GetHWND(), (bf ? 1 : 0)); -} - -bool SXGUIComponent::SetWinRect(RECT* rect,bool alignment_screen_space) -{ - RECT wrect; - SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); - UINT width_screen = wrect.right; - UINT heigth_screen = wrect.bottom; - - //MessageBox(0,ToPointChar(ToString(width_screen) + "|" + ToString(heigth_screen)),0,0); - - WORD x = rect->left; - WORD y = rect->top; - WORD width = rect->right - rect->left; - WORD heigth = rect->bottom - rect->top; - //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(heigth)),"wh",0); - if(alignment_screen_space) - { - x = x < width_screen ? x : width_screen; - y = y < heigth_screen ? y : heigth_screen; - //MessageBox(0,ToPointChar(ToString(rect->right) + "|" + ToString(rect->bottom)),"wh",0); - width = rect->right <= width_screen ? width : width_screen - x; - heigth = rect->bottom <= heigth_screen ? heigth : heigth_screen - y; - - /*if(x < 0) - x = 0; - if(y < 0) - y = 0;*/ - } - //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(heigth)),"wh",0); - BOOL bf = MoveWindow(this->GetHWND(), x, y, width, heigth, true); - return bf == TRUE ? true : false; -} - -void SXGUIComponent::GetWinRect(RECT* rect) -{ - GetWindowRect(this->GetHWND(), rect); -} - -bool SXGUIComponent::SetClientRect(RECT* rect,bool alignment_screen_space) -{ - RECT wrect; - SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); - long width_screen = wrect.right; - long heigth_screen = wrect.bottom; - - //MessageBox(0,ToPointChar(ToString(width_screen) + "|" + ToString(heigth_screen)),0,0); - - long x = rect->left; - long y = rect->top; - long width = rect->right - rect->left; - long heigth = rect->bottom - rect->top; - //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(heigth)),"wh",0); - if(alignment_screen_space) - { - x = x < width_screen ? x : width_screen; - y = y < heigth_screen ? y : heigth_screen; - //MessageBox(0,ToPointChar(ToString(rect->right) + "|" + ToString(rect->bottom)),"wh",0); - width = rect->right <= width_screen ? width : width_screen - x; - heigth = rect->bottom <= heigth_screen ? heigth : heigth_screen - y; - } - //MessageBox(0,ToPointChar(ToString(width) + "|" + ToString(heigth)),"wh",0); - BOOL bf = MoveWindow(this->GetHWND(), x, y, width, heigth, TRUE); - /*RECT* qwerr = GetClientRect(); - if(x != qwerr->left || y != qwerr->top || width != qwerr->right - qwerr->left || heigth != qwerr->bottom - qwerr->top) - MessageBox(0,0,0,0);*/ - return bf == TRUE ? true : false; -} - -void SXGUIComponent::GetClientRect(RECT* rect) -{ - GetWindowRect(this->GetHWND(), rect); - MapWindowPoints(NULL, this->Parent(), (LPPOINT)rect, 2); -} - -void SXGUIComponent::SetFont(const char* name,int height,int width,int weight,int italic,int underline,int strike_out) -{ - HFONT hfont = this->GetFont(); - LOGFONT LogFont; - ZeroMemory(&LogFont,sizeof(&LogFont)); - GetObject(hfont, sizeof(LOGFONT), &LogFont); - if(name != 0) - strcpy(LogFont.lfFaceName, name); - - if(height != -1) - LogFont.lfHeight = height; - - if(width != -1) - LogFont.lfWidth = width; - - if(weight != -1) - LogFont.lfWeight = weight; - - if(italic != -1) - LogFont.lfItalic = italic; - - if(underline != -1) - LogFont.lfUnderline = underline; - - if(strike_out != -1) - LogFont.lfStrikeOut = strike_out; - DeleteObject(hfont); - hfont = ::CreateFontIndirect(&LogFont); - SendMessage(this->GetHWND(), WM_SETFONT, WPARAM(hfont), 1); -} - -void SXGUIComponent::SetFont(HFONT hfont) -{ - SendMessage(this->GetHWND(), WM_SETFONT, WPARAM(hfont), 1); -} -/* -void SXGUIComponent::GetFont(SXFont* font) -{ - if(font) - { - this->Font->SetHandleFont((HFONT)SendMessage(this->WindowHandle, WM_GETFONT, 0, 0)); - memcpy(font,this->Font,sizeof(SXFont)); - } - //return (HFONT)SendMessage(this->WindowHandle, WM_GETFONT, 0, 0); -}*/ - -HFONT SXGUIComponent::GetFont() -{ - return (HFONT)SendMessage(this->WindowHandle, WM_GETFONT, 0, 0); -} - -//����� �� ����� ����������� ��� ������ ������� ����� ������ -//����� ������� ������ �� ��������� � ��� ... � ��� -/*void SXGUIComponent::SetFont(SXFont* font) -{ - if(font) - { - memcpy(this->Font,font,sizeof(SXFont)); - //this->Font->SetHandleFont(font->GetHandleFont()); - SendMessage(this->WindowHandle,WM_SETFONT,WPARAM(font->GetHandleFont()),0); - } -}*/ - -HFONT SXGUIComponent::ParentFont() -{ - return (HFONT)SendMessage(this->Parent(), WM_GETFONT, 0, 0); -} - -bool SXGUIComponent::IsParentFont() -{ - HFONT ChildHFont = this->GetFont(); - HFONT ParentHFont = this->ParentFont(); - LOGFONT ChildLF,ParentLF; - ZeroMemory(&ChildLF,sizeof(&ChildLF)); - GetObject(ChildHFont, sizeof(LOGFONT), &ChildLF); - ZeroMemory(&ParentLF,sizeof(&ParentLF)); - GetObject(ParentHFont, sizeof(LOGFONT), &ParentLF); - if(ChildLF.lfCharSet != ParentLF.lfCharSet) - return false; - if(ChildLF.lfClipPrecision != ParentLF.lfClipPrecision) - return false; - if(ChildLF.lfEscapement != ParentLF.lfEscapement) - return false; - if(ChildLF.lfHeight != ParentLF.lfHeight) - return false; - if(ChildLF.lfItalic != ParentLF.lfItalic) - return false; - if(ChildLF.lfOrientation != ParentLF.lfOrientation) - return false; - if(ChildLF.lfOutPrecision != ParentLF.lfOutPrecision) - return false; - if(ChildLF.lfPitchAndFamily != ParentLF.lfPitchAndFamily) - return false; - if(ChildLF.lfQuality != ParentLF.lfQuality) - return false; - if(ChildLF.lfStrikeOut != ParentLF.lfStrikeOut) - return false; - if(ChildLF.lfUnderline != ParentLF.lfUnderline) - return false; - if(ChildLF.lfWeight != ParentLF.lfWeight) - return false; - if(ChildLF.lfWidth != ParentLF.lfWidth) - return false; - if(strcmp(ChildLF.lfFaceName,ParentLF.lfFaceName) != 0) - return false; - return true; -} - - -bool SXGUIComponent::ModifyStyle(long style_add,long style_del) -{ - - if(style_add) - { - if (!SetWindowLong(this->GetHWND(), GWL_STYLE, GetWindowLong(this->GetHWND(), GWL_STYLE) | style_add)) - return false; - } - - if(style_del) - { - if (!SetWindowLong(this->GetHWND(), GWL_STYLE, GetWindowLong(this->GetHWND(), GWL_STYLE)&~style_del)) - return false; - } - return true; -} - -bool SXGUIComponent::ModifyExStyle(long style_add,long style_del) -{ - - if(style_add) - { - if (!SetWindowLong(this->GetHWND(), GWL_EXSTYLE, GetWindowLong(this->GetHWND(), GWL_EXSTYLE) | style_add)) - return false; - } - - if(style_del) - { - if (!SetWindowLong(this->GetHWND(), GWL_EXSTYLE, GetWindowLong(this->GetHWND(), GWL_EXSTYLE)&~style_del)) - return false; - } - return true; -} - -void SXGUIComponent::ShowHint(bool bf) -{ - if(Hint != 0) - Hint->Visible(bf); - else - { - Hint = new SXGUIHint(this->GetHWND()); - Hint->Visible(bf); - } -} - -bool SXGUIComponent::ShowHint() -{ - if(Hint != 0) - return Hint->Visible(); - return false; -} - -void SXGUIComponent::SetHintText(const char* text) -{ - if(Hint == 0) - Hint = new SXGUIHint(this->GetHWND()); - Hint->SetText(text); -} - -const char* SXGUIComponent::GetHintText() -{ - if(Hint != 0) - return Hint->GetText(); - return 0; -} - -void SXGUIComponent::GetHintText(char* buf) -{ - if(Hint != 0) - Hint->GetText(buf); - else - buf[0] = 0; -} - -void SXGUIComponent::UpdateSize() -{ - char classname[256]; - GetClassName(this->GetHWND(), classname, 256); - if (strcmp(classname, WC_LISTVIEW) == 0) - int qwerty = 0; - RECT rect; - RECT win_screen_rect; - BOOL bf = GetWindowRect(this->GetHWND(), &rect); - - GetWindowRect(this->GetHWND(), &win_screen_rect); - //MapWindowPoints(this->ParentHandle, HWND_DESKTOP, (LPPOINT)&win_screen_rect, 2); - - RECT NewParentRect; - GetWindowRect(this->Parent(),&NewParentRect); - - //if(NewParentRect.top != ParentRect.top) - //MessageBox(0,ToPointChar(NewParentRect.top),ToPointChar(ParentRect.top),0); - - //���������� ��������� � ������������ �������� - //MapWindowPoints(NULL, this->ParentHandle, (LPPOINT)&rect, 2); - - if (abs(OffsetParentRect.left) > 30000 || abs(OffsetParentRect.right) > 30000 || abs(OffsetParentRect.top) > 30000 || abs(OffsetParentRect.bottom) > 30000) - return; - - //�������� �� ���� ������������ - RECT offset; - offset.left = OffsetParentRect.left ? OffsetParentRect.left : NewParentRect.left - ParentRect.left; - offset.right = OffsetParentRect.right ? OffsetParentRect.right : NewParentRect.right - ParentRect.right; - offset.top = OffsetParentRect.top ? OffsetParentRect.top : NewParentRect.top - ParentRect.top; - offset.bottom = OffsetParentRect.bottom ? OffsetParentRect.bottom : NewParentRect.bottom - ParentRect.bottom; - - //MessageBox(0,ToPointChar(offset.top),ToPointChar(ParentRect.top),0); - - - if(GAlign.left) //rect.left - { - if(GAlign.right) - rect.right -= offset.left; - /*else - rect.right += offset.left;*/ - } - else - { - rect.left = rect.left - offset.left; - rect.right -= offset.left; - } - - if(GAlign.top) //rect.top - { - //MessageBox(0,ToPointChar(offset.top),ToPointChar(rect.top),0); - //rect.top = rect.top + offset.top; - if(GAlign.bottom) - rect.bottom -= offset.top; - } - else - { - rect.top = rect.top - offset.top; - rect.bottom -= offset.top; - } - - if(GAlign.right) //rect.right - { - rect.right = rect.right + offset.right; - if(!GAlign.left) //rect.left - rect.left += offset.right; - } - - if(GAlign.bottom) //rect.bottom - { - - rect.bottom = rect.bottom + offset.bottom; - if(!GAlign.top) //rect.top - rect.top += offset.bottom; - } - - MapWindowPoints(NULL, this->Parent(), (LPPOINT)&rect, 2); - - - //MapWindowPoints(this->ParentHandle, HWND_DESKTOP, (LPPOINT)&WinScreenRect, 2); - //MessageBox(0,ToPointChar(rect.bottom - rect.top),ToPointChar(rect.bottom - rect.top),0); - - bf = MoveWindow(this->GetHWND(), rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, true); - //SetWinRect(&rect,true); - GetWindowRect(this->Parent(),&this->ParentRect); - GetWindowRect(this->GetHWND(), &WinScreenRect); - - OffsetParentRect.top = OffsetParentRect.bottom = OffsetParentRect.left = OffsetParentRect.right = 0; - - DWORD err = GetLastError(); - int qweerty = 0; -} - -void SXGUIComponent::UpdateRect() -{ - //MessageBox(0,"UpdateRect","UpdateRect",0); - RECT tmprect; - GetWindowRect(this->Parent(),&tmprect); - OffsetParentRect.top = tmprect.top - ParentRect.top; - OffsetParentRect.left = tmprect.left - ParentRect.left; - OffsetParentRect.bottom = tmprect.bottom - ParentRect.bottom; - OffsetParentRect.right = tmprect.right - ParentRect.right; - //MessageBox(0,ToPointChar(tmprect.top - ParentRect.top),ToPointChar(0),0); - GetWindowRect(this->Parent(),&ParentRect); - //GetWindowRect(this->WindowHandle,&WinScreenRect); -} - -void SXGUIComponent::SetColorText(BYTE r,BYTE g, BYTE b) -{ - this->ColorText = RGB(r,g,b); - InvalidateRect(this->GetHWND(), 0, 1); -} - -void SXGUIComponent::SetColorText(DWORD color) -{ - this->ColorText = color; - InvalidateRect(this->GetHWND(), 0, 1); -} - -DWORD SXGUIComponent::GetColorText() -{ - return this->ColorText; -} - -void SXGUIComponent::SetTransparentTextBk(bool bf) -{ - this->TransparenTextBf = bf; - InvalidateRect(this->GetHWND(), 0, 1); -} - -bool SXGUIComponent::GetTransparentTextBk() -{ - return this->TransparenTextBf; -} - -void SXGUIComponent::SetColorTextBk(BYTE r,BYTE g, BYTE b) -{ - this->ColorTextBk = RGB(r,g,b); - InvalidateRect(this->GetHWND(), 0, 1); -} - -void SXGUIComponent::SetColorTextBk(DWORD color) -{ - this->ColorTextBk = color; - InvalidateRect(this->GetHWND(), 0, 1); -} - -DWORD SXGUIComponent::GetColorTextBk() -{ - return this->ColorTextBk; -} - - -bool SXGUIComponent::SetColorBrush(BYTE r,BYTE g,BYTE b) -{ - ColorBrush = RGB(r,g,b); - - DeleteObject(HBrush); - HBrush = CreateSolidBrush(ColorBrush); - InvalidateRect(this->GetHWND(), 0, 1); - return true; -} - -bool SXGUIComponent::SetColorBrush(DWORD color) -{ - ColorBrush = color; - - DeleteObject(HBrush); - HBrush = CreateSolidBrush(ColorBrush); - InvalidateRect(this->GetHWND(), 0, 1); - return true; -} - -DWORD SXGUIComponent::GetColorBrush() -{ - return ColorBrush; -} - -HBRUSH SXGUIComponent::GetBrush() -{ - return this->HBrush; -} - -bool SXGUIComponent::AddHandler(HandlerMsg Handler,UINT Msg,WPARAM wParam,bool considerWparam,LPARAM lParam,bool considerLparam,bool isMain) -{ - if(CountKeyArrHandler < SXGUI_COUNT_HANDLERS_MSG_IN_ARR) - { - ArrHandler[CountKeyArrHandler].Handler = Handler; - ArrHandler[CountKeyArrHandler].Msg = Msg; - ArrHandler[CountKeyArrHandler].WParam = wParam; - ArrHandler[CountKeyArrHandler].BFCondiderWParam = considerWparam; - ArrHandler[CountKeyArrHandler].LParam = lParam; - ArrHandler[CountKeyArrHandler].BFCondiderLParam = considerLparam; - ArrHandler[CountKeyArrHandler].IsMainFunction = isMain; - CountKeyArrHandler += 1; - return true; - } - else - return false; -} - -bool SXGUIComponent::AddHandler(HandlerMsg Handler,UINT Msg) -{ - if(CountKeyArrHandler < SXGUI_COUNT_HANDLERS_MSG_IN_ARR) - { - ArrHandler[CountKeyArrHandler].Handler = Handler; - ArrHandler[CountKeyArrHandler].Msg = Msg; - ArrHandler[CountKeyArrHandler].WParam = 0; - ArrHandler[CountKeyArrHandler].BFCondiderWParam = false; - ArrHandler[CountKeyArrHandler].LParam = 0; - ArrHandler[CountKeyArrHandler].BFCondiderLParam = false; - ArrHandler[CountKeyArrHandler].IsMainFunction = false; - CountKeyArrHandler += 1; - return true; - } - else - return false; -} - -int SXGUIComponent::GetCountKeyArrHandler() -{ - return CountKeyArrHandler; -} - -LRESULT SXGUIComponent::ExecuteHandler(int key,HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if(key < CountKeyArrHandler) - return (ArrHandler[key].Handler)(hwnd, msg, wParam, lParam); - else - return 0; -} - -UINT SXGUIComponent::GetMsgHandler(int key) -{ - if(key < CountKeyArrHandler) - return ArrHandler[key].Msg; - else - return 0; -} - -WPARAM SXGUIComponent::GetWParamHandler(int key) -{ - if(key < CountKeyArrHandler) - return ArrHandler[key].WParam; - else - return 0; -} - -LPARAM SXGUIComponent::GetLParamHandler(int key) -{ - if(key < CountKeyArrHandler) - return ArrHandler[key].LParam; - else - return 0; -} - -bool SXGUIComponent::GetConsiderWParamHandler(int key) -{ - if(key < CountKeyArrHandler) - return ArrHandler[key].BFCondiderWParam; - else - return false; -} - -bool SXGUIComponent::GetConsiderLParamHandler(int key) -{ - if(key < CountKeyArrHandler) - return ArrHandler[key].BFCondiderLParam; - else - return false; -} - -bool SXGUIComponent::IsMainFunction(int key) -{ - if(key < CountKeyArrHandler) - return ArrHandler[key].IsMainFunction; - else - return false; -} - -HandlerMsg SXGUIComponent::GetHandlerFunction(int key) -{ - if(key < CountKeyArrHandler) - return ArrHandler[key].Handler; - else - return false; -} - -/////////////////////////////////// - -SXGUITextual::SXGUITextual() -{ - -} - -SXGUITextual::~SXGUITextual() -{ - -} - -bool SXGUITextual::SetText(const char* text) -{ - return SXGUIFuctinon::SetText(this,text); -} - -/*const char* SXGUITextual::GetText() -{ - return SXGUIFuctinon::GetTextOut(this); -}*/ - -void SXGUITextual::GetText(char* buf,int size) -{ - SXGUIFuctinon::GetText(this,buf,size); -} - -int SXGUITextual::GetTextLen() -{ - return SXGUIFuctinon::GetTextLen(this); -} - -/////////////////////////////////// - -BOOL IsEdit(HWND hWnd) -{ - if(hWnd == NULL) - return FALSE; - - TCHAR szClassName[6]; - return ::GetClassNameA(hWnd, szClassName, 6) && - stricmp(szClassName, "Edit") == 0; -} - - -LRESULT CALLBACK WndProcAllDefault(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - ISXGUIComponent *Component = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - - if (Component) - { - if (msg == WM_LBUTTONDOWN || msg == WM_RBUTTONDOWN || msg == WM_MBUTTONDOWN) - { - Component->SetFocus(); - } - - if (msg == WM_KEYDOWN) - { - if (wParam == 'A' && (GetKeyState(VK_CONTROL) & 0x80)) - { - // User pressed Ctrl-A. Let's select-all - if (IsEdit(hwnd)) - { - SendMessage(hwnd, EM_SETSEL, 0, -1); - return(1); - } - } - } - HandlerMsg MainFunction = 0; //������� �������-����������, �� �������� � ����� ������������ - HandlerMsg SecondFunction[SXGUI_COUNT_HANDLERS_MSG_IN_ARR]; //������ �������������� ������������ �� ���������, �� �������� �� ������ ������ - int CountSecond = 0; //���������� �������������� �������-������������ - //�������������� ������������� ������ - for (int i = 0; i<Component->GetCountKeyArrHandler(); i++) - { - if (Component->GetMsgHandler(i) == msg) - { - if ( - Component->GetConsiderWParamHandler(i) && Component->GetWParamHandler(i) == wParam && - Component->GetConsiderLParamHandler(i) && Component->GetLParamHandler(i) == lParam - ) - { - if (Component->IsMainFunction(i)) - { - MainFunction = Component->GetHandlerFunction(i); - } - else - { - SecondFunction[CountSecond] = Component->GetHandlerFunction(i); - CountSecond++; - } - - } - else if ( - !Component->GetConsiderWParamHandler(i) && - Component->GetConsiderLParamHandler(i) && Component->GetLParamHandler(i) == lParam - ) - { - if (Component->IsMainFunction(i)) - { - MainFunction = Component->GetHandlerFunction(i); - } - else - { - SecondFunction[CountSecond] = Component->GetHandlerFunction(i); - CountSecond++; - } - - } - else if ( - Component->GetConsiderWParamHandler(i) && Component->GetWParamHandler(i) == wParam && - !Component->GetConsiderLParamHandler(i) - ) - { - if (Component->IsMainFunction(i)) - { - MainFunction = Component->GetHandlerFunction(i); - } - else - { - SecondFunction[CountSecond] = Component->GetHandlerFunction(i); - CountSecond++; - } - - } - else if ( - !Component->GetConsiderWParamHandler(i) && - !Component->GetConsiderLParamHandler(i) - ) - { - if (Component->IsMainFunction(i)) - { - MainFunction = Component->GetHandlerFunction(i); - } - else - { - SecondFunction[CountSecond] = Component->GetHandlerFunction(i); - CountSecond++; - } - - } - } - } - - //�������� ��� �������������� ������� ����������� - for (int i = 0; i<CountSecond; i++) - { - SecondFunction[i](hwnd, msg, wParam, lParam); - } - - //���� ���� ������� ������� ������� �� �������� �� � ���������� �� �������� - if (MainFunction) - return MainFunction(hwnd, msg, wParam, lParam); - //else - //return Component->OldProc(hwnd, msg, wParam, lParam); - //!!!� ���� ��� �� ���??? - //else mf - //return CallWindowProc(Component->OldProc, hwnd, msg, wParam, lParam); - return CallWindowProc(Component->OldProc, hwnd, msg, wParam, lParam);; - } - - return CallWindowProc(Component->OldProc, hwnd, msg, wParam, lParam); -} - -///////////////////////// - -bool SXGUIFuctinon::ScroolBars(ISXGUIControl *Control,bool h,bool v) -{ - return ShowScrollBar(Control->GetHWND(),SB_HORZ,h ? 1 : 0) && ShowScrollBar(Control->GetHWND(),SB_VERT,v ? 1 : 0); -} - -bool SXGUIFuctinon::ScrollBarV(ISXGUIControl *Control) -{ - long style = GetWindowLong(Control->GetHWND(),GWL_STYLE); - if(style & WS_VSCROLL) - return true; - return false; -} - -bool SXGUIFuctinon::ScrollBarH(ISXGUIControl *Control) -{ - long style = GetWindowLong(Control->GetHWND(),GWL_STYLE); - if(style & WS_HSCROLL) - return true; - return false; -} - -bool SXGUIFuctinon::ScrollLine(ISXGUIControl *Control,int scroll,int dir,int count) -{ - long _scroll = scroll == SXGUI_SCROLL_TYPE_VERT ? WM_VSCROLL : WM_HSCROLL; - long _dir = 0; - if(_scroll == WM_VSCROLL) - _dir = dir == SXGUI_SCROLL_DIR_DOWN ? SB_LINEDOWN : SB_LINEUP /*SB_BOTTOM :SB_TOP*/; - else - _dir = dir == SXGUI_SCROLL_DIR_RIGTH ? SB_LINERIGHT : SB_LINELEFT /*SB_RIGHT :SB_LEFT*/; - - bool bf = true; - for(int i=0;i<count;i++) - { - bf = SendMessage(Control->GetHWND(),_scroll,_dir,0); - } - - return bf;//SendMessage(Control->GetHWND(),_scroll,_dir,LPARAM(count)) == 0 ? true : false; -} - -bool SXGUIFuctinon::SetText(ISXGUIControl*const Control, const char* text) -{ - if(!SetWindowText(Control->GetHWND(),text)) - return false; - else - return true; -} - -void SXGUIFuctinon::GetText(ISXGUIControl *Control,char* buf,int count) -{ - GetWindowText(Control->GetHWND(),buf,count); -} - -int SXGUIFuctinon::GetTextLen(ISXGUIControl *Control) -{ - return GetWindowTextLength(Control->GetHWND()); -} - -///////////////////////// - -BOOL CALLBACK SXGUIEnumChildWindow::EnumChildProcUpdateImgButton(HWND hwnd,LPARAM lParam) -{ - ISXGUIComponent *Component = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - - if (Component) - { - char ClassName[256]; - int error = GetClassName(hwnd, ClassName, 256); - if (error && strcmp(ClassName, "SXGUIBUTTONIMG") == 0 && Component) - SendMessage(hwnd, WM_KILLFOCUS, 0, lParam); - } - - return TRUE; -} - -BOOL CALLBACK SXGUIEnumChildWindow::EnumChildProcUpdateSize(HWND hwnd,LPARAM lParam) -{ - ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong(hwnd, GWL_USERDATA); - if (Component) - Component->UpdateSize(); - - return TRUE; -} - -BOOL CALLBACK SXGUIEnumChildWindow::EnumChildProcUpdateRect(HWND hwnd,LPARAM lParam) -{ - ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong(hwnd, GWL_USERDATA); - if (Component) - Component->UpdateRect(); - - return TRUE; -} - -BOOL CALLBACK SXGUIEnumChildWindow::EnumChildProcMouseMove(HWND hwnd,LPARAM lParam) -{ - ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong(hwnd, GWL_USERDATA); - - if (Component) - { - POINT p; - GetCursorPos(&p); - RECT rect; - GetWindowRect(hwnd, &rect); - - if (Component && !((p.x >= rect.left && p.x <= rect.right) && (p.y >= rect.top && p.y <= rect.bottom))) - { - SendMessage(Component->GetHWND(), WM_NCMOUSEMOVE, lParam, 0); - } - } - - return TRUE; -} - -//////////////////////////////// - -int SXGUIBaseHandlers::InitHandlerMsg(ISXGUIComponent* Component) -{ - if(!Component->AddHandler(SXGUIBaseHandlers::CtlColorChange,WM_CTLCOLORSTATIC,0,0,0,0,true)) - return 1; - if(!Component->AddHandler(SXGUIBaseHandlers::CtlColorChange,WM_CTLCOLOREDIT,0,0,0,0,true)) - return 2; - if(!Component->AddHandler(SXGUIBaseHandlers::CtlColorChange,WM_CTLCOLORBTN,0,0,0,0,true)) - return 3; - if(!Component->AddHandler(SXGUIBaseHandlers::CtlColorChange,WM_CTLCOLORLISTBOX,0,0,0,0,true)) - return 4; - - if(!Component->AddHandler(SXGUIBaseHandlers::SizeChange,WM_SIZE,0,0,0,0,true)) - return 5; - if(!Component->AddHandler(SXGUIBaseHandlers::SizingChange,WM_SIZING,0,0,0,0,true)) - return 6; - if(!Component->AddHandler(SXGUIBaseHandlers::WinDestroy,WM_DESTROY,0,0,0,0,true)) - return 7; - - if(!Component->AddHandler(SXGUIBaseHandlers::MoveChange,WM_MOVE,0,0,0,0,true)) - return 8; - if(!Component->AddHandler(SXGUIBaseHandlers::MouseMoveChange,WM_MOUSEMOVE,0,0,0,0,true)) - return 9; - if(!Component->AddHandler(SXGUIBaseHandlers::MaximuzeWinChange,WM_SYSCOMMAND,SC_MAXIMIZE,true,0,0,true)) - return 10; - if(!Component->AddHandler(SXGUIBaseHandlers::SetCursorChange,WM_SETCURSOR,0,0,0,0,true)) - return 11; - - return 0; -} - -LRESULT SXGUIBaseHandlers::CtlColorChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong((HWND)lParam, GWL_USERDATA); - - if(Component) - { - if(Component->GetTransparentTextBk()) - SetBkMode((HDC)wParam,TRANSPARENT); - else - SetBkColor((HDC)wParam, Component->GetColorTextBk()); - SetTextColor((HDC)wParam, Component->GetColorText()); - return (long)Component->GetBrush(); - } - return((LRESULT)INVALID_HANDLE_VALUE); -} - -LRESULT SXGUIBaseHandlers::SizeChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - EnumChildWindows(hwnd,(WNDENUMPROC)&SXGUIEnumChildWindow::EnumChildProcUpdateSize,lParam); - return TRUE; -} - -LRESULT SXGUIBaseHandlers::SizingChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - ISXGUIComponent *Component = (ISXGUIComponent *)GetWindowLong(hwnd, GWL_USERDATA); - - if (!Component) - return TRUE; - - RECT rc; - GetWindowRect(hwnd, &rc); - POINT p; - GetCursorPos(&p); - - RECT lpRect = *((LPRECT)lParam); - - if(Component) - { - - if(!Component->BFSizingChangeTop) - lpRect.top = rc.top; - - if(!Component->BFSizingChangeLeft) - lpRect.left = rc.left; - - if(!Component->BFSizingChangeRight) - lpRect.right = rc.right; - - if(!Component->BFSizingChangeBottom) - lpRect.bottom = rc.bottom; - - if (Component->MinSizeX != 0 && Component->MinSizeY != 0) - { - if(lpRect.right - lpRect.left < Component->MinSizeX && Component->BFSizingChangeRight) - { - lpRect.right += Component->MinSizeX - (lpRect.right - lpRect.left); - } - - if(lpRect.bottom - lpRect.top < Component->MinSizeY && Component->BFSizingChangeBottom) - { - lpRect.bottom += Component->MinSizeY - (lpRect.bottom - lpRect.top); - } - } - } - - *((LPRECT)lParam) = lpRect; - - return TRUE; -} - -LRESULT SXGUIBaseHandlers::MoveChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - EnumChildWindows(hwnd,(WNDENUMPROC)&SXGUIEnumChildWindow::EnumChildProcUpdateRect,lParam); - return TRUE; -} - -LRESULT SXGUIBaseHandlers::MouseMoveChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - EnumChildWindows(hwnd,(WNDENUMPROC)&SXGUIEnumChildWindow::EnumChildProcMouseMove,lParam); - return ::DefWindowProc(hwnd, msg, wParam, lParam); -} - -LRESULT SXGUIBaseHandlers::SetCursorChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - EnumChildWindows(hwnd,(WNDENUMPROC)&SXGUIEnumChildWindow::EnumChildProcMouseMove,lParam); - return ::DefWindowProc(hwnd, msg, wParam, lParam); -} - -LRESULT SXGUIBaseHandlers::MaximuzeWinChange(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - EnumChildWindows(hwnd,(WNDENUMPROC)&SXGUIEnumChildWindow::EnumChildProcUpdateSize,lParam); - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -LRESULT SXGUIBaseHandlers::WinDestroy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PostQuitMessage(0); - return ::DefWindowProc(hwnd, msg, wParam, lParam); -} - -//////////////////////////////// - -bool SXGUIRegClass::RegButtonImg() -{ - WNDCLASS wc; - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = DefWindowProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle(0); - wc.hIcon = 0; - wc.hCursor = 0; - wc.hbrBackground = 0; - wc.lpszMenuName = 0; - wc.lpszClassName = "SXGUIBUTTONIMG"; - - if(!RegisterClass(&wc)) - return false; - return true; -} - -bool SXGUIRegClass::RegGroupBox() -{ - WNDCLASS wc; - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = DefWindowProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle(0); - wc.hIcon = 0; - wc.hCursor = 0; - wc.hbrBackground = 0; - wc.lpszMenuName = 0; - wc.lpszClassName = "SXGUIGROUPBOX"; - - if (!RegisterClass(&wc)) - return false; - return true; -} - -void SXGUIDialogs::SelectFile(int type, char* path, char* name, const char* stdpath, const char* filter) -{ - OPENFILENAME ofn; - - char tpath[1024]; - char tname[256]; - - if (!path && !name) - return; - - if (path) - tpath[0] = tpath[1] = 0; - - if (name) - tname[0] = tname[1] = 0; - - ZeroMemory(&ofn, sizeof(OPENFILENAME)); - ofn.lStructSize = sizeof(OPENFILENAME); - ofn.hInstance = GetModuleHandle(0); - ofn.hwndOwner = 0; - ofn.lpstrFilter = filter; - ofn.lpstrFile = tpath; - ofn.nMaxFile = sizeof(tpath); - ofn.lpstrInitialDir = stdpath; - - if (name) - { - ofn.lpstrFileTitle = tname; - ofn.nMaxFileTitle = sizeof(tname); - } - - ofn.Flags = 0; - - //if (path) - ofn.Flags |= OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; - - /*if (name) - ofn.Flags |= OFN_FILEMUSTEXIST;*/ - - char bf[256]; - GetCurrentDirectory(256, bf); - BOOL Result = FALSE; - if (type == SXGUI_DIALOG_FILE_OPEN) - Result = GetOpenFileName(&ofn); - else if (type == SXGUI_DIALOG_FILE_SAVE) - Result = GetSaveFileName(&ofn); - - SetCurrentDirectory(bf); - - if (Result) - { - if (path) - strcpy(path, tpath); - - if (name) - strcpy(name, tname); - } -} \ No newline at end of file diff --git a/source/SXGUIWinApi/sxgui_base.h b/source/SXGUIWinApi/sxgui_base.h deleted file mode 100644 index bc7cbf68dd61be47a2666c2dbe3241cea5d788d8..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/sxgui_base.h +++ /dev/null @@ -1,180 +0,0 @@ - -/****************************************************** -Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017 -See the license in LICENSE -******************************************************/ - -#ifndef SXGUI_BASE_H -#define SXGUI_BASE_H - -class SXGUIButtonImg; - -#include "SXGUI_hint.h" -#include "SXGUI.h" - -//первый базовый класс, единственным родителем не используется -//определяет объект как контрол, то есть содержит в себе минимум данных для -//управления объектом -class SXGUIControl : public virtual ISXGUIControl -{ -public: - SXGUIControl(); - SXGUIControl(HWND window_handle,HWND parent_handle,WNDPROC handler); - ~SXGUIControl(); - void Release(){ mem_del(this); } - void Init(HWND window_handle, HWND parent_handle, WNDPROC handler); //запоминаем дескрипторы, и устанавливаем новый обработчик - - HWND Parent(); //возвращает HWND родителя - bool Parent(HWND parent_handle); //устанавливает родителя - - HWND GetHWND(); - - void Visible(bool bf); //установка видимости контрола - bool Visible(); //видим ли контрол? - - void SetFocus(); //установить фокус на контрол - bool Focus(); //установлен ли фокус на контроле? - - void * GetUserPtr(); - void * SetUserPtr(void *); - -private: - void * UserPtr; - -protected: - HWND ParentHandle; - HWND WindowHandle; -}; - -//второй в очереди родитель, часто наследование идет именно от него -//более расширенное управление большинством элементов -class SXGUIComponent : public SXGUIControl, public virtual ISXGUIComponent -{ -public: - SXGUIComponent(); - ~SXGUIComponent(); - void Release(){ mem_del(this); } - //устанавливает необходимые данные для управления элементом - void InitComponent(); //необходимо вызывать после инициализации - - //действителен ли элемент - bool Enable(); - void Enable(bool bf); - - //работа со шрифтом - //если name == 0 то не изменияем название шрифта, - //если name[0] == 0 то дефолтный шрифт gui - //если остальные значения в -1 то не учитываются - void SetFont(const char* name, int height, int width, int weight, int italic, int underline, int strike_out); - void SetFont(HFONT hfont); - HFONT GetFont(); - - bool IsParentFont(); //наследуется ли шрифт родителя - HFONT ParentFont(); //получает родительский шрифт - - //работа со стилями (в т.ч. специальным) - //style_add - добавляемые стили - //style_del - удаляемые - bool ModifyStyle(long style_add, long style_del); - bool ModifyExStyle(long style_add, long style_del); - - //устанавливает/возвращает область окна RECT элемента в глобальных координатах - bool SetWinRect(RECT* rect, bool alignment_screen_space); //alignment_screen_space - использовать ли только работчую область (рабочий стол кроме панели задач) - RECT* GetWinRect(); - void GetWinRect(RECT* rect); - - //устанавливает/возвращает клиентскую область RECT элемента в глобальных координатах - bool SetClientRect(RECT* rect, bool alignment_screen_space); //alignment_screen_space - использовать ли только работчую область (рабочий стол кроме панели задач) - void GetClientRect(RECT* rect); - - //!!!первоначально нужно единожды включить видимость подсказки, ибо в этот момент она инициализируется - //видимость подсказки - void ShowHint(bool bf); - bool ShowHint(); - - //работа с текстом подсказки для элемента - void SetHintText(const char* text); - const char* GetHintText(); - void GetHintText(char* buf); - - //функции для цветов - //set/get цвет текста - void SetColorText(BYTE r, BYTE g, BYTE b); - void SetColorText(DWORD color); - DWORD GetColorText(); - - //set/get прозрачность заднего фона текста - void SetTransparentTextBk(bool bf); - bool GetTransparentTextBk(); - - //set/get цвет заднего фона - void SetColorTextBk(BYTE r, BYTE g, BYTE b); - void SetColorTextBk(DWORD color); - DWORD GetColorTextBk(); - - //set/get цвет заднего фона элемента - bool SetColorBrush(BYTE r, BYTE g, BYTE b); - bool SetColorBrush(DWORD color); - DWORD GetColorBrush(); - HBRUSH GetBrush(); - - //все что касается обработчиков функций - /////////////////////////////////////// - - //добавление обработчика - bool AddHandler(HandlerMsg Handler, UINT Msg, WPARAM wParam, bool considerWparam, LPARAM lParam, bool considerLparam, bool isMain); - bool AddHandler(HandlerMsg Handler, UINT Msg); //все что необъявлено из функции выше не учитывается - - //key - ключ в массиве обработчиков - HandlerMsg GetHandlerFunction(int key); //возвращает функцию обработчик - int GetCountKeyArrHandler(); //количество ключей в массиве обработчиков - - //все что касается данных сообщения - UINT GetMsgHandler(int key); - WPARAM GetWParamHandler(int key); - bool GetConsiderWParamHandler(int key); //учитывать WParam? - LPARAM GetLParamHandler(int key); - bool GetConsiderLParamHandler(int key); //учитывать LParam? - - bool IsMainFunction(int key); //это главная функция? - LRESULT ExecuteHandler(int key, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); //выполняет функцию обработчик, в аргументы отправляет свои аргументы - /////////////////////////////////////// - - void UpdateSize(); - void UpdateRect(); - - -protected: - - //данные необходимые для UpdateSize - RECT ParentRect; //!< координаты родителя - RECT OffsetParentRect; //!< на сколько был изменен родитель - RECT WinScreenRect; //!< координаты текущего окна относительно рабочего стола - - ISXGUIHint *Hint; - SXHandlerMsgStruct ArrHandler[SXGUI_COUNT_HANDLERS_MSG_IN_ARR]; - int CountKeyArrHandler; - - DWORD ColorBrush; //цвет заливки формы - HBRUSH HBrush; - - DWORD ColorText; //цвет текста - bool TransparenTextBf; //используется прозрачность? если true то заднего фона у текста не будет - DWORD ColorTextBk; //цвет заднего фона у текста -}; - -//третий (если нужен текст) родитель, непосредтсвенно не используется -//характеризует элемент как содержащий единый текст (аля кэпшен) текстовый компонент -class SXGUITextual : public SXGUIComponent, public virtual ISXGUITextual -{ -public: - SXGUITextual(); - ~SXGUITextual(); - void Release(){ mem_del(this); } - bool SetText(const char* text); - void GetText(char* buf, int size); - int GetTextLen(); -}; - - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/sxgui_button.h b/source/SXGUIWinApi/sxgui_button.h deleted file mode 100644 index f361c8ec53449d35ffa233c18d680fc012d1a4c0..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/sxgui_button.h +++ /dev/null @@ -1,23 +0,0 @@ - -#ifndef SXGUI_BUTTON_H -#define SXGUI_BUTTON_H - -#include <SXGUIWinApi\SXGUI_base.h> - -#pragma once - -class SXGUIButton : public SXGUITextual, public virtual ISXGUIButton -{ -public: - SXGUIButton(); - SXGUIButton(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIButton(const char* caption, WORD x, WORD y, WORD width, WORD heigth, int image, HWND parent, WNDPROC handler, DWORD id); - - bool SetIconInFile(const char* path); - bool SetBmpInFile(const char* path); - - bool SetIconInResourse(WORD id); - bool SetBmpInResourse(WORD id); -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/sxgui_edit.h b/source/SXGUIWinApi/sxgui_edit.h deleted file mode 100644 index b3b5eade059d7652579e63bb16cee23cfbaa925b..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/sxgui_edit.h +++ /dev/null @@ -1,28 +0,0 @@ - -#ifndef SXGUI_EDIT_H -#define SXGUI_EDIT_H - -#include <SXGUIWinApi\SXGUI_base.h> - -#pragma once - -class SXGUIEdit : public SXGUITextual, public virtual ISXGUIEdit -{ -public: - SXGUIEdit(); - ~SXGUIEdit(); - SXGUIEdit(const char* caption,WORD x,WORD y,WORD width,WORD heigth,DWORD exstyle,DWORD style,HWND parent,WNDPROC handler,DWORD id); - SXGUIEdit(const char* caption,WORD x,WORD y,WORD width,WORD heigth,HWND parent,WNDPROC handler,DWORD id); - - bool ReadOnly(); //����������� �� �������� "������ ��� ������" - bool ReadOnly(bool bf); //������������ ��������� "������ ��� ������", ���������� ��������� �������� - - //��������� ������� ����� ���������� �� * - bool Password(); //����������� �� ������� ������� ������ - bool Password(bool bf); //������������ ��������� ������� ������ - - int Align(); //���������� ���� ������������ ������ - bool Align(int align); //������������� ������������ -}; - -#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/sxgui_menu.cpp b/source/SXGUIWinApi/sxgui_menu.cpp deleted file mode 100644 index a9388018ebc0ea48b0ef7f4f086e6ef877f2ab97..0000000000000000000000000000000000000000 --- a/source/SXGUIWinApi/sxgui_menu.cpp +++ /dev/null @@ -1,369 +0,0 @@ - -#include <SXGUIWinApi\SXGUI_menu.h> - -#pragma once - -SXGUIMenu::SXGUIMenu() -{ - MENUINFO mi; - MenuHandle = CreateMenu(); - mi.cbSize = sizeof(MENUINFO); - mi.fMask = MIM_STYLE; - mi.dwStyle = MNS_NOTIFYBYPOS; - SetMenuInfo(MenuHandle, &mi); -} - -SXGUIMenu::SXGUIMenu(WORD menu) -{ - MenuHandle = LoadMenu(GetModuleHandle(0),MAKEINTRESOURCE(menu)); -} - -SXGUIMenu::~SXGUIMenu() -{ - DestroyMenu(this->MenuHandle); -} - -bool SXGUIMenu::InsertItem(int index,const char* text,WORD id,WORD id_sub_menu) -{ - char str[256]; - sprintf(str,"%s",text); - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_STRING|MIIM_ID; - mi.dwTypeData = str; - mi.wID=id; - - HMENU SubMenu = this->GetSubMenu(id_sub_menu); - BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu ? SubMenu : MenuHandle,index,TRUE,&mi); - //DrawMenuBar(ParentHandle); - return bf ? true : false; -} - -bool SXGUIMenu::InsertPopupItem(int index,const char* text,WORD id,WORD id_sub_menu) -{ - char str[256]; - sprintf(str,"%s",text); - MENUINFO mi; - MENUITEMINFO mii; - HMENU SubMenu = CreatePopupMenu(); - mi.cbSize = sizeof(MENUINFO); - mi.fMask = MIM_STYLE; - mi.dwStyle = MNS_NOTIFYBYPOS; - SetMenuInfo(SubMenu, &mi); - - mii.cbSize = sizeof(MENUITEMINFO); - mii.fMask = MIIM_STRING | MIIM_SUBMENU | MIIM_FTYPE | MIIM_ID; - mii.fType = MFT_STRING; - mii.dwTypeData = str; - mii.wID = id; - mii.hSubMenu = SubMenu; - - HMENU SubMenu2 = this->GetSubMenu(id_sub_menu); - BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu2 ? SubMenu2 : MenuHandle, index, TRUE, &mii); - //DrawMenuBar(ParentHandle); - return bf ? true : false; -} - -bool SXGUIMenu::InsertSeparator(int index,WORD id,WORD id_sub_menu) -{ - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_ID | MIIM_FTYPE; - mi.wID=id; - mi.fType = MFT_SEPARATOR; - - HMENU SubMenu = this->GetSubMenu(id_sub_menu); - BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu ? SubMenu : MenuHandle,index,TRUE,&mi); - //DrawMenuBar(ParentHandle); - return bf ? true : false; -} - -bool SXGUIMenu::DeleteItem(WORD id) -{ - return DeleteMenu(this->MenuHandle,id,MF_BYCOMMAND) ? true : false; -} - -HMENU SXGUIMenu::GetSubMenu(WORD id) -{ - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_SUBMENU; - mi.hSubMenu = 0; - BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); - - return bf ? mi.hSubMenu : 0; -} - -bool SXGUIMenu::CheckItem(WORD id,bool check) -{ - /*MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_STATE; - - if(!GetMenuItemInfo(MenuHandle,id,FALSE,&mi)) - return false; - - mi.fState |= (check ? MFS_CHECKED : MFS_UNCHECKED); - - if(!SetMenuItemInfo(MenuHandle,id,FALSE,&mi)) - return false; - return true;*/ - DWORD var = CheckMenuItem(MenuHandle,id,(check ? MF_CHECKED : MF_UNCHECKED)); - //DrawMenuBar(ParentHandle); - return ((var != 0xFFFFFFFF) || (var == -1)) ? true : false; -} - -bool SXGUIMenu::GetCheckedItem(WORD id) -{ - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_STATE; - BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); - if(mi.fState & MFS_CHECKED) - return true; - return false; -} - -bool SXGUIMenu::EnableItem(WORD id, int enable) -{ - /*MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_STATE; - - if(!GetMenuItemInfo(MenuHandle,id,FALSE,&mi)) - return false; - - DWORD Enable = SXGUI_MENU_ENABLED; - - if(enable == SXGUI_MENU_DISABLED) - Enable = MFS_DISABLED; - else if(enable == SXGUI_MENU_GRAYED) - Enable = MFS_GRAYED; - else - Enable = MFS_ENABLED; - - mi.fState |= Enable; - - if(!SetMenuItemInfo(MenuHandle,id,FALSE,&mi)) - return false; - return true;*/ - - DWORD Enable = SXGUI_MENU_PART_STATE_ENABLED; - - if (enable == SXGUI_MENU_PART_STATE_DISABLED) - Enable = MFS_DISABLED; - else if (enable == SXGUI_MENU_PART_STATE_GRAYED) - Enable = MFS_GRAYED; - else - Enable = MFS_ENABLED; - - DWORD var = EnableMenuItem(MenuHandle,id,Enable);; - //DrawMenuBar(ParentHandle); - return ((var != 0xFFFFFFFF) || (var == -1)) ? true : false; -} - -int SXGUIMenu::GetEnabledItem(WORD id) -{ - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_STATE; - BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); - - if(mi.fState & MFS_DISABLED) - return SXGUI_MENU_PART_STATE_DISABLED; - else if(mi.fState & MFS_GRAYED) - return SXGUI_MENU_PART_STATE_GRAYED; - else - return SXGUI_MENU_PART_STATE_ENABLED; - - return -1; -} - -HMENU SXGUIMenu::GetHMENU() -{ - return this->MenuHandle; -} - -bool SXGUIMenu::SetToWindow(HWND hwnd) -{ - if(!hwnd) - return false; - if(!SetMenu(hwnd,this->MenuHandle)) - return false; - return true; -} - -////////////////////// - -SXGUIPopupMenu::SXGUIPopupMenu(WORD menu) -{ - MenuHandle = LoadMenu(GetModuleHandle(0),MAKEINTRESOURCE(menu)); - MenuHandle = ::GetSubMenu(MenuHandle,0); -} - -SXGUIPopupMenu::SXGUIPopupMenu() -{ - MENUINFO mi; - MenuHandle = CreatePopupMenu(); - mi.cbSize = sizeof(MENUINFO); - mi.fMask = MIM_STYLE; - mi.dwStyle = MNS_NOTIFYBYPOS; - SetMenuInfo(MenuHandle, &mi); -} - -SXGUIPopupMenu::~SXGUIPopupMenu() -{ - DestroyMenu(this->MenuHandle); -} - -bool SXGUIPopupMenu::InsertItem(int index,const char* text,WORD id,WORD id_sub_menu) -{ - char str[256]; - sprintf(str,"%s",text); - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_STRING|MIIM_ID; - mi.dwTypeData=str; - mi.wID=id; - - HMENU SubMenu = this->GetSubMenu(id_sub_menu); - BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu ? SubMenu : MenuHandle,index,TRUE,&mi); - //DrawMenuBar(ParentHandle); - return bf ? true : false; -} - -bool SXGUIPopupMenu::InsertPopupItem(int index,const char* text,WORD id,WORD id_sub_menu) -{ - char str[256]; - sprintf(str,"%s",text); - MENUINFO mi; - MENUITEMINFO mii; - HMENU SubMenu = CreatePopupMenu(); - mi.cbSize = sizeof(MENUINFO); - mi.fMask = MIM_STYLE; - mi.dwStyle = MNS_NOTIFYBYPOS; - SetMenuInfo(SubMenu, &mi); - - mii.cbSize = sizeof(MENUITEMINFO); - mii.fMask = MIIM_STRING | MIIM_SUBMENU | MIIM_FTYPE | MIIM_ID; - mii.fType = MFT_STRING; - mii.dwTypeData = str; - mii.wID = id; - mii.hSubMenu = SubMenu; - - HMENU SubMenu2 = this->GetSubMenu(id_sub_menu); - BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu2 ? SubMenu2 : MenuHandle, index, TRUE, &mii); - //DrawMenuBar(ParentHandle); - return bf ? true : false; -} - -bool SXGUIPopupMenu::InsertSeparator(int index,WORD id,WORD id_sub_menu) -{ - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_ID | MIIM_FTYPE; - mi.wID=id; - mi.fType = MFT_SEPARATOR; - - HMENU SubMenu = this->GetSubMenu(id_sub_menu); - BOOL bf = InsertMenuItem(id_sub_menu > 0 && SubMenu ? SubMenu : MenuHandle,index,TRUE,&mi); - //DrawMenuBar(ParentHandle); - return bf ? true : false; -} - -bool SXGUIPopupMenu::DeleteItem(WORD id) -{ - return DeleteMenu(this->MenuHandle,id,MF_BYCOMMAND) ? true : false; -} - -HMENU SXGUIPopupMenu::GetSubMenu(WORD id) -{ - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_SUBMENU; - mi.hSubMenu = 0; - BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); - - return bf ? mi.hSubMenu : 0; -} - -bool SXGUIPopupMenu::CheckItem(WORD id,bool check) -{ - DWORD var = CheckMenuItem(MenuHandle,id,(check ? MF_CHECKED : MF_UNCHECKED)); - //DrawMenuBar(ParentHandle); - return ((var != 0xFFFFFFFF) || (var == -1)) ? true : false; -} - -bool SXGUIPopupMenu::GetCheckedItem(WORD id) -{ - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_STATE; - BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); - if(mi.fState & MFS_CHECKED) - return true; - return false; -} - -bool SXGUIPopupMenu::EnableItem(WORD id, int enable) -{ - DWORD Enable = SXGUI_MENU_PART_STATE_ENABLED; - - if (enable == SXGUI_MENU_PART_STATE_DISABLED) - Enable = MFS_DISABLED; - else if (enable == SXGUI_MENU_PART_STATE_GRAYED) - Enable = MFS_GRAYED; - else - Enable = MFS_ENABLED; - - DWORD var = EnableMenuItem(MenuHandle,id,Enable);; - //DrawMenuBar(ParentHandle); - return ((var != 0xFFFFFFFF) || (var == -1)) ? true : false; -} - -int SXGUIPopupMenu::GetEnabledItem(WORD id) -{ - MENUITEMINFO mi; - mi.cbSize=sizeof(MENUITEMINFO); - mi.fMask=MIIM_STATE; - BOOL bf = GetMenuItemInfo(MenuHandle,id,FALSE,&mi); - - if(mi.fState & MFS_DISABLED) - return SXGUI_MENU_PART_STATE_DISABLED; - else if(mi.fState & MFS_GRAYED) - return SXGUI_MENU_PART_STATE_GRAYED; - else - return SXGUI_MENU_PART_STATE_ENABLED; - - return -1; -} - -bool SXGUIPopupMenu::Track(HWND hwnd,int x,int y) -{ - int pos_x,pos_y; - - if((x == -1)&&(y==-1)) - { - POINT point; - GetCursorPos(&point); - pos_x = point.x; - pos_y = point.y; - } - else - { - pos_y=x; - pos_y=y; - } - if(!hwnd) - return false; - - if(!TrackPopupMenu(MenuHandle,TPM_LEFTALIGN,pos_x,pos_y,0,hwnd,0)) - return false; - return true; -} - - -HMENU SXGUIPopupMenu::GetHMENU() -{ - return this->MenuHandle; -} \ No newline at end of file diff --git a/source/SXGUIWinApi/sxguiwinapi_dll.cpp b/source/SXGUIWinApi/sxguiwinapi_dll.cpp index 6eacfdafdaa929a0c9725420e1bd3a8bd3d76745..4369c428e14e566b68f6033bb0b529c98a5cef53 100644 --- a/source/SXGUIWinApi/sxguiwinapi_dll.cpp +++ b/source/SXGUIWinApi/sxguiwinapi_dll.cpp @@ -1,8 +1,8 @@ -/****************************************************** -Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017 +/*********************************************************** +Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 See the license in LICENSE -******************************************************/ +***********************************************************/ #include <windows.h> diff --git a/source/SXGUIWinApi/toolbar.cpp b/source/SXGUIWinApi/toolbar.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c73f8009169659e55e68f8d887859400195ce1dd --- /dev/null +++ b/source/SXGUIWinApi/toolbar.cpp @@ -0,0 +1,72 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "toolbar.h" + + +CGUIToolBar::CGUIToolBar() +{ + +} + +CGUIToolBar::CGUIToolBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, WORD width_element, WORD heigth_element, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + TOOLBARCLASSNAME, + caption, + (parent != 0 ? WS_CHILD : 0) | TBSTYLE_FLAT | WS_BORDER | CCS_NOMOVEY | CCS_NORESIZE | TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, handler, idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); + + HimList = ImageList_Create (width_element, heigth_element, ILC_COLOR24 | ILC_MASK, 1, 256); + SendMessage(this->getHWND(), TB_SETIMAGELIST, 0, (LPARAM)HimList); + ShowWindow(this->getHWND(), SW_SHOW); +} + +CGUIToolBar::~CGUIToolBar() +{ + ImageList_Destroy(HimList); +} + +void CGUIToolBar::AddButton(WORD num,WORD id,const char* hint,WORD id_resource,DWORD mask) +{ + TBBUTTON tbb[1]; + tbb[0].iBitmap = num; + tbb[0].idCommand = id; + tbb[0].fsState = TBSTATE_ENABLED; + tbb[0].fsStyle = TBSTYLE_BUTTON; + tbb[0].dwData = 0; + tbb[0].iString = (INT_PTR)hint; + + HBITMAP HBitmap = LoadBitmap (GetModuleHandle(NULL), MAKEINTRESOURCE(id_resource)); + ImageList_AddMasked (HimList, HBitmap, mask); + + SendMessage (this->getHWND(), TB_ADDBUTTONS, 1, (LPARAM)&tbb); + SendMessage (this->getHWND(), TB_SETMAXTEXTROWS, 0, 0); + SendMessage(this->getHWND(), TB_ADDSTRING, 0, (LPARAM)hint); + ShowWindow (this->getHWND(), SW_SHOW); +} + +void CGUIToolBar::AddSeparator(WORD num) +{ + TBBUTTON tbb[1]; + tbb[0].iBitmap = num; + tbb[0].idCommand = 0; + tbb[0].fsState = TBSTATE_ENABLED; + tbb[0].fsStyle = TBSTYLE_SEP; + tbb[0].dwData = 0; + + SendMessage (this->getHWND(), TB_ADDBUTTONS, 1, (LPARAM)&tbb); + SendMessage (this->getHWND(), TB_SETMAXTEXTROWS, 0, 0); + ShowWindow (this->getHWND(), SW_SHOW); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/toolbar.h b/source/SXGUIWinApi/toolbar.h new file mode 100644 index 0000000000000000000000000000000000000000..3663a129d7488a9598c9cc320dc0935115dafa9a --- /dev/null +++ b/source/SXGUIWinApi/toolbar.h @@ -0,0 +1,31 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_TOOLBAR_H +#define __SXGUI_TOOLBAR_H + +#include "base.h" + + +class CGUIToolBar : public CGUIComponent, public virtual ISXGUIToolBar +{ +public: + CGUIToolBar(); + CGUIToolBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, WORD width_element, WORD heigth_element, HWND parent, WNDPROC handler, ID idObj); + + ~CGUIToolBar(); + + void Release(){ mem_del(this); } + + + void AddButton(WORD num,WORD id,const char* hint,WORD id_resource,DWORD mask); + void AddSeparator(WORD num); + +private: + HIMAGELIST HimList; +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/trackbar.cpp b/source/SXGUIWinApi/trackbar.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88e361e41c9b2fad3d8792de73747c39a89bc77f --- /dev/null +++ b/source/SXGUIWinApi/trackbar.cpp @@ -0,0 +1,110 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "trackbar.h" + + +CGUITrackBar::CGUITrackBar() +{ + +} + +CGUITrackBar::CGUITrackBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + exstyle, + TRACKBAR_CLASS, + caption, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUITrackBar::CGUITrackBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj) +{ + m_hWindow = CreateWindowEx( + 0, + TRACKBAR_CLASS, + caption, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | TBS_AUTOTICKS, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +void CGUITrackBar::setPos(int pos) +{ + SendMessage(this->getHWND(),TBM_SETPOS,WPARAM(TRUE),LPARAM(pos)); +} + +int CGUITrackBar::getPos() +{ + return SendMessage(this->getHWND(),TBM_GETPOS,0,0); +} + +void CGUITrackBar::setMinMax(int min,int max) +{ + SendMessage(this->getHWND(),TBM_SETRANGE,WPARAM(TRUE),MAKELPARAM(min,max)); +} + +int CGUITrackBar::getMin() +{ + return SendMessage(this->getHWND(),TBM_GETRANGEMIN,0,0); +} + +int CGUITrackBar::getMax() +{ + return SendMessage(this->getHWND(),TBM_GETRANGEMAX,0,0); +} + +bool CGUITrackBar::setTick(int pos) +{ + if(!SendMessage(this->getHWND(),TBM_SETTIC,0,LPARAM(pos))) + return false; + return true; +} + +int CGUITrackBar::getTick(int index) +{ + return SendMessage(this->getHWND(),TBM_GETTIC,WPARAM(index),0); +} + +void CGUITrackBar::setTickFrequency(int freq) +{ + SendMessage(this->getHWND(),TBM_SETTICFREQ,WPARAM(freq),0); +} + +bool CGUITrackBar::setBuddies(HWND hwnd_left,HWND hwnd_right) +{ + if(!hwnd_left && !hwnd_left) + return false; + + SendMessage(this->getHWND(),TBM_SETBUDDY,WPARAM(TRUE),LPARAM(hwnd_left)); + SendMessage(this->getHWND(),TBM_SETBUDDY,WPARAM(FALSE),LPARAM(hwnd_right)); + + return true; +} + +HWND CGUITrackBar::getLeftBuddy() +{ + return HWND(SendMessage(this->getHWND(),TBM_GETBUDDY,WPARAM(TRUE),0)); +} + +HWND CGUITrackBar::getRightBuddy() +{ + return HWND(SendMessage(this->getHWND(),TBM_GETBUDDY,WPARAM(FALSE),0)); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/trackbar.h b/source/SXGUIWinApi/trackbar.h new file mode 100644 index 0000000000000000000000000000000000000000..94548c3b2229094056857d0038ef9759087202b5 --- /dev/null +++ b/source/SXGUIWinApi/trackbar.h @@ -0,0 +1,37 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_TRACK_BAR_H +#define __SXGUI_TRACK_BAR_H + +#include "base.h" + + +class CGUITrackBar : public CGUIComponent, public virtual ISXGUITrackBar +{ +public: + CGUITrackBar(); + CGUITrackBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj); + CGUITrackBar(const char* caption, WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj); + + void setPos(int pos); + int getPos(); + + void setMinMax(int min,int max); + int getMin(); + int getMax(); + + bool setTick(int pos); + int getTick(int index); + + void setTickFrequency(int freq); + + bool setBuddies(HWND hwnd_left,HWND hwnd_right); + HWND getLeftBuddy(); + HWND getRightBuddy(); +}; + +#endif \ No newline at end of file diff --git a/source/SXGUIWinApi/updown.cpp b/source/SXGUIWinApi/updown.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f5b80b8e70ee569fafdf767ba548d1008fa7b0cf --- /dev/null +++ b/source/SXGUIWinApi/updown.cpp @@ -0,0 +1,107 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#include "updown.h" + + +CGUIUpDown::CGUIUpDown() +{ + +} + +CGUIUpDown::~CGUIUpDown() +{ + +} + +CGUIUpDown::CGUIUpDown(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj, HWND buddy) +{ + m_hWindow = CreateWindowEx( + exstyle, + UPDOWN_CLASS, + 0, + style, + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + SendMessage(this->getHWND(), UDM_SETRANGE32, -65535, 65535); + SendMessage(this->getHWND(), UDM_SETPOS32, 0, 0); + if(buddy) + setBuddy(buddy); + + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +CGUIUpDown::CGUIUpDown(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj, HWND buddy, bool align_left) +{ + /*this->getHWND() = CreateUpDownControl( + WS_CHILD | WS_BORDER | WS_VISIBLE | UDS_WRAP | UDS_SETBUDDYINT | UDS_ARROWKEYS | (left_right == 1 ?UDS_ALIGNRIGHT : UDS_ALIGNLEFT), + x,y,width,heigth, + parent, 0, GetModuleHandle(0), buddy, + 0, 0, 0 + );*/ + m_hWindow = CreateWindowEx( + 0, + UPDOWN_CLASS, + 0, + (parent != 0 ? WS_CHILD : 0) | WS_VISIBLE | UDS_WRAP | UDS_SETBUDDYINT | UDS_ARROWKEYS | (align_left ? UDS_ALIGNRIGHT : UDS_ALIGNLEFT), + x,y,width,heigth, + parent, + (HMENU)idObj, + GetModuleHandle(0), + 0); + SendMessage(this->getHWND(), UDM_SETRANGE32, -65535, 65535); + SendMessage(this->getHWND(), UDM_SETPOS32, 0, 0); + if(buddy) + setBuddy(buddy); + + init(this->getHWND(), parent, (handler == 0 ? WndProcAllDefault : handler), idObj); + SetWindowLong(getHWND(),GWL_USERDATA,(LONG)dynamic_cast<ISXGUIComponent*>(this)); + initComponent(); +} + +void CGUIUpDown::setMinMax(int min, int max) +{ + SendMessage(this->getHWND(), UDM_SETRANGE32, min, max); +} + +long CGUIUpDown::setPos(int pos) +{ + return SendMessage(this->getHWND(), UDM_SETPOS32, 0, pos); +} + +long CGUIUpDown::getMin() +{ + long min = 0; + SendMessage(this->getHWND(), UDM_GETRANGE32, (WPARAM)&min, 0); + return min; +} + +long CGUIUpDown::getMax() +{ + long max = 0; + SendMessage(this->getHWND(), UDM_GETRANGE32, 0, (LPARAM)&max); + return max; +} + +long CGUIUpDown::getPos() +{ + return SendMessage(this->getHWND(), UDM_GETPOS32, 0, 0); +} + +HWND CGUIUpDown::setBuddy(HWND buddy) +{ + return (HWND)SendMessage(this->getHWND(), UDM_SETBUDDY, (WPARAM)buddy, 0); +} + +HWND CGUIUpDown::getBuddy() +{ + return (HWND)SendMessage(this->getHWND(), UDM_GETBUDDY, 0, 0); +} \ No newline at end of file diff --git a/source/SXGUIWinApi/updown.h b/source/SXGUIWinApi/updown.h new file mode 100644 index 0000000000000000000000000000000000000000..454312f9be0fc8f4358bfdcba18f486ef818845c --- /dev/null +++ b/source/SXGUIWinApi/updown.h @@ -0,0 +1,34 @@ + +/*********************************************************** +Copyright � Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SXGUI_UP_DOWN_H +#define __SXGUI_UP_DOWN_H + +#include "base.h" + + +class CGUIUpDown : public CGUIComponent, public virtual ISXGUIUpDown +{ +public: + CGUIUpDown(); + CGUIUpDown(WORD x, WORD y, WORD width, WORD heigth, DWORD exstyle, DWORD style, HWND parent, WNDPROC handler, ID idObj, HWND buddy); + CGUIUpDown(WORD x, WORD y, WORD width, WORD heigth, HWND parent, WNDPROC handler, ID idObj, HWND buddy, bool align_left); + + ~CGUIUpDown(); + + + void setMinMax(int min, int max); + long setPos(int pos); + + long getMin(); + long getMax(); + long getPos(); + + HWND setBuddy(HWND buddy); + HWND getBuddy(); +}; + +#endif \ No newline at end of file diff --git a/source/SkyXEngine.h b/source/SkyXEngine.h index 36810e6f94fdb1402609b062236c2e34dfa30b4f..2dcfe74f601f7359369c7df4bdb49693a53e7b48 100644 --- a/source/SkyXEngine.h +++ b/source/SkyXEngine.h @@ -1,160 +1,160 @@ - -/*********************************************************** -Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 -See the license in LICENSE -***********************************************************/ - -/*! -\file -Заголовочный файл движка SkyXEngine, подключает все необходимые библиотеки -*/ - + +/*********************************************************** +Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +/*! +\file +Заголовочный файл движка SkyXEngine, подключает все необходимые библиотеки +*/ + /*! \mainpage Документация SkyXEngine Это документация API (интерфейса программирования приложения) 3D движка real-time рендера SkyXEngine. \n Для того чтобы понять что такое SkyXEngine рекомендуем Вам ознакомится с \ref info_engine "кратким описанием движка". \n Также было бы крайне полезным узнать \ref general_info_libs "об организации библиотек". \n Дальнейшее ознакомление с движком SkyXEngine можно по <a href="./modules.html">документации, которая представлена модулями/подмодулями</a>. -*/ - -/*! \page info_engine Информация о движке SkyXEngine -\tableofcontents -\section ie_common Общее -\b SkyXEngine - движок для создания 3D игр с real-time рендером, использует технологии DirectX 9. \n -<small>Сразу уточнение, DirectX 9 мы используем в связи с личными предпочтениями, так как на наш взгляд эта технология является одной из лучших, хоть и считается устаревшей. -Все новое это забытое старое)) И как нам кажется ... нет ничего такого, чего нельзя было бы сделать на DirectX 9, но что можно сделать на другом GAPI, для создания игр любого жанра с real-time рендером. -Но это только точка зрения нашей команды и она может быть ошибочная. Однако в планах есть расширение поддерживаемых GAPI.</small> - -<b>Формирование уровня</b> осуществляется посредством: - - загрузки статических моделей формата dse, с их автоматическим разбиением на "куски рендера" как quad или octo дерево, возможны сохранение/загрузка в бинарный файл всей геометрии уровня - - генерации растительности по маске, возможны 2 вида: трава (чем дальше тем меньше размер объекта) и деревья (с возможностью загрузки лодов), возможны возможны сохранение/загрузка в бинарный файл всей растительности уровня. Ручная расстановка расстительности поддерживается. Редактирование поддерживается. - -<b>Освещение</b> представлено 3 видами источников света (опционально поддерживается генерация теней от каждого исчтоника света): - - глобальный (солнце), тени - PSSM - - локальный - точечный, тени - Cube Shadow Mapping - - локальный - направленный, тени - Shadow Mapping. - -HDR эффект присутсвует. - -<b>Система материалов</b> pbr, то есть построенная на физичеки корретных, но апроксимированных вычислениях. \n -Для формирования данных для освещения используется техника Deferred shading, что позволяет обрабатывать неограниченное количество источников света. \n -Поддерживаются отражения 2 видов: - - плоские (планарные) - - объемные (кубические). - -Поддерживается до 3 полупрозрачных поверхностей в кадре (пока только тестовый режим, в планах улучшения качества). \n -Поддерживаемые эффекты поверхностей: - - микрорельеф - - микрорельеф по маске (до 4 текстур) - - детальность - - детальность по маске (до 4 текстур) - - комбинированный микрорельеф с детальностью по маске (до 4 текстур) - - альфа тест - - просвечиваемость (для освещения тонких поверхностей, к примеру листвы и травы). - - Вся система материалов является открытой и практически любой функционал системы доступен для собственной интерпретации, посредством шейдеров. Имеется встроенный набор данных.\n - Поддерживаются различные пользовательские данные которые интерпретируются только создающим материалы. - Настрока физического материала доступна. - -<b>Постпроцесс</b> состоит из эффектов: - - черно-белое изображение - - эффект сепия - - коррекция изображения - - рендер солнца - - bloom - - lens flare, эффект восприятия яркого света линзами - - depth of field, глубина резкости - - linear fog, линейный туман - - space screen ambient occulusion, глобальное освещение (точнее затенение) в пространстве экрана - - motion blur, размытие в движении - - nfaa - - dlaa. - -<b>Декали</b> - следы от пуль, взрывов, трещины. Рисуются поверх основной геометрии. - -<b>Физика</b> - для симуляции физики используется физический движок Bullet. - -<b>Звуковой движок</b> поддерживает воспроизведение в пространстве и в фоне. Поддерживаемые форматы ogg, wav. Доступно создание инстансов без возможности управления. - -<b>Партиклы</b> с необходимым набором логики и с многочисленными и простыми настроками. - -<b>AI сетка</b> для навигации живых игровых объектов. - -<b>Игровой движок</b> - основа для построения игровой логики. Предоставляет набор игровых объектов и обеспечивает их взаимодействие. - -<b>Эффекты окружения</b> представлены фоновыми ambient звуками, погодой, определяемой для каждого уровня, с различными погодными эффектами. - -<b>Real-time конфигурация (cvars)</b> позволяет в режиме реального времени через консоль изменять разного рода установки движка - -<b>Редакторы:</b> - - \link level_editor SXLevelEditor - редактор уровней \endlink \n - - \link material_editor SXMaterialEditor - редактор материалов \endlink \n - - \link particles_editor SXParticlesEditor - редактор партиклов \endlink \n - -\section dogma_engine Идеология движка -Основной технической идеей при разработке движка была идея о том что программист должен иметь контроль над объектами которыми он оперирует, НО этот контроль должен быть в меру. \n -Основной идеей предназначения служила и служит идея о том чтобы предоставляемый инструментарий мог полностью удовлетворять потребностям разработчика, без необходимости со стороны разработчика вникать в детали реализации, но чтобы этот инструментарий имел прозрачную, открытую, свободную, бесплатную лицензию, и разработчик мог спокойно податься в стихию сотворения своего мира. \n -Также главенствовал принцип разделения функционала на логические блоки (библиотеки) и после окончания разработки очередного блока он бы выносился в dll (с глаз долой). -Однако существенным дополнением являлась идея о том что библиотеки не должны ничего значть о равнозначных себе библиотеках в общей иерархии. -К примеру \ref sxgeom "библиотека статической геометрии и растительности" ничего не знает о \ref sxmtllight "библиотеке материалов", и последняя ничего не знает о первой, однако первая использует функции из второй посредством графического ядра, а вторая осуществляется настройку материалов перед рендером первой.\n -Немаловажным моментом являлся ориентир на гибкость. К примеру \ref sxgcore_redefinition_func "переопредляемые функции" в графическом ядре, позволяют настроить на свой лад рендер. \n -Ну и пожалуй самая главная идея заключается в полноценной возможности разработки игр с видом от первого лица, с настройкой/перестройкой "под себя" всего рендера. Также к приправе к этому мы руководствовались мыслью о том что скриптеры (коих не мало) могли бы вести разработку игры на своем (доступном им) уровне, со всеми возможностями движка. - -\section struct_engine Структура движка -Весь движок состоит из \ref general_info_libs "подсистем", которые в некоторых случаях являются ядрами. \n -Иерархия подсистем:\n -\- \ref sxcore\n -\-- \ref sxgcore\n -\--- \ref sxgeom\n -\--- \ref sxanim\n -\--- \ref sxmtllight\n -\--- \ref sxpp\n -\- \ref sxinput\n -Все библиотеки представлены файлами dll, что позволяет разделить функционал и реализацию. Также в большинстве случаев библиотеки могут быть вычленены из самого движка и могут использоваться автономно.\n -В большинстве случаев весь функционал библиотек предоставляется интерфейсом функций, а идентификация объектов числовая, по типу #ID. -Это позволяет не беспокоится о типах и о существовании объектов - об этом заботятся сами библиотеки. -*/ - -/*! \page std_doc Стандарт документирования -\tableofcontents -\section std_doc_common Общее -Дабы создать удобочитаемые комментрии, которые легко бы трансформировались в документацию был создан данный стандарт документирования, следование которому является обязательным. -Так как для документирования был выбран Doxygen, то все что касается документирования будет в контексте именно этой программы. \n -Для более чектого структурирования необходимо разделять весь код на логические звенья, которые могут быть представлены модулями/подмодулями и группами как в модулях так и вне их. - -\section style_doc Стиль документирования +*/ + +/*! \page info_engine Информация о движке SkyXEngine +\tableofcontents +\section ie_common Общее +\b SkyXEngine - движок для создания 3D игр с real-time рендером, использует технологии DirectX 9. \n +<small>Сразу уточнение, DirectX 9 мы используем в связи с личными предпочтениями, так как на наш взгляд эта технология является одной из лучших, хоть и считается устаревшей. +Все новое это забытое старое)) И как нам кажется ... нет ничего такого, чего нельзя было бы сделать на DirectX 9, но что можно сделать на другом GAPI, для создания игр любого жанра с real-time рендером. +Но это только точка зрения нашей команды и она может быть ошибочная. Однако в планах есть расширение поддерживаемых GAPI.</small> + +<b>Формирование уровня</b> осуществляется посредством: + - загрузки статических моделей формата dse, с их автоматическим разбиением на "куски рендера" как quad или octo дерево, возможны сохранение/загрузка в бинарный файл всей геометрии уровня + - генерации растительности по маске, возможны 2 вида: трава (чем дальше тем меньше размер объекта) и деревья (с возможностью загрузки лодов), возможны возможны сохранение/загрузка в бинарный файл всей растительности уровня. Ручная расстановка расстительности поддерживается. Редактирование поддерживается. + +<b>Освещение</b> представлено 3 видами источников света (опционально поддерживается генерация теней от каждого исчтоника света): + - глобальный (солнце), тени - PSSM + - локальный - точечный, тени - Cube Shadow Mapping + - локальный - направленный, тени - Shadow Mapping. + +HDR эффект присутсвует. + +<b>Система материалов</b> pbr, то есть построенная на физичеки корретных, но апроксимированных вычислениях. \n +Для формирования данных для освещения используется техника Deferred shading, что позволяет обрабатывать неограниченное количество источников света. \n +Поддерживаются отражения 2 видов: + - плоские (планарные) + - объемные (кубические). + +Поддерживается до 3 полупрозрачных поверхностей в кадре (пока только тестовый режим, в планах улучшения качества). \n +Поддерживаемые эффекты поверхностей: + - микрорельеф + - микрорельеф по маске (до 4 текстур) + - детальность + - детальность по маске (до 4 текстур) + - комбинированный микрорельеф с детальностью по маске (до 4 текстур) + - альфа тест + - просвечиваемость (для освещения тонких поверхностей, к примеру листвы и травы). + + Вся система материалов является открытой и практически любой функционал системы доступен для собственной интерпретации, посредством шейдеров. Имеется встроенный набор данных.\n + Поддерживаются различные пользовательские данные которые интерпретируются только создающим материалы. + Настрока физического материала доступна. + +<b>Постпроцесс</b> состоит из эффектов: + - черно-белое изображение + - эффект сепия + - коррекция изображения + - рендер солнца + - bloom + - lens flare, эффект восприятия яркого света линзами + - depth of field, глубина резкости + - linear fog, линейный туман + - space screen ambient occulusion, глобальное освещение (точнее затенение) в пространстве экрана + - motion blur, размытие в движении + - nfaa + - dlaa. + +<b>Декали</b> - следы от пуль, взрывов, трещины. Рисуются поверх основной геометрии. + +<b>Физика</b> - для симуляции физики используется физический движок Bullet. + +<b>Звуковой движок</b> поддерживает воспроизведение в пространстве и в фоне. Поддерживаемые форматы ogg, wav. Доступно создание инстансов без возможности управления. + +<b>Партиклы</b> с необходимым набором логики и с многочисленными и простыми настроками. + +<b>AI сетка</b> для навигации живых игровых объектов. + +<b>Игровой движок</b> - основа для построения игровой логики. Предоставляет набор игровых объектов и обеспечивает их взаимодействие. + +<b>Эффекты окружения</b> представлены фоновыми ambient звуками, погодой, определяемой для каждого уровня, с различными погодными эффектами. + +<b>Real-time конфигурация (cvars)</b> позволяет в режиме реального времени через консоль изменять разного рода установки движка + +<b>Редакторы:</b> + - \link level_editor SXLevelEditor - редактор уровней \endlink \n + - \link material_editor SXMaterialEditor - редактор материалов \endlink \n + - \link particles_editor SXParticlesEditor - редактор партиклов \endlink \n + +\section dogma_engine Идеология движка +Основной технической идеей при разработке движка была идея о том что программист должен иметь контроль над объектами которыми он оперирует, НО этот контроль должен быть в меру. \n +Основной идеей предназначения служила и служит идея о том чтобы предоставляемый инструментарий мог полностью удовлетворять потребностям разработчика, без необходимости со стороны разработчика вникать в детали реализации, но чтобы этот инструментарий имел прозрачную, открытую, свободную, бесплатную лицензию, и разработчик мог спокойно податься в стихию сотворения своего мира. \n +Также главенствовал принцип разделения функционала на логические блоки (библиотеки) и после окончания разработки очередного блока он бы выносился в dll (с глаз долой). +Однако существенным дополнением являлась идея о том что библиотеки не должны ничего значть о равнозначных себе библиотеках в общей иерархии. +К примеру \ref sxgeom "библиотека статической геометрии и растительности" ничего не знает о \ref sxmtllight "библиотеке материалов", и последняя ничего не знает о первой, однако первая использует функции из второй посредством графического ядра, а вторая осуществляется настройку материалов перед рендером первой.\n +Немаловажным моментом являлся ориентир на гибкость. К примеру \ref sxgcore_redefinition_func "переопредляемые функции" в графическом ядре, позволяют настроить на свой лад рендер. \n +Ну и пожалуй самая главная идея заключается в полноценной возможности разработки игр с видом от первого лица, с настройкой/перестройкой "под себя" всего рендера. Также к приправе к этому мы руководствовались мыслью о том что скриптеры (коих не мало) могли бы вести разработку игры на своем (доступном им) уровне, со всеми возможностями движка. + +\section struct_engine Структура движка +Весь движок состоит из \ref general_info_libs "подсистем", которые в некоторых случаях являются ядрами. \n +Иерархия подсистем:\n +\- \ref sxcore\n +\-- \ref sxgcore\n +\--- \ref sxgeom\n +\--- \ref sxanim\n +\--- \ref sxmtllight\n +\--- \ref sxpp\n +\- \ref sxinput\n +Все библиотеки представлены файлами dll, что позволяет разделить функционал и реализацию. Также в большинстве случаев библиотеки могут быть вычленены из самого движка и могут использоваться автономно.\n +В большинстве случаев весь функционал библиотек предоставляется интерфейсом функций, а идентификация объектов числовая, по типу #ID. +Это позволяет не беспокоится о типах и о существовании объектов - об этом заботятся сами библиотеки. +*/ + +/*! \page std_doc Стандарт документирования +\tableofcontents +\section std_doc_common Общее +Дабы создать удобочитаемые комментрии, которые легко бы трансформировались в документацию был создан данный стандарт документирования, следование которому является обязательным. +Так как для документирования был выбран Doxygen, то все что касается документирования будет в контексте именно этой программы. \n +Для более чектого структурирования необходимо разделять весь код на логические звенья, которые могут быть представлены модулями/подмодулями и группами как в модулях так и вне их. + +\section style_doc Стиль документирования QT стиль документирования (!) и QT_AUTOBRIEF - короткая документация до точки в любом комментарии, а после точки идет подробное документирование если надо.\n Возможные виды: <pre> //! документирование того что идет за этой строкой //!< документирование того что предшествовало данному комментарию / *! документирование того что идет за этой строкой * / -/ *!< документирование того что предшествовало данному комментарию * / -</pre> -<b>Примечание:</b> здесь и далее / * и * / комментарий без пробелов! - +/ *!< документирование того что предшествовало данному комментарию * / +</pre> +<b>Примечание:</b> здесь и далее / * и * / комментарий без пробелов! + \section style_desc_file Описание файла (обязательно для каждого документируемого файла) <pre> / *! \\file Описание файла -\* / -</pre> - +\* / +</pre> + \section style_modules Модули/подмодули <pre> / *! \\defgroup имя_модуля описание модуля \@{ \* / ... код модуля -//!\@} имя_модуля -</pre> -В случае если модуль является подмодулем другого модуля то после описания модуля необходимо добавить: -<pre> - \\ingroup имя_модуля_которому_будет_принадлежать_данный_модуль -</pre> -Окончание модуля может быть любым удобным, но только окончание модуля должно включать в себя имя модуля для которого написан конец. - +//!\@} имя_модуля +</pre> +В случае если модуль является подмодулем другого модуля то после описания модуля необходимо добавить: +<pre> + \\ingroup имя_модуля_которому_будет_принадлежать_данный_модуль +</pre> +Окончание модуля может быть любым удобным, но только окончание модуля должно включать в себя имя модуля для которого написан конец. + \section style_group Группа (вложенные группы не поддерживаются) <pre> / *! \\name название группы, оно также будет размещено в документации @@ -163,55 +163,55 @@ QT стиль документирования (!) и QT_AUTOBRIEF - корот //! \@{ ... все кроме классов //! \@} -</pre> - -\section style_ref Ссылки -Для лучшей навигации необходимо использовать ссылки, которые могут указывать на структурные единицы (модули/подмодули, страницы, секции) так и на код. -Пример ссылки на структурные единицы: -<pre> -Весь движок состоит из \\ref general_info_libs "подсистем". -</pre> -Или без указания имени ссылки: -<pre> -\\ref sxcore -</pre> - -Пример ссылки на код: -<pre> -\#SCore_Create -</pre> - -\section style_page Страницы -<pre> -/ *! \\page идентификатор_только_латиница Заголовок страницы -\\tableofcontents -Для того чтобы разделить на разделы можно использовать секции: -\\section style_page Создание страниц -\* / -</pre> - -\section style_list Списки -<pre> - \- первый элемент - \- второй элемент -</pre> - -\section style_extra Дополнительно -\\n - для новой строки \n -Также можно использовать html теги. \n -\\note - заметка \n -\\warning - предупреждение \n -\\todo - пометка о том что надо сделать \n -*/ - -//############################################################################# - -/*! \page engine_cvar Движковые квары -\tableofcontents - -\section engine_cvar_naming Правила именования -Все имена кваров пишутся только в нижнем регистре, в качестве пробела используется _ (нижний пробел). -Если квар является дефолтным, относительно него буду происходит расчеты либо действия, то тогда prefix_default_cvar. +</pre> + +\section style_ref Ссылки +Для лучшей навигации необходимо использовать ссылки, которые могут указывать на структурные единицы (модули/подмодули, страницы, секции) так и на код. +Пример ссылки на структурные единицы: +<pre> +Весь движок состоит из \\ref general_info_libs "подсистем". +</pre> +Или без указания имени ссылки: +<pre> +\\ref sxcore +</pre> + +Пример ссылки на код: +<pre> +\#SCore_Create +</pre> + +\section style_page Страницы +<pre> +/ *! \\page идентификатор_только_латиница Заголовок страницы +\\tableofcontents +Для того чтобы разделить на разделы можно использовать секции: +\\section style_page Создание страниц +\* / +</pre> + +\section style_list Списки +<pre> + \- первый элемент + \- второй элемент +</pre> + +\section style_extra Дополнительно +\\n - для новой строки \n +Также можно использовать html теги. \n +\\note - заметка \n +\\warning - предупреждение \n +\\todo - пометка о том что надо сделать \n +*/ + +//############################################################################# + +/*! \page engine_cvar Движковые квары +\tableofcontents + +\section engine_cvar_naming Правила именования +Все имена кваров пишутся только в нижнем регистре, в качестве пробела используется _ (нижний пробел). +Если квар является дефолтным, относительно него буду происходит расчеты либо действия, то тогда prefix_default_cvar. - r_ - все, что связано с рендером непосредственно - cl_ - игрок управление - phy_ - физика @@ -224,21 +224,21 @@ QT стиль документирования (!) и QT_AUTOBRIEF - корот - nav_ - навигация - snd_ - звуки - ed_ - для редакторов - - pt_ - партиклы - - \section engine_cvar_camera Камера - - \b r_default_fov дефолтный fov - - \b r_near ближняя плоскость отсечения - - \b r_far дальняя плоскость отсечения - -\section engine_cvar_window Окно - - \b r_win_width размер окна по горизонтали (в пикселях) - - \b r_win_height размер окна по вертикали (в пикселях) - - \b r_win_windowed режим рендера true - оконный, false - полноэкранный - - \b r_final_image тип финального (выводимого в окно рендера) изображения из перечисления DS_RT - - \b r_resize тип изменения размеров окан рендера из перечисления RENDER_RESIZE - -\section engine_cvar_pp Post process + - pt_ - партиклы + + \section engine_cvar_camera Камера + - \b r_default_fov дефолтный fov + - \b r_near ближняя плоскость отсечения + - \b r_far дальняя плоскость отсечения + +\section engine_cvar_window Окно + - \b r_win_width размер окна по горизонтали (в пикселях) + - \b r_win_height размер окна по вертикали (в пикселях) + - \b r_win_windowed режим рендера true - оконный, false - полноэкранный + - \b r_final_image тип финального (выводимого в окно рендера) изображения из перечисления DS_RT + - \b r_resize тип изменения размеров окан рендера из перечисления RENDER_RESIZE + +\section engine_cvar_pp Post process - \b pp_ssao установка качества ssao (0 - не рисовать, 1 - среднее, 2 - хорошее, 3 - высокое) - \b pp_bloom рисовать ли эффект bloom (true/false) - \b pp_lensflare true рисовать ли эффект lens flare (true/false) @@ -262,270 +262,323 @@ QT стиль документирования (!) и QT_AUTOBRIEF - корот - \b r_green_lod0 дистанция от наблюдателя на которой заканчивается нулевой лод растительности (он же лод травы), то есть дальность отрисовки травы (0,100) - \b r_green_lod1 дистанция от наблюдателя на которой заканчивается первый лод растительности (50,150) - \b r_green_less дистанция от наблюдателя c которой начнет уменьшаться трава (0,green_lod0) - - \section engine_cvar_texfilter Фильтрация текстур + + \section engine_cvar_texfilter Фильтрация текстур - \b r_texfilter_type тип фильтрации текстур, 0 - точечная, 1 - линейная, 2 - анизотропная - \b r_texfilter_max_anisotropy максимальное значение анизотропной фильтрации (если включена) [1,16] - - \b r_texfilter_max_miplevel какой mip уровень текстур использовать? 0 - самый высокий, 1 - ниже на один уровень и т.д. - - \b r_stats показывать ли статистику? 0 - нет, 1 - fps и игровое время, 2 - показать полностью - -\section engine_cvar_env Окружение - - \b env_default_rain_density коэфициент плотности дождя (0,1] - - \b env_default_thunderbolt могут ли воспроизводится эффекты молнии? - - \b env_weather_snd_volume громкость звуков погоды [0,1] - - \b env_ambient_snd_volume громкость фоновых звуков на уровне [0,1] - -\section engine_cvar_game Игра - - \b g_time_run запущено ли игрвоое время?" - - \b g_time_speed скорость/соотношение течения игрового времени - -//########################################################################## - -\page editors Редакторы -\link level_editor SXLevelEditor - редактор уровней \endlink \n -\link material_editor SXMaterialEditor - редактор материалов \endlink \n -\link particles_editor SXParticlesEditor - редактор партиклов \endlink \n -*/ - -//############################################################################# - -#ifndef __SKYXENGINE_H -#define __SKYXENGINE_H - -#define SKYXENGINE_VERSION "0.9.3" - -#include <windows.h> -#include <ctime> -#include <gdefines.h> -#include <common/array.h> -#include <common/string.h> -#include <fstream> - -//ЗАГРУЗКА БИБЛИОТЕК -//{ -#if defined(_DEBUG) -#pragma comment(lib, "sxcore_d.lib") -#else -#pragma comment(lib, "sxcore.lib") -#endif -#include <core/sxcore.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxinput_d.lib") -#else -#pragma comment(lib, "sxinput.lib") -#endif -#include <input/sxinput.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxscore_d.lib") -#else -#pragma comment(lib, "sxscore.lib") -#endif -#include <score/sxscore.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxgcore_d.lib") -#else -#pragma comment(lib, "sxgcore.lib") -#endif -#include <gcore/sxgcore.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxgeom_d.lib") -#else -#pragma comment(lib, "sxgeom.lib") -#endif -#include <geom/sxgeom.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxmtllight_d.lib") -#else -#pragma comment(lib, "sxmtllight.lib") -#endif -#include <mtllight/sxmtllight.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxparticles_d.lib") -#else -#pragma comment(lib, "sxparticles.lib") -#endif -#include <particles/sxparticles.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxpp_d.lib") -#else -#pragma comment(lib, "sxpp.lib") -#endif -#include <pp/sxpp.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxanim_d.lib") -#else -#pragma comment(lib, "sxanim.lib") -#endif -#include <anim/sxanim.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxphysics_d.lib") -#else -#pragma comment(lib, "sxphysics.lib") -#endif -#include <physics/sxphysics.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxaigrid_d.lib") -#else -#pragma comment(lib, "sxaigrid.lib") -#endif -#include <aigrid/sxaigrid.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxdecals_d.lib") -#else -#pragma comment(lib, "sxdecals.lib") -#endif -#include <decals/sxdecals.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxlevel_d.lib") -#else -#pragma comment(lib, "sxlevel.lib") -#endif -#include <level/sxlevel.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxgame_d.lib") -#else -#pragma comment(lib, "sxgame.lib") -#endif -#include <game/sxgame.h> - + - \b r_texfilter_max_miplevel какой mip уровень текстур использовать? 0 - самый высокий, 1 - ниже на один уровень и т.д. + - \b r_stats показывать ли статистику? 0 - нет, 1 - fps и игровое время, 2 - показать полностью + +\section engine_cvar_env Окружение + - \b env_default_rain_density коэфициент плотности дождя (0,1] + - \b env_default_thunderbolt могут ли воспроизводится эффекты молнии? + - \b env_weather_snd_volume громкость звуков погоды [0,1] + - \b env_ambient_snd_volume громкость фоновых звуков на уровне [0,1] + +\section engine_cvar_game Игра + - \b g_time_run запущено ли игрвоое время?" + - \b g_time_speed скорость/соотношение течения игрового времени + +//########################################################################## + +\page editors Редакторы +\link level_editor SXLevelEditor - редактор уровней \endlink \n +\link material_editor SXMaterialEditor - редактор материалов \endlink \n +\link particles_editor SXParticlesEditor - редактор партиклов \endlink \n +*/ + +//############################################################################# + +#ifndef __SKYXENGINE_H +#define __SKYXENGINE_H + +#define SKYXENGINE_VERSION "0.9.3" + +#define SKYXENGINE_PREVIEW_SIZE 256 + +#define SKYXENGINE_PREVIEWBUF_SIZE (SKYXENGINE_PREVIEW_SIZE * SKYXENGINE_PREVIEW_SIZE * 4) + +#define SKYXENGINE_RELPATH_GAMESOURCE "gamesource" +#define SKYXENGINE_RELPATH_EDITOR_CACHE "editors_cache" + +#include <vld.h> +#include <windows.h> +#include <ctime> +#include <gdefines.h> +#include <common/array.h> +#include <common/string.h> +#include <common/file_utils.h> +#include <fstream> + +//ЗАГРУЗКА БИБЛИОТЕК +//{ +#if defined(_DEBUG) +#pragma comment(lib, "sxcore_d.lib") +#else +#pragma comment(lib, "sxcore.lib") +#endif +#include <core/sxcore.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxinput_d.lib") +#else +#pragma comment(lib, "sxinput.lib") +#endif +#include <input/sxinput.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxscore_d.lib") +#else +#pragma comment(lib, "sxscore.lib") +#endif +#include <score/sxscore.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxgcore_d.lib") +#else +#pragma comment(lib, "sxgcore.lib") +#endif +#include <gcore/sxgcore.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxgeom_d.lib") +#else +#pragma comment(lib, "sxgeom.lib") +#endif +#include <geom/sxgeom.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxmtllight_d.lib") +#else +#pragma comment(lib, "sxmtllight.lib") +#endif +#include <mtllight/sxmtllight.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxparticles_d.lib") +#else +#pragma comment(lib, "sxparticles.lib") +#endif +#include <particles/sxparticles.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxpp_d.lib") +#else +#pragma comment(lib, "sxpp.lib") +#endif +#include <pp/sxpp.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxanim_d.lib") +#else +#pragma comment(lib, "sxanim.lib") +#endif +#include <anim/sxanim.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxphysics_d.lib") +#else +#pragma comment(lib, "sxphysics.lib") +#endif +#include <physics/sxphysics.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxaigrid_d.lib") +#else +#pragma comment(lib, "sxaigrid.lib") +#endif +#include <aigrid/sxaigrid.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxdecals_d.lib") +#else +#pragma comment(lib, "sxdecals.lib") +#endif +#include <decals/sxdecals.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxlevel_d.lib") +#else +#pragma comment(lib, "sxlevel.lib") +#endif +#include <level/sxlevel.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxgame_d.lib") +#else +#pragma comment(lib, "sxgame.lib") +#endif +#include <game/sxgame.h> + #if defined(SX_LEVEL_EDITOR) || defined(SX_MATERIAL_EDITOR) || defined(SX_PARTICLES_EDITOR) -#if defined(_DEBUG) -#pragma comment(lib, "sxguiwinapi_d.lib") -#else -#pragma comment(lib, "sxguiwinapi.lib") -#endif -#include <sxguiwinapi/sxgui.h> -#endif - -#if defined(_DEBUG) -#pragma comment(lib, "sxrender_d.lib") -#else -#pragma comment(lib, "sxrender.lib") -#endif -#include <render/sxrender.h> - -//} - -//############################################################################# - -#if defined(SX_GAME) -#include <SkyXEngine_Build/resource.h> -#endif - -#if defined(SX_LEVEL_EDITOR) -#include <SXLevelEditor/resource.h> -#include <SXLevelEditor/level_editor.h> -#endif - -#if defined(SX_MATERIAL_EDITOR) -#include <sxmaterialeditor/resource.h> -#include <sxmaterialeditor/material_editor.h> -#endif - -#if defined(SX_PARTICLES_EDITOR) -#include <sxparticleseditor/resource.h> -#include <sxparticleseditor/particles_editor.h> -#endif - -//############################################################################# - -/*! \defgroup skyxengine Функции и данные движка -@{*/ - -//! инициализация движка -void SkyXEngine_Init(HWND hWnd3D = 0, HWND hWndParent3D = 0); - -//! инициализация путей в регистрах -void SkyXEngine_InitPaths(); - -//! создание кваров и загрузка файлов настроек -void SkyXEngine_CreateLoadCVar(); - -//! обработчик для окна рендера -LRESULT CALLBACK SkyXEngine_WndProc(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam); - -//! создание окна рендера -HWND SkyXEngine_CreateWindow(const char *szName, const char *szCaption, int iWidth, int iHeight); - -//************************************************************************** - -//! перебор всех окон процесса для их сворачивания -BOOL CALLBACK SkyXEngine_EnumWindowsProc(HWND hwnd, LPARAM lParam); - -//! обработка ошибки -void SkyXEngine_HandlerError(const char *szFormat, ...); - -//! инициализация потока ведения лога -void SkyXEngine_InitOutLog(); - -//! функция ведения лога и обработки сообщений -void SkyXEngine_PrintfLog(int level, const char *szFormat, ...); - -//************************************************************************** - -//! кадр -void SkyXEngine_Frame(DWORD timeDelta); - -//! обновление данных кваром (реакция на обновление) -void SkyXEngind_UpdateDataCVar(); - -//! запуск основного цикла обработки -int SkyXEngine_CycleMain(); - -//! уничтожение данных движка, освобождение памяти +#if defined(_DEBUG) +#pragma comment(lib, "sxguiwinapi_d.lib") +#else +#pragma comment(lib, "sxguiwinapi.lib") +#endif +#include <sxguiwinapi/sxgui.h> +#endif + +#if defined(_DEBUG) +#pragma comment(lib, "sxrender_d.lib") +#else +#pragma comment(lib, "sxrender.lib") +#endif +#include <render/sxrender.h> + +//} + +//############################################################################# + +#if defined(SX_GAME) +#include <SkyXEngine_Build/resource.h> +#endif + +#if defined(SX_LEVEL_EDITOR) +#include <SXLevelEditor/resource.h> +#include <SXLevelEditor/level_editor.h> +#endif + +#if defined(SX_MATERIAL_EDITOR) +#include <sxmaterialeditor/resource.h> +#include <sxmaterialeditor/material_editor.h> +#endif + +#if defined(SX_PARTICLES_EDITOR) +#include <sxparticleseditor/resource.h> +#include <sxparticleseditor/particles_editor.h> +#endif + +//############################################################################# + +/*! \defgroup skyxengine Функции и данные движка +@{*/ + +//! инициализация движка +void SkyXEngine_Init(HWND hWnd3D = 0, HWND hWndParent3D = 0); + +//! инициализация путей в регистрах +void SkyXEngine_InitPaths(); + +//! создание кваров и загрузка файлов настроек +void SkyXEngine_CreateLoadCVar(); + +//! обработчик для окна рендера +LRESULT CALLBACK SkyXEngine_WndProc(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam); + +//! создание окна рендера +HWND SkyXEngine_CreateWindow(const char *szName, const char *szCaption, int iWidth, int iHeight); + +//************************************************************************** + +//! перебор всех окон процесса для их сворачивания +BOOL CALLBACK SkyXEngine_EnumWindowsProc(HWND hwnd, LPARAM lParam); + +//! обработка ошибки +void SkyXEngine_HandlerError(const char *szFormat, ...); + +//! инициализация потока ведения лога +void SkyXEngine_InitOutLog(); + +//! функция ведения лога и обработки сообщений +void SkyXEngine_PrintfLog(int level, const char *szLibName, const char *szFormat, ...); + +//************************************************************************** + +//! кадр +void SkyXEngine_Frame(DWORD timeDelta); + +//! обновление данных кваром (реакция на обновление) +void SkyXEngind_UpdateDataCVar(); + +//! запуск основного цикла обработки +int SkyXEngine_CycleMain(); + +//! уничтожение данных движка, освобождение памяти void SkyXEngine_Kill(); //************************************************************************** -/*! \name skyxengine_preview_wnd preview_wnd - Функции превью окна движка +/*! \name skyxengine_preview_wnd preview_wnd - Функции превью окна движка @{*/ +#ifdef IDB_BITMAP_PREVIEW //! обработчик для превьюокна LRESULT CALLBACK SkyXEngine_PreviewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); - -//! создание превью окна -void SkyXEngine_PreviewCreate(); - -//! уничтожение превью окна -void SkyXEngine_PreviewKill(); - -//!@} - -//************************************************************************** - -/*! \name skyxengine_redefined_func redefined_func - Функции обертки, для передачи графическому ядру для замены стандартных + +//! создание превью окна +void SkyXEngine_PreviewCreate(); + +//! уничтожение превью окна +void SkyXEngine_PreviewKill(); + +#endif +//!@} + +//************************************************************************** + +/*! \name skyxengine_redefined_func redefined_func - Функции обертки, для передачи графическому ядру для замены стандартных +@{*/ + +//! функция отрисовки, в данной версии не назначается +void SkyXEngine_RFuncDIP(UINT type_primitive, long base_vertexIndex, UINT min_vertex_index, UINT num_vertices, UINT start_index, UINT prim_count); + +//! функция установки материала по id, world - мировая матрица +void SkyXEngine_RFuncMtlSet(ID id, float4x4* world); + +//! функция загрузки материала +ID SkyXEngine_RFuncMtlLoad(const char* name, int mtl_type); + +//! просчет физики для квада аи сетки +bool SkyXEngine_RFuncAIQuadPhyNavigate(float3_t * pos); + +//! просчет столкновения частицы с миром +bool SkyXEngine_RFuncParticlesPhyCollision(const float3 * lastpos, const float3* nextpos, float3* coll_pos, float3* coll_nrm); + +//!@} + +//########################################################################## + +/*! \name skyxengine_preview_genload Генерация/загрузка превью игровых ресурсов +@{*/ + +//! загружает текстуру по указанному пути как превью изображение и возвращает +IDirect3DTexture9* SkyXEngine_LoadAsPreviewData(const char *szPath); + +//! возвращает загруженную текстуру с превью, в szPath путь до оригинала +IDirect3DTexture9* SkyXEngine_GetPreviewData(const char *szPath); + +//! запускает генератор создания превью для игровых ресурсов +void SkyXEngine_RunGenPreview(); + +//!@} + +//########################################################################## + +/*! \name skyxengine_preview_editor_handlers Данные и обработчики для превью игровых ресурсов @{*/ -//! функция отрисовки, в данной версии не назначается -void SkyXEngine_RFuncDIP(UINT type_primitive, long base_vertexIndex, UINT min_vertex_index, UINT num_vertices, UINT start_index, UINT prim_count); - -//! функция установки материала по id, world - мировая матрица -void SkyXEngine_RFuncMtlSet(ID id, float4x4* world); - -//! функция загрузки материала -ID SkyXEngine_RFuncMtlLoad(const char* name, int mtl_type); - -//! просчет физики для квада аи сетки -bool SkyXEngine_RFuncAIQuadPhyNavigate(float3_t * pos); - -//! просчет столкновения частицы с миром -bool SkyXEngine_RFuncParticlesPhyCollision(const float3 * lastpos, const float3* nextpos, float3* coll_pos, float3* coll_nrm); - -//!@} - -//!@} skyxengine - +//! буфер для превью +extern BYTE *g_pPreviewBuffer; + +//! записывает в аргументы данные, если все прошло удачно возвращает true +bool SkyXEngine_EditorHandlerGetPreviewData( + const char *szPath, //!< полный путь до оригинального файла + void **pOutBuf, //!< указатель на буфер, сюда будет записан указатель на g_pPreviewBuffer + int *pOutSizeBuf, //!< размер буфера в байтах + int *pOutWidth, //!< ширина изображения в пикселях + int *pOutHeight //!< высота изображения в пикселях + ); + +//! в szBuf записывает информацию о текстуре szPath +bool SkyXEngine_EditorHandlerGetTextureInfo(const char *szPath, char *szBuf); + +//! в szBuf записывает информацию о dse модели szPath +bool SkyXEngine_EditorHandlerGetDSEinfo(const char *szPath, char *szBuf); + +//!@} + + +//!@} skyxengine + #endif \ No newline at end of file diff --git a/source/SkyXEngine_Build/SkyXEngine_Build.cpp b/source/SkyXEngine_Build/SkyXEngine_Build.cpp index af579d6be24a02613cd8ef75fb351fda860d0dc2..34613266fea9ccbcca3af4c1ebeb619d8d7db466 100644 --- a/source/SkyXEngine_Build/SkyXEngine_Build.cpp +++ b/source/SkyXEngine_Build/SkyXEngine_Build.cpp @@ -7,6 +7,7 @@ See the license in LICENSE #define _CRT_SECURE_NO_WARNINGS #include <SkyXEngine.h> +//#include <common/string_func.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { @@ -35,7 +36,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin //bEnt->setKV("origin", "14.90 0.36 25.56"); bEnt->setKV("origin", "0 0 0"); }*/ - + CBaseEntity* bEnt = SXGame_CreateEntity("npc_zombie"); + bEnt->setFlags(bEnt->getFlags() | EF_EXPORT | EF_LEVEL); + bEnt->setKV("origin", "0 0 0"); /*for (int i = 0; i < 10; ++i) { for (int k = 0; k < 10; ++k) diff --git a/source/anim/animated.cpp b/source/anim/animated.cpp index 505be3e7ec421eb4c7641e213dc474522e08bde3..2e47a2491fda244a13452843f9a1e4d2827c5fe1 100644 --- a/source/anim/animated.cpp +++ b/source/anim/animated.cpp @@ -1079,7 +1079,7 @@ SMMATRIX Animation::getBoneTransform(UINT _id, bool bWithScale) { //id *= 2; int id = m_FinalBones[_id].pid; - if(id < 0) + if(id < 0 || id >= m_pMdl->m_hdr2.iBoneTableCount) { return(SMMatrixIdentity()); } diff --git a/source/core/Config.cpp b/source/core/Config.cpp index be2502a13cd320c324865befa4881fa7c472e3c1..1e345f850d46f1eb530d1e4b407a27262e26a917 100644 --- a/source/core/Config.cpp +++ b/source/core/Config.cpp @@ -4,8 +4,6 @@ Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 See the license in LICENSE ***********************************************************/ -#include <common/AssotiativeArray.h> -#include <common/String.cpp> #include "Config.h" /* diff --git a/source/core/concmd.cpp b/source/core/concmd.cpp index 0505613bf05d6a442cb54b9127811566f4acd00e..b733e89cbec1be7a84ea10ad045bf76dca0747c4 100644 --- a/source/core/concmd.cpp +++ b/source/core/concmd.cpp @@ -478,8 +478,13 @@ void ConsoleRecv(void*) int hOut; FILE * fOut = NULL; -bool ConsoleConnect(bool bNewInstance) +bool ConsoleConnect(const char *szName, bool bNewInstance) { + char szNameConsole[64]; + + char str[MAX_PATH]; + GetModuleFileNameA(NULL, str, MAX_PATH); + if(bNewInstance) { srand((UINT)time(NULL)); @@ -487,18 +492,20 @@ bool ConsoleConnect(bool bNewInstance) sprintf(g_szServerPort, "%d", port); sprintf(g_szClientPort, "%d", port + 1); - char str[MAX_PATH]; - GetModuleFileNameA(NULL, str, MAX_PATH); - - ShellExecuteA(0, "open", "sxconsole.exe", g_szServerPort, dirname(str), SW_SHOWNORMAL); + sprintf(szNameConsole, "%s %s", g_szServerPort, szName); } else { int port = 59705; sprintf(g_szServerPort, "%d", port); sprintf(g_szClientPort, "%d", port + 1); + + sprintf(szNameConsole, "0 %s", szName); } + if (bNewInstance || !Core_0IsProcessRun("sxconsole.exe")) + ShellExecuteA(0, "open", "sxconsole.exe", szNameConsole, dirname(str), SW_SHOWNORMAL); + WSADATA wsaData; struct addrinfo *result = NULL, *ptr = NULL, @@ -561,7 +568,7 @@ bool ConsoleConnect(bool bNewInstance) { printf("Unable to connect to console!\n"); WSACleanup(); - return(ConsoleConnect(true)); + return(ConsoleConnect(szName, true)); //return(false); } @@ -623,9 +630,9 @@ bool CommandConnect() struct addrinfo *result = NULL, *ptr = NULL, hints; - char recvbuf[2048]; + int iResult; - int recvbuflen = sizeof(recvbuf); + // Initialize Winsock iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); diff --git a/source/core/concmd.h b/source/core/concmd.h index 5d972ff6448b9a695513643b8c8b24c680c5e37f..51bca80fa7dd256398412347a83d2f4ee90c865c 100644 --- a/source/core/concmd.h +++ b/source/core/concmd.h @@ -32,7 +32,7 @@ struct ConCmd char * szDesc; }; -bool ConsoleConnect(bool bNewInstance = false); +bool ConsoleConnect(const char *szName = 0, bool bNewInstance = false); void ConsoleDisconnect(); void ConsoleRegisterCmds(); diff --git a/source/core/sxcore.cpp b/source/core/sxcore.cpp index 81c9cdb7c3cb01445f1c5424923428938e3f81bd..7c60d64ab9ba55a7216630c5b641793e2ad885a0 100644 --- a/source/core/sxcore.cpp +++ b/source/core/sxcore.cpp @@ -67,7 +67,7 @@ void Core_Dbg_Set(report_func fnReportFunc) g_fnReportf = fnReportFunc; } -bool Core_0FileExists(const char *szNameFunc) +/*bool Core_0FileExists(const char *szNameFunc) { WIN32_FIND_DATA wfd; HANDLE hFind = ::FindFirstFile(szNameFunc, &wfd); @@ -77,16 +77,16 @@ bool Core_0FileExists(const char *szNameFunc) return true; } return false; -} +}*/ -SX_LIB_API UINT Core_0GetTimeLastModify(const char *szPath) +/*SX_LIB_API UINT Core_0GetTimeLastModify(const char *szPath) { HANDLE hFile = CreateFile(szPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); if (hFile == INVALID_HANDLE_VALUE) return 0; - SYSTEMTIME stUTC, stLocal; + SYSTEMTIME stUTC; FILETIME ftCreate, ftAccess, ftWrite; GetFileTime(hFile, &ftCreate, &ftAccess, &ftWrite); FileTimeToSystemTime(&ftWrite, &stUTC); @@ -103,7 +103,7 @@ SX_LIB_API UINT Core_0GetTimeLastModify(const char *szPath) uint32_t tLastModify = mktime(&tmObj); return tLastModify; -} +}*/ bool Core_0ClipBoardCopy(const char *szStr) { @@ -144,7 +144,7 @@ bool Core_0IsProcessRun(const char* process) } } -void Core_0Create(const char* name, bool is_unic) +void Core_0Create(const char* name, const char *szNameConsole, bool is_unic) { if(name && strlen(name) > 1) { @@ -159,7 +159,7 @@ void Core_0Create(const char* name, bool is_unic) } } strcpy(g_szCoreName, name); - ConsoleConnect(); + ConsoleConnect(szNameConsole); ConsoleRegisterCmds(); g_pTaskManager = new CTaskManager(); g_pTimers = new CTimeManager(); diff --git a/source/core/sxcore.h b/source/core/sxcore.h index 07400a220434908a592eacfc4ce5a7028e319c89..14bdc6f96d3320831b3afa17cc8464ff910a5f1e 100644 --- a/source/core/sxcore.h +++ b/source/core/sxcore.h @@ -59,17 +59,11 @@ enum CORE_TASK_FLAG SX_LIB_API long Core_0GetVersion(); //! создание нового ядра, name - имя, is_unic - должно ли имя ядра быть уникальным -SX_LIB_API void Core_0Create(const char *szName, bool isUnic = true); +SX_LIB_API void Core_0Create(const char *szName, const char *szNameConsole, bool isUnic = true); //! установка своего обработчика вывода отладочной информации SX_LIB_API void Core_Dbg_Set(report_func rf); -//! существует ли файл -SX_LIB_API bool Core_0FileExists(const char *szPath); - -//! возвращает время последнего изменения файла -SX_LIB_API UINT Core_0GetTimeLastModify(const char *szPath); - //! копирует строку в буфер обмена SX_LIB_API bool Core_0ClipBoardCopy(const char *szStr); diff --git a/source/game/BaseTool.cpp b/source/game/BaseTool.cpp index af21ecfa2080fd9e6ab7b0813c2fdb2d1be5f8ed..02b8fd35113a770054548c8f670a8acfa69a7513 100644 --- a/source/game/BaseTool.cpp +++ b/source/game/BaseTool.cpp @@ -87,11 +87,11 @@ void CBaseTool::onPostLoad() if(m_szPrimaryActionSound[0]) { - m_iSoundAction1 = SSCore_SndCreate3dInst(m_szPrimaryActionSound, false, 0, 100); + m_iSoundAction1 = SSCore_SndCreate3dInst(m_szPrimaryActionSound, SX_SOUND_CHANNEL_GAME, 100); } if(m_szSecondaryActionSound[0]) { - m_iSoundAction2 = SSCore_SndCreate3dInst(m_szSecondaryActionSound, false, 0, 100); + m_iSoundAction2 = SSCore_SndCreate3dInst(m_szSecondaryActionSound, SX_SOUND_CHANNEL_GAME, 100); } if(m_szPrimaryActionMuzzleflash[0]) { @@ -125,7 +125,7 @@ void CBaseTool::primaryAction(BOOL st) } if(ID_VALID(m_iSoundAction1)) { - SSCore_SndInstancePlay3d(m_iSoundAction1, &getPos()); + SSCore_SndInstancePlay3d(m_iSoundAction1, false, false, &getPos()); } //((CPlayer*)m_pOwner)->is diff --git a/source/game/BaseWeapon.cpp b/source/game/BaseWeapon.cpp index cd5fcca5cf68ffc506315b3397a4f683aad93982..6bb81c0443d2f7e079fd8a04161ddfc1ac10ad9a 100644 --- a/source/game/BaseWeapon.cpp +++ b/source/game/BaseWeapon.cpp @@ -136,27 +136,27 @@ void CBaseWeapon::onPostLoad() if(m_szSndDraw[0]) { - m_idSndDraw = SSCore_SndCreate3dInst(m_szSndDraw, false, 0, 100); + m_idSndDraw = SSCore_SndCreate3dInst(m_szSndDraw, SX_SOUND_CHANNEL_GAME, 100); } if(m_szSndHolster[0]) { - m_idSndHolster = SSCore_SndCreate3dInst(m_szSndHolster, false, 0, 100); + m_idSndHolster = SSCore_SndCreate3dInst(m_szSndHolster, SX_SOUND_CHANNEL_GAME, 100); } if(m_szSndShoot[0]) { - m_idSndShoot = SSCore_SndCreate3dInst(m_szSndShoot, false, 0, 100); + m_idSndShoot = SSCore_SndCreate3dInst(m_szSndShoot, SX_SOUND_CHANNEL_GAME, 100); } if(m_szSndEmpty[0]) { - m_idSndEmpty = SSCore_SndCreate3dInst(m_szSndEmpty, false, 0, 100); + m_idSndEmpty = SSCore_SndCreate3dInst(m_szSndEmpty, SX_SOUND_CHANNEL_GAME, 100); } if(m_szSndReload[0]) { - m_idSndReload = SSCore_SndCreate3dInst(m_szSndReload, false, 0, 100); + m_idSndReload = SSCore_SndCreate3dInst(m_szSndReload, SX_SOUND_CHANNEL_GAME, 100); } if(m_szSndSwitch[0]) { - m_idSndSwitch = SSCore_SndCreate3dInst(m_szSndSwitch, false, 0, 100); + m_idSndSwitch = SSCore_SndCreate3dInst(m_szSndSwitch, SX_SOUND_CHANNEL_GAME, 100); } } @@ -212,7 +212,7 @@ void CBaseWeapon::primaryAction(BOOL st) { m_bInPrimaryAction = true; switch(m_fireMode) - { + { case FIRE_MODE_BURST: m_idTaskShoot = SET_INTERVAL(taskShoot, 60.0f / (float)m_iBurstRate); break; @@ -223,14 +223,14 @@ void CBaseWeapon::primaryAction(BOOL st) case FIRE_MODE_SINGLE: setNextUse(60.0f / (float)m_iSingleRate); break; - } + } taskShoot(0.0f); } } else - { - if(m_fireMode != FIRE_MODE_CUTOFF) { + if(m_fireMode != FIRE_MODE_CUTOFF) + { if(ID_VALID(m_idTaskShoot)) { CLEAR_INTERVAL(m_idTaskShoot); @@ -280,7 +280,7 @@ void CBaseWeapon::reload() count -= m_iCurrentLoad; m_pMag->load(count); - setNextUse(m_fReloadTime); + setNextUse(m_fReloadTime); playAnimation(isFast ? "reload_fast" : "reload"); if(isFast) { @@ -291,12 +291,12 @@ void CBaseWeapon::reload() } else { - if(ID_VALID(m_idSndReload)) - { - SSCore_SndInstancePlay3d(m_idSndReload, &getPos()); - } - } + if(ID_VALID(m_idSndReload)) + { + SSCore_SndInstancePlay3d(m_idSndReload, false, false, &getPos()); } + } +} else { printf(COLOR_MAGENTA "No more bullets!\n" COLOR_RESET); @@ -312,7 +312,7 @@ void CBaseWeapon::setFireMode(FIRE_MODE mode) m_fireMode = mode; if(ID_VALID(m_idSndSwitch)) { - SSCore_SndInstancePlay3d(m_idSndSwitch, &getPos()); + SSCore_SndInstancePlay3d(m_idSndSwitch, false, false, &getPos()); } } } @@ -444,7 +444,7 @@ void CBaseWeapon::taskShoot(float dt) { if(ID_VALID(m_idSndEmpty)) { - SSCore_SndInstancePlay3d(m_idSndEmpty, &getPos()); + SSCore_SndInstancePlay3d(m_idSndEmpty, false, false, &getPos()); } if(ID_VALID(m_idTaskShoot)) { @@ -462,7 +462,7 @@ void CBaseWeapon::taskShoot(float dt) } if(ID_VALID(m_idSndShoot)) { - SSCore_SndInstancePlay3d(m_idSndShoot, &getPos()); + SSCore_SndInstancePlay3d(m_idSndShoot, false, false, &getPos()); } //((CPlayer*)m_pOwner)->is diff --git a/source/game/GameData.cpp b/source/game/GameData.cpp index 05a35686eaddba1d4f2daa383543f907bc81284d..a0f27ee6c387441a36ec8401725f1872ea81e1a2 100644 --- a/source/game/GameData.cpp +++ b/source/game/GameData.cpp @@ -133,7 +133,7 @@ void GameData::playFootstepSound(MTLTYPE_PHYSIC mtl_type, const float3 &f3Pos) return; } ID idSound = m_pidFootstepSound[mtl_type][rand() % iCount]; - SSCore_SndInstancePlay3d(idSound, (float3*)&f3Pos); + SSCore_SndInstancePlay3d(idSound, false, false, (float3*)&f3Pos); } void GameData::loadFoostepsSounds() @@ -180,7 +180,7 @@ void GameData::loadFoostepsSounds() m_pidFootstepSound[i] = jl ? new ID[jl] : NULL; for(int j = 0; j < jl; ++j) { - m_pidFootstepSound[i][j] = SSCore_SndCreate3dInst(paSounds[0][j], false, 0, 100); + m_pidFootstepSound[i][j] = SSCore_SndCreate3dInst(paSounds[0][j], SX_SOUND_CHANNEL_GAME, 100); } } } diff --git a/source/game/NPCZombie.cpp b/source/game/NPCZombie.cpp index 560ff74aa3b616053cf47d7355d236012e431ec4..e9e647b0e4ab9e989c328f220b64425a6a9c3f9d 100644 --- a/source/game/NPCZombie.cpp +++ b/source/game/NPCZombie.cpp @@ -24,9 +24,9 @@ CNPCZombie::CNPCZombie(CEntityManager * pMgr) : m_fSpeedWalk = 0.07f; m_fSpeedRun = 0.12f; - m_idSndIdle = SSCore_SndCreate3d("mobs/zombie/zombie_idle_16.ogg", false, 0, 30); - m_idSndIdle2 = SSCore_SndCreate3d("mobs/zombie/zombie_idle_17.ogg", false, 0, 30); - m_idSndDeath = SSCore_SndCreate3d("mobs/zombie/zombie_die_1.ogg", false, 0, 45); + m_idSndIdle = SSCore_SndCreate3d("mobs/zombie/zombie_idle_16.ogg", SX_SOUND_CHANNEL_GAME, 0, 30); + m_idSndIdle2 = SSCore_SndCreate3d("mobs/zombie/zombie_idle_17.ogg", SX_SOUND_CHANNEL_GAME, 0, 30); + m_idSndDeath = SSCore_SndCreate3d("mobs/zombie/zombie_die_1.ogg", SX_SOUND_CHANNEL_GAME, 0, 45); } CNPCZombie::~CNPCZombie() @@ -38,9 +38,9 @@ void CNPCZombie::onSync() { BaseClass::onSync(); - SSCore_SndPosWSet(m_idSndIdle, &getPos()); - SSCore_SndPosWSet(m_idSndIdle2, &getPos()); - SSCore_SndPosWSet(m_idSndDeath, &getPos()); + SSCore_SndSetPosWorld(m_idSndIdle, &getPos()); + SSCore_SndSetPosWorld(m_idSndIdle2, &getPos()); + SSCore_SndSetPosWorld(m_idSndDeath, &getPos()); //если здоровье меньше нуля if (m_fHealth < 0.0f) @@ -106,9 +106,9 @@ void CNPCZombie::randWalk() m_stateMove = NPC_STATE_MOVE_WALK; else if (m_stateMove != NPC_STATE_MOVE_IDLE) { - if (!playingAnimations("reload")) + if (!playingAnimations("walk0")) { - playAnimation("reload"); + playAnimation("walk0"); SSCore_SndPlay(m_idSndIdle2); } diff --git a/source/gcore/LoaderTextures.cpp b/source/gcore/LoaderTextures.cpp index 9af887772e2cb26994bf10cdb9685e8e4c2ca847..a3dbba57ad95567091458ab0b988f6621a21332e 100644 --- a/source/gcore/LoaderTextures.cpp +++ b/source/gcore/LoaderTextures.cpp @@ -53,7 +53,7 @@ bool LoaderTextures::FileExists(const char* name) } sprintf(tmppath, "%s%s\\%s", Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), tmp_path, name); - return Core_0FileExists(tmppath); + return FileExistsFile(tmppath); } void LoaderTextures::ClearLoaded() diff --git a/source/gcore/LoaderTextures.h b/source/gcore/LoaderTextures.h index a33cef978fb39bcccf1174873ebfac043465a107..10619669de54a507933871a945b05c178a12f93c 100644 --- a/source/gcore/LoaderTextures.h +++ b/source/gcore/LoaderTextures.h @@ -11,6 +11,7 @@ See the license in LICENSE #include <d3d9.h> #include <common/array.h> #include <common/String.h> +#include <common/file_utils.h> #include "sxgcore.h" void LibReport(int iLevel, const char *szFormat, ...); diff --git a/source/gcore/loader_static.cpp b/source/gcore/loader_static.cpp index 7764729b0fb0432a0473979b0bea17bfa58343ea..564e9f4cf403321dab81df0ac8d5408d75eee972 100644 --- a/source/gcore/loader_static.cpp +++ b/source/gcore/loader_static.cpp @@ -16,6 +16,317 @@ IDirect3DVertexDeclaration9* SGCore_StaticModelGetDecl() return g_pStaticVertexDecl; } +bool SGCore_DSE_IsDSE(const char *szPath) +{ + FILE * pf = fopen(szPath, "rb"); + if (!pf) + return false; + + ModelHeader header; + + fread(&header, sizeof(ModelHeader), 1, pf); + fclose(pf); + + if (header.Magick != SX_MODEL_MAGICK) + return false; + + if (!(header.iVersion == SX_MODEL_VERSION_OLD || header.iVersion == SX_MODEL_VERSION)) + return false; + + return true; +} + +SX_LIB_API bool SGCore_DSE_IsModel(const char *szPath) +{ + FILE * pf = fopen(szPath, "rb"); + if (!pf) + return false; + + ModelHeader header; + + fread(&header, sizeof(ModelHeader), 1, pf); + fclose(pf); + + if (header.Magick != SX_MODEL_MAGICK) + return false; + + if (!(header.iVersion == SX_MODEL_VERSION_OLD || header.iVersion == SX_MODEL_VERSION)) + return false; + + return !(header.iFlags & MODEL_FLAG_SOURCE_ANIMATION); +} + + +SX_LIB_API bool SGCore_DSE_IsAnimation(const char *szPath) +{ + FILE * pf = fopen(szPath, "rb"); + if (!pf) + return false; + + ModelHeader header; + + fread(&header, sizeof(ModelHeader), 1, pf); + fclose(pf); + + if (header.Magick != SX_MODEL_MAGICK) + return false; + + if (!(header.iVersion == SX_MODEL_VERSION_OLD || header.iVersion == SX_MODEL_VERSION)) + return false; + + return (header.iFlags & MODEL_FLAG_SOURCE_ANIMATION); +} + +SX_LIB_API bool SGCore_DSEgetInfo(const char *szPath, CDSEinfo *pInfo) +{ + FILE * pf = fopen(szPath, "rb"); + if (!pf) + return false; + + ModelHeader header; + + fread(&header, sizeof(ModelHeader), 1, pf); + + if (header.Magick != SX_MODEL_MAGICK) + { + fclose(pf); + return false; + } + + if (!(header.iVersion == SX_MODEL_VERSION_OLD || header.iVersion == SX_MODEL_VERSION)) + { + fclose(pf); + return false; + } + + pInfo->iVersion = header.iVersion; + pInfo->iCountSkin = header.iSkinCount; + pInfo->iCountSubsets = header.iMaterialCount; + pInfo->iCountBone = header.iBoneCount; + pInfo->iCountAnimation = header.iAnimationCount; + + fseek(pf, header.iSecondHeaderOffset, SEEK_SET); + + ModelHeader2 header2; + fread(&header2, sizeof(ModelHeader2), 1, pf); + + pInfo->iCountHitbox = header2.iHitboxCount; + + //���� ���� ��� �������� + if (header.iFlags & MODEL_FLAG_SOURCE_ANIMATION) + { + fclose(pf); + pInfo->type = DSE_TYPE_ANIMATION; + return true; + } + + + if (header.iFlags & MODEL_FLAG_STATIC) + pInfo->type = DSE_TYPE_STATIC; + else if (header.iFlags & MODEL_FLAG_COMPILED || header.iFlags & MODEL_FLAG_SOURCE_MESH) + pInfo->type = DSE_TYPE_ANIM_MESH; + else + { + // ��� �����? + } + + + if (header.iVersion == SX_MODEL_VERSION_OLD) + { + if (header.iMaterialsOffset) + { + fseek(pf, header.iMaterialsOffset, SEEK_SET); + for (int i = 0; i < header.iMaterialCount; i++) + { + char c; + while (c = getc(pf)) + { + + } + } + } + + if (header.iFlags & (MODEL_FLAG_SOURCE_MESH | MODEL_FLAG_COMPILED)) + { + ModelLoD lh; + + fread(&lh.iSubMeshCount, sizeof(int), 1, pf); + lh.pSubLODmeshes = new ModelLoDSubset[lh.iSubMeshCount]; + + int iVC = 0; + int iIC = 0; + float3 vMin, vMax; + + for (int i = 0; i < lh.iSubMeshCount; i++) + { + fread(&lh.pSubLODmeshes[i].iMaterialID, sizeof(int), 1, pf); + fread(&lh.pSubLODmeshes[i].iVectexCount, sizeof(int), 1, pf); + fread(&lh.pSubLODmeshes[i].iIndexCount, sizeof(int), 1, pf); + lh.pSubLODmeshes[i].pVertices = new vertex_animated_ex[lh.pSubLODmeshes[i].iVectexCount]; + lh.pSubLODmeshes[i].pIndices = new UINT[lh.pSubLODmeshes[i].iIndexCount]; + fread(lh.pSubLODmeshes[i].pVertices, sizeof(vertex_animated_ex), lh.pSubLODmeshes[i].iVectexCount, pf); + fread(lh.pSubLODmeshes[i].pIndices, sizeof(UINT), lh.pSubLODmeshes[i].iIndexCount, pf); + + iVC += lh.pSubLODmeshes[i].iVectexCount; + iIC += lh.pSubLODmeshes[i].iIndexCount; + + vertex_animated_ex* pArrVertex = (vertex_animated_ex*)lh.pSubLODmeshes[i].pVertices; + + if (i == 0) + { + vMin = pArrVertex[0].Pos; + vMax = pArrVertex[0].Pos; + } + + for (int k = 0; k < lh.pSubLODmeshes[i].iVectexCount; ++k) + { + if (pArrVertex[k].Pos.x > vMax.x) + vMax.x = pArrVertex[k].Pos.x; + + if (pArrVertex[k].Pos.y > vMax.y) + vMax.y = pArrVertex[k].Pos.y; + + if (pArrVertex[k].Pos.z > vMax.z) + vMax.z = pArrVertex[k].Pos.z; + + + if (pArrVertex[k].Pos.x < vMin.x) + vMin.x = pArrVertex[k].Pos.x; + + if (pArrVertex[k].Pos.y < vMin.y) + vMin.y = pArrVertex[k].Pos.y; + + if (pArrVertex[k].Pos.z < vMin.z) + vMin.z = pArrVertex[k].Pos.z; + } + } + + pInfo->iCountVertex = iVC; + pInfo->iCountIndex = iIC; + pInfo->vDimensions = float3_t(vMax - vMin); + pInfo->vCenter = float3_t((vMax + vMin) * 0.5f); + + for (int i = 0; i < lh.iSubMeshCount; i++) + { + mem_delete_a(lh.pSubLODmeshes[i].pVertices); + mem_delete_a(lh.pSubLODmeshes[i].pIndices); + } + + mem_delete_a(lh.pSubLODmeshes); + } + } + else if (header.iVersion == SX_MODEL_VERSION) + { + if (header.iMaterialsOffset) + { + fseek(pf, header.iMaterialsOffset, SEEK_SET); + fseek(pf, header.iMaterialCount * MODEL_MAX_NAME, SEEK_CUR); + } + + ModelLoD *m_pLods; + if (header.iLODcount && header.iLODoffset) + { + + fseek(pf, header.iLODoffset, SEEK_SET); + + m_pLods = new ModelLoD[header.iLODcount]; + + for (int i = 0; i < header.iLODcount; i++) + { + fread(&m_pLods[i], MODEL_LOD_STRUCT_SIZE, 1, pf); + int iVC = 0; + int iIC = 0; + float3 vMin, vMax; + + m_pLods[i].pSubLODmeshes = new ModelLoDSubset[m_pLods[i].iSubMeshCount]; + for (int j = 0; j < m_pLods[i].iSubMeshCount; j++) + { + + fread(&m_pLods[i].pSubLODmeshes[j].iMaterialID, sizeof(int), 1, pf); + fread(&m_pLods[i].pSubLODmeshes[j].iVectexCount, sizeof(int), 1, pf); + fread(&m_pLods[i].pSubLODmeshes[j].iIndexCount, sizeof(int), 1, pf); + + if (header.iFlags & MODEL_FLAG_STATIC) + m_pLods[i].pSubLODmeshes[j].pVertices = new vertex_static[m_pLods[i].pSubLODmeshes[j].iVectexCount]; + else + m_pLods[i].pSubLODmeshes[j].pVertices = new vertex_animated[m_pLods[i].pSubLODmeshes[j].iVectexCount]; + + m_pLods[i].pSubLODmeshes[j].pIndices = new UINT[m_pLods[i].pSubLODmeshes[j].iIndexCount]; + + if (header.iFlags & MODEL_FLAG_STATIC) + fread(m_pLods[i].pSubLODmeshes[j].pVertices, sizeof(vertex_static), m_pLods[i].pSubLODmeshes[j].iVectexCount, pf); + else + fread(m_pLods[i].pSubLODmeshes[j].pVertices, sizeof(vertex_animated), m_pLods[i].pSubLODmeshes[j].iVectexCount, pf); + + fread(m_pLods[i].pSubLODmeshes[j].pIndices, sizeof(UINT), m_pLods[i].pSubLODmeshes[j].iIndexCount, pf); + + iVC += m_pLods[i].pSubLODmeshes[j].iVectexCount; + iIC += m_pLods[i].pSubLODmeshes[j].iIndexCount; + + + if (j == 0) + { + vMin = *(float3_t*)(m_pLods[i].pSubLODmeshes[j].pVertices); + vMax = *(float3_t*)(m_pLods[i].pSubLODmeshes[j].pVertices); + } + + float3_t vPos; + int iSizeVertex = sizeof(vertex_animated); + + if (header.iFlags & MODEL_FLAG_STATIC) + iSizeVertex = sizeof(vertex_static); + + for (int k = 0; k < m_pLods[i].pSubLODmeshes[j].iVectexCount; ++k) + { + vPos = *(float3_t*)(m_pLods[i].pSubLODmeshes[j].pVertices + k*iSizeVertex); + if (vPos.x > vMax.x) + vMax.x = vPos.x; + + if (vPos.y > vMax.y) + vMax.y = vPos.y; + + if (vPos.z > vMax.z) + vMax.z = vPos.z; + + + if (vPos.x < vMin.x) + vMin.x = vPos.x; + + if (vPos.y < vMin.y) + vMin.y = vPos.y; + + if (vPos.z < vMin.z) + vMin.z = vPos.z; + } + } + + if (i == 0) + { + pInfo->iCountVertex = iVC; + pInfo->iCountIndex = iIC; + pInfo->vDimensions = float3_t(vMax - vMin); + pInfo->vCenter = float3_t((vMax +vMin) * 0.5f); + } + } + } + + for (int i = 0; i < header.iLODcount; i++) + { + for (int j = 0; j < m_pLods[i].iSubMeshCount; j++) + { + mem_delete_a(m_pLods[i].pSubLODmeshes[j].pVertices); + mem_delete_a(m_pLods[i].pSubLODmeshes[j].pIndices); + } + mem_delete_a(m_pLods[i].pSubLODmeshes); + } + mem_delete(m_pLods); + } + + fclose(pf); + + return true; +} + void SGCore_StaticModelLoad(const char * file, ISXDataStaticModel** data) { if (!data) diff --git a/source/gcore/shader.cpp b/source/gcore/shader.cpp index e81b4e176584bb24b3b2a0db013b266ad4c7c9ab..fc0ab9c963889b137fd3acc7841eaeea61d82203 100644 --- a/source/gcore/shader.cpp +++ b/source/gcore/shader.cpp @@ -47,7 +47,7 @@ void SaveShaderFileCache(CShaderFileCache *pShaderFileCache) FILE *pFile = fopen(szFullPathCache, "wb"); - uint32_t tLastModify = Core_0GetTimeLastModify(szFullPath); + uint32_t tLastModify = FileGetTimeLastModify(szFullPath); fwrite(&tLastModify, sizeof(uint32_t), 1, pFile); @@ -105,7 +105,7 @@ void SaveShaderFileCache(CShaderFileCache *pShaderFileCache) CShaderFileCache* CreateShaderFileCacheFormFile(const char *szPath) { - if (!Core_0FileExists(szPath)) + if (!FileExistsFile(szPath)) return 0; CShaderFileCache *pSFC = new CShaderFileCache(); @@ -173,7 +173,7 @@ CShaderFileCache* CreateShaderFileCacheFormFile(const char *szPath) uint32_t GetTimeShaderFileCache(const char *szPath) { - if (!Core_0FileExists(szPath)) + if (!FileExistsFile(szPath)) return 0; FILE *pFile = fopen(szPath, "rb"); @@ -207,7 +207,7 @@ void LoadVertexShader(const char *szPath, CShaderVS *pShader, D3DXMACRO *aMacro) } #ifndef _DEBUG - if (Core_0FileExists(szFullPathCache) && GetTimeShaderFileCache(szFullPathCache) == Core_0GetTimeLastModify(szFullPath)) + if (FileExistsFile(szFullPathCache) && GetTimeShaderFileCache(szFullPathCache) == FileGetTimeLastModify(szFullPath)) { CShaderFileCache *pSFC = CreateShaderFileCacheFormFile(szFullPathCache); @@ -325,7 +325,7 @@ void LoadPixelShader(const char *szPath, CShaderPS *pShader,D3DXMACRO *aMacro) } #ifndef _DEBUG - if (Core_0FileExists(szFullPathCache) && GetTimeShaderFileCache(szFullPathCache) == Core_0GetTimeLastModify(szFullPath)) + if (FileExistsFile(szFullPathCache) && GetTimeShaderFileCache(szFullPathCache) == FileGetTimeLastModify(szFullPath)) { CShaderFileCache *pSFC = CreateShaderFileCacheFormFile(szFullPathCache); @@ -540,7 +540,7 @@ bool CShaderManager::existsFile(const char *szPath) else sprintf(tmppath, "%s%s", Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), szPath); - return Core_0FileExists(tmppath); + return FileExistsFile(tmppath); } ID CShaderManager::preLoad(SHADER_TYPE type, const char *szPath, const char *szName, SHADER_CHECKDOUBLE check_double, D3DXMACRO *aMacros) @@ -616,6 +616,7 @@ void CShaderManager::allLoad() if (m_aVS.size() == m_iLastAllLoadVS || m_aPS.size() == m_iLastAllLoadPS) return; + DWORD dwTime = GetTickCount(); LibReport(REPORT_MSG_LEVEL_NOTICE, "load shaders ...\n"); for (int i = 0, il = m_aVS.size(); i < il; ++i) @@ -639,7 +640,7 @@ void CShaderManager::allLoad() m_iLastAllLoadVS = m_aVS.size(); m_iLastAllLoadPS = m_aPS.size(); - LibReport(REPORT_MSG_LEVEL_NOTICE, "all loaded shaders\n"); + LibReport(REPORT_MSG_LEVEL_NOTICE, "all loaded shaders, time %d\n", GetTickCount() - dwTime); } void CShaderManager::update(SHADER_TYPE type_shader, const char *szName) @@ -1080,7 +1081,7 @@ void CShaderManager::getPath(SHADER_TYPE type_shader, ID idShader, char *szPath) { if (idShader < m_aVS.size()) { - if (m_aVS[idShader]->m_pVertexShader) + //if (m_aVS[idShader]->m_pVertexShader) sprintf(szPath, "%s", m_aVS[idShader]->m_szPath); } } @@ -1088,7 +1089,7 @@ void CShaderManager::getPath(SHADER_TYPE type_shader, ID idShader, char *szPath) { if (idShader < m_aPS.size()) { - if (m_aPS[idShader]->m_pPixelShader) + //if (m_aPS[idShader]->m_pPixelShader) sprintf(szPath, "%s", m_aPS[idShader]->m_szPath); } } diff --git a/source/gcore/shader.h b/source/gcore/shader.h index b3f10bfe2ad056c9e14c46950b0fcb9499752361..dcbc07884e2f6b8b8f96b9d2621eeb7e8e89f1c6 100644 --- a/source/gcore/shader.h +++ b/source/gcore/shader.h @@ -16,6 +16,7 @@ See the license in LICENSE #include <d3d9.h> #include <common/array.h> #include <common/String.h> +#include <common/file_utils.h> #include "sxgcore.h" extern IDirect3DDevice9 *g_pDXDevice; diff --git a/source/gcore/sxgcore.cpp b/source/gcore/sxgcore.cpp index 6905957b693718b6a79b03aa8f86a5afef227317..01ed825cc6c21edbc6be29c7f49b33b52b5cdd58 100644 --- a/source/gcore/sxgcore.cpp +++ b/source/gcore/sxgcore.cpp @@ -457,7 +457,7 @@ SX_LIB_API ID SGCore_ShaderLoad(SHADER_TYPE type_shader, const char *szPath, con SX_LIB_API void SGCore_ShaderAllLoad() { - SG_PRECOND(); + SG_PRECOND(_VOID); return g_pManagerShaders->allLoad(); } diff --git a/source/gcore/sxgcore.h b/source/gcore/sxgcore.h index 882e36ed389e8fcadcf646a29efd033a00cbf4f7..96e421d250ea65732b6658613da107ee777be587 100644 --- a/source/gcore/sxgcore.h +++ b/source/gcore/sxgcore.h @@ -1,1134 +1,1196 @@ - -/*********************************************************** -Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 -See the license in LICENSE -***********************************************************/ - -/*! -\file -Заголовочный файл sxgcore - графического ядра (переопределяемые функции, шейдеры, загружаемые текстуры, render targets, ограничиваюий объем, камера, статическая модель dse формата, skybox, skyclouds) -*/ - -/*! \defgroup sxgcore sxgcore - графическое ядро, использует технологии DirectX 9 -@{ -*/ - -#ifndef __SXGCORE_H -#define __SXGCORE_H - -#include <GRegisterIndex.h> - -#include <d3d9.h> -#include <d3dx9.h> - -#if defined(_DEBUG) -#pragma comment(lib, "sxcore_d.lib") -#else -#pragma comment(lib, "sxcore.lib") -#endif - -#undef SX_LIB_API -#define SX_LIB_API extern "C" __declspec (dllimport) -#include <core/sxcore.h> - -#ifdef SX_DLL -#undef SX_LIB_API -#define SX_LIB_API extern "C" __declspec (dllexport) -#endif - -#include <gdefines.h> - -#pragma comment(lib, "d3d9.lib") -#pragma comment(lib, "DxErr9.lib") -#pragma comment(lib, "d3dx9.lib") - -#include <gcore/ModelFile.h> - + +/*********************************************************** +Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +/*! +\file +Заголовочный файл sxgcore - графического ядра (переопределяемые функции, шейдеры, загружаемые текстуры, render targets, ограничиваюий объем, камера, статическая модель dse формата, skybox, skyclouds) +*/ + +/*! \defgroup sxgcore sxgcore - графическое ядро, использует технологии DirectX 9 +@{ +*/ + +#ifndef __SXGCORE_H +#define __SXGCORE_H + +#include <GRegisterIndex.h> + +#include <d3d9.h> +#include <d3dx9.h> + +#if defined(_DEBUG) +#pragma comment(lib, "sxcore_d.lib") +#else +#pragma comment(lib, "sxcore.lib") +#endif + +#undef SX_LIB_API +#define SX_LIB_API extern "C" __declspec (dllimport) +#include <core/sxcore.h> + +#ifdef SX_DLL +#undef SX_LIB_API +#define SX_LIB_API extern "C" __declspec (dllexport) +#endif + +#include <gdefines.h> + +#pragma comment(lib, "d3d9.lib") +#pragma comment(lib, "DxErr9.lib") +#pragma comment(lib, "d3dx9.lib") + +#include <gcore/ModelFile.h> + //флаги компиляции шейдеров #define SHADER_DEBUG D3DXSHADER_DEBUG | D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY | D3DXSHADER_AVOID_FLOW_CONTROL | D3DXSHADER_SKIPOPTIMIZATION #define SHADER_RELEASE D3DXSHADER_OPTIMIZATION_LEVEL3 | D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY | D3DXSHADER_PARTIALPRECISION | D3DXSHADER_PREFER_FLOW_CONTROL - + //определяем флаг компилции шейдеров #if defined(DEBUG) || defined(_DEBUG) #define SHADER_FLAGS SHADER_DEBUG #else #define SHADER_FLAGS SHADER_RELEASE -#endif - -// -#define SXGC_ERR_NON_DETECTED_D3D -1 -#define SXGC_ERR_FAILED_INIT_D3D -2 - -//! \name Базовые функции библиотеки -//!@{ - -//! версия подсистемы -SX_LIB_API long SGCore_0GetVersion(); - -//! установка функции вывода сообщений -SX_LIB_API void SGCore_Dbg_Set(report_func fnReport); - -//! инициализация подсистемы -SX_LIB_API void SGCore_0Create( - const char *szName, //!< передваваемое имя подсистемы - HWND hWnd, //!< дескриптор окна в которое будет осуществляться рендер - int iWidth, //!< ширина области рендера - int iHeigth, //!< высота области рендера - bool isWindowed, //!< оконный режим использовать ли? иначе полноэкранный - DWORD dwFlags, //!< флаги создания устрайства (стандартные dx) - bool isUnic = true //!< должна ли подсистема быть уникальной на основе имени - ); - -//! уничтожение либы -SX_LIB_API void SGCore_AKill(); - -//! возвращает dx устройство -SX_LIB_API IDirect3DDevice9* SGCore_GetDXDevice(); - -//! возвращает массив всех доступных разрешений монитора, в iCount записывает размер массива -SX_LIB_API const DEVMODE* SGCore_GetModes(int *iCount); - -//!@} - -//############################################################################# - -/*! \name Отладочное сообщение в окне рендера - \note Графическое ядро предусматривает наличие текстового сообщения в окне рендера, которое формирует непосредственно сам программист и дает команду на его вывод -@{*/ - -/*!< размер отладочного сообщения, выводимого в окно рендера */ -#define SXGC_STR_SIZE_DBG_MSG 4096 - -/*! Вывод отладочного сообщения в окно рендера. -Аргументы аналогичны стандартным функциям типа printf. -*/ -SX_LIB_API void SGCore_DbgMsg(const char *szFormat, ...); - -//!@} - -//############################################################################# - -/*! \name Обработка потери/восстановления устройства - \warning Функции обработки потери/восстановления устройства обрабатывают ресурсы только в пределах данной библиотеки, другие библиотеки должны сами производить данную обработку! -!@{*/ - -//! вызывать при потере устройства -SX_LIB_API void SGCore_OnLostDevice(); - -//! вызывать при попытке сброса устройства -SX_LIB_API bool SGCore_OnDeviceReset( - int iWwidth, //!< новая ширина окна - int iHeigth, //!< новая выоста окна - bool isWindewed //!< true - оконный режим, false - полноэкранный - ); - -//! вызывать при сбросе устроства -SX_LIB_API void SGCore_OnResetDevice(); - -//! отрисовка full screen quad (уже смещенного как надо чтобы не было размытия) -SX_LIB_API void SGCore_ScreenQuadDraw(); - -//!@} - -//############################################################################# - -/*! \name Базовые функции установки настроек выборки из текстуры -id - идентификатор текстурного слота -value - для Filter D3DTEXTUREFILTERTYPE, для Address D3DTEXTUREADDRESS -@{*/ - -//! установка фильтрации для конкретного слота -SX_LIB_API void SGCore_SetSamplerFilter(DWORD dwNum, DWORD dwValue); - -//! установка фильтрации для набора слотов от begin_id до end_id -SX_LIB_API void SGCore_SetSamplerFilter2(DWORD dwNumStart, DWORD dwCount, DWORD dwValue); - - -//! установка адресации для конкретного слота -SX_LIB_API void SGCore_SetSamplerAddress(DWORD dwNum, DWORD dwValue); - -//! установка адресации для набора слотов от begin_id до end_id -SX_LIB_API void SGCore_SetSamplerAddress2(DWORD dwNumStart, DWORD dwCount, DWORD dwValue); - -//!@} - -//############################################################################# - -/*! \defgroup sxgcore_redefinition_func Переопределяемые функции - \ingroup sxgcore - \note sxgcore содержит базовые и необходимые функции для переопределения их пользователем, которые будут доступны из графического ядра в других библиотеках зависимых от графического ядра, но в тоже время, эти функции могут быть переопределены функциями из других библиотек. \n -Это обеспечивает централизованную обобщенную зависимость от самого графического ядра и исключает перекрестные зависимости библиотек между собой, позволяя программисту воздействовать на ценрт управления не из центра. \n -Переопределяемые функции могут быть переопределены во внутреннем состоянии, то есть функция обертка так и останется функцией оберткой только будет вызывать уже переопределенную функцию. \n -Переопределяемые функции изначально выполняют штатные действия исходя из их назначения, и могут вообще не переопределяться если так надо программисту, то есть необходимость в их переопределении исходит только от программиста. \n -@{*/ - -/*! \name Прототипы переопределяемых функций -@{*/ - -/*! draw indexed primitive, команда отрисовки. -Аналогична DrawIndexedPrimitive, в дополнение к DIP инкрементирует счетчик DIPов в int регистрах по индексу #G_RI_INT_COUNT_DIP, обнуление данных только на стороне приложения -*/ -typedef void(*g_func_dip) (UINT uiTypePrimitive, long lBaseVertexIndex, UINT uiMinVertexIndex, UINT uiNumVertices, UINT uiStartIndex, UINT uiPrimitiveCount); - -/*! установка материала id, world - мировая матрица. -По умолчанию установка текстуры в нулевой текстурный слот, id – идентификатор материала (по умолчанию - текстуры), world – матрица трансформации модели -*/ -typedef void(*g_func_mtl_set) (ID id, float4x4 *pWorld); - -/*! загрузка материала, szName - имя текстуры с расширением, iMtlType - тип материала на случай провала загрузки. -Загрузка материала (по умолчанию – текстуры) с именем name, iMtlType – типа материала, -будет задействован только в случае провала определения типа материала (по умолчанию не используется) - -тип стандартного материала будет определен на основании iMtlType, может принимать одно из значений MTL_TYPE_ -*/ -typedef ID(*g_func_mtl_load) (const char *szName, int iMtlType); - -//! получить сорт материала, по дефолту 0 -typedef int(*g_func_mtl_get_sort) (ID id); - -//! получить физический тип материала -typedef int(*g_func_mtl_get_physic_type)(ID id); - -//! рисовать ли подгруппы моделей данного материала раздельно? -typedef bool(*g_func_mtl_group_render_is_singly) (ID id); - -//!@} - -/*! \name Переопределяемые функции(переопределение реализации внутри) -!@{*/ - -//! \copydoc g_func_dip -SX_LIB_API void SGCore_DIP(UINT uiTypePrimitive, long lBaseVertexIndex, UINT uiMinVertexIndex, UINT uiNumVertices, UINT uiStartIndex, UINT uiPrimitiveCount); - -//! \copydoc g_func_mtl_set -SX_LIB_API void SGCore_MtlSet(ID id, float4x4 *pWorld); - -//! \copydoc g_func_mtl_load -SX_LIB_API ID SGCore_MtlLoad(const char *szName, int iMtlType); - -//! \copydoc g_func_mtl_get_sort -SX_LIB_API int SGCore_MtlGetSort(ID id); - -//! \copydoc g_func_mtl_get_physic_type -SX_LIB_API int SGCore_MtlGetPhysicType(ID id); - -//! \copydoc g_func_mtl_group_render_is_singly -SX_LIB_API bool SGCore_MtlGroupRenderIsSingly(ID id); - -//!@} - -//########################################################################## - -/*! \name Переопределение функций -!@{*/ - -//! переназначение g_func_dip -SX_LIB_API void SGCore_SetFunc_DIP(g_func_dip fnFunc); - -//! переназначение g_func_mtl_set -SX_LIB_API void SGCore_SetFunc_MtlSet(g_func_mtl_set fnFunc); - -//! переназначение g_func_mtl_load -SX_LIB_API void SGCore_SetFunc_MtlLoad(g_func_mtl_load fnFunc); - -//! переназначение g_func_mtl_get_sort -SX_LIB_API void SGCore_SetFunc_MtlGetSort(g_func_mtl_get_sort fnFunc); - -//! переназначение g_func_mtl_get_physic_type -SX_LIB_API void SGCore_SetFunc_MtlGetPhysicType(g_func_mtl_get_physic_type fnFunc); - -//! переназначение g_func_mtl_group_render_is_singly -SX_LIB_API void SGCore_SetFunc_MtlGroupRenderIsSingly(g_func_mtl_group_render_is_singly fnFunc); - -//!@} - -//!@} group sxgcore_redefinition_func - -//############################################################################# - -/*! \defgroup sxgcore_shaders Шейдеры - \ingroup sxgcore - \note Распознавание шейдеров (обращение через функции) происходит на основе идентификаторов представленных типом ID \n -Если речь идет об идентификации на основе имени то имя в данном случае эта та строка name которая была передана SGCore_ShaderLoad \n -Все шейдеры загружаются с версией 3.0 \n -Если имя шейдер не содержит нижний пробел (_) то значит шейдера находится в корне директории \n -Если шейдер содержит нижний пробел (_) то строка до первого нижнего проблема это имя папки в котором находится шейдер с целым именем \n -Пример: pp_shader.vs - лежит по загружаемому пути: /pp/pp_shader.vs -@{*/ - -/*! \name Ограничения на размеры -@{*/ - -//! максимальный размер имени директории (до _) -#define SXGC_SHADER_MAX_SIZE_DIR 64 - -//! максимальный размер имени с расширением (после _) -#define SXGC_SHADER_MAX_SIZE_NAME 64 - -//! общий максимальный размер имени текстуры с расширением -#define SXGC_SHADER_MAX_SIZE_DIRNAME SXGC_SHADER_MAX_SIZE_DIR + SXGC_SHADER_MAX_SIZE_NAME - -//! максимальный размер пути до файла шейдера (без имени файла) -#define SXGC_SHADER_MAX_SIZE_STDPATH 256 - -//! максимальный размер полного пути до шейдера (включая имя шейдера) -#define SXGC_SHADER_MAX_SIZE_FULLPATH SXGC_SHADER_MAX_SIZE_STDPATH + SXGC_SHADER_MAX_SIZE_DIRNAME - - -//! максимальная длина имени переменной в шейдере -#define SXGC_SHADER_VAR_MAX_SIZE 64 - -//! максимальное количество переменных в шейдере -#define SXGC_SHADER_VAR_MAX_COUNT 64 - -//! количество макросов в массиве макросов -#define SXGC_SHADER_COUNT_MACRO 12 - -//!@} - -//************************************************************************** - -//! типы шейдеров (int type_shader) -enum SHADER_TYPE -{ - SHADER_TYPE_VERTEX, //!< вершинный - SHADER_TYPE_PIXEL //!< пиксельный -}; - -//! типы проверок дубликатов шейдеров -enum SHADER_CHECKDOUBLE -{ - SHADER_CHECKDOUBLE_NONE, //!< нет проверки - SHADER_CHECKDOUBLE_PATH, //!< проверка по пути (имени шейдера с расширением) - SHADER_CHECKDOUBLE_NAME //!< проверка по пользовательскому имени -}; - -//************************************************************************** - -//! загрузить все шейдеры поставленные в очередь -SX_LIB_API void SGCore_ShaderAllLoad(); - -//! поставить шейдер в очередь загрузки -SX_LIB_API ID SGCore_ShaderLoad( - SHADER_TYPE type_shader, //!< тип шейдера - const char *szPath, //!< имя файла шейдера с расширением - const char *szName, //!< имя шейдера которое присвоится при загрузке - SHADER_CHECKDOUBLE check_double,//!< проверять ли на уникальность - D3DXMACRO *pMacro = 0 //!< макросы - ); - -//! существует ли файл name в папке с шейдерами -SX_LIB_API bool SGCore_ShaderFileExists(const char *szName); - -//! записывает пользовательское имя шейдера в name -SX_LIB_API void SGCore_ShaderGetName(SHADER_TYPE type_shader, ID idShader, char *szName); - -//! записывает имя шейдер с расширением в path -SX_LIB_API void SGCore_ShaderGetPath(SHADER_TYPE type_shader, ID idShader, char *szPath); - -//! существует ли шейдер с пользовательским именем name, если да то возвращает id -SX_LIB_API ID SGCore_ShaderExistsName(SHADER_TYPE type_shader, const char *szName); - -//! существует ли шейдер с именем файла и расширением name, если да то возвращает id -SX_LIB_API ID SGCore_ShaderExistsPath(SHADER_TYPE type_shader, const char *szPath); - -//! загружен ли шейдер с данным id -SX_LIB_API bool SGCore_ShaderIsValidated(SHADER_TYPE type_shader, ID idShader); - - -//! обновление шейдера по имени -SX_LIB_API void SGCore_ShaderUpdateN(SHADER_TYPE type_shader, const char *szName); - -//! обновление шейдера по id -SX_LIB_API void SGCore_ShaderUpdate(SHADER_TYPE type_shader, ID idShader); - -//! перезагрузить все шейдеры, с учетом макросов -SX_LIB_API void SGCore_ShaderReloadAll(); - - -//! получить идентификатор шейдера по имени -SX_LIB_API ID SGCore_ShaderGetID(SHADER_TYPE type_shader, const char *szName); - -//! бинд шейдера по имени -SX_LIB_API void SGCore_ShaderBindN(SHADER_TYPE type_shader, const char *szName); - -//! бинд шейдера по id -SX_LIB_API void SGCore_ShaderBind(SHADER_TYPE type_shader, ID idShader); - - -//! обнуление биндов шейдеров -SX_LIB_API void SGCore_ShaderUnBind(); - -//************************************************************************** - -/*! \name Передача данных в шейдер -@{*/ - -//! передача float значений в шейдер по имени -SX_LIB_API void SGCore_ShaderSetVRFN( - SHADER_TYPE type_shader, //!< тип шейдера из #SHADER_TYPE - const char *szNameShader, //!< пользовательское имя шейдера - const char *szNameVar, //!< имя переменной которой присваивается значение - void *pData, //!< указатель на массив данных - int iCountFloat4 = 0 //!< количество float4 значений в передаваемом массиве, если меньше одного значит количество будет взято из шейдера - ); - -//! передача float значений в шейдер по ID -SX_LIB_API void SGCore_ShaderSetVRF( - SHADER_TYPE type_shader, //!< тип шейдера из #SHADER_TYPE - ID idShader, //!< идентификатор шейдера - const char *szNameVar, //!< имя переменной которой присваивается значение - void *pData, //!< указатель на массив данных - int iCountFloat4 = 0 //!< количество float4 значений в передаваемом массиве, если меньше одного значит количество будет взято из шейдера - ); - -//! передача int значений в шейдер по имени -SX_LIB_API void SGCore_ShaderSetVRIN( - SHADER_TYPE type_shader, //!< тип шейдера из #SHADER_TYPE - const char *szNameShader, //!< пользовательское имя шейдера - const char *szNameVar, //!< имя переменной которой присваивается значение - void *pData, //!< указатель на массив данных - int iCountInt4 = 0 //!< количество int4 значений в передаваемом массиве, если меньше одного значит количество будет взято из шейдера - ); - -//! передача int значений в шейдер по ID -SX_LIB_API void SGCore_ShaderSetVRI( - SHADER_TYPE type_shader, //!< тип шейдера из #SHADER_TYPE - ID idShader, //!< идентификатор шейдера - const char *szNameVar, //!< имя переменной которой присваивается значение - void *pData, //!< указатель на массив данных - int iCountInt4 = 0 //!< количество int4 значений в передаваемом массиве, если меньше одного значит количество будет взято из шейдера - ); - -//!@} -//!@} sxgcore_shaders - -//############################################################################# - -/*! \defgroup sxgcore_loadtex Загружаемые текстуры - \ingroup sxgcore - \note Распознавание текстур (обращение через функции) происходит на основе идентификаторов представленных типом ID. \n -Имя текстуры обязательно долно содержать нижний пробел (_), строка до первого нижнего проблема это имя папки в котором находится текстура с целым именем. \n -Например: mtl_tex.dds - лежит по загружаемому пути: /mtl/mtl_tex.dds -@{*/ - -/*! \name Ограничения на размеры -@{*/ - -//! максимальный размер имени директории (до _) -#define SXGC_LOADTEX_MAX_SIZE_DIR 64 - -//! максимальный размер имени с расширением (после _) -#define SXGC_LOADTEX_MAX_SIZE_NAME 64 - -//! общий максимальный размер имени текстуры с расширением -#define SXGC_LOADTEX_MAX_SIZE_DIRNAME SXGC_LOADTEX_MAX_SIZE_DIR + SXGC_LOADTEX_MAX_SIZE_NAME - -//! максимальный размер пути до файла текстуры (без имени файла) -#define SXGC_LOADTEX_MAX_SIZE_STDPATH 256 - -//! максимальный размер полного пути до текстуры (включая имя текстуры) -#define SXGC_LOADTEX_MAX_SIZE_FULLPATH SXGC_LOADTEX_MAX_SIZE_STDPATH + SXGC_LOADTEX_MAX_SIZE_DIRNAME - - -//! количество mipmap уровней в загружаемых текстурах -#define SXGC_LOADTEX_COUNT_MIPMAP 5 - -/*! формат в который будут преобразованы загружаемые текстуры - \warning если установить формат со сжатием то необходимо следовать всем правилам оформления текстур для данного формата -*/ -#define SXGC_LOADTEX_FORMAT_TEX D3DFMT_FROM_FILE - -//!@} - -//************************************************************************** - -/*! \name Типы материалов -!@{*/ - -#define MTL_TYPE_GEOM 0 /*!< статическая геометрия */ -#define MTL_TYPE_GRASS 1 /*!< растительность - трава */ -#define MTL_TYPE_TREE 2 /*!< растительность - деревья */ -#define MTL_TYPE_SKIN 3 /*!< скелетная модель */ -//#define MTL_LIGHT 4 - -//!@} - -//! типы текстур -enum LOAD_TEXTURE_TYPE -{ - LOAD_TEXTURE_TYPE_LOAD, //!< загружаемая - LOAD_TEXTURE_TYPE_CONST, //!< неудаляемая загружаемая - LOAD_TEXTURE_TYPE_CUSTOM, //!< созданная пользователем - - /*! самоопределение типа, на тот случай когда обновляем текстуру которая точно есть. - Если определить этот тип, а внутри у текстуры на самом деле нет типа (скорее всего нет текстуры) - то будет определен LOAD_TEXTURE_TYPE_LOAD - */ - LOAD_TEXTURE_TYPE_SELF, -}; - -//************************************************************************** - -//! существует ил файл name в папке с текстурами -SX_LIB_API bool SGCore_LoadTexFileExists(const char *szName); - -//! очистить список загружаемых текстур -SX_LIB_API void SGCore_LoadTexClearLoaded(); - -//! удалить тектуру по id (независимо от типа) -SX_LIB_API void SGCore_LoadTexDelete(ID idTexture); - -//! добавляем имя текстуры, взамен получаем на нее ID (поставить в очередь) -SX_LIB_API ID SGCore_LoadTexAddName(const char *szName, LOAD_TEXTURE_TYPE type); - -//! получить id по имени -SX_LIB_API ID SGCore_LoadTexGetID(const char *szName); - -//! получить имя по id -SX_LIB_API void SGCore_LoadTexGetName(ID idTexture, char *szName); - - -/*! создать место для текстуры tex и присвоить ей имя name, возвращает id - \warning создавать текстур необходимо в managed pool (D3DPOOL_MANAGED) ибо обработка потери и восстановления устройства сюда не приходит -*/ -SX_LIB_API ID SGCore_LoadTexCreate(const char *szName, IDirect3DTexture9 *pTexture); - -/*! обновить/перезагрузить текстуру name, если текстуры не было в списке то добавляет. -Если текстуру надо обновить, но тип у нее заранее не известен, но она точно уже загружена -то можно использовать тип самоопределения LOAD_TEXTURE_TYPE_SELF, тогда тип текстуры не изменится -*/ -SX_LIB_API ID SGCore_LoadTexUpdateN(const char *szName, LOAD_TEXTURE_TYPE type); - -//! обновить/перезагрузить текстуру -SX_LIB_API void SGCore_LoadTexUpdate(ID idTexture); - -//! возвращает текстуру по id -SX_LIB_API IDirect3DTexture9* SGCore_LoadTexGetTex(ID idTexture); - -//! загрузка всех текстур поставленных в очередь, если есть очередь -SX_LIB_API void SGCore_LoadTexAllLoad(); - -//!@} sxgcore_loadtex - -//############################################################################# - -/*! \defgroup sxgcore_rt Render targets - \ingroup sxgcore - \note Cброс и восстановление устройства сюда приходят -@{*/ - -//! добавить новый render target -SX_LIB_API ID SGCore_RTAdd( - UINT iWidth, //!< ширина - UINT iHeight, //!< высота - UINT iLevels, //!< количество mip-map уровней - DWORD dwUsage, //!< признак применения, возможные значения из D3DUSAGE_ - D3DFORMAT format, //!< формат из D3DFORMAT - D3DPOOL pool, //!< где будет размещена текстура, из D3DPOOL - const char *szName, //!< имя rt - /*! коэфициент размеров rt относительно области рендера - (если rt и размер области одинаковы то 1, если rt меньша на 0.5 то 0.5) - если указаны фиксированные значения то ставить 0, это нужно для устновления размеров при восстановлении устройства - */ - float fCoefFullScreen - ); - -//! удалить rt по имени -SX_LIB_API void SGCore_RTDeleteN(const char *szName); - -//! удалить rt по id -SX_LIB_API void SGCore_RTDelete(ID id); - -//! возвращает id по имени -SX_LIB_API ID SGCore_RTGetNum(const char *szName); - -//! возвращает текстуру по имени -SX_LIB_API IDirect3DTexture9* SGCore_RTGetTextureN(const char *szName); - -//! возвращает текстуру по id -SX_LIB_API IDirect3DTexture9* SGCore_RTGetTexture(ID id); - -//!@} sxgcore_rt - -//############################################################################# - -/*! \defgroup sxgcore_dse_static Статическая модель dse формата - \ingroup sxgcore - \note sxgcore предоставляет возможность загрузки статических моделей, формат вершин которых представлен структурой #vertex_static, которая объявлена в файле ModelFile.h - \todo Описать формат файла статической модели dse -@{*/ - -//! структура статической модели dse -struct ISXDataStaticModel : public IBaseObject -{ - virtual ~ISXDataStaticModel(){}; - - virtual ISXDataStaticModel* getCopy()=0;//!< получить абсолютную копию модели - - IDirect3DVertexBuffer9 *m_pVertexBuffer;//!< вершиный буфер - IDirect3DIndexBuffer9 *m_pIndexBuffer; //!< индексный буфер - - UINT m_uiSubsetCount; //!< количество подгрупп - char **m_ppTextures; //!< массив имен текстур без расширения - UINT *m_pStartIndex; //!< массив стартовых позиций индексов для каждой подгруппы - UINT *m_pIndexCount; //!< массив количества индексов для каждой подгруппы - UINT *m_pStartVertex; //!< массив стартовых позиций вершин для каждой подгруппы - UINT *m_pVertexCount; //!< массив количества вершин для каждой подгруппы - UINT m_uiAllIndexCount; //!< общее количество индексов - UINT m_uiAllVertexCount; //!< общее количество вершин - - float4_t m_vBSphere; - float3_t m_vBBMax, m_vBBMin; -}; - -//! создать статическую модель -SX_LIB_API ISXDataStaticModel* SGCore_StaticModelCr(); - -//! загрузить статическую модель, data инициализируется внутри -SX_LIB_API void SGCore_StaticModelLoad(const char *szFile, ISXDataStaticModel **ppData); - -//! сохранить статическую модель -SX_LIB_API void SGCore_StaticModelSave(const char *szFile, ISXDataStaticModel **pData); - -//! возвращает декларацию вершин статической модели -SX_LIB_API IDirect3DVertexDeclaration9* SGCore_StaticModelGetDecl(); - -//!@} sxgcore_dse_static - -//############################################################################# - -/*! \defgroup sxgcore_bb Ограничивающий объем - \ingroup sxgcore -@{*/ - -/*! Простой объект трансформаций с минимальным описанием. - \note Для корректного использования необходимо сначала установить позицию/поворот/масштаб после чего CalculateWorld -*/ -struct ISXTransObject : public IBaseObject -{ - virtual ~ISXTransObject(){}; - - SX_ALIGNED_OP_MEM - - //! просчет мировой матрицы трансформации на основе поворотов масштабирования и позиции - virtual inline float4x4* calcWorld() = 0; - - float3 m_vPosition; //!< позиция - float3 m_vRotation; //!< повороты - float3 m_vScale; //!< масштабирование - float4x4 m_mWorld; //!< мировая матрица на основе поворотов масштабирования и позиции -}; - -//! создать ISXTransObject -SX_LIB_API ISXTransObject* SGCore_CrTransObject(); - -//! структура описывающая ограничивающий квадрат (а точнее параллелепипед) в пространстве экрана -struct SXPosBBScreen -{ - float x; //!< позиция по оси x в пространстве экрана - float y; //!< позиция по оси y в пространстве экрана - float width; //!< ширина в пикселях - float height; //!< высота в пикселях - float maxdepth; //!< конец объекта глубина 0-1 - float mindepth; //!< начало объект глубина 0-1 - bool IsVisible; //!< виден ли квадрат наблюдателю -}; - - -/*! класс ограничивающего объема - \warning GetMinMax, GetSphere до вызова CalcWorldAndTrans возвращают нетрансформирвоанные данные -*/ -class ISXBound : public virtual ISXTransObject -{ -public: - virtual ~ISXBound(){}; - - SX_ALIGNED_OP_MEM - - /*! Просчет ограничивающего объема по вершинному буферу*/ - virtual void calcBound( - IDirect3DVertexBuffer9 *pVertexBuffer, //!< вершинный буфер (незаблокированный), в вершинах которого первым элементом идет позиция float3_t вектор - DWORD dwCountVertex, //!< количество вершин - DWORD dwBytePerVertex //!< количество байт в вершине - ) = 0; - - //! функция просчета мировой матрицы и трансформации минимума и максимума - virtual float4x4* calcWorldAndTrans() = 0; - - //! просчет структуры SXPosBBScreen - virtual void getPosBBScreen( - SXPosBBScreen *res, //!< инициализированная стркутура #SXPosBBScreen для записи - float3* campos, //!< позиция наблюдателя - float3* sizemapdepth, //!< размер карты глубины глябины для просчета float3(ширина, высота, максильная глубина) - float4x4* mat //!< произведение видовой и проекционной матриц - ) = 0; - - //! установить экстремум, также просчитает и сферу - virtual void setMinMax(const float3 *pMin, const float3 *pMax) = 0; - - //! запишет в min и max точки экстремума - virtual void getMinMax(float3 *pMin, float3 *pMax) const = 0; - - - //! установить сферу, просчитает также и параллелепипед - virtual void setSphere(const float3 *pCenter, float fRadius) = 0; - - //! запишет в center центр сферы, в radius радиус сферы - virtual void getSphere(float3 *pCenter, float *pRadius) const = 0; - - - //! находится ли точка point в пределах сферы - virtual bool isPointInSphere(const float3 *pPoint) const = 0; - - //! находится ли точка point в пределах параллелепипеда - virtual bool isPointInBox(const float3 *pPoint) const = 0; -}; - -//! создать ISXBound -SX_LIB_API ISXBound* SGCore_CrBound(); - -//!@} sxgcore_bb - -//############################################################################# - -//! создание меша (ID3DXMesh) конуса -SX_LIB_API void SGCore_FCreateCone( - float fTopRadius, //!< верхний радиус - float fBottomRadius, //!< нижний радиус - float fHeight, //!< длина - ID3DXMesh ** ppMesh, //!< выходной меш - UINT iSideCount //!< количество частей?? - ); - -//! просчет ограничивающего объема по вершинному буфер -SX_LIB_API void SGCore_FCompBoundBox( - IDirect3DVertexBuffer9* vertex_buffer, //!< вершинный буфер (незаблокированный), в вершинах которого первым элементом идет позиция float3_t вектор - ISXBound** bound, //!< инициализированный ISXBound - DWORD count_vert, //!< количество вершин - DWORD bytepervert //!< количество байт в вершине - ); - -//! создание меша (ID3DXMesh) ограничивающего объема -SX_LIB_API void SGCore_FCreateBoundingBoxMesh(float3* min, float3* max, ID3DXMesh** bbmesh); - -/*! \name Оптимизация индексных буферов -@{*/ - -//! 16 битные индексные буферы -SX_LIB_API void SGCore_OptimizeIndecesInSubsetUint16( - uint16_t* ib, //!< указатель на индексный буфер - uint16_t numFaces, //!< количество индексов - uint16_t numVerts //!< количество вершин - ); - -//! 16 битные индексные буферы -SX_LIB_API void SGCore_OptimizeIndecesInSubsetUint32( - uint32_t* ib, //!< указатель на индексный буфер - uint32_t numFaces, //!< количество индексов - uint32_t numVerts //!< количество вершин - ); -//!@} - -//########################################################################## - -/*! \defgroup sxgcore_bb_intersect Функции просчета попаданий точек в объемы и деление объемов - \ingroup sxgcore -@{*/ - -/*! \name Просчеты попадания точки/точек в объем - \note 2d - на основании x и z координат \n -3d - на основании всех трех координат \n -Abs - абсолютное нахождение внутри, не на границах, иное допускает нахождение на границах -@{*/ - -//! находится ли точка pos в пределах [min,max] по осям x z -SX_LIB_API bool SGCore_0InPos2D(float3* min, float3* max, float3* pos); - -//! находится ли точка pos в пределах (min,max) по осям x z -SX_LIB_API bool SGCore_0InPosAbs2D(float3* min, float3* max, float3* pos); - - -//! возвращает количество точек (p1,p2,p3) лежащих в пределах [min,max] по осям x z -SX_LIB_API int SGCore_0CountPosPoints2D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); - -//! возвращает количество точек (p1,p2,p3) лежащих в пределах (min,max) по осям x z -SX_LIB_API int SGCore_0CountPosPointsAbs2D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); - -//! лежит ли хотя бы одна точка абсолютно в (min,max) или хотя бы 2 точки в пределах [min,max], из числа трех точек p1,p2,p3, по осям x z -SX_LIB_API bool SGCore_0InPosPoints2D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); - - -//! находится ли точка pos в пределах [min,max] -SX_LIB_API bool SGCore_0InPos3D(float3* min, float3* max, float3* pos); - -//! находится ли точка pos в пределах (min,max) -SX_LIB_API bool SGCore_0InPosAbs3D(float3* min, float3* max, float3* pos); - - -//! возвращает количество точек (p1,p2,p3) лежащих в пределах [min,max] -SX_LIB_API int SGCore_0CountPosPoints3D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); - -//! возвращает количество точек (p1,p2,p3) лежащих в пределах (min,max) -SX_LIB_API int SGCore_0CountPosPointsAbs3D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); - -//! лежит ли хотя бы одна точка абсолютно в (min,max) или хотя бы 2 точки в пределах [min,max], из числа трех точек p1,p2,p3 -SX_LIB_API bool SGCore_0InPosPoints3D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); - -//!@} - -//************************************************************************** - -/*! кубическое (octo) деление объема (по всем трем осям) - \warning массивы и объекты должны быть заранее инициализированны - */ -SX_LIB_API void SGCore_0ComBoundBoxArr8(ISXBound* bound, ISXBound** bound_arr); - -/*! квадратичное (quad) деление объема (по двум осям x и z) - \warning массивы и объекты должны быть заранее инициализированны -*/ -SX_LIB_API void SGCore_0ComBoundBoxArr4(ISXBound* bound, ISXBound** bound_arr); - -//! находит квадрат расстояния между лучем и точкой -SX_LIB_API float SGCore_0DistancePointBeam2(const float3 & p, const float3 & start, const float3 & dir); - -//! возвращает пересекаются ли боксы или нет -SX_LIB_API bool SGCore_0InretsectBox(const float3 * min1, const float3 * max1, const float3 * min2, const float3 * max2); - -struct SXTriangle -{ - float3_t a; - float3_t b; - float3_t c; - SXTriangle() - { - }; - SXTriangle(float3_t _a, float3_t _b, float3_t _c) :a(_a), b(_b), c(_c) - { - }; - - //Проверкка пересечения треугольника и отрезка - bool IntersectLine(const float3 & l1, const float3 &l2, float3 * p) - { - float3 n = SMVector3Normalize(SMVector3Cross((b - a), (c - b))); - float d1 = SMVector3Dot((l1 - a), n) / SMVector3Length(n); - float d2 = SMVector3Dot((l2 - a), n) / SMVector3Length(n); - if ((d1 > 0 && d2 > 0) || (d1 < 0 && d2 < 0)) - return(false); - *p = l1 + (l2 - l1) * (-d1 / (d2 - d1)); - if (SMVector3Dot(SMVector3Cross((b - a), (*p - a)), n) <= 0) return(false); - if (SMVector3Dot(SMVector3Cross((c - b), (*p - b)), n) <= 0) return(false); - if (SMVector3Dot(SMVector3Cross((a - c), (*p - c)), n) <= 0) return(false); - return(true); - } -}; - - -//!@} sxgcore_bb_intersect - -//############################################################################# - -/*! \defgroup sxgcore_camera Камера - \ingroup sxgcore - \todo Добавить в библиотеку математики плоскости и операции с ними, заменить dx плоскости на свои - \todo Возможно надо расширить возможности и абстракцию класса камеры, к примеру матрицу проекции хранить тоже в камере, и сделать отдельные функции для ее модификации -@{ -*/ - -//! структура описание плоскости -struct CSXFrustumPlane -{ - float3_t m_vNormal; - float m_fDistance; - - SX_ALIGNED_OP_MEM - - void normalize() - { - float fDenom = sqrt((m_vNormal.x*m_vNormal.x) + (m_vNormal.y*m_vNormal.y) + (m_vNormal.z*m_vNormal.z)); - m_vNormal.x = m_vNormal.x / fDenom; - m_vNormal.y = m_vNormal.y / fDenom; - m_vNormal.z = m_vNormal.z / fDenom; - m_fDistance = m_fDistance / fDenom; - } -}; - -//! класс описывающий фрустум -class ISXFrustum : public IBaseObject -{ -public: - virtual ~ISXFrustum(){}; - - SX_ALIGNED_OP_MEM - - //! обновление фрустума, на вход матрицы по которым необходимо построить фрустум - virtual void update( - const float4x4 *pView, //<! видовая матрица - const float4x4 *pProj //<! проекционная матрица - ) = 0; - - //! находится ли точка во фрустуме - virtual bool pointInFrustum(const float3 *pPoint) const = 0; - - //! находится ли треугольник во фрутстуме - virtual bool polyInFrustum(const float3 *pPoint1, const float3 *pPoint2, const float3 *pPoint3) const = 0; - - //! находится ли полигон во фрустуме полностью - virtual bool polyInFrustumAbs(const float3 *pPoint1, const float3 *pPoint2, const float3 *pPoint3) const = 0; - - - //! находится ли полигон во фрустуме - virtual bool sphereInFrustum(const float3 *pPoint, float fRadius) const = 0; - - //! находится ли сфера во фрустуме полностью - virtual bool sphereInFrustumAbs(const float3 *pPoint, float fRadius) const = 0; - - //! находится ли параллелепипед (описанный точками экстремума) во фрустуме - virtual bool boxInFrustum(float3 *pMin, float3 *pMax) const = 0; - - - //! возвращает координаты точки фрустума, iNumPoint = [0,7] - virtual float3 getPoint(int iNumPoint) const = 0; - - //! возвращает координаты центра фрустума - virtual float3 getCenter() const = 0; - - //! устанавливает координаты точки фрустума, iNumPoint = [0,7] - virtual void setPoint(int iNumPoint, const float3 *pPoint) = 0; - - //! устанавливает координаты центра фрустума - virtual void setCenter(const float3 *pCenter) = 0; -}; - -//! создать ISXFrustum -SX_LIB_API ISXFrustum* SGCore_CrFrustum(); - -//************************************************************************** - -//! камера -class ISXCamera : public IBaseObject -{ -public: - virtual ~ISXCamera(){}; - - SX_ALIGNED_OP_MEM - - /*! \name Движение - \note В метрах - @{*/ - - //! влево/вправо - virtual void posLeftRight(float fUnits) = 0; - - //! вверх/вниз - virtual void posUpDown(float fUnits) = 0; - - //! вперед/назад - virtual void posFrontBack(float fUnits) = 0; - - //!@} - - /*! \name Вращение - \note В радианах - @{*/ - - //! вращение вверх/вниз - virtual void rotUpDown(float fAngle) = 0; - - //! вращение вправо/влево - virtual void rotRightLeft(float fAngle) = 0; - - //! крен - virtual void roll(float fAngle) = 0; - - //! установить полное вращение - virtual void setOrientation(const SMQuaternion *pOrientation) = 0; - - //!@} - - //! получаем матрицу вида в pMatrix - virtual void getViewMatrix(float4x4 *pMatrix) = 0; - - /*! \name Базис - @{ - */ - - //! в pos записывает текущую позицию в мире - virtual void getPosition(float3 *pPos) const = 0; - - //! устанавливает позицию в мире - virtual void setPosition(const float3 *pPos) = 0; - - - //! в right записывает парвый вектор - virtual void getRight(float3 *pRight) const = 0; - - //! в up записывает верхний вектор - virtual void getUp(float3 *vUp) const = 0; - - //! в look записывает вектор направление взгляда - virtual void getLook(float3 *vLook) const = 0; - - - //! в rot записывает углы поворотов по осям, в радианах - virtual void getRotation(float3 *vRot) const = 0; - - //повроты по осям - - //! возвращает поворот по оси X, в радианах - virtual float getRotationX() const = 0; - - //! возвращает поворот по оси Y, в радианах - virtual float getRotationY() const = 0; - - //! возвращает поворот по оси Z, в радианах - virtual float getRotationZ() const = 0; - - //!@} - - //! устанавливает FOV камеры - virtual void setFOV(float fFOV) = 0; - - //! возвращает FOV камеры - virtual float getFOV() const = 0; - - //! обновление фрустума камеры - virtual void updateFrustum(const float4x4 *mProjection) = 0; - - //! возвращает константный указатель фрустума - virtual const ISXFrustum* getFrustum() = 0; -}; - -//! создать ISXCamera -SX_LIB_API ISXCamera* SGCore_CrCamera(); - -//!@} sxgcore_camera - -//############################################################################# - -/*! \defgroup sxgcore_sky Небо - \ingroup sxgcore -@{*/ - -/*! \name SkyBox - \note Используются кубические текстуры -@{*/ - -//! создание -SX_LIB_API void SGCore_SkyBoxCr(); - -//! инициализирован ли skybox -SX_LIB_API bool SGCore_SkyBoxIsCr(); - -//! загружена ли текстура? -SX_LIB_API bool SGCore_SkyBoxIsLoadTex(); - - -//! загрузка текстуры, texture - имя текстуры с расширением -SX_LIB_API void SGCore_SkyBoxLoadTex(const char *szTexture); - -//! смена текстуры, texture - имя текстуры с расширением -SX_LIB_API void SGCore_SkyBoxChangeTex(const char *szTexture); - -//! в аргумент записывает путь до текущей активной текстуры -SX_LIB_API void SGCore_SkyBoxGetActiveTex(char *szTexture); - -//! в аргумент записывает путь до следующей текстуры 9если включена смена) -SX_LIB_API void SGCore_SkyBoxGetSecondTex(char *szTexture); - - -//! установка угла поворота angle по оси y, в радианах -SX_LIB_API void SGCore_SkyBoxSetRot(float fAngle); - -//! возвращает угол поворота по оси y, в радианах -SX_LIB_API float SGCore_SkyBoxGetRot(); - - -//! установка цвета окраски в пределах 0-1, альфа компонента (w) - на сколько будет окрашен -SX_LIB_API void SGCore_SkyBoxSetColor(const float4_t *pColor); - -//! в color записывает текущий цвет окраски -SX_LIB_API void SGCore_SkyBoxGetColor(float4_t *pColor); - -//! рендер скайбокса -SX_LIB_API void SGCore_SkyBoxRender( - float timeDelta, //!< время рендера кадра в млсек - const float3 *pPos //!< позиция набладателя, эта же позиция будет центром skybox - ); - -//!@} - -//************************************************************************** - -/*! \name SkyClouds - - \note Простая плоскость параллельная xz на которую зеркально (х2) натягивается текстура, в постоянном движении. - Положение констатно. - Используются обычные 2д текстуры. -@{*/ - -//! создание -SX_LIB_API void SGCore_SkyCloudsCr(); - -//! инициализирован ли sky clouds -SX_LIB_API bool SGCore_SkyCloudsIsCr(); - -//! загружена ли текстура -SX_LIB_API bool SGCore_SkyCloudsIsLoadTex(); - - -/*! установка размеров и позиции. - Так как позиция облаков константна то чтобы была илюзия полного покрытия уровня, необходимо облакам указывать размер в несколько раз больше чем весь доступный уровень, к примеру x2 -*/ -SX_LIB_API void SGCore_SkyCloudsSetWidthHeightPos( - float fWidth, //!< ширина в метрах - float fHeight, //!< высота в метрах - const float3 *pCenter //!< позиция центра - ); - -//! загрузка текстуры, texture - имя текстуры с расширением -SX_LIB_API void SGCore_SkyCloudsLoadTex(const char *szNameTexture); - -//! плавная смена текстуры, texture - имя текстуры с расширением -SX_LIB_API void SGCore_SkyCloudsChangeTex(const char *szNameTexture); - - -//! установка угла поворота angle по оси y, в радианах -SX_LIB_API void SGCore_SkyCloudsSetRot(float fAngle); - -//! возвращает текущий угол поворота по оси y, в радианах -SX_LIB_API float SGCore_SkyCloudsGetRot(); - - -//! устанавливает коэфициент прозрачности, в пределах 0-1 -SX_LIB_API void SGCore_SkyCloudsSetAlpha(float fAlpha); - -//! возвращает текущий коэфициент прозрачности -SX_LIB_API float SGCore_SkyCloudsGetAlpha(); - - -//! устанавливает коэфициент скорости движения -SX_LIB_API void SGCore_SkyCloudsSetSpeed(float fSpeed); - -//! возвращает текущий коэфициент скорости движения -SX_LIB_API float SGCore_SkyCloudsGetSpeed(); - - -//! установка цвета окраски в пределах 0-1, альфа компонента (w) - на сколько будет окрашен -SX_LIB_API void SGCore_SkyCloudsSetColor(const float4_t *pColor); - -//! в color записывает текущий цвет окраски -SX_LIB_API void SGCore_SkyCloudsGetColor(float4_t *pColor); - -//! рендер облаков -SX_LIB_API void SGCore_SkyCloudsRender( - DWORD timeDetlta, //!< время рендера кадра в млсек - const float3* pos, //!< позиция набладателя - bool isShadow //!< для теней ли рендерим? - ); - -//!@} -//!@} sxgcore_sky - -#endif - -/*! @} */ +#endif + +// +#define SXGC_ERR_NON_DETECTED_D3D -1 +#define SXGC_ERR_FAILED_INIT_D3D -2 + +//! \name Базовые функции библиотеки +//!@{ + +//! версия подсистемы +SX_LIB_API long SGCore_0GetVersion(); + +//! установка функции вывода сообщений +SX_LIB_API void SGCore_Dbg_Set(report_func fnReport); + +//! инициализация подсистемы +SX_LIB_API void SGCore_0Create( + const char *szName, //!< передваваемое имя подсистемы + HWND hWnd, //!< дескриптор окна в которое будет осуществляться рендер + int iWidth, //!< ширина области рендера + int iHeigth, //!< высота области рендера + bool isWindowed, //!< оконный режим использовать ли? иначе полноэкранный + DWORD dwFlags, //!< флаги создания устрайства (стандартные dx) + bool isUnic = true //!< должна ли подсистема быть уникальной на основе имени + ); + +//! уничтожение либы +SX_LIB_API void SGCore_AKill(); + +//! возвращает dx устройство +SX_LIB_API IDirect3DDevice9* SGCore_GetDXDevice(); + +//! возвращает массив всех доступных разрешений монитора, в iCount записывает размер массива +SX_LIB_API const DEVMODE* SGCore_GetModes(int *iCount); + +//!@} + +//############################################################################# + +/*! \name Отладочное сообщение в окне рендера + \note Графическое ядро предусматривает наличие текстового сообщения в окне рендера, которое формирует непосредственно сам программист и дает команду на его вывод +@{*/ + +/*!< размер отладочного сообщения, выводимого в окно рендера */ +#define SXGC_STR_SIZE_DBG_MSG 4096 + +/*! Вывод отладочного сообщения в окно рендера. +Аргументы аналогичны стандартным функциям типа printf. +*/ +SX_LIB_API void SGCore_DbgMsg(const char *szFormat, ...); + +//!@} + +//############################################################################# + +/*! \name Обработка потери/восстановления устройства + \warning Функции обработки потери/восстановления устройства обрабатывают ресурсы только в пределах данной библиотеки, другие библиотеки должны сами производить данную обработку! +!@{*/ + +//! вызывать при потере устройства +SX_LIB_API void SGCore_OnLostDevice(); + +//! вызывать при попытке сброса устройства +SX_LIB_API bool SGCore_OnDeviceReset( + int iWwidth, //!< новая ширина окна + int iHeigth, //!< новая выоста окна + bool isWindewed //!< true - оконный режим, false - полноэкранный + ); + +//! вызывать при сбросе устроства +SX_LIB_API void SGCore_OnResetDevice(); + +//! отрисовка full screen quad (уже смещенного как надо чтобы не было размытия) +SX_LIB_API void SGCore_ScreenQuadDraw(); + +//!@} + +//############################################################################# + +/*! \name Базовые функции установки настроек выборки из текстуры +id - идентификатор текстурного слота +value - для Filter D3DTEXTUREFILTERTYPE, для Address D3DTEXTUREADDRESS +@{*/ + +//! установка фильтрации для конкретного слота +SX_LIB_API void SGCore_SetSamplerFilter(DWORD dwNum, DWORD dwValue); + +//! установка фильтрации для набора слотов от begin_id до end_id +SX_LIB_API void SGCore_SetSamplerFilter2(DWORD dwNumStart, DWORD dwCount, DWORD dwValue); + + +//! установка адресации для конкретного слота +SX_LIB_API void SGCore_SetSamplerAddress(DWORD dwNum, DWORD dwValue); + +//! установка адресации для набора слотов от begin_id до end_id +SX_LIB_API void SGCore_SetSamplerAddress2(DWORD dwNumStart, DWORD dwCount, DWORD dwValue); + +//!@} + +//############################################################################# + +/*! \defgroup sxgcore_redefinition_func Переопределяемые функции + \ingroup sxgcore + \note sxgcore содержит базовые и необходимые функции для переопределения их пользователем, которые будут доступны из графического ядра в других библиотеках зависимых от графического ядра, но в тоже время, эти функции могут быть переопределены функциями из других библиотек. \n +Это обеспечивает централизованную обобщенную зависимость от самого графического ядра и исключает перекрестные зависимости библиотек между собой, позволяя программисту воздействовать на ценрт управления не из центра. \n +Переопределяемые функции могут быть переопределены во внутреннем состоянии, то есть функция обертка так и останется функцией оберткой только будет вызывать уже переопределенную функцию. \n +Переопределяемые функции изначально выполняют штатные действия исходя из их назначения, и могут вообще не переопределяться если так надо программисту, то есть необходимость в их переопределении исходит только от программиста. \n +@{*/ + +/*! \name Прототипы переопределяемых функций +@{*/ + +/*! draw indexed primitive, команда отрисовки. +Аналогична DrawIndexedPrimitive, в дополнение к DIP инкрементирует счетчик DIPов в int регистрах по индексу #G_RI_INT_COUNT_DIP, обнуление данных только на стороне приложения +*/ +typedef void(*g_func_dip) (UINT uiTypePrimitive, long lBaseVertexIndex, UINT uiMinVertexIndex, UINT uiNumVertices, UINT uiStartIndex, UINT uiPrimitiveCount); + +/*! установка материала id, world - мировая матрица. +По умолчанию установка текстуры в нулевой текстурный слот, id – идентификатор материала (по умолчанию - текстуры), world – матрица трансформации модели +*/ +typedef void(*g_func_mtl_set) (ID id, float4x4 *pWorld); + +/*! загрузка материала, szName - имя текстуры с расширением, iMtlType - тип материала на случай провала загрузки. +Загрузка материала (по умолчанию – текстуры) с именем name, iMtlType – типа материала, +будет задействован только в случае провала определения типа материала (по умолчанию не используется) - +тип стандартного материала будет определен на основании iMtlType, может принимать одно из значений MTL_TYPE_ +*/ +typedef ID(*g_func_mtl_load) (const char *szName, int iMtlType); + +//! получить сорт материала, по дефолту 0 +typedef int(*g_func_mtl_get_sort) (ID id); + +//! получить физический тип материала +typedef int(*g_func_mtl_get_physic_type)(ID id); + +//! рисовать ли подгруппы моделей данного материала раздельно? +typedef bool(*g_func_mtl_group_render_is_singly) (ID id); + +//!@} + +/*! \name Переопределяемые функции(переопределение реализации внутри) +!@{*/ + +//! \copydoc g_func_dip +SX_LIB_API void SGCore_DIP(UINT uiTypePrimitive, long lBaseVertexIndex, UINT uiMinVertexIndex, UINT uiNumVertices, UINT uiStartIndex, UINT uiPrimitiveCount); + +//! \copydoc g_func_mtl_set +SX_LIB_API void SGCore_MtlSet(ID id, float4x4 *pWorld); + +//! \copydoc g_func_mtl_load +SX_LIB_API ID SGCore_MtlLoad(const char *szName, int iMtlType); + +//! \copydoc g_func_mtl_get_sort +SX_LIB_API int SGCore_MtlGetSort(ID id); + +//! \copydoc g_func_mtl_get_physic_type +SX_LIB_API int SGCore_MtlGetPhysicType(ID id); + +//! \copydoc g_func_mtl_group_render_is_singly +SX_LIB_API bool SGCore_MtlGroupRenderIsSingly(ID id); + +//!@} + +//########################################################################## + +/*! \name Переопределение функций +!@{*/ + +//! переназначение g_func_dip +SX_LIB_API void SGCore_SetFunc_DIP(g_func_dip fnFunc); + +//! переназначение g_func_mtl_set +SX_LIB_API void SGCore_SetFunc_MtlSet(g_func_mtl_set fnFunc); + +//! переназначение g_func_mtl_load +SX_LIB_API void SGCore_SetFunc_MtlLoad(g_func_mtl_load fnFunc); + +//! переназначение g_func_mtl_get_sort +SX_LIB_API void SGCore_SetFunc_MtlGetSort(g_func_mtl_get_sort fnFunc); + +//! переназначение g_func_mtl_get_physic_type +SX_LIB_API void SGCore_SetFunc_MtlGetPhysicType(g_func_mtl_get_physic_type fnFunc); + +//! переназначение g_func_mtl_group_render_is_singly +SX_LIB_API void SGCore_SetFunc_MtlGroupRenderIsSingly(g_func_mtl_group_render_is_singly fnFunc); + +//!@} + +//!@} group sxgcore_redefinition_func + +//############################################################################# + +/*! \defgroup sxgcore_shaders Шейдеры + \ingroup sxgcore + \note Распознавание шейдеров (обращение через функции) происходит на основе идентификаторов представленных типом ID \n +Если речь идет об идентификации на основе имени то имя в данном случае эта та строка name которая была передана SGCore_ShaderLoad \n +Все шейдеры загружаются с версией 3.0 \n +Если имя шейдер не содержит нижний пробел (_) то значит шейдера находится в корне директории \n +Если шейдер содержит нижний пробел (_) то строка до первого нижнего проблема это имя папки в котором находится шейдер с целым именем \n +Пример: pp_shader.vs - лежит по загружаемому пути: /pp/pp_shader.vs +@{*/ + +/*! \name Ограничения на размеры +@{*/ + +//! максимальный размер имени директории (до _) +#define SXGC_SHADER_MAX_SIZE_DIR 64 + +//! максимальный размер имени с расширением (после _) +#define SXGC_SHADER_MAX_SIZE_NAME 64 + +//! общий максимальный размер имени текстуры с расширением +#define SXGC_SHADER_MAX_SIZE_DIRNAME SXGC_SHADER_MAX_SIZE_DIR + SXGC_SHADER_MAX_SIZE_NAME + +//! максимальный размер пути до файла шейдера (без имени файла) +#define SXGC_SHADER_MAX_SIZE_STDPATH 256 + +//! максимальный размер полного пути до шейдера (включая имя шейдера) +#define SXGC_SHADER_MAX_SIZE_FULLPATH SXGC_SHADER_MAX_SIZE_STDPATH + SXGC_SHADER_MAX_SIZE_DIRNAME + + +//! максимальная длина имени переменной в шейдере +#define SXGC_SHADER_VAR_MAX_SIZE 64 + +//! максимальное количество переменных в шейдере +#define SXGC_SHADER_VAR_MAX_COUNT 64 + +//! количество макросов в массиве макросов +#define SXGC_SHADER_COUNT_MACRO 12 + +//!@} + +//************************************************************************** + +//! типы шейдеров (int type_shader) +enum SHADER_TYPE +{ + SHADER_TYPE_VERTEX, //!< вершинный + SHADER_TYPE_PIXEL //!< пиксельный +}; + +//! типы проверок дубликатов шейдеров +enum SHADER_CHECKDOUBLE +{ + SHADER_CHECKDOUBLE_NONE, //!< нет проверки + SHADER_CHECKDOUBLE_PATH, //!< проверка по пути (имени шейдера с расширением) + SHADER_CHECKDOUBLE_NAME //!< проверка по пользовательскому имени +}; + +//************************************************************************** + +//! загрузить все шейдеры поставленные в очередь +SX_LIB_API void SGCore_ShaderAllLoad(); + +//! поставить шейдер в очередь загрузки +SX_LIB_API ID SGCore_ShaderLoad( + SHADER_TYPE type_shader, //!< тип шейдера + const char *szPath, //!< имя файла шейдера с расширением + const char *szName, //!< имя шейдера которое присвоится при загрузке + SHADER_CHECKDOUBLE check_double,//!< проверять ли на уникальность + D3DXMACRO *pMacro = 0 //!< макросы + ); + +//! существует ли файл name в папке с шейдерами +SX_LIB_API bool SGCore_ShaderFileExists(const char *szName); + +//! записывает пользовательское имя шейдера в name +SX_LIB_API void SGCore_ShaderGetName(SHADER_TYPE type_shader, ID idShader, char *szName); + +//! записывает имя шейдер с расширением в path +SX_LIB_API void SGCore_ShaderGetPath(SHADER_TYPE type_shader, ID idShader, char *szPath); + +//! существует ли шейдер с пользовательским именем name, если да то возвращает id +SX_LIB_API ID SGCore_ShaderExistsName(SHADER_TYPE type_shader, const char *szName); + +//! существует ли шейдер с именем файла и расширением name, если да то возвращает id +SX_LIB_API ID SGCore_ShaderExistsPath(SHADER_TYPE type_shader, const char *szPath); + +//! загружен ли шейдер с данным id +SX_LIB_API bool SGCore_ShaderIsValidated(SHADER_TYPE type_shader, ID idShader); + + +//! обновление шейдера по имени +SX_LIB_API void SGCore_ShaderUpdateN(SHADER_TYPE type_shader, const char *szName); + +//! обновление шейдера по id +SX_LIB_API void SGCore_ShaderUpdate(SHADER_TYPE type_shader, ID idShader); + +//! перезагрузить все шейдеры, с учетом макросов +SX_LIB_API void SGCore_ShaderReloadAll(); + + +//! получить идентификатор шейдера по имени +SX_LIB_API ID SGCore_ShaderGetID(SHADER_TYPE type_shader, const char *szName); + +//! бинд шейдера по имени +SX_LIB_API void SGCore_ShaderBindN(SHADER_TYPE type_shader, const char *szName); + +//! бинд шейдера по id +SX_LIB_API void SGCore_ShaderBind(SHADER_TYPE type_shader, ID idShader); + + +//! обнуление биндов шейдеров +SX_LIB_API void SGCore_ShaderUnBind(); + +//************************************************************************** + +/*! \name Передача данных в шейдер +@{*/ + +//! передача float значений в шейдер по имени +SX_LIB_API void SGCore_ShaderSetVRFN( + SHADER_TYPE type_shader, //!< тип шейдера из #SHADER_TYPE + const char *szNameShader, //!< пользовательское имя шейдера + const char *szNameVar, //!< имя переменной которой присваивается значение + void *pData, //!< указатель на массив данных + int iCountFloat4 = 0 //!< количество float4 значений в передаваемом массиве, если меньше одного значит количество будет взято из шейдера + ); + +//! передача float значений в шейдер по ID +SX_LIB_API void SGCore_ShaderSetVRF( + SHADER_TYPE type_shader, //!< тип шейдера из #SHADER_TYPE + ID idShader, //!< идентификатор шейдера + const char *szNameVar, //!< имя переменной которой присваивается значение + void *pData, //!< указатель на массив данных + int iCountFloat4 = 0 //!< количество float4 значений в передаваемом массиве, если меньше одного значит количество будет взято из шейдера + ); + +//! передача int значений в шейдер по имени +SX_LIB_API void SGCore_ShaderSetVRIN( + SHADER_TYPE type_shader, //!< тип шейдера из #SHADER_TYPE + const char *szNameShader, //!< пользовательское имя шейдера + const char *szNameVar, //!< имя переменной которой присваивается значение + void *pData, //!< указатель на массив данных + int iCountInt4 = 0 //!< количество int4 значений в передаваемом массиве, если меньше одного значит количество будет взято из шейдера + ); + +//! передача int значений в шейдер по ID +SX_LIB_API void SGCore_ShaderSetVRI( + SHADER_TYPE type_shader, //!< тип шейдера из #SHADER_TYPE + ID idShader, //!< идентификатор шейдера + const char *szNameVar, //!< имя переменной которой присваивается значение + void *pData, //!< указатель на массив данных + int iCountInt4 = 0 //!< количество int4 значений в передаваемом массиве, если меньше одного значит количество будет взято из шейдера + ); + +//!@} +//!@} sxgcore_shaders + +//############################################################################# + +/*! \defgroup sxgcore_loadtex Загружаемые текстуры + \ingroup sxgcore + \note Распознавание текстур (обращение через функции) происходит на основе идентификаторов представленных типом ID. \n +Имя текстуры обязательно долно содержать нижний пробел (_), строка до первого нижнего проблема это имя папки в котором находится текстура с целым именем. \n +Например: mtl_tex.dds - лежит по загружаемому пути: /mtl/mtl_tex.dds +@{*/ + +/*! \name Ограничения на размеры +@{*/ + +//! максимальный размер имени директории (до _) +#define SXGC_LOADTEX_MAX_SIZE_DIR 64 + +//! максимальный размер имени с расширением (после _) +#define SXGC_LOADTEX_MAX_SIZE_NAME 64 + +//! общий максимальный размер имени текстуры с расширением +#define SXGC_LOADTEX_MAX_SIZE_DIRNAME SXGC_LOADTEX_MAX_SIZE_DIR + SXGC_LOADTEX_MAX_SIZE_NAME + +//! максимальный размер пути до файла текстуры (без имени файла) +#define SXGC_LOADTEX_MAX_SIZE_STDPATH 256 + +//! максимальный размер полного пути до текстуры (включая имя текстуры) +#define SXGC_LOADTEX_MAX_SIZE_FULLPATH SXGC_LOADTEX_MAX_SIZE_STDPATH + SXGC_LOADTEX_MAX_SIZE_DIRNAME + + +//! количество mipmap уровней в загружаемых текстурах +#define SXGC_LOADTEX_COUNT_MIPMAP 5 + +/*! формат в который будут преобразованы загружаемые текстуры + \warning если установить формат со сжатием то необходимо следовать всем правилам оформления текстур для данного формата +*/ +#define SXGC_LOADTEX_FORMAT_TEX D3DFMT_FROM_FILE + +//!@} + +//************************************************************************** + +/*! \name Типы материалов +!@{*/ + +#define MTL_TYPE_GEOM 0 /*!< статическая геометрия */ +#define MTL_TYPE_GRASS 1 /*!< растительность - трава */ +#define MTL_TYPE_TREE 2 /*!< растительность - деревья */ +#define MTL_TYPE_SKIN 3 /*!< скелетная модель */ +//#define MTL_LIGHT 4 + +//!@} + +//! типы текстур +enum LOAD_TEXTURE_TYPE +{ + LOAD_TEXTURE_TYPE_LOAD, //!< загружаемая + LOAD_TEXTURE_TYPE_CONST, //!< неудаляемая загружаемая + LOAD_TEXTURE_TYPE_CUSTOM, //!< созданная пользователем + + /*! самоопределение типа, на тот случай когда обновляем текстуру которая точно есть. + Если определить этот тип, а внутри у текстуры на самом деле нет типа (скорее всего нет текстуры) + то будет определен LOAD_TEXTURE_TYPE_LOAD + */ + LOAD_TEXTURE_TYPE_SELF, +}; + +//************************************************************************** + +//! существует ил файл name в папке с текстурами +SX_LIB_API bool SGCore_LoadTexFileExists(const char *szName); + +//! очистить список загружаемых текстур +SX_LIB_API void SGCore_LoadTexClearLoaded(); + +//! удалить тектуру по id (независимо от типа) +SX_LIB_API void SGCore_LoadTexDelete(ID idTexture); + +//! добавляем имя текстуры, взамен получаем на нее ID (поставить в очередь) +SX_LIB_API ID SGCore_LoadTexAddName(const char *szName, LOAD_TEXTURE_TYPE type); + +//! получить id по имени +SX_LIB_API ID SGCore_LoadTexGetID(const char *szName); + +//! получить имя по id +SX_LIB_API void SGCore_LoadTexGetName(ID idTexture, char *szName); + + +/*! создать место для текстуры tex и присвоить ей имя name, возвращает id + \warning создавать текстур необходимо в managed pool (D3DPOOL_MANAGED) ибо обработка потери и восстановления устройства сюда не приходит +*/ +SX_LIB_API ID SGCore_LoadTexCreate(const char *szName, IDirect3DTexture9 *pTexture); + +/*! обновить/перезагрузить текстуру name, если текстуры не было в списке то добавляет. +Если текстуру надо обновить, но тип у нее заранее не известен, но она точно уже загружена +то можно использовать тип самоопределения LOAD_TEXTURE_TYPE_SELF, тогда тип текстуры не изменится +*/ +SX_LIB_API ID SGCore_LoadTexUpdateN(const char *szName, LOAD_TEXTURE_TYPE type); + +//! обновить/перезагрузить текстуру +SX_LIB_API void SGCore_LoadTexUpdate(ID idTexture); + +//! возвращает текстуру по id +SX_LIB_API IDirect3DTexture9* SGCore_LoadTexGetTex(ID idTexture); + +//! загрузка всех текстур поставленных в очередь, если есть очередь +SX_LIB_API void SGCore_LoadTexAllLoad(); + +//!@} sxgcore_loadtex + +//############################################################################# + +/*! \defgroup sxgcore_rt Render targets + \ingroup sxgcore + \note Cброс и восстановление устройства сюда приходят +@{*/ + +//! добавить новый render target +SX_LIB_API ID SGCore_RTAdd( + UINT iWidth, //!< ширина + UINT iHeight, //!< высота + UINT iLevels, //!< количество mip-map уровней + DWORD dwUsage, //!< признак применения, возможные значения из D3DUSAGE_ + D3DFORMAT format, //!< формат из D3DFORMAT + D3DPOOL pool, //!< где будет размещена текстура, из D3DPOOL + const char *szName, //!< имя rt + /*! коэфициент размеров rt относительно области рендера + (если rt и размер области одинаковы то 1, если rt меньша на 0.5 то 0.5) + если указаны фиксированные значения то ставить 0, это нужно для устновления размеров при восстановлении устройства + */ + float fCoefFullScreen + ); + +//! удалить rt по имени +SX_LIB_API void SGCore_RTDeleteN(const char *szName); + +//! удалить rt по id +SX_LIB_API void SGCore_RTDelete(ID id); + +//! возвращает id по имени +SX_LIB_API ID SGCore_RTGetNum(const char *szName); + +//! возвращает текстуру по имени +SX_LIB_API IDirect3DTexture9* SGCore_RTGetTextureN(const char *szName); + +//! возвращает текстуру по id +SX_LIB_API IDirect3DTexture9* SGCore_RTGetTexture(ID id); + +//!@} sxgcore_rt + +//############################################################################# + +/*! \defgroup sxgcore_dse_static Статическая модель dse формата + \ingroup sxgcore + \note sxgcore предоставляет возможность загрузки статических моделей, формат вершин которых представлен структурой #vertex_static, которая объявлена в файле ModelFile.h + \todo Описать формат файла статической модели dse +@{*/ + +//! структура статической модели dse +struct ISXDataStaticModel : public IBaseObject +{ + virtual ~ISXDataStaticModel(){}; + + virtual ISXDataStaticModel* getCopy()=0;//!< получить абсолютную копию модели + + IDirect3DVertexBuffer9 *m_pVertexBuffer;//!< вершиный буфер + IDirect3DIndexBuffer9 *m_pIndexBuffer; //!< индексный буфер + + UINT m_uiSubsetCount; //!< количество подгрупп + char **m_ppTextures; //!< массив имен текстур без расширения + UINT *m_pStartIndex; //!< массив стартовых позиций индексов для каждой подгруппы + UINT *m_pIndexCount; //!< массив количества индексов для каждой подгруппы + UINT *m_pStartVertex; //!< массив стартовых позиций вершин для каждой подгруппы + UINT *m_pVertexCount; //!< массив количества вершин для каждой подгруппы + UINT m_uiAllIndexCount; //!< общее количество индексов + UINT m_uiAllVertexCount; //!< общее количество вершин + + float4_t m_vBSphere; + float3_t m_vBBMax, m_vBBMin; +}; + +//! типы dse файлов +enum DSE_TYPE +{ + //! статика + DSE_TYPE_STATIC, + + //! анимация + DSE_TYPE_ANIMATION, + + //! анимационная модель + DSE_TYPE_ANIM_MESH, +}; + +//! возможная информация о dse файле +struct CDSEinfo +{ + //! тип файла + DSE_TYPE type; + + //! количество вершин + int iCountVertex; + + //! количество индексов + int iCountIndex; + + //! количество подгрупп + int iCountSubsets; + + //! версия + int iVersion; + + //! количество скинов + int iCountSkin; + + //! количество хитбоксов + int iCountHitbox; + + //! количество костей + int iCountBone; + + //! количетсов анимаций + int iCountAnimation; + + //! габариты в метрах + float3_t vDimensions; + + //! центр модели в метрах + float3_t vCenter; +}; + +//! получить информацию о dse файле pInfo != 0, путь абсолютный +SX_LIB_API bool SGCore_DSEgetInfo(const char *szPath, CDSEinfo *pOutInfo); + +//! создать статическую модель +SX_LIB_API ISXDataStaticModel* SGCore_StaticModelCr(); + +//! является ли файл в пути szPath dse форматом? путь абсолютный +SX_LIB_API bool SGCore_DSE_IsDSE(const char *szPath); + +//! является ли файл в пути szPath dse моделью? путь абсолютный +SX_LIB_API bool SGCore_DSE_IsModel(const char *szPath); + +//! является ли файл в пути szPath dse анимацией? путь абсолютный +SX_LIB_API bool SGCore_DSE_IsAnimation(const char *szPath); + +//! загрузить статическую модель, data инициализируется внутри +SX_LIB_API void SGCore_StaticModelLoad(const char *szFile, ISXDataStaticModel **ppData); + +//! сохранить статическую модель +SX_LIB_API void SGCore_StaticModelSave(const char *szFile, ISXDataStaticModel **pData); + +//! возвращает декларацию вершин статической модели +SX_LIB_API IDirect3DVertexDeclaration9* SGCore_StaticModelGetDecl(); + +//!@} sxgcore_dse_static + +//############################################################################# + +/*! \defgroup sxgcore_bb Ограничивающий объем + \ingroup sxgcore +@{*/ + +/*! Простой объект трансформаций с минимальным описанием. + \note Для корректного использования необходимо сначала установить позицию/поворот/масштаб после чего CalculateWorld +*/ +struct ISXTransObject : public IBaseObject +{ + virtual ~ISXTransObject(){}; + + SX_ALIGNED_OP_MEM + + //! просчет мировой матрицы трансформации на основе поворотов масштабирования и позиции + virtual inline float4x4* calcWorld() = 0; + + float3 m_vPosition; //!< позиция + float3 m_vRotation; //!< повороты + float3 m_vScale; //!< масштабирование + float4x4 m_mWorld; //!< мировая матрица на основе поворотов масштабирования и позиции +}; + +//! создать ISXTransObject +SX_LIB_API ISXTransObject* SGCore_CrTransObject(); + +//! структура описывающая ограничивающий квадрат (а точнее параллелепипед) в пространстве экрана +struct SXPosBBScreen +{ + float x; //!< позиция по оси x в пространстве экрана + float y; //!< позиция по оси y в пространстве экрана + float width; //!< ширина в пикселях + float height; //!< высота в пикселях + float maxdepth; //!< конец объекта глубина 0-1 + float mindepth; //!< начало объект глубина 0-1 + bool IsVisible; //!< виден ли квадрат наблюдателю +}; + + +/*! класс ограничивающего объема + \warning GetMinMax, GetSphere до вызова CalcWorldAndTrans возвращают нетрансформирвоанные данные +*/ +class ISXBound : public virtual ISXTransObject +{ +public: + virtual ~ISXBound(){}; + + SX_ALIGNED_OP_MEM + + /*! Просчет ограничивающего объема по вершинному буферу*/ + virtual void calcBound( + IDirect3DVertexBuffer9 *pVertexBuffer, //!< вершинный буфер (незаблокированный), в вершинах которого первым элементом идет позиция float3_t вектор + DWORD dwCountVertex, //!< количество вершин + DWORD dwBytePerVertex //!< количество байт в вершине + ) = 0; + + //! функция просчета мировой матрицы и трансформации минимума и максимума + virtual float4x4* calcWorldAndTrans() = 0; + + //! просчет структуры SXPosBBScreen + virtual void getPosBBScreen( + SXPosBBScreen *res, //!< инициализированная стркутура #SXPosBBScreen для записи + float3* campos, //!< позиция наблюдателя + float3* sizemapdepth, //!< размер карты глубины глябины для просчета float3(ширина, высота, максильная глубина) + float4x4* mat //!< произведение видовой и проекционной матриц + ) = 0; + + //! установить экстремум, также просчитает и сферу + virtual void setMinMax(const float3 *pMin, const float3 *pMax) = 0; + + //! запишет в min и max точки экстремума + virtual void getMinMax(float3 *pMin, float3 *pMax) const = 0; + + + //! установить сферу, просчитает также и параллелепипед + virtual void setSphere(const float3 *pCenter, float fRadius) = 0; + + //! запишет в center центр сферы, в radius радиус сферы + virtual void getSphere(float3 *pCenter, float *pRadius) const = 0; + + + //! находится ли точка point в пределах сферы + virtual bool isPointInSphere(const float3 *pPoint) const = 0; + + //! находится ли точка point в пределах параллелепипеда + virtual bool isPointInBox(const float3 *pPoint) const = 0; +}; + +//! создать ISXBound +SX_LIB_API ISXBound* SGCore_CrBound(); + +//!@} sxgcore_bb + +//############################################################################# + +//! создание меша (ID3DXMesh) конуса +SX_LIB_API void SGCore_FCreateCone( + float fTopRadius, //!< верхний радиус + float fBottomRadius, //!< нижний радиус + float fHeight, //!< длина + ID3DXMesh ** ppMesh, //!< выходной меш + UINT iSideCount //!< количество частей?? + ); + +//! просчет ограничивающего объема по вершинному буфер +SX_LIB_API void SGCore_FCompBoundBox( + IDirect3DVertexBuffer9* vertex_buffer, //!< вершинный буфер (незаблокированный), в вершинах которого первым элементом идет позиция float3_t вектор + ISXBound** bound, //!< инициализированный ISXBound + DWORD count_vert, //!< количество вершин + DWORD bytepervert //!< количество байт в вершине + ); + +//! создание меша (ID3DXMesh) ограничивающего объема +SX_LIB_API void SGCore_FCreateBoundingBoxMesh(float3* min, float3* max, ID3DXMesh** bbmesh); + +/*! \name Оптимизация индексных буферов +@{*/ + +//! 16 битные индексные буферы +SX_LIB_API void SGCore_OptimizeIndecesInSubsetUint16( + uint16_t* ib, //!< указатель на индексный буфер + uint16_t numFaces, //!< количество индексов + uint16_t numVerts //!< количество вершин + ); + +//! 16 битные индексные буферы +SX_LIB_API void SGCore_OptimizeIndecesInSubsetUint32( + uint32_t* ib, //!< указатель на индексный буфер + uint32_t numFaces, //!< количество индексов + uint32_t numVerts //!< количество вершин + ); +//!@} + +//########################################################################## + +/*! \defgroup sxgcore_bb_intersect Функции просчета попаданий точек в объемы и деление объемов + \ingroup sxgcore +@{*/ + +/*! \name Просчеты попадания точки/точек в объем + \note 2d - на основании x и z координат \n +3d - на основании всех трех координат \n +Abs - абсолютное нахождение внутри, не на границах, иное допускает нахождение на границах +@{*/ + +//! находится ли точка pos в пределах [min,max] по осям x z +SX_LIB_API bool SGCore_0InPos2D(float3* min, float3* max, float3* pos); + +//! находится ли точка pos в пределах (min,max) по осям x z +SX_LIB_API bool SGCore_0InPosAbs2D(float3* min, float3* max, float3* pos); + + +//! возвращает количество точек (p1,p2,p3) лежащих в пределах [min,max] по осям x z +SX_LIB_API int SGCore_0CountPosPoints2D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); + +//! возвращает количество точек (p1,p2,p3) лежащих в пределах (min,max) по осям x z +SX_LIB_API int SGCore_0CountPosPointsAbs2D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); + +//! лежит ли хотя бы одна точка абсолютно в (min,max) или хотя бы 2 точки в пределах [min,max], из числа трех точек p1,p2,p3, по осям x z +SX_LIB_API bool SGCore_0InPosPoints2D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); + + +//! находится ли точка pos в пределах [min,max] +SX_LIB_API bool SGCore_0InPos3D(float3* min, float3* max, float3* pos); + +//! находится ли точка pos в пределах (min,max) +SX_LIB_API bool SGCore_0InPosAbs3D(float3* min, float3* max, float3* pos); + + +//! возвращает количество точек (p1,p2,p3) лежащих в пределах [min,max] +SX_LIB_API int SGCore_0CountPosPoints3D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); + +//! возвращает количество точек (p1,p2,p3) лежащих в пределах (min,max) +SX_LIB_API int SGCore_0CountPosPointsAbs3D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); + +//! лежит ли хотя бы одна точка абсолютно в (min,max) или хотя бы 2 точки в пределах [min,max], из числа трех точек p1,p2,p3 +SX_LIB_API bool SGCore_0InPosPoints3D(float3* min, float3* max, float3* p1, float3* p2, float3* p3); + +//!@} + +//************************************************************************** + +/*! кубическое (octo) деление объема (по всем трем осям) + \warning массивы и объекты должны быть заранее инициализированны + */ +SX_LIB_API void SGCore_0ComBoundBoxArr8(ISXBound* bound, ISXBound** bound_arr); + +/*! квадратичное (quad) деление объема (по двум осям x и z) + \warning массивы и объекты должны быть заранее инициализированны +*/ +SX_LIB_API void SGCore_0ComBoundBoxArr4(ISXBound* bound, ISXBound** bound_arr); + +//! находит квадрат расстояния между лучем и точкой +SX_LIB_API float SGCore_0DistancePointBeam2(const float3 & p, const float3 & start, const float3 & dir); + +//! возвращает пересекаются ли боксы или нет +SX_LIB_API bool SGCore_0InretsectBox(const float3 * min1, const float3 * max1, const float3 * min2, const float3 * max2); + +struct SXTriangle +{ + float3_t a; + float3_t b; + float3_t c; + SXTriangle() + { + }; + SXTriangle(float3_t _a, float3_t _b, float3_t _c) :a(_a), b(_b), c(_c) + { + }; + + //Проверкка пересечения треугольника и отрезка + bool IntersectLine(const float3 & l1, const float3 &l2, float3 * p) + { + float3 n = SMVector3Normalize(SMVector3Cross((b - a), (c - b))); + float d1 = SMVector3Dot((l1 - a), n) / SMVector3Length(n); + float d2 = SMVector3Dot((l2 - a), n) / SMVector3Length(n); + if ((d1 > 0 && d2 > 0) || (d1 < 0 && d2 < 0)) + return(false); + *p = l1 + (l2 - l1) * (-d1 / (d2 - d1)); + if (SMVector3Dot(SMVector3Cross((b - a), (*p - a)), n) <= 0) return(false); + if (SMVector3Dot(SMVector3Cross((c - b), (*p - b)), n) <= 0) return(false); + if (SMVector3Dot(SMVector3Cross((a - c), (*p - c)), n) <= 0) return(false); + return(true); + } +}; + + +//!@} sxgcore_bb_intersect + +//############################################################################# + +/*! \defgroup sxgcore_camera Камера + \ingroup sxgcore + \todo Добавить в библиотеку математики плоскости и операции с ними, заменить dx плоскости на свои + \todo Возможно надо расширить возможности и абстракцию класса камеры, к примеру матрицу проекции хранить тоже в камере, и сделать отдельные функции для ее модификации +@{ +*/ + +//! структура описание плоскости +struct CSXFrustumPlane +{ + float3_t m_vNormal; + float m_fDistance; + + SX_ALIGNED_OP_MEM + + void normalize() + { + float fDenom = sqrt((m_vNormal.x*m_vNormal.x) + (m_vNormal.y*m_vNormal.y) + (m_vNormal.z*m_vNormal.z)); + m_vNormal.x = m_vNormal.x / fDenom; + m_vNormal.y = m_vNormal.y / fDenom; + m_vNormal.z = m_vNormal.z / fDenom; + m_fDistance = m_fDistance / fDenom; + } +}; + +//! класс описывающий фрустум +class ISXFrustum : public IBaseObject +{ +public: + virtual ~ISXFrustum(){}; + + SX_ALIGNED_OP_MEM + + //! обновление фрустума, на вход матрицы по которым необходимо построить фрустум + virtual void update( + const float4x4 *pView, //<! видовая матрица + const float4x4 *pProj //<! проекционная матрица + ) = 0; + + //! находится ли точка во фрустуме + virtual bool pointInFrustum(const float3 *pPoint) const = 0; + + //! находится ли треугольник во фрутстуме + virtual bool polyInFrustum(const float3 *pPoint1, const float3 *pPoint2, const float3 *pPoint3) const = 0; + + //! находится ли полигон во фрустуме полностью + virtual bool polyInFrustumAbs(const float3 *pPoint1, const float3 *pPoint2, const float3 *pPoint3) const = 0; + + + //! находится ли полигон во фрустуме + virtual bool sphereInFrustum(const float3 *pPoint, float fRadius) const = 0; + + //! находится ли сфера во фрустуме полностью + virtual bool sphereInFrustumAbs(const float3 *pPoint, float fRadius) const = 0; + + //! находится ли параллелепипед (описанный точками экстремума) во фрустуме + virtual bool boxInFrustum(float3 *pMin, float3 *pMax) const = 0; + + + //! возвращает координаты точки фрустума, iNumPoint = [0,7] + virtual float3 getPoint(int iNumPoint) const = 0; + + //! возвращает координаты центра фрустума + virtual float3 getCenter() const = 0; + + //! устанавливает координаты точки фрустума, iNumPoint = [0,7] + virtual void setPoint(int iNumPoint, const float3 *pPoint) = 0; + + //! устанавливает координаты центра фрустума + virtual void setCenter(const float3 *pCenter) = 0; +}; + +//! создать ISXFrustum +SX_LIB_API ISXFrustum* SGCore_CrFrustum(); + +//************************************************************************** + +//! камера +class ISXCamera : public IBaseObject +{ +public: + virtual ~ISXCamera(){}; + + SX_ALIGNED_OP_MEM + + /*! \name Движение + \note В метрах + @{*/ + + //! влево/вправо + virtual void posLeftRight(float fUnits) = 0; + + //! вверх/вниз + virtual void posUpDown(float fUnits) = 0; + + //! вперед/назад + virtual void posFrontBack(float fUnits) = 0; + + //!@} + + /*! \name Вращение + \note В радианах + @{*/ + + //! вращение вверх/вниз + virtual void rotUpDown(float fAngle) = 0; + + //! вращение вправо/влево + virtual void rotRightLeft(float fAngle) = 0; + + //! крен + virtual void roll(float fAngle) = 0; + + //! установить полное вращение + virtual void setOrientation(const SMQuaternion *pOrientation) = 0; + + //!@} + + //! получаем матрицу вида в pMatrix + virtual void getViewMatrix(float4x4 *pMatrix) = 0; + + /*! \name Базис + @{ + */ + + //! в pos записывает текущую позицию в мире + virtual void getPosition(float3 *pPos) const = 0; + + //! устанавливает позицию в мире + virtual void setPosition(const float3 *pPos) = 0; + + + //! в right записывает парвый вектор + virtual void getRight(float3 *pRight) const = 0; + + //! в up записывает верхний вектор + virtual void getUp(float3 *vUp) const = 0; + + //! в look записывает вектор направление взгляда + virtual void getLook(float3 *vLook) const = 0; + + + //! в rot записывает углы поворотов по осям, в радианах + virtual void getRotation(float3 *vRot) const = 0; + + //повроты по осям + + //! возвращает поворот по оси X, в радианах + virtual float getRotationX() const = 0; + + //! возвращает поворот по оси Y, в радианах + virtual float getRotationY() const = 0; + + //! возвращает поворот по оси Z, в радианах + virtual float getRotationZ() const = 0; + + //!@} + + //! устанавливает FOV камеры + virtual void setFOV(float fFOV) = 0; + + //! возвращает FOV камеры + virtual float getFOV() const = 0; + + //! обновление фрустума камеры + virtual void updateFrustum(const float4x4 *mProjection) = 0; + + //! возвращает константный указатель фрустума + virtual const ISXFrustum* getFrustum() = 0; +}; + +//! создать ISXCamera +SX_LIB_API ISXCamera* SGCore_CrCamera(); + +//!@} sxgcore_camera + +//############################################################################# + +/*! \defgroup sxgcore_sky Небо + \ingroup sxgcore +@{*/ + +/*! \name SkyBox + \note Используются кубические текстуры +@{*/ + +//! создание +SX_LIB_API void SGCore_SkyBoxCr(); + +//! инициализирован ли skybox +SX_LIB_API bool SGCore_SkyBoxIsCr(); + +//! загружена ли текстура? +SX_LIB_API bool SGCore_SkyBoxIsLoadTex(); + + +//! загрузка текстуры, texture - имя текстуры с расширением +SX_LIB_API void SGCore_SkyBoxLoadTex(const char *szTexture); + +//! смена текстуры, texture - имя текстуры с расширением +SX_LIB_API void SGCore_SkyBoxChangeTex(const char *szTexture); + +//! в аргумент записывает путь до текущей активной текстуры +SX_LIB_API void SGCore_SkyBoxGetActiveTex(char *szTexture); + +//! в аргумент записывает путь до следующей текстуры 9если включена смена) +SX_LIB_API void SGCore_SkyBoxGetSecondTex(char *szTexture); + + +//! установка угла поворота angle по оси y, в радианах +SX_LIB_API void SGCore_SkyBoxSetRot(float fAngle); + +//! возвращает угол поворота по оси y, в радианах +SX_LIB_API float SGCore_SkyBoxGetRot(); + + +//! установка цвета окраски в пределах 0-1, альфа компонента (w) - на сколько будет окрашен +SX_LIB_API void SGCore_SkyBoxSetColor(const float4_t *pColor); + +//! в color записывает текущий цвет окраски +SX_LIB_API void SGCore_SkyBoxGetColor(float4_t *pColor); + +//! рендер скайбокса +SX_LIB_API void SGCore_SkyBoxRender( + float timeDelta, //!< время рендера кадра в млсек + const float3 *pPos //!< позиция набладателя, эта же позиция будет центром skybox + ); + +//!@} + +//************************************************************************** + +/*! \name SkyClouds + + \note Простая плоскость параллельная xz на которую зеркально (х2) натягивается текстура, в постоянном движении. + Положение констатно. + Используются обычные 2д текстуры. +@{*/ + +//! создание +SX_LIB_API void SGCore_SkyCloudsCr(); + +//! инициализирован ли sky clouds +SX_LIB_API bool SGCore_SkyCloudsIsCr(); + +//! загружена ли текстура +SX_LIB_API bool SGCore_SkyCloudsIsLoadTex(); + + +/*! установка размеров и позиции. + Так как позиция облаков константна то чтобы была илюзия полного покрытия уровня, необходимо облакам указывать размер в несколько раз больше чем весь доступный уровень, к примеру x2 +*/ +SX_LIB_API void SGCore_SkyCloudsSetWidthHeightPos( + float fWidth, //!< ширина в метрах + float fHeight, //!< высота в метрах + const float3 *pCenter //!< позиция центра + ); + +//! загрузка текстуры, texture - имя текстуры с расширением +SX_LIB_API void SGCore_SkyCloudsLoadTex(const char *szNameTexture); + +//! плавная смена текстуры, texture - имя текстуры с расширением +SX_LIB_API void SGCore_SkyCloudsChangeTex(const char *szNameTexture); + + +//! установка угла поворота angle по оси y, в радианах +SX_LIB_API void SGCore_SkyCloudsSetRot(float fAngle); + +//! возвращает текущий угол поворота по оси y, в радианах +SX_LIB_API float SGCore_SkyCloudsGetRot(); + + +//! устанавливает коэфициент прозрачности, в пределах 0-1 +SX_LIB_API void SGCore_SkyCloudsSetAlpha(float fAlpha); + +//! возвращает текущий коэфициент прозрачности +SX_LIB_API float SGCore_SkyCloudsGetAlpha(); + + +//! устанавливает коэфициент скорости движения +SX_LIB_API void SGCore_SkyCloudsSetSpeed(float fSpeed); + +//! возвращает текущий коэфициент скорости движения +SX_LIB_API float SGCore_SkyCloudsGetSpeed(); + + +//! установка цвета окраски в пределах 0-1, альфа компонента (w) - на сколько будет окрашен +SX_LIB_API void SGCore_SkyCloudsSetColor(const float4_t *pColor); + +//! в color записывает текущий цвет окраски +SX_LIB_API void SGCore_SkyCloudsGetColor(float4_t *pColor); + +//! рендер облаков +SX_LIB_API void SGCore_SkyCloudsRender( + DWORD timeDetlta, //!< время рендера кадра в млсек + const float3* pos, //!< позиция набладателя + bool isShadow //!< для теней ли рендерим? + ); + +//!@} +//!@} sxgcore_sky + +#endif + +/*! @} */ diff --git a/source/gdefines.h b/source/gdefines.h index f5c235178c384eaa4b6c2845eea9adffeec854a8..a49977adf08e37e81ac0fa75f5f7c1b95ddcd122 100644 --- a/source/gdefines.h +++ b/source/gdefines.h @@ -103,6 +103,12 @@ struct IBaseObject #define CONFIG_SECTION_MAX_LEN 64 /*!< максимальная длина секции конфигурационного файла */ //!@} +/*! звуковой канал самой игры */ +#define SX_SOUND_CHANNEL_GAME 0 + +/*! звуковой канал главного меню */ +#define SX_SOUND_CHANNEL_MAIN_MENU 1 + /*! Пустые дефайны для визуальной идентификации аргументов функций @{ */ diff --git a/source/geom/green.cpp b/source/geom/green.cpp index ddf5720563f72f2e6ffc3ca1d7723cb9619045e7..5df2543a36e657a6ea100c0e2da3ee28740335ca 100644 --- a/source/geom/green.cpp +++ b/source/geom/green.cpp @@ -1871,7 +1871,6 @@ bool CGreen::traceBeam(const float3* start, const float3* dir, float3* _res, ID* return false; SXTriangle tmptri; - float dist; bool tmpiscom = true; float3 ip; float3 res; @@ -1955,7 +1954,6 @@ bool CGreen::traceBeam(const float3* start, const float3* dir, float3* _res, ID* void CGreen::getPartBB(float3* bbmin, float3 * bbmax, CSegment** arrsplits, int *count, CSegment* comsegment, ID curr_splits_ids_render) { float3 min,max; - float radius; comsegment->m_pBoundVolumeP->getMinMax(&min, &max); if (comsegment->m_iCountObj > 0 && SGCore_0InretsectBox(bbmin, bbmax, &min, &max)) diff --git a/source/geom/static_geom.cpp b/source/geom/static_geom.cpp index 42b1ee3d74c7dab91c64a2bc8185ff7f3b7f8bbe..3f69191926a9744e3974c29a98b9315b2d83dc7c 100644 --- a/source/geom/static_geom.cpp +++ b/source/geom/static_geom.cpp @@ -2959,7 +2959,6 @@ void CStaticGeom::applyTransform(ID id) applyTransformLod(id); vertex_static* pData; - float3_t* pData2; int idgroup; int idbuff; @@ -3298,7 +3297,6 @@ bool CStaticGeom::traceBeam(const float3* start, const float3* dir, float3* _res return false; SXTriangle tmptri; - float dist; bool tmpiscom = true; float3 ip; float3 res; diff --git a/source/level/AmbientSounds.cpp b/source/level/AmbientSounds.cpp index 3932a81b637e77bec9283218279e6d921a5acabe..055437021daba20be5b4c0da767cf9877da4e05a 100644 --- a/source/level/AmbientSounds.cpp +++ b/source/level/AmbientSounds.cpp @@ -19,7 +19,7 @@ CAmbientSounds::~CAmbientSounds() void CAmbientSounds::add(const char *szPath) { - ID id = SSCore_SndCreate2d(szPath); + ID id = SSCore_SndCreate2d(szPath, SX_SOUND_CHANNEL_GAME); if (id >= 0) m_aIDSnds.push_back(id); } @@ -28,7 +28,7 @@ void CAmbientSounds::get(ID id, char *szPath) { if (id >= 0 && id < m_aIDSnds.size()) { - SSCore_SndFileGet(m_aIDSnds[id], szPath); + SSCore_SndGetFile(m_aIDSnds[id], szPath); } } @@ -51,7 +51,7 @@ void CAmbientSounds::play() { if (m_iPlayingLast >= 0 && m_iPlayingLast < m_aIDSnds.size()) { - SSCore_SndVolumeSet(m_aIDSnds[m_iPlayingLast], 100); + SSCore_SndSetVolume(m_aIDSnds[m_iPlayingLast], 100); SSCore_SndPlay(m_aIDSnds[m_iPlayingLast]); m_isPlaying = true; } @@ -65,14 +65,14 @@ void CAmbientSounds::update() static const float * env_ambient_snd_volume = GET_PCVAR_FLOAT("env_ambient_snd_volume"); static float env_ambient_snd_volume_old = 1.f; - if (SSCore_SndStateGet(m_aIDSnds[m_iPlayingLast]) != SOUND_OBJSTATE_PLAY) + if (SSCore_SndGetState(m_aIDSnds[m_iPlayingLast]) != SOUND_OBJSTATE_PLAY) { if (m_iPlayingLast + 1 < m_aIDSnds.size()) ++m_iPlayingLast; else m_iPlayingLast = 0; - SSCore_SndVolumeSet(m_aIDSnds[m_iPlayingLast], env_ambient_snd_volume_old*100.f); + SSCore_SndSetVolume(m_aIDSnds[m_iPlayingLast], env_ambient_snd_volume_old*100.f); SSCore_SndPlay(m_aIDSnds[m_iPlayingLast]); } @@ -80,7 +80,7 @@ void CAmbientSounds::update() { env_ambient_snd_volume_old = *env_ambient_snd_volume; if (m_iPlayingLast >= 0) - SSCore_SndVolumeSet(m_aIDSnds[m_iPlayingLast], env_ambient_snd_volume_old*100.f); + SSCore_SndSetVolume(m_aIDSnds[m_iPlayingLast], env_ambient_snd_volume_old*100.f); } } diff --git a/source/level/level.cpp b/source/level/level.cpp index c124f1a32d9e4fb95b6872c295812a6a0c44ae5f..00655bf370b3640cde658a63f181d40826285b6d 100644 --- a/source/level/level.cpp +++ b/source/level/level.cpp @@ -46,7 +46,7 @@ void CLevel::load(const char *szName, bool isGame) sprintf(m_szName, "%s", szName); char tmppathlevel[1024]; sprintf(tmppathlevel, "%s%s/%s.lvl", Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), szName, szName); - if (!Core_0FileExists(tmppathlevel)) + if (!FileExistsFile(tmppathlevel)) { LibReport(REPORT_MSG_LEVEL_WARNING, "not found file of level '%s'", tmppathlevel); return; @@ -57,7 +57,7 @@ void CLevel::load(const char *szName, bool isGame) { char tmppath[1024]; sprintf(tmppath, "%s%s/%s", Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), szName, config->getKey("level", "geometry")); - if (Core_0FileExists(tmppath)) + if (FileExistsFile(tmppath)) SGeom_ModelsLoad(tmppath); else { @@ -69,7 +69,7 @@ void CLevel::load(const char *szName, bool isGame) { char tmppath[1024]; sprintf(tmppath, "%s%s/%s", Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), szName, config->getKey("level", "green")); - if (Core_0FileExists(tmppath)) + if (FileExistsFile(tmppath)) SGeom_GreenLoad(tmppath); else { @@ -81,7 +81,7 @@ void CLevel::load(const char *szName, bool isGame) { char tmppath[1024]; sprintf(tmppath, "%s%s/%s", Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), szName, config->getKey("level", "entity")); - if (Core_0FileExists(tmppath)) + if (FileExistsFile(tmppath)) SXGame_LoadEnts(tmppath); else { @@ -93,7 +93,7 @@ void CLevel::load(const char *szName, bool isGame) { char tmppath[1024]; sprintf(tmppath, "%s%s/%s", Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), szName, config->getKey("level", "physic")); - if (Core_0FileExists(tmppath)) + if (FileExistsFile(tmppath)) { SXPhysics_ImportGeom(tmppath); } @@ -116,7 +116,7 @@ void CLevel::load(const char *szName, bool isGame) { char tmppath[1024]; sprintf(tmppath, "%s%s/%s", Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), szName, config->getKey("level", "aigrid")); - if (Core_0FileExists(tmppath)) + if (FileExistsFile(tmppath)) SAIG_GridLoad(tmppath); else { @@ -156,7 +156,7 @@ void CLevel::load(const char *szName, bool isGame) char tmppath[1024]; sprintf(tmppath, "%s%s", Core_RStringGet(G_RI_STRING_PATH_GS_CONFIGS), m_sWeather.c_str()); - if (Core_0FileExists(tmppath)) + if (FileExistsFile(tmppath)) m_pWeather->load(tmppath); else { diff --git a/source/level/level.h b/source/level/level.h index f17c3205896df7f2c9bbc460a565fef9303a392f..bee770fd40c057d517012cc1d10f31a1e885fc25 100644 --- a/source/level/level.h +++ b/source/level/level.h @@ -18,6 +18,7 @@ See the license in LICENSE #include <gdefines.h> #include <common/string.h> +#include <common/file_utils.h> #include <level/sxlevel.h> #include "ambientsounds.h" diff --git a/source/level/weather.cpp b/source/level/weather.cpp index 85bd30871b6469a51c7b4ec7aa06a8dec843e92a..5fb9ccb16dc1c8e4156fad25e136dfa775c29d8f 100644 --- a/source/level/weather.cpp +++ b/source/level/weather.cpp @@ -77,7 +77,7 @@ void CWeatherRndSnd::addSound(const char *szPath) if (isunic) { - ID tmpid = SSCore_SndCreate2d(szPath); + ID tmpid = SSCore_SndCreate2d(szPath, SX_SOUND_CHANNEL_GAME); m_aArrSnds.push_back(CSnd(szPath, tmpid)); m_aCurrSndIDs.push_back(tmpid); } @@ -100,13 +100,13 @@ void CWeatherRndSnd::update() if((int)m_aCurrSndIDs.size() > tmpkeysnd && m_aCurrSndIDs[tmpkeysnd] && m_aCurrSndIDs[tmpkeysnd] >= 0) { m_idCurrPlay = m_aCurrSndIDs[tmpkeysnd]; - SSCore_SndPosCurrSet(m_idCurrPlay, 0); + SSCore_SndSetPosPlay(m_idCurrPlay, 0); int tmprndvol = (rand() % (m_iVolumeE - m_iVolumeB)) + m_iVolumeB; - SSCore_SndVolumeSet(m_idCurrPlay, (long)(env_weather_snd_volume ? (float)tmprndvol * (*env_weather_snd_volume) : tmprndvol), SOUND_VOL_PCT); + SSCore_SndSetVolume(m_idCurrPlay, ((float)(env_weather_snd_volume ? (float)tmprndvol * (*env_weather_snd_volume) : tmprndvol))*0.01f); SSCore_SndPlay(m_idCurrPlay); DWORD tmprnd = (rand() % (m_ulPeriodE - m_ulPeriodB)) + m_ulPeriodB; - m_ulNextPlay = TimeGetMls(Core_RIntGet(G_RI_INT_TIMER_RENDER)) + tmprnd + ((SSCore_SndLengthSecGet(m_idCurrPlay) + 1) * 1000); + m_ulNextPlay = TimeGetMls(Core_RIntGet(G_RI_INT_TIMER_RENDER)) + tmprnd + ((SSCore_SndGetLengthSec(m_idCurrPlay) + 1) * 1000); } } } @@ -118,7 +118,7 @@ void CWeatherRndSnd::play() m_isPlaying = true; - if (m_idCurrPlay >= 0 && SSCore_SndStateGet(m_idCurrPlay) == SOUND_OBJSTATE_PAUSE) + if (m_idCurrPlay >= 0 && SSCore_SndGetState(m_idCurrPlay) == SOUND_OBJSTATE_PAUSE) SSCore_SndPlay(m_idCurrPlay); } @@ -129,7 +129,7 @@ void CWeatherRndSnd::pause() m_isPlaying = false; - if (m_idCurrPlay >= 0 && SSCore_SndStateGet(m_idCurrPlay) == SOUND_OBJSTATE_PLAY) + if (m_idCurrPlay >= 0 && SSCore_SndGetState(m_idCurrPlay) == SOUND_OBJSTATE_PLAY) SSCore_SndPlay(SOUND_OBJSTATE_PAUSE); } @@ -176,8 +176,8 @@ CWeather::CWeather() m_idLightThunderbolt = SML_LigthsCreatePoint(&float3(0, 0, 0), 200, &float3(1, 1, 1), false, true); SML_LigthsSetEnable(m_idLightThunderbolt, false); - m_idSndRain = SSCore_SndCreate2d("nature/rain.ogg",true); - m_idSndThunder = SSCore_SndCreate2d("nature/thunder.ogg"); + m_idSndRain = SSCore_SndCreate2d("nature/rain.ogg", SX_SOUND_CHANNEL_GAME, true); + m_idSndThunder = SSCore_SndCreate2d("nature/thunder.ogg", SX_SOUND_CHANNEL_GAME); m_fRainVolume = 0; } @@ -646,8 +646,8 @@ void CWeather::update() SPE_EmitterSet(m_idEffRain, 0, ReCreateCount, env_default_rain_density_old * m_aTimeSections[m_iSectionCurr].m_DataSection.m_fRainDensity * float(WEATHER_RAIN_RECREATE_COUNT)); SPE_EffectEnableSet(m_idEffRain, true); - SSCore_SndPosCurrSet(m_idSndRain, 0); - SSCore_SndVolumeSet(m_idSndRain, 0, SOUND_VOL_PCT); + SSCore_SndSetPosPlay(m_idSndRain, 0); + SSCore_SndSetVolume(m_idSndRain, 0); if (m_isPlaying) SSCore_SndPlay(m_idSndRain); @@ -780,8 +780,8 @@ void CWeather::update() } else { - SSCore_SndPosCurrSet(m_idSndThunder, 0); - SSCore_SndVolumeSet(m_idSndThunder, (env_weather_snd_volume ? (*env_weather_snd_volume) : 1.f) * 100.f, SOUND_VOL_PCT); + SSCore_SndSetPosPlay(m_idSndThunder, 0); + SSCore_SndSetVolume(m_idSndThunder, (env_weather_snd_volume ? (*env_weather_snd_volume) : 1.f)); if (m_isPlaying) SSCore_SndPlay(m_idSndThunder); @@ -806,8 +806,8 @@ void CWeather::update() SML_LigthsSetEnable(m_idLightThunderbolt, false); //и заодно проиграть звук молнии - SSCore_SndPosCurrSet(m_idSndThunder, 0); - SSCore_SndVolumeSet(m_idSndThunder, clampf(m_fRainVolume*2.f*100.f,0.f,100.f), SOUND_VOL_PCT); + SSCore_SndSetPosPlay(m_idSndThunder, 0); + SSCore_SndSetVolume(m_idSndThunder, clampf(m_fRainVolume*2.f, 0.f, 1.f)); if (m_isPlaying) SSCore_SndPlay(m_idSndThunder); @@ -859,7 +859,7 @@ void CWeather::updateRainSound() } m_fRainVolume /= tmpcount / 4; - SSCore_SndVolumeSet(m_idSndRain, (env_weather_snd_volume ? (*env_weather_snd_volume) : 1.f) * m_fRainVolume * 100.f, SOUND_VOL_PCT); + SSCore_SndSetVolume(m_idSndRain, (env_weather_snd_volume ? (*env_weather_snd_volume) : 1.f) * m_fRainVolume); } float CWeather::getCurrRainDensity() @@ -878,10 +878,10 @@ void CWeather::sndPlay() m_isPlaying = true; m_RndSnd.play(); - if (m_idSndRain >= 0 && SSCore_SndStateGet(m_idSndRain) == SOUND_OBJSTATE_PAUSE) + if (m_idSndRain >= 0 && SSCore_SndGetState(m_idSndRain) == SOUND_OBJSTATE_PAUSE) SSCore_SndPlay(m_idSndRain); - if (m_idSndThunder >= 0 && SSCore_SndStateGet(m_idSndThunder) == SOUND_OBJSTATE_PAUSE) + if (m_idSndThunder >= 0 && SSCore_SndGetState(m_idSndThunder) == SOUND_OBJSTATE_PAUSE) SSCore_SndPlay(m_idSndThunder); } @@ -893,10 +893,10 @@ void CWeather::sndPause() m_isPlaying = false; m_RndSnd.pause(); - if (m_idSndRain >= 0 && SSCore_SndStateGet(m_idSndRain) == SOUND_OBJSTATE_PLAY) + if (m_idSndRain >= 0 && SSCore_SndGetState(m_idSndRain) == SOUND_OBJSTATE_PLAY) SSCore_SndPause(m_idSndRain); - if (m_idSndThunder >= 0 && SSCore_SndStateGet(m_idSndThunder) == SOUND_OBJSTATE_PLAY) + if (m_idSndThunder >= 0 && SSCore_SndGetState(m_idSndThunder) == SOUND_OBJSTATE_PLAY) SSCore_SndPause(m_idSndThunder); } diff --git a/source/mtllight/light.cpp b/source/mtllight/light.cpp index 74b59a158471d51923b2e5c3caab522410921c91..8ea957c2a80dd6fe5882dccbc9aea8d0df873397 100644 --- a/source/mtllight/light.cpp +++ b/source/mtllight/light.cpp @@ -265,7 +265,7 @@ bool Lights::getExists(ID id) const void Lights::DeleteLight(ID id) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->IsGlobal) GlobalLight = -1; @@ -285,7 +285,7 @@ char* Lights::GetLightName(ID id) void Lights::SetLightName(ID id, const char* name) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); sprintf(ArrLights[id]->Name, "%s", name); } @@ -443,7 +443,7 @@ ID Lights::CreateDirection(ID id, const float3* pos, float dist, const float3* c void Lights::Render(ID id, DWORD timeDelta) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); float4x4 tmpwmat = ArrLights[id]->WorldMat; MLSet::DXDevice->SetTransform(D3DTS_WORLD, &(ArrLights[id]->WorldMat.operator D3DXMATRIX())); @@ -468,21 +468,21 @@ void Lights::SetCastGlobalShadow(bool isShadowed) void Lights::GetLightColor(ID id, float3* vec) const { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); (*vec) = ArrLights[id]->Color; } void Lights::SetLightColor(ID id, const float3* vec) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); ArrLights[id]->Color = *vec; } void Lights::GetLightPos(ID id, float3* vec, bool greal) const { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->IsGlobal && !greal) { @@ -527,7 +527,7 @@ float Lights::GetLightDist(ID id) const void Lights::SetLightDist(ID id, float radius_height, bool is_create) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); ArrLights[id]->Dist = radius_height; if (ArrLights[id]->TypeLight == LTYPE_LIGHT_DIR && is_create) @@ -562,7 +562,7 @@ void Lights::SetLightDist(ID id, float radius_height, bool is_create) void Lights::SetLightPos(ID id, const float3* vec, bool greal) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->IsGlobal) { @@ -615,14 +615,14 @@ void Lights::SetLightPos(ID id, const float3* vec, bool greal) void Lights::GetLightOrient(ID id, SMQuaternion* q) const { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); *q = ArrLights[id]->Quaternion; } void Lights::SetLightOrient(ID id, const SMQuaternion* q) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); ArrLights[id]->Quaternion = *q; @@ -634,7 +634,7 @@ void Lights::SetLightOrient(ID id, const SMQuaternion* q) void Lights::SetShadowBias(ID id, float val) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowSM) ArrLights[id]->ShadowSM->SetBias(val); @@ -733,7 +733,7 @@ bool Lights::GetLightEnable(ID id) const void Lights::SetLightEnable(ID id, bool val) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); ArrLights[id]->IsEnable = val; LightCountUpdateNull(id); @@ -754,7 +754,7 @@ LTYPE_LIGHT Lights::GetLightType(ID id) const void Lights::ShadowRenderBegin(ID id) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowSM) ArrLights[id]->ShadowSM->Begin(); @@ -766,7 +766,7 @@ void Lights::ShadowRenderBegin(ID id) void Lights::ShadowRenderEnd(ID id) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowSM) ArrLights[id]->ShadowSM->End(); @@ -778,7 +778,7 @@ void Lights::ShadowRenderEnd(ID id) void Lights::ShadowRenderPre(ID id, int cube) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowCube) ArrLights[id]->ShadowCube->Pre(cube); @@ -788,7 +788,7 @@ void Lights::ShadowRenderPre(ID id, int cube) void Lights::ShadowRenderPost(ID id, int cube) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowCube) ArrLights[id]->ShadowCube->Post(cube); @@ -900,14 +900,14 @@ ISXFrustum* Lights::GetLightFrustumG(ID id, int split) const void Lights::UpdateLightGFrustums(ID id, int split, const float3* pos, const float3* dir) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); ArrLights[id]->ShadowPSSM->UpdateFrustums(split, pos, dir); } void Lights::ShadowGen2(ID id) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowSM) ArrLights[id]->ShadowSM->GenShadow2(SGCore_RTGetTexture(ShadowMap)); @@ -945,7 +945,7 @@ void Lights::ShadowNull() void Lights::SetLightAngle(ID id, float angle, bool is_create) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); ArrLights[id]->Angle = angle; if (ArrLights[id]->TypeLight == LTYPE_LIGHT_DIR && is_create) @@ -972,7 +972,7 @@ void Lights::SetLightAngle(ID id, float angle, bool is_create) void Lights::SetLightTopRadius(ID id, float top_radius) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->TypeLight == 1) { @@ -994,7 +994,7 @@ void Lights::SetLightTopRadius(ID id, float top_radius) void Lights::SetShadowBlurPixel(ID id, float blur_pixel) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowCube) ArrLights[id]->ShadowCube->SetBlurPixel(blur_pixel); @@ -1021,7 +1021,7 @@ float Lights::GetShadowBlurPixel(ID id) const void Lights::SetShadowLocalNear(ID id, float slnear) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowCube) ArrLights[id]->ShadowCube->SetNear(slnear); @@ -1044,7 +1044,7 @@ float Lights::GetShadowLocalNear(ID id) const void Lights::SetShadowLocalFar(ID id, float slfar) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowCube) { @@ -1077,7 +1077,7 @@ float Lights::GetShadowLocalFar(ID id) const void Lights::SetLightCubeEdgeEnable(ID id, int edge, bool enable) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowCube) ArrLights[id]->ShadowCube->SetEnableCubeEdge(edge, enable); @@ -1118,7 +1118,7 @@ ID Lights::GetLightIDArr(ID id, ID inid, int how) void Lights::SetLightIDArr(ID id, ID inid, int how, ID id_arr) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowSM) { @@ -1139,7 +1139,7 @@ void Lights::SetLightIDArr(ID id, ID inid, int how, ID id_arr) void Lights::SetLightTypeShadowed(ID id, LTYPE_SHADOW type) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); ArrLights[id]->TypeShadowed = type; @@ -1490,7 +1490,7 @@ void Lights::ToneMappingCom(DWORD timeDelta, float factor_adapted) void Lights::Set4Or3Splits(ID id, bool is4) { - LIGHTS_PRE_COND_ID(id); + LIGHTS_PRE_COND_ID(id, _VOID); if (ArrLights[id]->ShadowPSSM) ArrLights[id]->ShadowPSSM->Set4Or3Splits(is4); @@ -1521,7 +1521,7 @@ LTYPE_LIGHT Lights::DelGetType(ID key) void Lights::DelDel(ID key) { - LIGHTS_PRE_COND_KEY_DEL(key); + LIGHTS_PRE_COND_KEY_DEL(key, _VOID); mem_delete(ArrDelLights[key]); ArrDelLights.erase(key); } diff --git a/source/mtllight/material.cpp b/source/mtllight/material.cpp index ed373db66b389b12bb8df4f2965d2ecfc70110fd..01906c5bd71c376d3238a118e674c632718d523d 100644 --- a/source/mtllight/material.cpp +++ b/source/mtllight/material.cpp @@ -165,9 +165,9 @@ void Materials::Material::Nulling() Type = MTLTYPE_MODEL_STATIC; - MainTexture-1; - PreShaderVS-1; - PreShaderPS-1; + MainTexture = -1; + PreShaderVS = -1; + PreShaderPS = -1; MicroDetail = MaterialMaskPM(); LightParam = MaterialLightParam(); @@ -404,7 +404,7 @@ MTLTYPE_MODEL Materials::GetTypeModel(ID id) void Materials::SetTypeModel(ID id, MTLTYPE_MODEL type_model) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->Type = type_model; } @@ -416,7 +416,7 @@ bool Materials::MtlGetUsingAlphaTest(ID id) void Materials::MtlSetUsingAlphaTest(ID id, bool is_using) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->IsAlphaTest = is_using; } @@ -431,7 +431,7 @@ MTLTYPE_REFLECT Materials::MtlTypeReflection(ID id) void Materials::MtlRefSetIDArr(ID id, ID inid, int cube, ID idarr) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->SetIDArr(inid, cube, idarr); } @@ -455,13 +455,13 @@ ID Materials::MtlRefGetIDArr(ID id, ID inid, int cube) void Materials::MtlRefPreRenderPlane(ID id, D3DXPLANE* plane) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->PreRenderRefPlane(plane); } ISXFrustum* Materials::MtlRefGetfrustum(ID id, int cube) { - MTL_REF_PRE_COND_ID(id,0); + MTL_REF_PRE_COND_ID(id, 0); if (cube == 0 || (cube > 0 && (ArrMaterials[id]->Reflect->GetTypeReflect() == MTLTYPE_REFLECT_CUBE_STATIC || ArrMaterials[id]->Reflect->GetTypeReflect() == MTLTYPE_REFLECT_CUBE_DYNAMIC))) return ArrMaterials[id]->Reflect->ReflectFrustum[cube]; return 0; @@ -469,26 +469,26 @@ ISXFrustum* Materials::MtlRefGetfrustum(ID id, int cube) void Materials::MtlRefPostRenderPlane(ID id) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->PostRenderRefPlane(); } IDirect3DTexture9* Materials::MtlRefPlaneGetTex(ID id) { - MTL_REF_PRE_COND_ID(id,0); + MTL_REF_PRE_COND_ID(id, 0); return ArrMaterials[id]->Reflect->GetRefPlaneTex(); } void Materials::MtlRefSetMinMax(ID id, float3_t* min, float3_t* max) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->SetMinMax(min,max); } bool Materials::MtlRefIsAllowedRender(ID id) { - MTL_REF_PRE_COND_ID(id,false); + MTL_REF_PRE_COND_ID(id, false); if (ArrMaterials[id]->Reflect) return ArrMaterials[id]->Reflect->AllowedRender(); @@ -498,43 +498,43 @@ bool Materials::MtlRefIsAllowedRender(ID id) void Materials::MtlRefCubeBeginRender(ID id, float3_t* center) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->BeginRenderRefCube(center); } void Materials::MtlRefCubePreRender(ID id, int cube, float4x4* world) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->PreRenderRefCube(cube, world); } void Materials::MtlRefCubePostRender(ID id, int cube) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->PostRenderRefCube(cube); } void Materials::MtlRefCubeEndRender(ID id, float3_t* viewpos) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->EndRenderRefCube(viewpos); } bool Materials::MtlRefUpdateCountUpdate( ID id, float3_t* viewpos) { - MTL_REF_PRE_COND_ID(id,false); + MTL_REF_PRE_COND_ID(id, false); return ArrMaterials[id]->Reflect->UpdateCountUpdate(viewpos); } void Materials::MtlRefNullingCountUpdate(ID id) { - MTL_REF_PRE_COND_ID(id); + MTL_REF_PRE_COND_ID(id, _VOID); ArrMaterials[id]->Reflect->NullingCountUpdate(); } IDirect3DCubeTexture9* Materials::RefCubeGetTex(ID id) { - MTL_REF_PRE_COND_ID(id,0); + MTL_REF_PRE_COND_ID(id, 0); return ArrMaterials[id]->Reflect->GetRefCubeTex(); } @@ -555,13 +555,13 @@ MTLTYPE_PHYSIC Materials::MtlGetPhysicMaterial(ID id) void Materials::MtlSetTexture(ID id, const char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->MainTexture = SGCore_LoadTexAddName(path_tex, LOAD_TEXTURE_TYPE_LOAD); } void Materials::MtlGetTexture(ID id, char* name) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); if (name && ArrMaterials[id]->mtl->MainTexture >= 0) SGCore_LoadTexGetName(ArrMaterials[id]->mtl->MainTexture, name); @@ -576,25 +576,25 @@ ID Materials::MtlGetTextureID(ID id) void Materials::MtlSetVS(ID id, const char* path_vs) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->PreShaderVS = SGCore_ShaderLoad(SHADER_TYPE_VERTEX, path_vs, path_vs, SHADER_CHECKDOUBLE_PATH); } void Materials::MtlGetVS(ID id, char* name) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); SGCore_ShaderGetPath(SHADER_TYPE_VERTEX, ArrMaterials[id]->mtl->PreShaderVS, name); } void Materials::MtlSetPS(ID id, const char* path_ps) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->PreShaderPS = SGCore_ShaderLoad(SHADER_TYPE_PIXEL, path_ps, path_ps, SHADER_CHECKDOUBLE_PATH); } void Materials::MtlGetPS(ID id, char* name) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); SGCore_ShaderGetPath(SHADER_TYPE_PIXEL, ArrMaterials[id]->mtl->PreShaderPS, name); } @@ -603,39 +603,39 @@ void Materials::MtlGetPS(ID id, char* name) void Materials::MtlSetLighting(ID id, bool is_lighting) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->IsUnlit = !is_lighting; } bool Materials::MtlGetLighting(ID id) { - MTL_PRE_COND_ID(id,false); + MTL_PRE_COND_ID(id, false); return !ArrMaterials[id]->mtl->IsUnlit; } void Materials::MtlSetIsTextureLighting(ID id, bool is_tex_lighting) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->LightParam.IsTextureParam = is_tex_lighting; } bool Materials::MtlGetIsTextureLighting(ID id) { - MTL_PRE_COND_ID(id,false); + MTL_PRE_COND_ID(id, false); return ArrMaterials[id]->mtl->LightParam.IsTextureParam; } void Materials::MtlSetTextureLighting(ID id, const char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->LightParam.ParamTex = SGCore_LoadTexAddName(path_tex, LOAD_TEXTURE_TYPE_LOAD); } void Materials::MtlGetTextureLighting(ID id, char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); if (path_tex && ArrMaterials[id]->mtl->LightParam.ParamTex >= 0) { SGCore_LoadTexGetName(ArrMaterials[id]->mtl->LightParam.ParamTex, path_tex); @@ -649,32 +649,32 @@ void Materials::MtlGetTextureLighting(ID id, char* path_tex) void Materials::MtlSetRoughness(ID id, float roughness) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->LightParam.RoughnessValue = roughness; } float Materials::MtlGetRoughness(ID id) { - MTL_PRE_COND_ID(id,-1); + MTL_PRE_COND_ID(id, -1); return ArrMaterials[id]->mtl->LightParam.RoughnessValue; } void Materials::MtlSetF0(ID id, float f0) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->LightParam.F0Value = f0; } float Materials::MtlGetF0(ID id) { - MTL_PRE_COND_ID(id,-1); + MTL_PRE_COND_ID(id, -1); return ArrMaterials[id]->mtl->LightParam.F0Value; } void Materials::MtlSetThickness(ID id, float thickness) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->LightParam.ThicknessValue = thickness; } @@ -726,7 +726,7 @@ float Materials::MtlGetDensity(ID id) void Materials::MtlSetTypeTransparency(ID id, MTLTYPE_TRANSPARENCY type) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->LightParam.TypeRefraction = type; } @@ -739,7 +739,7 @@ MTLTYPE_TRANSPARENCY Materials::MtlGetTypeTransparency(ID id) void Materials::MtlSetTypeReflection(ID id, MTLTYPE_REFLECT type) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->LightParam.TypeReflect = type; if (ArrMaterials[id]->mtl->LightParam.TypeReflect != MTLTYPE_REFLECT_NONE) @@ -762,13 +762,13 @@ MTLTYPE_REFLECT Materials::MtlGetTypeReflection(ID id) void Materials::MtlSetMaskTex(ID id, const char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->MicroDetail.Mask = SGCore_LoadTexAddName(path_tex, LOAD_TEXTURE_TYPE_LOAD); } void Materials::MtlGetMaskTex(ID id, char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); if (path_tex && ArrMaterials[id]->mtl->MicroDetail.Mask >= 0) SGCore_LoadTexGetName(ArrMaterials[id]->mtl->MicroDetail.Mask, path_tex); else if (path_tex) @@ -777,13 +777,13 @@ void Materials::MtlGetMaskTex(ID id, char* path_tex) void Materials::MtlSetMRTex(ID id, int channel, const char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->MicroDetail.ArrMicroDiffuse[channel] = SGCore_LoadTexAddName(path_tex, LOAD_TEXTURE_TYPE_LOAD); } void Materials::MtlGetMRTex(ID id, int channel, char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); if (path_tex && ArrMaterials[id]->mtl->MicroDetail.ArrMicroDiffuse[channel] >= 0) SGCore_LoadTexGetName(ArrMaterials[id]->mtl->MicroDetail.ArrMicroDiffuse[channel], path_tex); else if (path_tex) @@ -793,13 +793,13 @@ void Materials::MtlGetMRTex(ID id, int channel, char* path_tex) void Materials::MtlSetDTex(ID id, int channel, const char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->MicroDetail.ArrDeatail[channel] = SGCore_LoadTexAddName(path_tex, LOAD_TEXTURE_TYPE_LOAD); } void Materials::MtlGetDTex(ID id, int channel, char* path_tex) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); if (path_tex && ArrMaterials[id]->mtl->MicroDetail.ArrDeatail[channel] >= 0) SGCore_LoadTexGetName(ArrMaterials[id]->mtl->MicroDetail.ArrDeatail[channel], path_tex); else if (path_tex) @@ -810,7 +810,7 @@ void Materials::MtlGetDTex(ID id, int channel, char* path_tex) void Materials::MtlSetSTDVS(ID id, MTL_SHADERSTD type, bool is_send) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); if (type == MTL_SHADERSTD_MATRIX_WORLD) ArrMaterials[id]->mtl->VS.IsTransWorld = is_send; else if (type == MTL_SHADERSTD_MATRIX_VIEW) @@ -836,7 +836,7 @@ void Materials::MtlSetSTDVS(ID id, MTL_SHADERSTD type, bool is_send) bool Materials::MtlGetSTDVS(ID id, MTL_SHADERSTD type) { - MTL_PRE_COND_ID(id,false); + MTL_PRE_COND_ID(id, false); if (type == MTL_SHADERSTD_MATRIX_WORLD) return ArrMaterials[id]->mtl->VS.IsTransWorld; else if (type == MTL_SHADERSTD_MATRIX_VIEW) @@ -864,7 +864,7 @@ bool Materials::MtlGetSTDVS(ID id, MTL_SHADERSTD type) void Materials::MtlSetSTDPS(ID id, MTL_SHADERSTD type, bool is_send) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); if (type == MTL_SHADERSTD_MATRIX_WORLD) ArrMaterials[id]->mtl->PS.IsTransWorld = is_send; else if (type == MTL_SHADERSTD_MATRIX_VIEW) @@ -890,7 +890,7 @@ void Materials::MtlSetSTDPS(ID id, MTL_SHADERSTD type, bool is_send) bool Materials::MtlGetSTDPS(ID id, MTL_SHADERSTD type) { - MTL_PRE_COND_ID(id,false); + MTL_PRE_COND_ID(id, false); if (type == MTL_SHADERSTD_MATRIX_WORLD) return ArrMaterials[id]->mtl->PS.IsTransWorld; else if (type == MTL_SHADERSTD_MATRIX_VIEW) @@ -918,50 +918,50 @@ bool Materials::MtlGetSTDPS(ID id, MTL_SHADERSTD type) void Materials::MtlSetUDVS(ID id, int component, float val) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->VS.Param[component] = val; } float Materials::MtlGetUDVS(ID id, int component) { - MTL_PRE_COND_ID(id,-1); + MTL_PRE_COND_ID(id, -1); return ArrMaterials[id]->mtl->VS.Param[component]; } void Materials::MtlSetUDVS_InPS(ID id, bool is_send_ps) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->TransVSDataInPS = is_send_ps; } bool Materials::MtlGetUDVS_InPS(ID id) { - MTL_PRE_COND_ID(id,false); + MTL_PRE_COND_ID(id, false); return ArrMaterials[id]->mtl->TransVSDataInPS; } void Materials::MtlSetUDPS(ID id, int component, float val) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->PS.Param[component] = val; } float Materials::MtlGetUDPS(ID id, int component) { - MTL_PRE_COND_ID(id,-1); + MTL_PRE_COND_ID(id, -1); return ArrMaterials[id]->mtl->PS.Param[component]; } void Materials::MtlSetUDPS_InPS(ID id, bool is_send_vs) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); ArrMaterials[id]->mtl->TransPSDataInVS = is_send_vs; } bool Materials::MtlGetUDPS_InPS(ID id) { - MTL_PRE_COND_ID(id,false); + MTL_PRE_COND_ID(id, false); return ArrMaterials[id]->mtl->TransPSDataInVS; } @@ -1109,7 +1109,6 @@ bool Materials::LoadMtl(const char* name, Material** mtl) { char* ArrRGBA[4] = { "r", "g", "b", "a" }; - char tmpNameMtl[256]; char tmpVS[256]; char tmpPS[256]; @@ -1152,7 +1151,7 @@ bool Materials::LoadMtl(const char* name, Material** mtl) Material* tmpMtl = *mtl; sprintf(path, "%s%s\\%s.mtl", Core_RStringGet(G_RI_STRING_PATH_GS_MTRLS), tmp_path, tmp_name); - if (Core_0FileExists(path)) + if (FileExistsFile(path)) { ISXConfig* config = Core_OpConfig(path); @@ -1608,7 +1607,7 @@ void Materials::MtlReLoad(ID id, const char* name) void Materials::MtlSave(ID id) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); char tmp_path[256];//папка char tmp_name[256];//само им¤ текстыр с расширением @@ -1653,9 +1652,6 @@ void Materials::MtlSave(ID id) fprintf(file, "[%s]\n", mtrl->Name); - char tmpPathVS[1024]; - char tmpPathPS[1024]; - char tmpPathVSName[1024]; char tmpPathPSName[1024]; @@ -1937,7 +1933,7 @@ void Materials::RenderStd(MTLTYPE_MODEL type, float4x4* world, ID slot, ID id_mt void Materials::Render(ID id, float4x4* world) { - MTL_PRE_COND_ID(id); + MTL_PRE_COND_ID(id, _VOID); static const int *r_win_width = GET_PCVAR_INT("r_win_width"); static const int *r_win_height = GET_PCVAR_INT("r_win_height"); @@ -2178,7 +2174,7 @@ void Materials::Render(ID id, float4x4* world) void Materials::RenderLight(float4_t* color, float4x4* world) { - MTL_PRE_COND_ID(MtrlDefLight); + MTL_PRE_COND_ID(MtrlDefLight, _VOID); ArrMaterials[MtrlDefLight]->mtl->PS.Param = *color; Render(MtrlDefLight, world); diff --git a/source/mtllight/material.h b/source/mtllight/material.h index 87003dc48f5cba168848d1e8a1111be239336114..dba510a0e091903127c1b336c5969cba4016c1ab 100644 --- a/source/mtllight/material.h +++ b/source/mtllight/material.h @@ -9,6 +9,7 @@ See the license in LICENSE #include <common/String.h> #include <common/Array.h> +#include <common/file_utils.h> #include "reflection.h" #include <direct.h> diff --git a/source/mtllight/reflection.cpp b/source/mtllight/reflection.cpp index 71bbbec2f67d6185fd0ac2f4ee5a0f8e30d2c0a4..1001b0bb0c64f9b515f5c043171045bea4fd016f 100644 --- a/source/mtllight/reflection.cpp +++ b/source/mtllight/reflection.cpp @@ -291,8 +291,6 @@ void Reflection::PreRenderRefCube(int cube, float4x4* world) void Reflection::PostRenderRefCube(int cube) { - LPDIRECT3DSURFACE9 BackBuf; - mem_release_del(CubeReflectSurface[cube]); mem_release(SurfaceReflect); diff --git a/source/mtllight/sxmtllight.h b/source/mtllight/sxmtllight.h index ce66190873de830055105e2b184db3e4c1d535cb..dfbb1bb0d4759ed695db764c672b05fc1d1bf5f2 100644 --- a/source/mtllight/sxmtllight.h +++ b/source/mtllight/sxmtllight.h @@ -230,7 +230,7 @@ SX_LIB_API void SML_LigthsSetCastGlobalShadow(bool isShadowed); \note Предварительный просчет - просчет для всего света (к примеру в другом потоке) @{*/ -SX_LIB_API bool SML_LigthsComVisibleForFrustum(ID id, const const ISXFrustum *pFrustum); //!< виден ли свет в данном фрустуме frustum (отдельный просчет) +SX_LIB_API bool SML_LigthsComVisibleForFrustum(ID id, const ISXFrustum *pFrustum); //!< виден ли свет в данном фрустуме frustum (отдельный просчет) SX_LIB_API float SML_LigthsComDistFor(ID id, const float3 *pViewPos); //!< дистанция от viewpos до начала света (отдельный просчет) //! просчет видимости и расстояния от наблюдателя viewpos до начала света, для каждого света (предварительный просчет) diff --git a/source/particles/effect.cpp b/source/particles/effect.cpp index 3a150f35773f57ee84137677dcac008d46a8d93c..4c3452706afd1f7f3bec6ea66fc6b2dc23146452 100644 --- a/source/particles/effect.cpp +++ b/source/particles/effect.cpp @@ -304,7 +304,7 @@ void Effects::Save(const char* path) void Effects::Load(const char* path) { - if (!Core_0FileExists(path)) + if (!FileExistsFile(path)) { LibReport(REPORT_MSG_LEVEL_ERROR, "%s - failed to save, %s", GEN_MSG_LOCATION, path); return; diff --git a/source/particles/effect.h b/source/particles/effect.h index 4c008947643fa3d27f2f65ca3de0a5f20d66656c..8c083f92142c619118576540fa9687a117479af9 100644 --- a/source/particles/effect.h +++ b/source/particles/effect.h @@ -17,6 +17,7 @@ See the license in LICENSE #include "emitter.h" #include <common/array.h> #include <common/string.h> +#include <common/file_utils.h> #define EFFECTS_EFFECT_PRECOND_KEY(key,retval) \ if (!(key >= 0 && key < ArrKey.size()))\ diff --git a/source/physics/PhyWorld.cpp b/source/physics/PhyWorld.cpp index 325de7d19235c2ee66f4e7d73c91c833d0832aa5..08a81981338a3309738fa1daf7b8014be30e0cec 100644 --- a/source/physics/PhyWorld.cpp +++ b/source/physics/PhyWorld.cpp @@ -433,7 +433,7 @@ bool PhyWorld::ImportGeom(const char * file) name[len - 1] = 'm'; name[len] = 0; - if(!Core_0FileExists(file) || !Core_0FileExists(name)) + if (!FileExistsFile(file) || !FileExistsFile(name)) { return(false); } diff --git a/source/physics/PhyWorld.h b/source/physics/PhyWorld.h index d35ba69dea9a8dbfae01d6830b282f7374fbac0f..a884c5d1c60eb921cc5ea4e2e3e3d125c0f58e82 100644 --- a/source/physics/PhyWorld.h +++ b/source/physics/PhyWorld.h @@ -14,6 +14,7 @@ See the license in LICENSE #include <common/AssotiativeArray.h> #include <common/Array.h> +#include <common/file_utils.h> #include <gdefines.h> diff --git a/source/pp/sxpp.cpp b/source/pp/sxpp.cpp index 54a490a6785c84d87ca42248120b783d9c0c8d2d..a45182bed15f025e66528ec9a2ff17dec78b5c24 100644 --- a/source/pp/sxpp.cpp +++ b/source/pp/sxpp.cpp @@ -865,12 +865,13 @@ SX_LIB_API void SPP_RenderLensFlare(float3_t* param, float4_t* sun_color, bool u RenderSurf->Release(); BackBuf->Release(); - if (GetKeyState('N')) + /*if (GetKeyState('N')) { + //MessageBox(0,"PP GetKeyState",0,0); char tmppath[1024]; - sprintf(tmppath, "%sbp.png", "C:\\1\\"); - D3DXSaveTextureToFile(tmppath, D3DXIFF_PNG, SGCore_RTGetTexture(PPSet::IDsRenderTargets::Bright), NULL); - } + sprintf(tmppath, "%sbp.jpg", "C:\\1\\"); + D3DXSaveTextureToFile(tmppath, D3DXIFF_JPG, SGCore_RTGetTexture(PPSet::IDsRenderTargets::Bright), NULL); + }*/ SGCore_RTGetTexture(PPSet::IDsRenderTargets::GetSendRT())->GetSurfaceLevel(0, &RenderSurf); diff --git a/source/render/render_func.cpp b/source/render/render_func.cpp index f0c3e7936e1afaa861d92e54fc59d8cf4491d9b0..58fafe174262d31d342f09ab197139348f40a5b5 100644 --- a/source/render/render_func.cpp +++ b/source/render/render_func.cpp @@ -216,11 +216,8 @@ void SXRenderFunc::ComVisibleForLight() { for (int k = 0; k < 6; k++) { - ID idarr = -1; - - idarr = SGeom_ModelsAddArrForCom(); if (SML_LigthsGetIDArr(i, RENDER_IDARRCOM_GEOM, k) <= -1) - SML_LigthsSetIDArr(i, RENDER_IDARRCOM_GEOM, k, idarr); + SML_LigthsSetIDArr(i, RENDER_IDARRCOM_GEOM, k, SGeom_ModelsAddArrForCom()); if (SML_LigthsGetIDArr(i, RENDER_IDARRCOM_GREEN, k) <= -1) SML_LigthsSetIDArr(i, RENDER_IDARRCOM_GREEN, k, SGeom_GreenAddArrForCom()); @@ -361,7 +358,7 @@ void SXRenderFunc::SaveScreenShot() char tmppath[1024]; static int numscreen = 0; - if (!Core_0FileExists(Core_RStringGet(G_RI_STRING_PATH_SCREENSHOTS))) + if (!FileExistsFile(Core_RStringGet(G_RI_STRING_PATH_SCREENSHOTS))) { CreateDirectoryA(Core_RStringGet(G_RI_STRING_PATH_SCREENSHOTS), NULL); } @@ -370,7 +367,7 @@ void SXRenderFunc::SaveScreenShot() { ++numscreen; sprintf(tmppath, "%sscreen_skyxengine_build_%d.jpg", Core_RStringGet(G_RI_STRING_PATH_SCREENSHOTS), numscreen); - } while (Core_0FileExists(tmppath)); + } while (FileExistsFile(tmppath)); LPDIRECT3DSURFACE9 BackBuf; GData::DXDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &BackBuf); diff --git a/source/render/render_func.h b/source/render/render_func.h index 8e6859f6f2feb7282fdeb761a543c172242d46e7..ea806761f0171cd8aeabe7b6f93d3bd238cdf41c 100644 --- a/source/render/render_func.h +++ b/source/render/render_func.h @@ -19,6 +19,7 @@ See the license in LICENSE #include <GRegisterIndex.h> #include <windows.h> #include <common/sxtypes.h> +#include <common/file_utils.h> #define SM_D3D_CONVERSIONS #include <common/SXMath.h> diff --git a/source/score/sound.cpp b/source/score/sound.cpp index 41b5ce6b54326376347326c1455e16374fc424fd..20f62be813b105057ff6a5599c71ea293f579546 100644 --- a/source/score/sound.cpp +++ b/source/score/sound.cpp @@ -6,21 +6,22 @@ See the license in LICENSE #include "sound.h" -size_t ogg_read(void *ptr, size_t size, size_t nmemb, void *datasource) +//############################################################################ + +size_t OggCallbackRead(void *ptr, size_t size, size_t nmemb, void *datasource) { FILE* f = (FILE*)datasource; return fread(ptr, 1, size * nmemb, f); } -int ogg_close(void* datasource) +int OggCallbackClose(void* datasource) { FILE* f = (FILE*)datasource; fclose(f); return 0; } -//позиционирование -int ogg_seek(void *datasource, ogg_int64_t offset, int whence) +int OggCallbackSeek(void *datasource, ogg_int64_t offset, int whence) { FILE* f = (FILE*)datasource; switch (whence) @@ -33,8 +34,7 @@ int ogg_seek(void *datasource, ogg_int64_t offset, int whence) return 1; } -//размер файла -long ogg_tell(void* datasource) +long OggCallbackTell(void* datasource) { FILE* f = (FILE*)datasource; return ftell(f); @@ -42,55 +42,442 @@ long ogg_tell(void* datasource) //############################################################################ -MainSound::MainSound() +CSoundManager::CSoundManager() { - DeviceSound = 0; - DSPrimary = 0; + m_pDeviceSound = 0; + m_pPrimaryBuffer = 0; + + for (int i = 0; i < SOUND_CHANNELS_COUNT; ++i) + m_aChannels[i] = SOUND_CHANNEL_NONE; } -MainSound::~MainSound() +CSoundManager::~CSoundManager() { - Clear(); - mem_release_del(DSPrimary); - mem_release_del(DeviceSound); + clear(); + mem_release_del(m_pPrimaryBuffer); + mem_release_del(m_pDeviceSound); } -void MainSound::Clear() +void CSoundManager::clear() { - for(UINT i = 0; i < ArrSounds.size(); ++i) + for(UINT i = 0; i < m_aSounds.size(); ++i) { - mem_delete(ArrSounds[i]); + mem_delete(m_aSounds[i]); } } -MainSound::Sound::Sound() +CSoundManager::CSound::CSound() { - ZeroMemory(this, sizeof(MainSound::Sound)); - Id = -1; + ZeroMemory(this, sizeof(CSoundManager::CSound)); + m_id = SOUND_FAIL_ID; + m_fVolume = 1.f; } -MainSound::Sound::~Sound() +CSoundManager::CSound::~CSound() { - if (StreamFile) - fclose(StreamFile); + if (m_pStream) + fclose(m_pStream); - mem_release_del(DSBuffer); - if (VorbisFile) + //mem_release_del(m_pSoundBuffer); + if (m_pVorbisFile) { - ov_clear(VorbisFile); - mem_delete(VorbisFile); + ov_clear(m_pVorbisFile); + mem_delete(m_pVorbisFile); } } -void MainSound::Init(HWND hwnd) +//########################################################################## + +CSoundManager::СSoundKit::СSoundKit() +{ + m_szName[0] = 0; + m_idChannel = SOUND_FAIL_ID; + m_is3D = false; + m_fDistAudible = SOUND_DIST_AUDIBLE_DEFAULT; +} + +CSoundManager::СSoundKit::~СSoundKit() +{ + +} + +ID CSoundManager::sndkitCreate(const char *szName, ID idChannel, bool is3D, float fDistAudible) +{ + // список звуков подлежащаих загрузке + СSoundKit *pSndKit = new СSoundKit(); + pSndKit->m_idChannel = idChannel; + pSndKit->m_is3D = is3D; + pSndKit->m_fDistAudible = fDistAudible; + sprintf(pSndKit->m_szName, "%s", szName); + + m_aSoundKits.push_back(pSndKit); + + return m_aSoundKits.size() - 1; +} + +ID CSoundManager::sndkitCreateFromList(const char *szName, ID idChannel, Array<String> aStrings, bool is3D, float fDistAudible, float fVolume) { - if (FAILED(DirectSoundCreate8(NULL, &DeviceSound, NULL))) + СSoundKit *pSndKit = new СSoundKit(); + pSndKit->m_idChannel = idChannel; + pSndKit->m_is3D = is3D; + pSndKit->m_fDistAudible = fDistAudible; + sprintf(pSndKit->m_szName, "%s", szName); + m_aSoundKits.push_back(pSndKit); + ID idSndKit = m_aSoundKits.size() - 1; + + String sFileData; + float fDistAudibleData = -2.f; + float fVolumeData = -2.f; + Array<UINT> aDelaysData; + + for (int i = 0, il = aStrings.size(); i < il; ++i) + { + aDelaysData.clearFast(); + fDistAudibleData = -2.f; + fVolumeData = -2.f; + + if (SndGetDataFromStr(aStrings[i].c_str(), sFileData, fDistAudibleData, fVolumeData, aDelaysData)) + { + if (fDistAudibleData == -2.f) + fDistAudibleData = -1.f; + + if (fVolumeData == -2.f) + fVolumeData = fVolume; + + sndkitAddSound(idSndKit, sFileData.c_str(), fDistAudibleData, fVolumeData, (aDelaysData.size() > 0 ? &(aDelaysData[0]) : 0), aDelaysData.size()); + } + else + sndkitAddSound(idSndKit, StrTrim(aStrings[i].c_str()).c_str(), pSndKit->m_fDistAudible, fVolume); + } + + return idSndKit; +} + +void CSoundManager::sndkitAddSound(ID idSndKit, const char *szFile, float fDistAudible, float fVolume, UINT *pArrDelay, int iSizeArrDelay) +{ + SOUND_SNDKIT_PRECOND(idSndKit, _VOID); + + СSoundKit *pSndKit = m_aSoundKits[idSndKit]; + + ID idSnd = SOUND_FAIL_ID; + + if (pSndKit->m_is3D) + idSnd = soundCreate3dInst(szFile, pSndKit->m_idChannel, (fDistAudible > 0 ? fDistAudible : pSndKit->m_fDistAudible)); + else + idSnd = soundCreate2dInst(szFile, pSndKit->m_idChannel); + + СSoundKit::CSoundKitObject oSndKitObj; + oSndKitObj.m_id = idSnd; + oSndKitObj.m_fVolume = fVolume; + + for (int i = 0, il = iSizeArrDelay; i < il; ++i) + { + oSndKitObj.m_aDelays.push_back(pArrDelay[i]); + } + + pSndKit->m_aSounds.push_back(oSndKitObj); +} + + +ID CSoundManager::sndkitGetID(const char *szName) +{ + for (int i = 0, il = m_aSoundKits.size(); i < il; ++i) + { + if (stricmp(m_aSoundKits[i]->m_szName, szName) == 0) + return i; + } + + return SOUND_FAIL_ID; +} + +ID CSoundManager::sndkitGetChannel(ID idSndKit) +{ + SOUND_SNDKIT_PRECOND(idSndKit, SOUND_FAIL_ID); + + return m_aSoundKits[idSndKit]->m_idChannel; +} + + +void CSoundManager::sndkitGetName(ID idSndKit, char *szName) +{ + SOUND_SNDKIT_PRECOND(idSndKit, _VOID); + + strcpy(szName, m_aSoundKits[idSndKit]->m_szName); +} + + +void CSoundManager::sndkitDelete(ID idSndKit) +{ + SOUND_SNDKIT_PRECOND(idSndKit, _VOID); + + СSoundKit *pSndKit = m_aSoundKits[idSndKit]; + + for (int i = 0, il = pSndKit->m_aSounds.size(); i < il; ++i) + { + soundDelete(pSndKit->m_aSounds[i].m_id); + } + + mem_delete(m_aSoundKits[idSndKit]); +} + + +void CSoundManager::sndkitDeleteAll() +{ + for (int i = 0, il = m_aSoundKits.size(); i < il; ++i) + { + sndkitDelete(i); + } +} + + +uint64_t CSoundManager::sndkitPlay(ID idSndKit, uint64_t id2, const float3 *pPos, float fVolume, float fPan) +{ + SOUND_SNDKIT_PRECOND(idSndKit, SOUND_FAIL_ID); + + СSoundKit *pSndKit = m_aSoundKits[idSndKit]; + + // если канал проигрывается + SOUND_CHANNEL_PLAYING(pSndKit->m_idChannel, ((id2 != SOUND_SNDKIT_INSTANCE_BLOCK && id2 != SOUND_SNDKIT_INSTANCE_NOTBLOCK) ? id2 : SOUND_FAIL_ID)); + + // если id2 валиден и инстанс проигрывается + if ((id2 != SOUND_SNDKIT_INSTANCE_BLOCK && id2 != SOUND_SNDKIT_INSTANCE_NOTBLOCK) && soundInstancePlaying(pSndKit->m_aSounds[SOUND_DECODE2ID_HI(id2)].m_id, SOUND_DECODE2ID_LO(id2))) + return id2; + + // если id2 валиден то освобождаем инстанс + if (id2 != SOUND_SNDKIT_INSTANCE_BLOCK && id2 != SOUND_SNDKIT_INSTANCE_NOTBLOCK) + soundInstanceFree(pSndKit->m_aSounds[SOUND_DECODE2ID_HI(id2)].m_id, SOUND_DECODE2ID_LO(id2)); + + ID idRand = rand() % (pSndKit->m_aSounds.size()); + ID idSndInstance = -1; + + UINT *pArr = 0; + int iSizeArr = pSndKit->m_aSounds[idRand].m_aDelays.size(); + + if (iSizeArr > 0) + pArr = &(pSndKit->m_aSounds[idRand].m_aDelays[0]); + + if (pSndKit->m_is3D) + { + if (!pPos) + { + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unresolved call function playing 3d sound without position", GEN_MSG_LOCATION); + return SOUND_FAIL_ID; + } + + idSndInstance = soundInstancePlay(pSndKit->m_aSounds[idRand].m_id, id2 != SOUND_SNDKIT_INSTANCE_NOTBLOCK, false, pArr, iSizeArr, pPos, (fVolume < 0 ? pSndKit->m_aSounds[idRand].m_fVolume : fVolume)); + } + else + idSndInstance = soundInstancePlay(pSndKit->m_aSounds[idRand].m_id, id2 != SOUND_SNDKIT_INSTANCE_NOTBLOCK, false, pArr, iSizeArr, 0, (fVolume < 0 ? pSndKit->m_aSounds[idRand].m_fVolume : fVolume), fPan); + + /*if (idSndInstance > 0) + { + CSound* snd = m_aSounds[pSndKit->m_aSounds[SOUND_DECODE2ID_HI(id2)].m_id]; + SOUND_SNDINSTANCE_BUSY busy = snd->m_aInstances[SOUND_DECODE2ID_LO(id2)].m_busy; + int qwerty = 0; + }*/ + + //ibReport(REPORT_MSG_LEVEL_NOTICE, "idSndInstance = %d\n", idSndInstance); + return SOUND_ENCODE2ID(idRand, idSndInstance); +} + + +void CSoundManager::sndkitStop(ID idSndKit, uint64_t id2) +{ + SOUND_SNDKIT_PRECOND(idSndKit, _VOID); + + if (id2 == SOUND_SNDKIT_INSTANCE_BLOCK) + return; + + СSoundKit *pSndKit = m_aSoundKits[idSndKit]; + + soundInstanceStop(pSndKit->m_aSounds[SOUND_DECODE2ID_HI(id2)].m_id, SOUND_DECODE2ID_LO(id2)); +} + +//########################################################################## + +void CSoundManager::channelAdd(ID idChannel, bool isPlaying) +{ + SOUND_CHANNEL_PRECOND(idChannel, _VOID); + + if (m_aChannels[idChannel] == SOUND_CHANNEL_NONE) + m_aChannels[idChannel] = isPlaying; +} + +bool CSoundManager::channelExists(ID idChannel) +{ + SOUND_CHANNEL_PRECOND(idChannel, false); + + return (m_aChannels[idChannel] != SOUND_CHANNEL_NONE); +} + +int CSoundManager::channelGetSndCount(ID idChannel) +{ + SOUND_CHANNEL_PRECOND(idChannel, SOUND_CHANNEL_NONE); + + int iCount = 0; + for (int i = 0, il = m_aSounds.size(); i < il; ++i) + { + if (m_aSounds[i]->m_idChannel == idChannel) + ++iCount; + } + + return iCount; +} + +void CSoundManager::channelPlay(ID idChannel) +{ + SOUND_CHANNEL_PRECOND(idChannel, _VOID); + + for (int i = 0, il = m_aSounds.size(); i < il; ++i) + { + if (m_aSounds[i] && m_aSounds[i]->m_idChannel == idChannel) + { + channelSndPlay(idChannel, i); + } + } + + m_aChannels[idChannel] = SOUND_CHANNEL_PLAY; +} + +bool CSoundManager::channelPlaying(ID idChannel) +{ + SOUND_CHANNEL_PRECOND(idChannel, false); + + return m_aChannels[idChannel]; +} + +void CSoundManager::channelStop(ID idChannel) +{ + SOUND_CHANNEL_PRECOND(idChannel, _VOID); + + for (int i = 0, il = m_aSounds.size(); i < il; ++i) + { + if (m_aSounds[i] && m_aSounds[i]->m_idChannel == idChannel) + { + channelSndStop(idChannel, i); + } + } + + m_aChannels[idChannel] = SOUND_CHANNEL_STOP; +} + +void CSoundManager::channelPlayOnly(ID idChannel) +{ + SOUND_CHANNEL_PRECOND(idChannel, _VOID); + + for (int i = 0, il = m_aSounds.size(); i < il; ++i) + { + if (m_aSounds[i]) + { + if (m_aSounds[i]->m_idChannel == idChannel) + { + channelSndPlay(idChannel, i); + } + else + { + channelSndStop(idChannel, i); + } + } + } +} + +void CSoundManager::soundResumePlayDelay(CSoundBase *pSndBase) +{ + if (!pSndBase || !(pSndBase->m_isPlayDelay)) + return; + + //если ключ валиден + if (pSndBase->oPlayDelay.m_iCurrPlayDelay >= 0 && pSndBase->oPlayDelay.m_aPlayDelay.size() > pSndBase->oPlayDelay.m_iCurrPlayDelay) + { + //если текущее значение задержка + if (pSndBase->oPlayDelay.m_aPlayDelay[pSndBase->oPlayDelay.m_iCurrPlayDelay].m_isDelay) + pSndBase->oPlayDelay.m_uiPlayDelayStart = GetTickCount() - pSndBase->oPlayDelay.m_uiPlayDelayStart; + else + pSndBase->m_pSoundBuffer->Play(0, 0, 0); + } + //иначе ключ невалиден, просто доигрываем + else + pSndBase->m_pSoundBuffer->Play(0, 0, 0); +} + +void CSoundManager::channelSndPlay(ID idChannel, ID idSound) +{ + if (idSound < m_aSounds.size() && idSound >= 0 && m_aSounds[idSound] && m_aSounds[idSound]->m_idChannel == idChannel) + { + CSound *pSnd = m_aSounds[idSound]; + DWORD dwStatus = 0; + + if (!(pSnd->m_isPlayDelay) && SUCCEEDED(pSnd->m_pSoundBuffer->GetStatus(&dwStatus)) && !(dwStatus & DSBSTATUS_PLAYING) && pSnd->m_state == SOUND_OBJSTATE_PLAY) + pSnd->m_pSoundBuffer->Play(0, 0, (pSnd->m_uiStreamSize || pSnd->m_isLooping ? DSBPLAY_LOOPING : 0)); + //если воспроизведение с задержками + else if (pSnd->m_isPlayDelay && pSnd->m_state == SOUND_OBJSTATE_PLAY) + soundResumePlayDelay(pSnd); + + + for (int k = 0, kl = pSnd->m_aInstances.size(); k < kl; ++k) + { + //TODO: доделать восстановление проигрывания с задержками для инстансов + + if (pSnd->m_aInstances[k].m_state == SOUND_OBJSTATE_PAUSE) + { + pSnd->m_aInstances[k].m_state = SOUND_OBJSTATE_PLAY; + + if (!(pSnd->m_isPlayDelay)) + pSnd->m_aInstances[k].m_pSoundBuffer->Play(0, 0, (pSnd->m_aInstances[k].m_isLooping ? DSBPLAY_LOOPING : 0)); + else + soundResumePlayDelay(&(pSnd->m_aInstances[k])); + } + } + } +} + +void CSoundManager::channelSndStop(ID idChannel, ID idSound) +{ + if (idSound < m_aSounds.size() && idSound >= 0 && m_aSounds[idSound] && m_aSounds[idSound]->m_idChannel == idChannel) + { + CSound *pSnd = m_aSounds[idSound]; + + if (pSnd->m_isPlayDelay) + { + if (pSnd->oPlayDelay.m_iCurrPlayDelay >= 0 && pSnd->oPlayDelay.m_aPlayDelay.size() > pSnd->oPlayDelay.m_iCurrPlayDelay && pSnd->oPlayDelay.m_aPlayDelay[pSnd->oPlayDelay.m_iCurrPlayDelay].m_isDelay) + pSnd->oPlayDelay.m_uiPlayDelayStart = GetTickCount() - pSnd->oPlayDelay.m_uiPlayDelayStart; + } + + pSnd->m_pSoundBuffer->Stop(); + DWORD dwStatus = 0; + CSoundInstance *pSndInst = 0; + + for (int k = 0, kl = pSnd->m_aInstances.size(); k < kl; ++k) + { + pSndInst = &(pSnd->m_aInstances[k]); + dwStatus = 0; + + if (pSndInst->m_state == SOUND_OBJSTATE_PLAY && SUCCEEDED(pSndInst->m_pSoundBuffer->GetStatus(&dwStatus)) && (dwStatus & DSBSTATUS_PLAYING)) + { + pSndInst->m_pSoundBuffer->Stop(); + pSndInst->m_state = SOUND_OBJSTATE_PAUSE; + } + + if (pSndInst->m_isPlayDelay) + { + if (pSndInst->oPlayDelay.m_iCurrPlayDelay >= 0 && pSndInst->oPlayDelay.m_aPlayDelay.size() > pSndInst->oPlayDelay.m_iCurrPlayDelay && pSndInst->oPlayDelay.m_aPlayDelay[pSndInst->oPlayDelay.m_iCurrPlayDelay].m_isDelay) + pSndInst->oPlayDelay.m_uiPlayDelayStart = GetTickCount() - pSndInst->oPlayDelay.m_uiPlayDelayStart; + } + } + } +} + +//########################################################################## + +void CSoundManager::init(HWND hwnd) +{ + if (FAILED(DirectSoundCreate8(NULL, &m_pDeviceSound, NULL))) { LibReport(REPORT_MSG_LEVEL_ERROR, "%s - could not create sound device", GEN_MSG_LOCATION); return;// SOUND_INIT_ERR_INIT; } - if (FAILED(DeviceSound->SetCooperativeLevel(hwnd, DSSCL_EXCLUSIVE))) + if (FAILED(m_pDeviceSound->SetCooperativeLevel(hwnd, DSSCL_EXCLUSIVE))) { LibReport(REPORT_MSG_LEVEL_ERROR, "%s - could not create cooperative level", GEN_MSG_LOCATION); return;// SOUND_INIT_ERR_CL; @@ -104,7 +491,7 @@ void MainSound::Init(HWND hwnd) dsbd.dwBufferBytes = 0; dsbd.lpwfxFormat = 0; - if (FAILED(DeviceSound->CreateSoundBuffer(&dsbd, &DSPrimary, NULL))) + if (FAILED(m_pDeviceSound->CreateSoundBuffer(&dsbd, &m_pPrimaryBuffer, NULL))) { LibReport(REPORT_MSG_LEVEL_ERROR, "%s - could not create primary buffer", GEN_MSG_LOCATION); return;// SOUND_INIT_ERR_PRIM_BUF; @@ -120,28 +507,28 @@ void MainSound::Init(HWND hwnd) wfex.nBlockAlign = (wfex.wBitsPerSample / 8) * wfex.nChannels; wfex.nAvgBytesPerSec = wfex.nSamplesPerSec * wfex.nBlockAlign; - if (FAILED(DSPrimary->SetFormat(&wfex))) + if (FAILED(m_pPrimaryBuffer->SetFormat(&wfex))) { LibReport(REPORT_MSG_LEVEL_ERROR, "%s - could not init format", GEN_MSG_LOCATION); return;// SOUND_INIT_ERR_SET_FORMAT; } - DSPrimary->SetVolume(0); - DSPrimary->Play(0, 0, DSBPLAY_LOOPING); + m_pPrimaryBuffer->SetVolume(0); + m_pPrimaryBuffer->Play(0, 0, DSBPLAY_LOOPING); } // -SOUND_FILEFORMAT MainSound::FileFormat(const char* file) +SOUND_FILEFORMAT CSoundManager::fileFormat(const char* file) { FILE *fp; if (!(fp = fopen(file, "rb"))) return SOUND_FILEFORMAT_UNKNOWN; - SoundWaveHeader Hdr; + CSoundWaveHeader Hdr; fseek(fp, 0, SEEK_SET); - fread(&Hdr, 1, sizeof(SoundWaveHeader), fp); + fread(&Hdr, 1, sizeof(CSoundWaveHeader), fp); if (memcmp(Hdr.RiffSig, "RIFF", 4) == 0 || memcmp(Hdr.Sig, "WAVE", 4) == 0 || memcmp(Hdr.FormatSig, "fmt ", 4) == 0) { @@ -162,76 +549,76 @@ SOUND_FILEFORMAT MainSound::FileFormat(const char* file) //############################################################################# -void MainSound::Load(Sound* snd, const char* fpath, SOUND_FILEFORMAT fmt) +void CSoundManager::load(CSound* snd, const char* fpath, SOUND_FILEFORMAT fmt) { if (fmt == SOUND_FILEFORMAT_OGG) - LoadOGG(snd, fpath); + loadOGG(snd, fpath); else if (fmt == SOUND_FILEFORMAT_WAV) - LoadWAV(snd, fpath); + loadWAV(snd, fpath); } -void MainSound::LoadWAV(Sound* snd, const char* fpath) +void CSoundManager::loadWAV(CSound* snd, const char* fpath) { - SoundWaveHeader Hdr; - snd->StreamFile = fopen(fpath, "rb"); + CSoundWaveHeader Hdr; + snd->m_pStream = fopen(fpath, "rb"); - fseek(snd->StreamFile, 0, SEEK_SET); - fread(&Hdr, 1, sizeof(SoundWaveHeader), snd->StreamFile); + fseek(snd->m_pStream, 0, SEEK_SET); + fread(&Hdr, 1, sizeof(CSoundWaveHeader), snd->m_pStream); - snd->SizeFull = (Hdr.ChunkSize + (sizeof(char)* 4 + sizeof(int32_t))) - sizeof(SoundWaveHeader); + snd->m_uiSizeFull = (Hdr.ChunkSize + (sizeof(char)* 4 + sizeof(int32_t))) - sizeof(CSoundWaveHeader); - if (snd->StreamSize == 0) - Hdr.DataSize = snd->SizeFull; + if (snd->m_uiStreamSize == 0) + Hdr.DataSize = snd->m_uiSizeFull; else - Hdr.DataSize = snd->StreamSize; + Hdr.DataSize = snd->m_uiStreamSize; - if (!(snd->DSBuffer = SoundBufferCreate(&Hdr))) + if (!(snd->m_pSoundBuffer = soundBufferCreate(&Hdr))) { - LibReport(REPORT_MSG_LEVEL_ERROR, "%s - could not create sound buffer [%s]", GEN_MSG_LOCATION, snd->RPath); + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - could not create sound buffer [%s]", GEN_MSG_LOCATION, snd->m_szRPath); return; } - fseek(snd->StreamFile, sizeof(SoundWaveHeader), SEEK_SET); + fseek(snd->m_pStream, sizeof(CSoundWaveHeader), SEEK_SET); - SoundDataWAVLoad(snd->DSBuffer, 0, snd->StreamFile, Hdr.DataSize, 0); + soundDataWAVLoad(snd->m_pSoundBuffer, 0, snd->m_pStream, Hdr.DataSize, 0); - snd->LengthSec = snd->StreamSize / (Hdr.BytesPerSec); - snd->ChannelsCount = Hdr.Channels; - snd->RateSample = Hdr.SampleRate; - snd->BitsPerSample = Hdr.BitsPerSample; - snd->BytesPerSec = ((snd->BitsPerSample / 8) * snd->ChannelsCount) * snd->RateSample; + snd->m_iLengthSec = snd->m_uiStreamSize / (Hdr.BytesPerSec); + snd->m_iChannelsCount = Hdr.Channels; + snd->m_iSampleRate = Hdr.SampleRate; + snd->m_iBitsPerSample = Hdr.BitsPerSample; + snd->m_uiBytesPerSec = ((snd->m_iBitsPerSample / 8) * snd->m_iChannelsCount) * snd->m_iSampleRate; - if (snd->StreamSize == 0) + if (snd->m_uiStreamSize == 0) { - fclose(snd->StreamFile); + fclose(snd->m_pStream); } else { - snd->Split1Size = snd->StreamSize / 4; - snd->Split2Size = snd->Split1Size * 2; - snd->Split3Size = snd->Split1Size * 3; + snd->m_uiSplit1Size = snd->m_uiStreamSize / 4; + snd->m_uiSplit2Size = snd->m_uiSplit1Size * 2; + snd->m_uiSplit3Size = snd->m_uiSplit1Size * 3; - snd->BF1 = false; - snd->BF2 = false; - snd->BF3 = false; - snd->BF4 = false; + snd->m_isWork1 = false; + snd->m_isWork2 = false; + snd->m_isWork3 = false; + snd->m_isWork4 = false; - snd->IsStarting = true; + snd->m_isStarting = true; - snd->RePlayCount = 0; - double tmpCRPE = double(snd->SizeFull) / double(snd->StreamSize); + snd->m_iRePlayCount = 0; + double tmpCRPE = double(snd->m_uiSizeFull) / double(snd->m_uiStreamSize); float Count = 0; while (1) { if (tmpCRPE > Count && tmpCRPE < Count + 1) { - snd->RePlayEndCount = Count + 1; + snd->m_iRePlayEndCount = Count + 1; break; } else if (tmpCRPE == Count) { - snd->RePlayEndCount = Count; + snd->m_iRePlayEndCount = Count; break; } Count++; @@ -239,10 +626,10 @@ void MainSound::LoadWAV(Sound* snd, const char* fpath) } } -IDirectSoundBuffer8* MainSound::SoundBufferCreate(SoundWaveHeader* hdr) +IDirectSoundBuffer8* CSoundManager::soundBufferCreate(CSoundWaveHeader* hdr) { IDirectSoundBuffer *DSB; - IDirectSoundBuffer8 *DSBuffer; + IDirectSoundBuffer8 *m_pSoundBuffer; DSBUFFERDESC dsbd; WAVEFORMATEX wfex; @@ -261,19 +648,19 @@ IDirectSoundBuffer8* MainSound::SoundBufferCreate(SoundWaveHeader* hdr) dsbd.dwFlags = DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY | DSBCAPS_LOCSOFTWARE; dsbd.dwBufferBytes = hdr->DataSize; dsbd.lpwfxFormat = &wfex; - if (FAILED(DeviceSound->CreateSoundBuffer(&dsbd, &DSB, NULL))) + if (FAILED(m_pDeviceSound->CreateSoundBuffer(&dsbd, &DSB, NULL))) return NULL; - if (FAILED(DSB->QueryInterface(IID_IDirectSoundBuffer8, (void**)&DSBuffer))) + if (FAILED(DSB->QueryInterface(IID_IDirectSoundBuffer8, (void**)&m_pSoundBuffer))) { DSB->Release(); return NULL; } - return DSBuffer; + return m_pSoundBuffer; } -void MainSound::SoundDataWAVLoad(IDirectSoundBuffer8* DSBuffer, long LockPos, FILE* data, long Size, DWORD flag) +void CSoundManager::soundDataWAVLoad(IDirectSoundBuffer8* m_pSoundBuffer, int LockPos, FILE* data, int Size, UINT flag) { BYTE *Ptr1, *Ptr2; DWORD Size1, Size2; @@ -281,113 +668,113 @@ void MainSound::SoundDataWAVLoad(IDirectSoundBuffer8* DSBuffer, long LockPos, FI if (!Size) return; - if (FAILED(DSBuffer->Lock(LockPos, Size, (void**)&Ptr1, &Size1, (void**)&Ptr2, &Size2, flag))) + if (FAILED(m_pSoundBuffer->Lock(LockPos, Size, (void**)&Ptr1, &Size1, (void**)&Ptr2, &Size2, flag))) return; fread(Ptr1, 1, Size1, data); if (Ptr2) fread(Ptr2, 1, Size2, data); - DSBuffer->Unlock(Ptr1, Size1, Ptr2, Size2); + m_pSoundBuffer->Unlock(Ptr1, Size1, Ptr2, Size2); } ///////////////////////////////////////////////////////////////////////////// -void MainSound::LoadOGG(Sound* snd, const char* fpath) +void CSoundManager::loadOGG(CSound* snd, const char* fpath) { OggVorbis_File ogg; - snd->StreamFile = fopen(fpath, "rb"); + snd->m_pStream = fopen(fpath, "rb"); - if (snd->StreamFile == NULL) + if (snd->m_pStream == NULL) return; if (ov_fopen(fpath, &ogg)) { - LibReport(REPORT_MSG_LEVEL_ERROR, "%s - error reading [%s]", GEN_MSG_LOCATION, snd->RPath); + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - error reading [%s]", GEN_MSG_LOCATION, snd->m_szRPath); return; } - snd->VorbisFile = new OggVorbis_File; + snd->m_pVorbisFile = new OggVorbis_File; ov_callbacks cb; - cb.close_func = ogg_close; - cb.read_func = ogg_read; - cb.seek_func = ogg_seek; - cb.tell_func = ogg_tell; + cb.close_func = OggCallbackClose; + cb.read_func = OggCallbackRead; + cb.seek_func = OggCallbackSeek; + cb.tell_func = OggCallbackTell; - ov_open_callbacks(snd->StreamFile, snd->VorbisFile, 0, 0, cb); + ov_open_callbacks(snd->m_pStream, snd->m_pVorbisFile, 0, 0, cb); vorbis_info *vi = ov_info(&ogg, -1); if (!vi) { - LibReport(REPORT_MSG_LEVEL_ERROR, "%s - error reading (info) [%s]", GEN_MSG_LOCATION, snd->RPath); + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - error reading (info) [%s]", GEN_MSG_LOCATION, snd->m_szRPath); return; } - snd->LengthSec = float(ov_pcm_total(snd->VorbisFile, -1)) / float(vi->rate); - snd->ChannelsCount = vi->channels; - snd->RateSample = vi->rate; - snd->BitsPerSample = SOUND_OGG_BITS_PER_SAMPLE; - snd->BytesPerSec = ((snd->BitsPerSample / 8) * snd->ChannelsCount) * snd->RateSample; - snd->SizeFull = ov_pcm_total(snd->VorbisFile, -1) * 2 * vi->channels; + snd->m_iLengthSec = float(ov_pcm_total(snd->m_pVorbisFile, -1)) / float(vi->rate); + snd->m_iChannelsCount = vi->channels; + snd->m_iSampleRate = vi->rate; + snd->m_iBitsPerSample = SOUND_OGG_BITS_PER_SAMPLE; + snd->m_uiBytesPerSec = ((snd->m_iBitsPerSample / 8) * snd->m_iChannelsCount) * snd->m_iSampleRate; + snd->m_uiSizeFull = ov_pcm_total(snd->m_pVorbisFile, -1) * 2 * vi->channels; - SoundWaveHeader hdr; + CSoundWaveHeader hdr; hdr.Channels = vi->channels; hdr.SampleRate = vi->rate; hdr.BitsPerSample = SOUND_OGG_BITS_PER_SAMPLE; - if (snd->StreamSize == 0) - hdr.DataSize = snd->SizeFull; + if (snd->m_uiStreamSize == 0) + hdr.DataSize = snd->m_uiSizeFull; else - hdr.DataSize = snd->StreamSize; + hdr.DataSize = snd->m_uiStreamSize; - snd->DSBuffer = SoundBufferCreate(&hdr); + snd->m_pSoundBuffer = soundBufferCreate(&hdr); - if (!snd->DSBuffer) + if (!snd->m_pSoundBuffer) { - LibReport(REPORT_MSG_LEVEL_ERROR, "%s - could not create sound buffer [%s]", GEN_MSG_LOCATION, snd->RPath); + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - could not create sound buffer [%s]", GEN_MSG_LOCATION, snd->m_szRPath); return; } - SoundDataOGGLoad(snd->VorbisFile, snd->DSBuffer, 0, hdr.DataSize, 0); + soundDataOGGLoad(snd->m_pVorbisFile, snd->m_pSoundBuffer, 0, hdr.DataSize, 0); - if (snd->StreamSize == 0) + if (snd->m_uiStreamSize == 0) { - fclose(snd->StreamFile); + fclose(snd->m_pStream); ov_clear(&ogg); - ov_clear(snd->VorbisFile); - mem_delete(snd->VorbisFile); - snd->VorbisFile = 0; + ov_clear(snd->m_pVorbisFile); + mem_delete(snd->m_pVorbisFile); + snd->m_pVorbisFile = 0; } else { - snd->Split1Size = snd->StreamSize / 4; - snd->Split2Size = snd->Split1Size * 2; - snd->Split3Size = snd->Split1Size * 3; + snd->m_uiSplit1Size = snd->m_uiStreamSize / 4; + snd->m_uiSplit2Size = snd->m_uiSplit1Size * 2; + snd->m_uiSplit3Size = snd->m_uiSplit1Size * 3; - snd->BF1 = false; - snd->BF2 = false; - snd->BF3 = false; - snd->BF4 = false; + snd->m_isWork1 = false; + snd->m_isWork2 = false; + snd->m_isWork3 = false; + snd->m_isWork4 = false; - snd->IsStarting = true; + snd->m_isStarting = true; - snd->RePlayCount = 0; - double tmpCRPE = double(snd->SizeFull) / double(snd->StreamSize); + snd->m_iRePlayCount = 0; + double tmpCRPE = double(snd->m_uiSizeFull) / double(snd->m_uiStreamSize); float Count = 0; while (1) { if (tmpCRPE > Count && tmpCRPE < Count + 1) { - snd->RePlayEndCount = Count + 1; + snd->m_iRePlayEndCount = Count + 1; break; } else if (tmpCRPE == Count) { - snd->RePlayEndCount = Count; + snd->m_iRePlayEndCount = Count; break; } Count++; @@ -396,7 +783,7 @@ void MainSound::LoadOGG(Sound* snd, const char* fpath) //return SOUND_OK; } -void MainSound::SoundDataOGGLoad(OggVorbis_File* VorbisFile, IDirectSoundBuffer8 *DSBuffer, long LockPos, long Size, DWORD flag) +void CSoundManager::soundDataOGGLoad(OggVorbis_File* VorbisFile, IDirectSoundBuffer8 *m_pSoundBuffer, int LockPos, int Size, UINT flag) { char *Ptr1, *Ptr2; DWORD Size1, Size2; @@ -404,7 +791,7 @@ void MainSound::SoundDataOGGLoad(OggVorbis_File* VorbisFile, IDirectSoundBuffer8 if (!Size) return; - if (FAILED(DSBuffer->Lock(LockPos, Size, (void**)&Ptr1, &Size1, (void**)&Ptr2, &Size2, flag))) + if (FAILED(m_pSoundBuffer->Lock(LockPos, Size, (void**)&Ptr1, &Size1, (void**)&Ptr2, &Size2, flag))) return; DWORD total_read = 0; @@ -457,355 +844,489 @@ void MainSound::SoundDataOGGLoad(OggVorbis_File* VorbisFile, IDirectSoundBuffer8 } } - DSBuffer->Unlock(Ptr1, Size1, Ptr2, Size2); + m_pSoundBuffer->Unlock(Ptr1, Size1, Ptr2, Size2); } //############################################################################# -ID MainSound::SoundCreate2d(const char *file, bool looping, DWORD size_stream) +ID CSoundManager::soundCreate2d(const char *szFile, ID idChannel, UINT uiSizeStream) { - if (!file) - return -1; + if (!szFile) + return SOUND_FAIL_ID; + + String sFileData = szFile; + float fDistAudibleData = -1.f; + float fVolumeData = -1.f; + Array<UINT> aDelaysData; + + SndGetDataFromStr(szFile, sFileData, fDistAudibleData, fVolumeData, aDelaysData); char fullpath[SOUND_MAX_SIZE_STDPATH + SOUND_MAX_SIZE_PATH]; - sprintf(fullpath, "%s%s", Core_RStringGet(G_RI_STRING_PATH_GS_SOUNDS), file); + sprintf(fullpath, "%s%s", Core_RStringGet(G_RI_STRING_PATH_GS_SOUNDS), sFileData.c_str()); - if (!Core_0FileExists(fullpath)) + if (!FileExistsFile(fullpath)) { LibReport(REPORT_MSG_LEVEL_ERROR, "%s - file not found [%s]", GEN_MSG_LOCATION, fullpath); - return -1; + return SOUND_FAIL_ID; } - SOUND_FILEFORMAT fmt = FileFormat(fullpath); + SOUND_FILEFORMAT fmt = fileFormat(fullpath); if (fmt == SOUND_FILEFORMAT_UNKNOWN) { - LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unknown format [%s]", GEN_MSG_LOCATION, file); - return -1; + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unknown format [%s]", GEN_MSG_LOCATION, sFileData.c_str()); + return SOUND_FAIL_ID; } - Sound* snd = new Sound(); - strcpy(snd->RPath, file); - snd->Format = fmt; - snd->IsLooping = looping; + channelAdd(idChannel); + + CSound *pSnd = new CSound(); + + if (fDistAudibleData > 0.f) + pSnd->m_fDistAudible = fDistAudibleData; - snd->StreamSize = 0; - if (size_stream > 0) + if (fVolumeData > -1.f) + pSnd->m_fVolume = fVolumeData; + + strcpy(pSnd->m_szRPath, szFile); + pSnd->m_format = fmt; + + pSnd->m_uiStreamSize = 0; + if (uiSizeStream > 0) { - if (size_stream < SOUND_MIN_SIZE_STREAM) - snd->StreamSize = SOUND_MIN_SIZE_STREAM; + if (uiSizeStream < SOUND_MIN_SIZE_STREAM) + pSnd->m_uiStreamSize = SOUND_MIN_SIZE_STREAM; else - snd->StreamSize = size_stream; + pSnd->m_uiStreamSize = uiSizeStream; } + + if (uiSizeStream == 0 && aDelaysData.size() > 0) + { + soundInitPlayDelay(pSnd, &(aDelaysData[0]), aDelaysData.size()); + } + + load(pSnd, fullpath, fmt); - Load(snd, fullpath, fmt); + DWORD dwFrec; + pSnd->m_pSoundBuffer->GetFrequency(&dwFrec); + pSnd->m_uiFrecOrigin = dwFrec; + pSnd->m_id = addSound(pSnd); + pSnd->m_idChannel = idChannel; + pSnd->m_iCountLoad = 1; - snd->DSBuffer->GetFrequency(&snd->FrecOrigin); - snd->Id = AddSound(snd); - return snd->Id; + return pSnd->m_id; } -ID MainSound::SoundCreate3d(const char *file, bool looping, DWORD size_stream, float dist, float shift_pan) +ID CSoundManager::soundCreate3d(const char *file, ID idChannel, UINT size_stream, float dist) { - ID sndid = SoundCreate2d(file, looping, size_stream); - Sound* snd = 0; + ID idSnd = soundCreate2d(file, idChannel, size_stream); + CSound* snd = 0; - if (sndid < 0) - return sndid; + if (idSnd < 0) + return idSnd; - snd = ArrSounds[sndid]; - snd->DistAudible = dist; - snd->Is3d = true; - snd->ShiftPan = shift_pan; + snd = m_aSounds[idSnd]; + + if (snd->m_fDistAudible <= 0.f) + snd->m_fDistAudible = dist; + + snd->m_is3d = true; + snd->m_fShiftPan = SOUND_SHIFTPAN_3D; + snd->m_idChannel = idChannel; - return sndid; + return idSnd; } -ID MainSound::SoundCreate2dInst(const char *file, bool looping, DWORD size_stream) +ID CSoundManager::soundCreate2dInst(const char *file, ID idChannel) { - ID idsnd = SoundFind2dInst(file); - if (idsnd >= 0) - return idsnd; - idsnd = SoundCreate2d(file, looping, size_stream); - AArr2dInst[file] = idsnd; - ArrSounds[idsnd]->IsInst = true; - return idsnd; + ID idSnd = soundFind2dInst(file, idChannel); + + if (idSnd >= 0) + { + ++(m_aSounds[idSnd]->m_iCountLoad); + return idSnd; + } + + idSnd = soundCreate2d(file, idChannel); + + char szStr[SOUND_MAX_SIZE_FULLPATH]; + szStr[0] = 0; + SOUND_CREATE_NAME(szStr, idChannel, file); + + m_a2dInst[szStr] = idSnd; + m_aSounds[idSnd]->m_isInst = true; + m_aSounds[idSnd]->m_idChannel = idChannel; + return idSnd; } -ID MainSound::SoundCreate3dInst(const char *file, bool looping, DWORD size_stream, float dist, float shift_pan) +ID CSoundManager::soundCreate3dInst(const char *file, ID idChannel, float dist) { - ID idsnd = SoundFind2dInst(file); - if (idsnd >= 0) - return idsnd; - idsnd = SoundCreate3d(file, looping, size_stream, dist, shift_pan); - AArr3dInst[file] = idsnd; - ArrSounds[idsnd]->IsInst = true; - return idsnd; + ID idSnd = soundFind3dInst(file, idChannel); + + if (idSnd >= 0) + { + ++(m_aSounds[idSnd]->m_iCountLoad); + return idSnd; + } + + idSnd = soundCreate3d(file, idChannel, 0, dist); + + char szStr[SOUND_MAX_SIZE_FULLPATH]; + szStr[0] = 0; + SOUND_CREATE_NAME(szStr, idChannel, file); + + m_a3dInst[szStr] = idSnd; + m_aSounds[idSnd]->m_isInst = true; + m_aSounds[idSnd]->m_idChannel = idChannel; + + return idSnd; } -ID MainSound::SoundFind2dInst(const char * file) +ID CSoundManager::soundFind2dInst(const char *file, ID idChannel) { - ID id = -1; + char szStr[SOUND_MAX_SIZE_FULLPATH]; + szStr[0] = 0; + SOUND_CREATE_NAME(szStr, idChannel, file); + + ID id = SOUND_FAIL_ID; const AssotiativeArray<AAStringNR, ID, false, 16>::Node* pNode = 0; - if (AArr2dInst.KeyExists(file, &pNode)) + if (m_a2dInst.KeyExists(szStr, &pNode)) id = *(pNode->Val); return id; } -ID MainSound::SoundFind3dInst(const char * file) +ID CSoundManager::soundFind3dInst(const char *file, ID idChannel) { - ID id = -1; + char szStr[SOUND_MAX_SIZE_FULLPATH]; + szStr[0] = 0; + SOUND_CREATE_NAME(szStr, idChannel, file); + + ID id = SOUND_FAIL_ID; const AssotiativeArray<AAStringNR, ID, false, 16>::Node* pNode = 0; - if (AArr3dInst.KeyExists(file, &pNode)) + if (m_a3dInst.KeyExists(szStr, &pNode)) id = *(pNode->Val); return id; } -void MainSound::SoundInstancePlay2d(ID id, int volume, int pan) +ID CSoundManager::soundInstancePlay(ID idSound, bool isBlocked, bool isLooping, UINT *pArrDelay, int iSizeArrDelay, const float3 *pPos, float fVolume, float fPan) { - SOUND_PRECOND(id, _VOID); + SOUND_PRECOND(idSound, SOUND_FAIL_ID); + + CSound *pSnd = m_aSounds[idSound]; - Sound* snd = ArrSounds[id]; + SOUND_CHANNEL_PLAYING(pSnd->m_idChannel, SOUND_FAIL_ID); - if (snd->StreamSize > 0) + if (pSnd->m_uiStreamSize > 0) { - LibReport(REPORT_MSG_LEVEL_WARNING, "%s - can not create sound instance for streaming [%s]", GEN_MSG_LOCATION, snd->RPath); - return; + LibReport(REPORT_MSG_LEVEL_WARNING, "%s - can not create sound instance for streaming [%s]", GEN_MSG_LOCATION, pSnd->m_szRPath); + return SOUND_FAIL_ID; } - if (snd->Is3d) + if (pSnd->m_is3d && !pPos) { - LibReport(REPORT_MSG_LEVEL_WARNING, "%s - can not create 2d sound instance by 3d [%s]", GEN_MSG_LOCATION, snd->RPath); - return; + LibReport(REPORT_MSG_LEVEL_WARNING, "%s - not send position for 3d sound instance [%s]", GEN_MSG_LOCATION, pSnd->m_szRPath); + return SOUND_FAIL_ID; + } + + if (!(pSnd->m_is3d) && pPos) + { + LibReport(REPORT_MSG_LEVEL_WARNING, "%s - uresolved send position for 2d sound instance [%s]", GEN_MSG_LOCATION, pSnd->m_szRPath); + return SOUND_FAIL_ID; } - ID id_instance = -1; - for (UINT i = 0; i < snd->DataInstances.size(); ++i) + ID idInstance = -1; + for (int i = 0; i < pSnd->m_aInstances.size(); ++i) { - if (!snd->DataInstances[i].busy) + if (pSnd->m_aInstances[i].m_busy == SOUND_SNDINSTANCE_BUSY_FREE) { - id_instance = i; + idInstance = i; break; } } - if (id_instance < 0) + if (idInstance < 0) { IDirectSoundBuffer* tsb; IDirectSoundBuffer8* tsb8; - DeviceSound->DuplicateSoundBuffer(snd->DSBuffer, &tsb); + m_pDeviceSound->DuplicateSoundBuffer(pSnd->m_pSoundBuffer, &tsb); if (!tsb) { - LibReport(REPORT_MSG_LEVEL_WARNING, "%s - can not create sound instance [%s], this is big problem", GEN_MSG_LOCATION, snd->RPath); - return; + LibReport(REPORT_MSG_LEVEL_WARNING, "%s - can not create sound instance [%s], this is big problem", GEN_MSG_LOCATION, pSnd->m_szRPath); + return SOUND_FAIL_ID; } tsb->QueryInterface(IID_IDirectSoundBuffer8, (void**)&tsb8); - snd->DataInstances.push_back(Sound::SIData(tsb8, 0, true)); - id_instance = snd->DataInstances.size() - 1; + pSnd->m_aInstances.push_back(CSoundInstance(tsb8, pSnd->m_uiBytesPerSec, (pPos ? &float3_t(*pPos) : 0), SOUND_SNDINSTANCE_BUSY_TEMP)); + idInstance = pSnd->m_aInstances.size() - 1; } - if (id_instance >= 0) - { - long tvol; - snd->DSBuffer->GetVolume(&tvol); - snd->DataInstances[id_instance].busy = true; - //IDirectSoundBuffer8* tsb = snd->DataInstances[id_instance].sbuffer; - snd->DataInstances[id_instance].sbuffer->SetVolume((tvol > -5000 ? tvol - 5000 : tvol + 5000)); - snd->DataInstances[id_instance].sbuffer->SetCurrentPosition(0); - snd->DataInstances[id_instance].sbuffer->SetVolume(-10000 + (volume * 100)); - snd->DataInstances[id_instance].sbuffer->SetPan((pan > 0) ? (10000 - (pan * 100)) - 10000 : 10000 - (10000 + (pan * 100))); - snd->DataInstances[id_instance].sbuffer->Play(0, 0, 0); + if (idInstance >= 0) + { + if (isBlocked || isLooping) + pSnd->m_aInstances[idInstance].m_busy = SOUND_SNDINSTANCE_BUSY_LOCKED; + else + pSnd->m_aInstances[idInstance].m_busy = SOUND_SNDINSTANCE_BUSY_TEMP; + + //если установлены задержки воспроизведения + if (pArrDelay && iSizeArrDelay > 0 || iSizeArrDelay < 0) + soundInitPlayDelay(&(pSnd->m_aInstances[idInstance]), pArrDelay, iSizeArrDelay); + + pSnd->m_aInstances[idInstance].m_fVolume = saturatef(fVolume); + + //если 3д звук + if (pSnd->m_is3d && pPos) + { + pSnd->m_aInstances[idInstance].m_pSoundBuffer->SetVolume(lerpf(-10000, 0, pSnd->m_aInstances[idInstance].m_fVolume * Snd3dComVolume((*pPos), m_vOldViewPos, pSnd->m_fDistAudible))); + pSnd->m_aInstances[idInstance].m_pSoundBuffer->SetPan(Snd3dComPan((*pPos), m_vOldViewPos, m_vOldViewDir, pSnd->m_fDistAudible, pSnd->m_fShiftPan)); + } + //иначе фоновый + else + { + pSnd->m_aInstances[idInstance].m_pSoundBuffer->SetVolume(lerpf(-10000, 0, pSnd->m_aInstances[idInstance].m_fVolume)); + pSnd->m_aInstances[idInstance].m_pSoundBuffer->SetPan((fPan > 0) ? (10000 - (fPan * 100)) - 10000 : 10000 - (10000 + (fPan * 100))); + } + + pSnd->m_aInstances[idInstance].m_pSoundBuffer->SetCurrentPosition(0); + pSnd->m_aInstances[idInstance].m_isLooping = isLooping; + + if (!(pArrDelay && iSizeArrDelay > 0)) + pSnd->m_aInstances[idInstance].m_pSoundBuffer->Play(0, 0, ((pSnd->m_aInstances[idInstance].m_isLooping) ? DSBPLAY_LOOPING : 0)); + + pSnd->m_aInstances[idInstance].m_state = SOUND_OBJSTATE_PLAY; + + return idInstance; } + + return SOUND_FAIL_ID; } -void MainSound::SoundInstancePlay3d(ID id, const float3* pos) +bool CSoundManager::soundInstancePlaying(ID idSound, ID idInstance) { - SOUND_PRECOND(id, _VOID); - - if (!pos) - return; + SOUND_PRECOND(idSound, false); - Sound* snd = ArrSounds[id]; + CSound* snd = m_aSounds[idSound]; - if (snd->StreamSize > 0) + if (idInstance >= 0) { - LibReport(REPORT_MSG_LEVEL_WARNING, "%s - can not create sound instance for streaming [%s]", GEN_MSG_LOCATION, snd->RPath); - return; + /*DWORD dwStatus; + snd->m_aInstances[idInstance].m_pSoundBuffer->GetStatus(&dwStatus); + return (dwStatus & DSBSTATUS_PLAYING);*/ + return (snd->m_aInstances[idInstance].m_state != SOUND_OBJSTATE_STOP); } - if (!snd->Is3d) - { - LibReport(REPORT_MSG_LEVEL_WARNING, "%s - can not create 3d sound instance by 2d[%s]", GEN_MSG_LOCATION, snd->RPath); - return; - } + return false; +} - ID id_instance = -1; - for(UINT i = 0; i < snd->DataInstances.size(); ++i) - { - if(!snd->DataInstances[i].busy) - { - id_instance = i; - break; - } - } +void CSoundManager::soundInstanceStop(ID idSound, ID idInstance) +{ + SOUND_PRECOND(idSound, _VOID); + + CSound* snd = m_aSounds[idSound]; - if (id_instance < 0) + if (idInstance >= 0) { - IDirectSoundBuffer* tsb; - IDirectSoundBuffer8* tsb8; - DeviceSound->DuplicateSoundBuffer(snd->DSBuffer, &tsb); - if (!tsb) - { - LibReport(REPORT_MSG_LEVEL_WARNING, "%s - can not create sound instance [%s], this is big problem", GEN_MSG_LOCATION, snd->RPath); - return; - } - tsb->QueryInterface(IID_IDirectSoundBuffer8, (void**)&tsb8); - snd->DataInstances.push_back(Sound::SIData(tsb8, &float3_t(*pos), true)); - id_instance = snd->DataInstances.size() - 1; + snd->m_aInstances[idInstance].m_isLooping = false; + snd->m_aInstances[idInstance].m_pSoundBuffer->Stop(); + snd->m_aInstances[idInstance].m_state = SOUND_OBJSTATE_STOP; } +} - if (id_instance >= 0) - { - long tvol; - snd->DSBuffer->GetVolume(&tvol); - snd->DataInstances[id_instance].sbuffer->SetVolume((tvol > -5000 ? tvol - 5000 : tvol + 5000)); +void CSoundManager::soundInstanceFree(ID idSound, ID idInstance) +{ + SOUND_PRECOND(idSound, _VOID); + + CSound* snd = m_aSounds[idSound]; - snd->DataInstances[id_instance].sbuffer->SetVolume(SOUND_3D_COM_VOLUME((*pos), OldViewPos, snd->DistAudible)); - snd->DataInstances[id_instance].sbuffer->SetPan(SOUND_3D_COM_PAN((*pos), OldViewPos, OldViewDir, snd->DistAudible,snd->ShiftPan)); - snd->DataInstances[id_instance].sbuffer->SetCurrentPosition(0); - snd->DataInstances[id_instance].sbuffer->Play(0, 0, 0); + if (idInstance >= 0) + { + if (snd->m_aInstances[idInstance].m_busy == SOUND_SNDINSTANCE_BUSY_LOCKED) + snd->m_aInstances[idInstance].m_busy = SOUND_SNDINSTANCE_BUSY_TEMP; } } -ID MainSound::AddSound(Sound* snd) +ID CSoundManager::addSound(CSound* snd) { - for (int i = 0, l = ArrSounds.size(); i < l; ++i) + for (int i = 0, l = m_aSounds.size(); i < l; ++i) { - if (ArrSounds[i] == 0) + if (m_aSounds[i] == 0) { - ArrSounds[i] = snd; + m_aSounds[i] = snd; return i; } } - ArrSounds.push_back(snd); - return ArrSounds.size() - 1; + m_aSounds.push_back(snd); + return m_aSounds.size() - 1; } -bool MainSound::SoundIsInit(ID id) +bool CSoundManager::soundIsInit(ID id) { - return ((ID)ArrSounds.size() > id && ArrSounds[id] != 0); + return ((ID)m_aSounds.size() > id && m_aSounds[id] != 0); } -void MainSound::SoundDelete(ID id) +void CSoundManager::soundDelete(ID id) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; - if (snd->IsInst) + + CSound* snd = m_aSounds[id]; + --(snd->m_iCountLoad); + + if (snd->m_iCountLoad > 0) + return; + + if (snd->m_isInst) { - if (snd->Is3d) - AArr3dInst.erase(snd->RPath); + char szStr[SOUND_MAX_SIZE_FULLPATH]; + szStr[0] = 0; + SOUND_CREATE_NAME(szStr, snd->m_idChannel, snd->m_szRPath); + + if (snd->m_is3d) + m_a3dInst.erase(szStr); else - AArr2dInst.erase(snd->RPath); + m_a2dInst.erase(szStr); } mem_delete(snd); } //############################################################################# -void MainSound::SoundPlay(ID id, int looping) +void CSoundManager::soundPlay(ID id, bool isLooping, UINT *pArrDelay, int iSizeArrDelay) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; + CSound *pSnd = m_aSounds[id]; + + if (pSnd->m_uiStreamSize != 0 && pArrDelay && iSizeArrDelay > 0) + { + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unresolved play delay for streming playing, file %s", GEN_MSG_LOCATION, pSnd->m_szRPath); + return; + } + + if (!m_aChannels[pSnd->m_idChannel]) + return; + + if (pArrDelay && iSizeArrDelay > 0 || iSizeArrDelay < 0) + soundInitPlayDelay(pSnd, pArrDelay, iSizeArrDelay); + + pSnd->m_isLooping = isLooping; + + if (pSnd->m_pSoundBuffer) + { + if (pArrDelay && iSizeArrDelay > 0) + pSnd->m_pSoundBuffer->SetCurrentPosition(0); + else + pSnd->m_pSoundBuffer->Play(0, 0, (pSnd->m_uiStreamSize || pSnd->m_isLooping ? DSBPLAY_LOOPING : 0)); + + pSnd->m_state = SOUND_OBJSTATE_PLAY; + } +} - if (looping >= 0) - snd->IsLooping = looping != 0; +void CSoundManager::soundInitPlayDelay(CSoundBase *pSndbase, UINT *pArrDelay, int iSizeArrDelay) +{ + if (!pSndbase) + return; - if (snd->DSBuffer) + if (iSizeArrDelay < 0) { - snd->DSBuffer->Play(0, 0, (snd->StreamSize || snd->IsLooping ? DSBPLAY_LOOPING : 0)); - snd->State = SOUND_OBJSTATE_PLAY; + if (pSndbase->oPlayDelay.m_aPlayDelay.size() <= 0) + { + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - previous delay data not init", GEN_MSG_LOCATION); + } + + pSndbase->oPlayDelay.m_iCurrPlayDelay = 0; + pSndbase->m_isPlayDelay = true; + return; + } + + if (pArrDelay == 0 || iSizeArrDelay == 0) + return; + + pSndbase->oPlayDelay.m_aPlayDelay.clearFast(); + pSndbase->oPlayDelay.m_iCurrPlayDelay = 0; + pSndbase->m_isPlayDelay = true; + pSndbase->oPlayDelay.m_uiPlayDelayStart = GetTickCount(); + + bool isEven = true; + for (int i = 0, il = iSizeArrDelay; i < il; ++i) + { + pSndbase->oPlayDelay.m_aPlayDelay.push_back(CPlayDelay::CTimeDelay(pArrDelay[i], isEven)); + isEven = !isEven; } } -void MainSound::SoundPause(ID id) +void CSoundManager::soundPause(ID id) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; + CSound* snd = m_aSounds[id]; + + if (!m_aChannels[snd->m_idChannel]) + return; - if (snd->DSBuffer) + if (snd->m_pSoundBuffer) { - snd->DSBuffer->Stop(); - snd->State = SOUND_OBJSTATE_PAUSE; + snd->m_pSoundBuffer->Stop(); + snd->m_state = SOUND_OBJSTATE_PAUSE; } } -void MainSound::SoundStop(ID id) +void CSoundManager::soundStop(ID id) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; + CSound* snd = m_aSounds[id]; + + if (!m_aChannels[snd->m_idChannel]) + return; - if (snd->DSBuffer) + if (snd->m_pSoundBuffer) { - snd->DSBuffer->Stop(); - snd->DSBuffer->SetCurrentPosition(0); - snd->State = SOUND_OBJSTATE_STOP; + snd->m_pSoundBuffer->Stop(); + snd->m_pSoundBuffer->SetCurrentPosition(0); + snd->m_state = SOUND_OBJSTATE_STOP; + snd->m_isLooping = false; + snd->m_isPlayDelay = false; } } -void MainSound::SoundStateSet(ID id, SOUND_OBJSTATE state) +void CSoundManager::soundSetState(ID id, SOUND_OBJSTATE state) { SOUND_PRECOND(id, _VOID); if (state == SOUND_OBJSTATE_PLAY) - SoundPlay(id); + soundPlay(id); else if (state == SOUND_OBJSTATE_PAUSE) - SoundPause(id); + soundPause(id); else if (state == SOUND_OBJSTATE_STOP) - SoundStop(id); + soundStop(id); } -SOUND_OBJSTATE MainSound::SoundStateGet(ID id) +SOUND_OBJSTATE CSoundManager::soundGetState(ID id) { SOUND_PRECOND(id, SOUND_OBJSTATE_STOP); - Sound* snd = ArrSounds[id]; - return snd->State; + CSound* snd = m_aSounds[id]; + return snd->m_state; } -void MainSound::SoundPosCurrSet(ID id, DWORD pos, int type) +void CSoundManager::soundSetPosPlay(ID id, UINT pos) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; + CSound* snd = m_aSounds[id]; DWORD PosInBytes = 0; - if (snd->DSBuffer) + if (snd->m_pSoundBuffer) { - if (type == SOUND_POS_BYTES) - { - PosInBytes = pos; - } - else if (type == SOUND_POS_SEC) - { - PosInBytes = pos * snd->BytesPerSec; - } - else if (type == SOUND_POS_MLS) - { - PosInBytes = pos * (snd->BytesPerSec / 1000); - } + PosInBytes = pos * (snd->m_uiBytesPerSec / 1000); - if (snd->StreamSize) + if (snd->m_uiStreamSize) { WORD HowCountRePlay = 0; - for (WORD i = 0; i <= snd->RePlayEndCount; i++) + for (WORD i = 0; i <= snd->m_iRePlayEndCount; i++) { - if ((i * snd->StreamSize <= PosInBytes && (i + 1) * snd->StreamSize >= PosInBytes) || i * snd->StreamSize == PosInBytes) + if ((i * snd->m_uiStreamSize <= PosInBytes && (i + 1) * snd->m_uiStreamSize >= PosInBytes) || i * snd->m_uiStreamSize == PosInBytes) { HowCountRePlay = i; break; @@ -813,392 +1334,463 @@ void MainSound::SoundPosCurrSet(ID id, DWORD pos, int type) } //wav - if (snd->Format == SOUND_FILEFORMAT_WAV) - fseek(snd->StreamFile, sizeof(SoundWaveHeader)+(HowCountRePlay * snd->StreamSize), SEEK_SET); + if (snd->m_format == SOUND_FILEFORMAT_WAV) + fseek(snd->m_pStream, sizeof(CSoundWaveHeader)+(HowCountRePlay * snd->m_uiStreamSize), SEEK_SET); //ogg - else if (snd->Format == SOUND_FILEFORMAT_OGG) - ov_pcm_seek(snd->VorbisFile, (HowCountRePlay * snd->StreamSize) / (2 * snd->ChannelsCount)); + else if (snd->m_format == SOUND_FILEFORMAT_OGG) + ov_pcm_seek(snd->m_pVorbisFile, (HowCountRePlay * snd->m_uiStreamSize) / (2 * snd->m_iChannelsCount)); - DWORD SizeCountRePlay = PosInBytes - (snd->StreamSize * HowCountRePlay); + DWORD SizeCountRePlay = PosInBytes - (snd->m_uiStreamSize * HowCountRePlay); - ReLoadSplit(id, 0, snd->StreamSize); + reLoadSplit(id, 0, snd->m_uiStreamSize); - snd->RePlayCount = HowCountRePlay; - snd->DSBuffer->SetCurrentPosition(SizeCountRePlay); + snd->m_iRePlayCount = HowCountRePlay; + snd->m_pSoundBuffer->SetCurrentPosition(SizeCountRePlay); for (WORD i = 0; i<4; i++) { - if (SizeCountRePlay >= snd->Split1Size * i && SizeCountRePlay < snd->Split1Size * (i + 1)) + if (SizeCountRePlay >= snd->m_uiSplit1Size * i && SizeCountRePlay < snd->m_uiSplit1Size * (i + 1)) { - snd->SplitActive = i + 1; + snd->m_iSplitActive = i + 1; break; } } - if (snd->SplitActive > 1) - snd->IsStarting = false; + if (snd->m_iSplitActive > 1) + snd->m_isStarting = false; else - snd->IsStarting = true; + snd->m_isStarting = true; - if (snd->SplitActive - 2 > 0 && snd->SplitActive - 2 < 5) + if (snd->m_iSplitActive - 2 > 0 && snd->m_iSplitActive - 2 < 5) { - for (WORD i = 0; i<snd->SplitActive - 2; i++) - ReLoadSplit(id, snd->Split1Size*i, snd->Split1Size); + for (WORD i = 0; i<snd->m_iSplitActive - 2; i++) + reLoadSplit(id, snd->m_uiSplit1Size*i, snd->m_uiSplit1Size); } - snd->BF1 = snd->BF2 = snd->BF3 = snd->BF4 = false; + snd->m_isWork1 = snd->m_isWork2 = snd->m_isWork3 = snd->m_isWork4 = false; } else - snd->DSBuffer->SetCurrentPosition(PosInBytes); + snd->m_pSoundBuffer->SetCurrentPosition(PosInBytes); } } -DWORD MainSound::SoundPosCurrGet(ID id, int type) +UINT CSoundManager::soundGetPosPlay(ID id) { SOUND_PRECOND(id, 0); - Sound* snd = ArrSounds[id]; - DWORD posinduff, Bytes, Pos = 0; - if (snd->DSBuffer) + CSound* snd = m_aSounds[id]; + DWORD dwPosBuff, dwBytes, dwPos = 0; + if (snd->m_pSoundBuffer) { - snd->DSBuffer->GetCurrentPosition(&posinduff, 0); + snd->m_pSoundBuffer->GetCurrentPosition(&dwPosBuff, 0); - if (snd->StreamSize) - Bytes = snd->RePlayCount * snd->StreamSize + posinduff; + if (snd->m_uiStreamSize) + dwBytes = snd->m_iRePlayCount * snd->m_uiStreamSize + dwPosBuff; else - Bytes = posinduff; - - if (type == SOUND_POS_BYTES) - Pos = Bytes; - else if (type == SOUND_POS_SEC) - Pos = Bytes / snd->BytesPerSec; - else if (type == SOUND_POS_MLS) - Pos = Bytes / (snd->BytesPerSec / 1000); + dwBytes = dwPosBuff; + + dwPos = dwBytes / (snd->m_uiBytesPerSec / 1000); } - return Pos; + return dwPos; } -void MainSound::SoundVolumeSet(ID id, long volume, int type) +void CSoundManager::soundSetVolume(ID id, float fVolume) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; - if (snd->DSBuffer) + CSound *pSnd = m_aSounds[id]; + pSnd->m_fVolume = saturatef(fVolume); + + if (pSnd->m_pSoundBuffer) { - if (type == SOUND_VOL_DB) - snd->Volume = volume; - else if (type == SOUND_VOL_PCT) - snd->Volume = -10000 + (volume * 100); + int iVolume = -10000 + (pSnd->m_fVolume * 10000); - if (!snd->Is3d) - snd->DSBuffer->SetVolume(snd->Volume); + if (!pSnd->m_is3d) + pSnd->m_pSoundBuffer->SetVolume(iVolume); } } -long MainSound::SoundVolumeGet(ID id, int type) +float CSoundManager::soundGetVolume(ID id) { SOUND_PRECOND(id, 0); - Sound* snd = ArrSounds[id]; - static long volume = 0; - if (snd->DSBuffer) - { - if (type == SOUND_VOL_DB) - { - if (snd->Is3d) - volume = snd->Volume; - else - snd->DSBuffer->GetVolume(&volume); - } - else if (type == SOUND_VOL_PCT) - { - if (snd->Is3d) - { - double one_percent = 100.0 / (-10000.0); - volume = double(snd->Volume) * one_percent; - } - else - { - double one_percent = 100.0 / (-10000.0); - snd->DSBuffer->GetVolume(&volume); - volume = double(volume) * one_percent; - } - } - } - return volume; + CSound *pSnd = m_aSounds[id]; + return pSnd->m_fVolume; } -void MainSound::SoundPanSet(ID id, long value, int type) +void CSoundManager::soundSetPan(ID id, float fPan) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; - static long Value = 0; - if (snd->DSBuffer) + CSound *pSnd = m_aSounds[id]; + + if (pSnd->m_is3d) + return; + + pSnd->m_fPan = clampf(fPan,-1.f,1.f); + + if (pSnd->m_pSoundBuffer) { - if (type == SOUND_VOL_DB || value == 0) - Value = value; - else if (type == SOUND_VOL_PCT && value != 0) - Value = (value > 0) ? (10000 - (value * 100)) - 10000 : 10000 - (10000 + (value * 100)); + long lValue = (pSnd->m_fPan > 0) ? (10000 - (pSnd->m_fPan * 100)) - 10000 : 10000 - (10000 + (pSnd->m_fPan * 100)); - snd->DSBuffer->SetPan(Value); + pSnd->m_pSoundBuffer->SetPan(lValue); } } -long MainSound::SoundPanGet(ID id, int type) +float CSoundManager::soundGetPan(ID id) { SOUND_PRECOND(id, 0); - Sound* snd = ArrSounds[id]; - static long Value = 0; - if (snd->DSBuffer) - { - if (type == SOUND_VOL_DB) - snd->DSBuffer->GetPan(&Value); - else - { - double coef_percent = 100.0 / (10000.0); - snd->DSBuffer->GetPan(&Value); - Value = double(Value) * coef_percent; - } - } - return Value; + CSound *pSnd = m_aSounds[id]; + + if (pSnd->m_is3d) + return 0; + + return pSnd->m_fPan; } -void MainSound::SoundFreqCurrSet(ID id, DWORD value) +void CSoundManager::soundSetFreqCurr(ID id, UINT value) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; - if (snd->DSBuffer) - snd->DSBuffer->SetFrequency(value); + CSound* snd = m_aSounds[id]; + if (snd->m_pSoundBuffer) + snd->m_pSoundBuffer->SetFrequency(value); } -DWORD MainSound::SoundFreqCurrGet(ID id) +UINT CSoundManager::soundGetFreqCurr(ID id) { SOUND_PRECOND(id, 0); - Sound* snd = ArrSounds[id]; + CSound* snd = m_aSounds[id]; static DWORD Value = 0; - if (snd->DSBuffer) - snd->DSBuffer->GetFrequency(&Value); + if (snd->m_pSoundBuffer) + snd->m_pSoundBuffer->GetFrequency(&Value); return Value; } -DWORD MainSound::SoundFreqOriginGet(ID id) +UINT CSoundManager::soundGetFreqOrigin(ID id) { SOUND_PRECOND(id, 0); - Sound* snd = ArrSounds[id]; - if (snd->DSBuffer) - return snd->FrecOrigin; + CSound* snd = m_aSounds[id]; + if (snd->m_pSoundBuffer) + return snd->m_uiFrecOrigin; return 0; } -void MainSound::SoundPosWSet(ID id, const float3* pos) +void CSoundManager::soundSetPosWorld(ID id, const float3* pos) { SOUND_PRECOND(id, _VOID); if (pos) - ArrSounds[id]->Position = *pos; + m_aSounds[id]->m_vPosition = *pos; } -void MainSound::SoundPosWGet(ID id, float3* pos) +void CSoundManager::soundGetPosWorld(ID id, float3* pos) { SOUND_PRECOND(id, _VOID); if (pos) - *pos = ArrSounds[id]->Position; + *pos = m_aSounds[id]->m_vPosition; } -int MainSound::SoundLengthSecGet(ID id) +int CSoundManager::soundGetLengthSec(ID id) { SOUND_PRECOND(id, 0); - return ArrSounds[id]->LengthSec; + return m_aSounds[id]->m_iLengthSec; } -DWORD MainSound::SoundBytesPerSecGet(ID id) +UINT CSoundManager::soundGetBytesPerSec(ID id) { SOUND_PRECOND(id, 0); - return ArrSounds[id]->BytesPerSec; + return m_aSounds[id]->m_uiBytesPerSec; } -DWORD MainSound::SoundSizeGet(ID id) +UINT CSoundManager::soundGetSize(ID id) { SOUND_PRECOND(id, 0); - return ArrSounds[id]->SizeFull; + return m_aSounds[id]->m_uiSizeFull; } -void MainSound::SoundFileGet(ID id, char* path) +void CSoundManager::soundGetFile(ID id, char* path) { SOUND_PRECOND(id, _VOID); if(path) - strcpy(path,ArrSounds[id]->RPath); + strcpy(path,m_aSounds[id]->m_szRPath); } -float MainSound::SoundDistAudibleGet(ID id) +float CSoundManager::soundGetDistAudible(ID id) { SOUND_PRECOND(id, 0); - return ArrSounds[id]->DistAudible; + return m_aSounds[id]->m_fDistAudible; } -void MainSound::SoundDistAudibleSet(ID id, float value) +void CSoundManager::soundSetDistAudible(ID id, float value) { SOUND_PRECOND(id, _VOID); - ArrSounds[id]->DistAudible = value; + m_aSounds[id]->m_fDistAudible = value; } //############################################################################# -void MainSound::ReLoadSplit(ID id, DWORD Pos, DWORD Size) +void CSoundManager::reLoadSplit(ID id, UINT Pos, UINT Size) { SOUND_PRECOND(id, _VOID); - Sound* snd = ArrSounds[id]; - if (snd->DSBuffer) + CSound* snd = m_aSounds[id]; + if (snd->m_pSoundBuffer) { //wav - if (snd->Format == SOUND_FILEFORMAT_WAV) - SoundDataWAVLoad(snd->DSBuffer, Pos, snd->StreamFile, Size, 0); + if (snd->m_format == SOUND_FILEFORMAT_WAV) + soundDataWAVLoad(snd->m_pSoundBuffer, Pos, snd->m_pStream, Size, 0); //ogg - else if (snd->Format == SOUND_FILEFORMAT_OGG) + else if (snd->m_format == SOUND_FILEFORMAT_OGG) { - SoundDataOGGLoad(snd->VorbisFile, snd->DSBuffer, Pos, Size, 0); + soundDataOGGLoad(snd->m_pVorbisFile, snd->m_pSoundBuffer, Pos, Size, 0); + } + } +} + +void CSoundManager::UpdatePlayDelay(CSoundBase *pSndBase) +{ + if (!pSndBase) + return; + + DWORD dwStatus = 0; + + //если вопроизведение с задержками + if (pSndBase->m_isPlayDelay) + { + if (pSndBase->m_state == SOUND_OBJSTATE_PLAY && pSndBase->m_isLooping && pSndBase->oPlayDelay.m_iCurrPlayDelay == -1 && SUCCEEDED(pSndBase->m_pSoundBuffer->GetStatus(&dwStatus)) && !(dwStatus & DSBSTATUS_PLAYING)) + { + pSndBase->oPlayDelay.m_iCurrPlayDelay = 0; + pSndBase->oPlayDelay.m_uiPlayDelayStart = 0; + pSndBase->m_pSoundBuffer->SetCurrentPosition(0); + pSndBase->m_pSoundBuffer->Play(0, 0, 0); + } + + dwStatus = 0; + + DWORD dwCurrPos = 0; + + pSndBase->m_pSoundBuffer->GetCurrentPosition(&dwCurrPos, 0); + dwCurrPos = dwCurrPos / (pSndBase->m_uiBytesPerSec / 1000); + + //если текущий ключ в массиве задержек валиден + if (pSndBase->oPlayDelay.m_iCurrPlayDelay >= 0 && pSndBase->oPlayDelay.m_aPlayDelay.size() > pSndBase->oPlayDelay.m_iCurrPlayDelay) + { + if ( + //если текущий ключ в массиве это не задержка и текущая время воспроизведения больше либо равно установленному + (!(pSndBase->oPlayDelay.m_aPlayDelay[pSndBase->oPlayDelay.m_iCurrPlayDelay].m_isDelay) && dwCurrPos >= pSndBase->oPlayDelay.m_aPlayDelay[pSndBase->oPlayDelay.m_iCurrPlayDelay].m_uiTime) || + + //если текущий ключ в массиве это задержка и время с засечки уже превысило установленное значение либо равно ему + (pSndBase->oPlayDelay.m_aPlayDelay[pSndBase->oPlayDelay.m_iCurrPlayDelay].m_isDelay && (GetTickCount() - pSndBase->oPlayDelay.m_uiPlayDelayStart) >= pSndBase->oPlayDelay.m_aPlayDelay[pSndBase->oPlayDelay.m_iCurrPlayDelay].m_uiTime) + ) + { + //инкрементируем текущий ключ + ++(pSndBase->oPlayDelay.m_iCurrPlayDelay); + + //если следующий ключ валиден + if (pSndBase->oPlayDelay.m_aPlayDelay.size() > pSndBase->oPlayDelay.m_iCurrPlayDelay) + { + //если задержка + if (pSndBase->oPlayDelay.m_aPlayDelay[pSndBase->oPlayDelay.m_iCurrPlayDelay].m_isDelay) + { + //естанавливаем и засекаем время + pSndBase->m_pSoundBuffer->Stop(); + pSndBase->oPlayDelay.m_uiPlayDelayStart = GetTickCount(); + } + else + { + //воспроизводим и обнуляем засечку + pSndBase->m_pSoundBuffer->Play(0, 0, 0); + pSndBase->oPlayDelay.m_uiPlayDelayStart = 0; + } + } + //иначе ключ в массиве задержек невалиден + else + { + //воспроизводим остаток и обнуляем данные настроек + pSndBase->m_pSoundBuffer->Play(0, 0, 0); + + if (!(pSndBase->m_isLooping)) + pSndBase->m_isPlayDelay = false; + + pSndBase->oPlayDelay.m_iCurrPlayDelay = -1; + pSndBase->oPlayDelay.m_uiPlayDelayStart = 0; + } + } } } } -void MainSound::Update(const float3* viewpos, const float3* viewdir) +void CSoundManager::update(const float3* viewpos, const float3* viewdir) { int tmpSoundsPlayCount = 0; int tmpSoundsLoadCount = 0; - Sound* snd; - DWORD status = 0; - for(UINT i = 0; i < ArrSounds.size(); ++i) + CSound *pSnd = 0; + DWORD dwStatus = 0; + for(UINT i = 0; i < m_aSounds.size(); ++i) { - snd = ArrSounds[i]; - if(snd) + pSnd = m_aSounds[i]; + + //если есть звук и его канал вопроизводится + if (pSnd && m_aChannels[pSnd->m_idChannel]) { - status = 0; - snd->DSBuffer->GetStatus(&status); - if(!(status & DSBSTATUS_PLAYING) && snd->State == SOUND_OBJSTATE_PLAY) - SoundStateSet(i, SOUND_OBJSTATE_STOP); + //если вопроизведение с задержками + if (pSnd->m_state == SOUND_OBJSTATE_PLAY && pSnd->m_uiStreamSize == 0 && pSnd->m_isPlayDelay) + { + UpdatePlayDelay((CSoundBase*)pSnd); + } + + dwStatus = 0; + + //если звук воспроизводится без задержек и буфер уже не прогирывается а состояние звука "проигрывается" тогда выключаем звук + if (!pSnd->m_isPlayDelay && SUCCEEDED(pSnd->m_pSoundBuffer->GetStatus(&dwStatus)) && !(dwStatus & DSBSTATUS_PLAYING) && pSnd->m_state == SOUND_OBJSTATE_PLAY) + soundSetState(i, SOUND_OBJSTATE_STOP); ++tmpSoundsLoadCount; - if(snd->State == SOUND_OBJSTATE_PLAY) + if(pSnd->m_state == SOUND_OBJSTATE_PLAY) ++tmpSoundsPlayCount; - if(snd->Is3d && snd->DSBuffer && viewpos && viewdir) + + //если анализируемый звук 3d + if(pSnd->m_is3d && pSnd->m_pSoundBuffer && viewpos && viewdir) { - snd->DSBuffer->SetVolume(SOUND_3D_COM_VOLUME(snd->Position, (*viewpos), snd->DistAudible)); - snd->DSBuffer->SetPan(SOUND_3D_COM_PAN(snd->Position, (*viewpos), (*viewdir), snd->DistAudible, snd->ShiftPan)); + //устанавливаем ему параметры воспроизведения + pSnd->m_pSoundBuffer->SetVolume(lerpf(-10000, 0, pSnd->m_fVolume * Snd3dComVolume(pSnd->m_vPosition, (*viewpos), pSnd->m_fDistAudible))); + pSnd->m_pSoundBuffer->SetPan(Snd3dComPan(pSnd->m_vPosition, (*viewpos), (*viewdir), pSnd->m_fDistAudible, pSnd->m_fShiftPan)); - if(snd->DataInstances.size() > 0) + //если есть инстансы + if(pSnd->m_aInstances.size() > 0) { - for(int k = 0, l = snd->DataInstances.size(); k < l; ++k) + //проходимся по всему массиву инстансов и устанавливаем параметры воспроизведения + for(int k = 0, l = pSnd->m_aInstances.size(); k < l; ++k) { - snd->DSBuffer->SetVolume(SOUND_3D_COM_VOLUME(snd->DataInstances[k].pos, (*viewpos), snd->DistAudible)); - snd->DSBuffer->SetPan(SOUND_3D_COM_PAN(snd->DataInstances[k].pos, (*viewpos), (*viewdir), snd->DistAudible, snd->ShiftPan)); + pSnd->m_pSoundBuffer->SetVolume(lerpf(-10000, 0, pSnd->m_fVolume * Snd3dComVolume(pSnd->m_aInstances[k].m_vPos, (*viewpos), pSnd->m_fDistAudible))); + pSnd->m_pSoundBuffer->SetPan(Snd3dComPan(pSnd->m_aInstances[k].m_vPos, (*viewpos), (*viewdir), pSnd->m_fDistAudible, pSnd->m_fShiftPan)); } } } - for(int k = 0, l = snd->DataInstances.size(); k < l; ++k) + for(int k = 0, kl = pSnd->m_aInstances.size(); k < kl; ++k) { - status = 0; - if(SUCCEEDED(snd->DataInstances[k].sbuffer->GetStatus(&status)) && !(status & DSBSTATUS_PLAYING)) - snd->DataInstances[k].busy = false; + //нужно ли это здесь? + /*if (pSnd->m_aInstances[k].m_state != SOUND_OBJSTATE_PLAY) + continue;*/ + + //если вопроизведение с задержками + if (pSnd->m_aInstances[k].m_isPlayDelay) + { + if (pSnd->m_aInstances[k].m_state == SOUND_OBJSTATE_PLAY) + UpdatePlayDelay(&(pSnd->m_aInstances[k])); + } + //иначе не установлено что звук воспроизводится с задержками + else + { + //обрабатываем состояния + dwStatus = 0; + + //если буфер не проигрывается и состояние инстанса "временно блокирован", тогда освобождаем инстанс + if (SUCCEEDED(pSnd->m_aInstances[k].m_pSoundBuffer->GetStatus(&dwStatus)) && !(dwStatus & DSBSTATUS_PLAYING) && pSnd->m_aInstances[k].m_busy != SOUND_SNDINSTANCE_BUSY_LOCKED) + pSnd->m_aInstances[k].m_busy = SOUND_SNDINSTANCE_BUSY_FREE; + + //если буфер инстанса не проигрывается а состояние инстанса "проигрывается", тогда устанавливаем состояние "непроигрывается" + if (pSnd->m_aInstances[k].m_state == SOUND_OBJSTATE_PLAY && !(dwStatus & DSBSTATUS_PLAYING)) + pSnd->m_aInstances[k].m_state = SOUND_OBJSTATE_STOP; + } } - if(snd->StreamSize && snd->DSBuffer != 0) + if(pSnd->m_uiStreamSize && pSnd->m_pSoundBuffer != 0) { DWORD pos; - snd->DSBuffer->GetCurrentPosition(&pos, 0); + pSnd->m_pSoundBuffer->GetCurrentPosition(&pos, 0); - if(pos >= snd->Split1Size && pos < snd->Split2Size && !snd->BF2) + if (pos >= pSnd->m_uiSplit1Size && pos < pSnd->m_uiSplit2Size && !pSnd->m_isWork2) { - ReLoadSplit(i, 0, snd->Split1Size); - snd->BF2 = true; - snd->BF1 = false; snd->BF3 = false; snd->BF4 = false; - snd->SplitActive = 2; + reLoadSplit(i, 0, pSnd->m_uiSplit1Size); + pSnd->m_isWork2 = true; + pSnd->m_isWork1 = false; pSnd->m_isWork3 = false; pSnd->m_isWork4 = false; + pSnd->m_iSplitActive = 2; } - else if(pos >= snd->Split2Size && pos < snd->Split3Size && !snd->BF3) + else if (pos >= pSnd->m_uiSplit2Size && pos < pSnd->m_uiSplit3Size && !pSnd->m_isWork3) { - snd->BF3 = true; - snd->BF1 = false; snd->BF2 = false; snd->BF4 = false; - ReLoadSplit(i, snd->Split1Size, snd->Split1Size); - snd->SplitActive = 3; + pSnd->m_isWork3 = true; + pSnd->m_isWork1 = false; pSnd->m_isWork2 = false; pSnd->m_isWork4 = false; + reLoadSplit(i, pSnd->m_uiSplit1Size, pSnd->m_uiSplit1Size); + pSnd->m_iSplitActive = 3; } - else if(pos >= snd->Split3Size && pos < snd->StreamSize && !snd->BF4) + else if (pos >= pSnd->m_uiSplit3Size && pos < pSnd->m_uiStreamSize && !pSnd->m_isWork4) { - snd->BF4 = true; - snd->BF1 = false; snd->BF2 = false; snd->BF3 = false; - ReLoadSplit(i, snd->Split2Size, snd->Split1Size); - snd->SplitActive = 4; + pSnd->m_isWork4 = true; + pSnd->m_isWork1 = false; pSnd->m_isWork2 = false; pSnd->m_isWork3 = false; + reLoadSplit(i, pSnd->m_uiSplit2Size, pSnd->m_uiSplit1Size); + pSnd->m_iSplitActive = 4; } - else if(pos < snd->Split1Size && !snd->BF1) + else if (pos < pSnd->m_uiSplit1Size && !pSnd->m_isWork1) { - snd->BF1 = true; - snd->BF2 = false; snd->BF3 = false; snd->BF4 = false; - if(!snd->IsStarting) + pSnd->m_isWork1 = true; + pSnd->m_isWork2 = false; pSnd->m_isWork3 = false; pSnd->m_isWork4 = false; + if(!pSnd->m_isStarting) { - ReLoadSplit(i, snd->Split3Size, snd->Split1Size); - snd->RePlayCount++; + reLoadSplit(i, pSnd->m_uiSplit3Size, pSnd->m_uiSplit1Size); + pSnd->m_iRePlayCount++; } - snd->SplitActive = 1; - snd->IsStarting = false; + pSnd->m_iSplitActive = 1; + pSnd->m_isStarting = false; } - if(snd->RePlayCount + 1 == snd->RePlayEndCount) + if(pSnd->m_iRePlayCount + 1 == pSnd->m_iRePlayEndCount) { - if(snd->SizeFull <= (snd->StreamSize * snd->RePlayCount + pos)) + if(pSnd->m_uiSizeFull <= (pSnd->m_uiStreamSize * pSnd->m_iRePlayCount + pos)) { - if(!snd->IsLooping) - SoundStop(i); + if(!pSnd->m_isLooping) + soundStop(i); //wav - if(snd->Format == SOUND_FILEFORMAT_WAV) - fseek(snd->StreamFile, sizeof(SoundWaveHeader), SEEK_SET); + if(pSnd->m_format == SOUND_FILEFORMAT_WAV) + fseek(pSnd->m_pStream, sizeof(CSoundWaveHeader), SEEK_SET); //ogg - else if(snd->Format == SOUND_FILEFORMAT_OGG) - ov_pcm_seek(snd->VorbisFile, 0); + else if(pSnd->m_format == SOUND_FILEFORMAT_OGG) + ov_pcm_seek(pSnd->m_pVorbisFile, 0); - ReLoadSplit(i, 0, snd->StreamSize); + reLoadSplit(i, 0, pSnd->m_uiStreamSize); - snd->DSBuffer->SetCurrentPosition(0); + pSnd->m_pSoundBuffer->SetCurrentPosition(0); - snd->RePlayCount = 0; - snd->IsStarting = true; + pSnd->m_iRePlayCount = 0; + pSnd->m_isStarting = true; - snd->BF1 = false; snd->BF2 = false; snd->BF3 = false; snd->BF4 = false; + pSnd->m_isWork1 = false; pSnd->m_isWork2 = false; pSnd->m_isWork3 = false; pSnd->m_isWork4 = false; } } } } } - SoundsPlayCount = tmpSoundsPlayCount; - SoundsLoadCount = tmpSoundsLoadCount; + m_iSoundsPlayCount = tmpSoundsPlayCount; + m_iSoundsLoadCount = tmpSoundsLoadCount; - OldViewPos = *viewpos; - OldViewDir = *viewdir; + m_vOldViewPos = *viewpos; + m_vOldViewDir = *viewdir; } -int MainSound::SoundsPlayCountGet() +int CSoundManager::soundsGetPlayCount() { - return SoundsPlayCount; + return m_iSoundsPlayCount; } -int MainSound::SoundsLoadCountGet() +int CSoundManager::soundsGetLoadCount() { - return SoundsLoadCount; + return m_iSoundsLoadCount; } diff --git a/source/score/sound.h b/source/score/sound.h index a5fe99dde8c8e2cb64cce4c565091fc602ec71fb..1bdb88b5ac3b079e36c4796456f44c78e5307956 100644 --- a/source/score/sound.h +++ b/source/score/sound.h @@ -1,31 +1,37 @@ - -/*********************************************************** -Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 -See the license in LICENSE -***********************************************************/ - -#ifndef __SOUND_H -#define __SOUND_H - -#pragma comment(lib, "dxguid.lib") -#pragma comment(lib, "dsound.lib") -#pragma comment(lib, "libogg_static.lib") -#pragma comment(lib, "libvorbis_static.lib") -#pragma comment(lib, "libvorbisfile_static.lib") -#include <gdefines.h> -#include <windows.h> -#include <mmsystem.h> -#include <dsound.h> -#include <stdint.h> -#include <vorbis/codec.h> -#include <vorbis/vorbisfile.h> -#include <common/aastring.h> -#include <common/array.h> -#include <common/assotiativearray.h> -#include "sxscore.h" - -struct AAStringNR : public AAString -{ + +/*********************************************************** +Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017, 2018 +See the license in LICENSE +***********************************************************/ + +#ifndef __SOUND_H +#define __SOUND_H + +#pragma comment(lib, "dxguid.lib") +#pragma comment(lib, "dsound.lib") +#pragma comment(lib, "libogg_static.lib") +#pragma comment(lib, "libvorbis_static.lib") +#pragma comment(lib, "libvorbisfile_static.lib") +#include <gdefines.h> +#include <windows.h> +#include <mmsystem.h> +#include <dsound.h> +#include <stdint.h> +#include <vorbis/codec.h> +#include <vorbis/vorbisfile.h> +#include <common/aastring.h> +#include <common/array.h> +#include <common/string.h> +#include <common/string_utils.h> +#include <common/file_utils.h> +#include <common/assotiativearray.h> +#include "sxscore.h" + +//########################################################################## + +//перенести в common +struct AAStringNR : public AAString +{ __forceinline AAStringNR(const char * str) { tmpName = str; @@ -36,238 +42,613 @@ struct AAStringNR : public AAString { tmpName = NULL; Name[0] = 0; - } - + } + __forceinline bool operator==(const AAStringNR & str) const { return(stricmp(tmpName ? tmpName : Name, str.tmpName ? str.tmpName : str.Name) == 0); - } -}; - - -#define SOUND_PRECOND(id, retval) \ -if((UINT)id >= ArrSounds.size() || !(ArrSounds[id]))\ + } +}; + +//########################################################################## + +/*! проверка допустимости id звука, в случае провала вылет */ +#define SOUND_PRECOND(id, retval) \ +if (id >= m_aSounds.size() || id < 0 || !(m_aSounds[id]))\ {LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unresolved address to sound %d", GEN_MSG_LOCATION, id); return retval; } - -inline long SOUND_3D_COM_VOLUME(const float3 & snd_pos, const float3 & view_pos, const float snd_distaudible) -{ - long vol = (SMVector3Distance(snd_pos, view_pos) / snd_distaudible) * (-10000); - - if (vol > 0) - vol = 0; - - if (vol < -10000) - vol = -10000; - - return vol; -} - -//чтение файла -size_t ogg_read(void *ptr, size_t size, size_t nmemb, void *datasource); -//закртытие файла -int ogg_close(void* datasource); -//позиционирование -int ogg_seek(void *datasource, ogg_int64_t offset, int whence); -//размер файла -long ogg_tell(void* datasource); - -inline long SOUND_3D_COM_PAN(const float3 & snd_pos, const float3 & view_pos, const float3 & view_dir, const float snd_distaudible, const float snd_shiftpan) -{ - float dist = SMVector3Distance(snd_pos, view_pos); - float3 vec = view_pos + view_dir; - - float str = (snd_pos.x - view_pos.x)*(snd_pos.z - vec.z) - (snd_pos.z - view_pos.z)*(snd_pos.x - vec.x); - return ((str * (dist / snd_distaudible)) * snd_shiftpan * (-10000)); -} - -//структура для загрузки wave файла -struct SoundWaveHeader -{ - char RiffSig[4]; - int32_t ChunkSize; - char Sig[4]; - char FormatSig[4]; - int32_t FormatChunkSize; - int16_t FormatTag; - int16_t Channels; - int32_t SampleRate; - int32_t BytesPerSec; - int16_t BlockAlign; - int16_t BitsPerSample; - char DataSig[4]; - int32_t DataSize; -}; - - -class MainSound -{ -public: - MainSound(); - ~MainSound(); - - SX_ALIGNED_OP_MEM - - void Clear(); - - void Init(HWND hwnd); - - struct Sound - { - Sound(); - ~Sound(); - SX_ALIGNED_OP_MEM - - char RPath[SOUND_MAX_SIZE_PATH]; - ID Id; - bool IsInst; - FILE* StreamFile; - IDirectSoundBuffer8* DSBuffer; //звуковой буфер - OggVorbis_File* VorbisFile; //поток для декодирования ogg - - struct SIData - { - SIData(){ sbuffer = 0; busy = false; } - SIData(IDirectSoundBuffer8* _sbuffer, float3_t* _pos, bool _busy) - { - sbuffer = _sbuffer; if (_pos) pos = *_pos; busy = _busy; - } - ~SIData() - { - mem_release(sbuffer); - } - - IDirectSoundBuffer8* sbuffer; - float3_t pos; - bool busy; - }; - - Array<SIData> DataInstances; - - SOUND_FILEFORMAT Format; //формат файла - DWORD SizeFull; //полный размер в байтах (для wav исключая заголовочную структуру) - - float3 Position; //позиция источника звука - //float Damping; //сброс громкости при отдалении на метр, т.е. count_volume = volume - dist * Damping % - - //изменение позиционирования звука, на сколько будет смещен звук при поворотах камеры к источнику звука - //чем ближе к объекту тем меньше разница в позиционировании при поворотах - float ShiftPan; - - SOUND_OBJSTATE State; - DWORD FrecOrigin; //оригинальная частота - - float DistAudible; - - DWORD StreamSize;//размер потока в байтах - int LengthSec; - int ChannelsCount; - int RateSample; - int BitsPerSample; - DWORD BytesPerSec; - long Volume; - - //размеры сплитов потока - DWORD Split1Size; - DWORD Split2Size; - DWORD Split3Size; - - //заглушки для работы апдейта на каждый сплит в отдельности - bool BF1; - bool BF2; - bool BF3; - bool BF4; - - bool IsLooping; //зацикливать воспроизведние? - bool IsStarting; //воспроизведение только началось? (для потока) - bool Is3d; - - short SplitActive; //активный сплит - int RePlayCount; //сколько раз был полностью перезагружен поток - int RePlayEndCount; //сколько раз нужно полностью перезагрузить поток чтоб дойти до конца - }; - - ID SoundCreate2d(const char *file, bool looping = false, DWORD size_stream = 0); - ID SoundCreate3d(const char *file, bool looping, DWORD size_stream, float dist, float shift_pan = 0.1f); - - ID SoundCreate2dInst(const char *file, bool looping = false, DWORD size_stream = 0); - ID SoundCreate3dInst(const char *file, bool looping, DWORD size_stream, float dist, float shift_pan = 0.1f); - - ID SoundFind2dInst(const char * file); - ID SoundFind3dInst(const char * file); - - void SoundInstancePlay2d(ID id, int volume=100, int pan = 0); - void SoundInstancePlay3d(ID id, const float3* pos); - - bool SoundIsInit(ID id); - void SoundDelete(ID id); - - void SoundPlay(ID id, int looping=-1); //проиграть - void SoundPause(ID id); //приостановить - void SoundStop(ID id); //остановить - - void SoundStateSet(ID id, SOUND_OBJSTATE state); - SOUND_OBJSTATE SoundStateGet(ID id); - - //текащая позиция проигрывания - void SoundPosCurrSet(ID id, DWORD pos, int type = SOUND_POS_BYTES); - DWORD SoundPosCurrGet(ID id, int type = SOUND_POS_BYTES); - - //громкость - void SoundVolumeSet(ID id, long volume, int type = SOUND_VOL_PCT); - long SoundVolumeGet(ID id, int type = SOUND_VOL_PCT); - - //позиционирование между динамиками - void SoundPanSet(ID id, long value, int type = SOUND_VOL_PCT); - long SoundPanGet(ID id, int type = SOUND_VOL_PCT); - - //частота - void SoundFreqCurrSet(ID id, DWORD value); - DWORD SoundFreqCurrGet(ID id); - DWORD SoundFreqOriginGet(ID id); - - void SoundPosWSet(ID id, const float3* pos); - void SoundPosWGet(ID id, float3* pos); - - int SoundLengthSecGet(ID id); //длина в секундах - DWORD SoundBytesPerSecGet(ID id); //байт в секунде - DWORD SoundSizeGet(ID id); //размер в байтах PCM данных - void SoundFileGet(ID id, char* path);//путь до звукового файла - - float SoundDistAudibleGet(ID id); - void SoundDistAudibleSet(ID id, float value); - - void Update(const float3* viewpos, const float3* viewdir); - - SOUND_FILEFORMAT FileFormat(const char* file); - - int SoundsPlayCountGet(); - int SoundsLoadCountGet(); - -private: - - void Load(Sound* snd, const char* fpath, SOUND_FILEFORMAT fmt); - - void LoadWAV(Sound* snd, const char* fpath); - void LoadOGG(Sound* snd, const char* fpath); - IDirectSoundBuffer8* SoundBufferCreate(SoundWaveHeader* hdr); - void SoundDataWAVLoad(IDirectSoundBuffer8* DSBuffer, long LockPos, FILE* data, long Size, DWORD flag = 0); - void SoundDataOGGLoad(OggVorbis_File* VorbisFile, IDirectSoundBuffer8 *DSBuffer, long LockPos, long Size, DWORD flag); - - void ReLoadSplit(ID id, DWORD Pos, DWORD Size); - - ID AddSound(Sound* snd); - - Array<Sound*> ArrSounds; //массив со всеми звуковыми объектами - AssotiativeArray<AAStringNR, ID, false, 16> AArr2dInst; - AssotiativeArray<AAStringNR, ID, false, 16> AArr3dInst; - - IDirectSound8* DeviceSound; //звуковое устройство - IDirectSoundBuffer* DSPrimary; //первичный буфер - int SoundsPlayCount; //количество проигрываемых звуков - int SoundsLoadCount; //количество загруженных звуков (с учетом как проигрывающихся так и простаивающих) - - float3 OldViewPos; - float3 OldViewDir; -}; - -#endif + +/*! создание имени звука (нужно для разделения между каналами */ +#define SOUND_CREATE_NAME(szStr, szFile, idChannel) sprintf(szStr, "%d|%s", idChannel, szFile); + +/*! проверка допустимости id канала, в случае провала вылет */ +#define SOUND_CHANNEL_PRECOND(id, retval) \ +if (!(id >= 0 && id < SOUND_CHANNELS_COUNT)) \ +{LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unresolved id channel %d", GEN_MSG_LOCATION, id); return retval; } + +/*! проверка проигрываемости канала */ +#define SOUND_CHANNEL_PLAYING(id, retval) \ +if (m_aChannels[id] != 1) \ +{return retval; } + +/*! проверка допустимости id набора звуков, в случае провала вылет */ +#define SOUND_SNDKIT_PRECOND(id, retval) \ +if (!(id >= 0 && id < m_aSoundKits.size() && m_aSoundKits[id])) \ +{LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unresolved id sound kit %d", GEN_MSG_LOCATION, id); return retval; } + +//########################################################################## + +//! просчет громкости звука, пределы [0, 1] +inline float Snd3dComVolume( + const float3 &vSndPos, //!< позиция звука + const float3 &vViewPos, //!< позиция слушателя + const float fDistAudible //!< дистанция слышимости + ) +{ + float fVolume = 1.f - (SMVector3Distance(vSndPos, vViewPos) / fDistAudible);// *(-10000); + + return saturatef(fVolume); +} + +//! просчет смещения звука между ушами слушателя +inline int Snd3dComPan( + const float3 &vSndPos, //!< позиция звука + const float3 &vViewPos, //!< позиция слушателя + const float3 &vViewDir, //!< направление взгляда слушателя + const float fDistAudible, //!< дистанция слышимости + const float fShiftPan //!< коэфициент смещения между ушами слушателя + ) +{ + float fDist = SMVector3Distance(vSndPos, vViewPos); + float3 fVec = vViewPos + vViewDir; + + float str = (vSndPos.x - vViewPos.x)*(vSndPos.z - fVec.z) - (vSndPos.z - vViewPos.z)*(vSndPos.x - fVec.x); + return ((str * (fDist / fDistAudible)) * fShiftPan * float(-10000)); +} + +//! парсинг строки szSrcStr на составляющие элементы (если есть): путь до звука и параметры воспроизведения +inline bool SndGetDataFromStr(const char *szSrcStr, String &sFile, float &fDistAudible, float &fVolume, Array<UINT> &aDelays) +{ + bool existsData = false; + + Array<String> aStrConfig = StrExplode(szSrcStr, " ", false); + + if (aStrConfig[0].length() == 0) + { + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - invalid file", GEN_MSG_LOCATION); + return false; + } + + sFile = StrTrim(aStrConfig[0].c_str()); + + if (aStrConfig.size() >= 2) + { + if (aStrConfig[1][0] == 'd' || aStrConfig[1][0] == 'v') + existsData = true; + + if (aStrConfig[1][0] == 'd') + sscanf(aStrConfig[1].c_str() + 1, "%f", &fDistAudible); + else if (aStrConfig[1][0] == 'v') + sscanf(aStrConfig[1].c_str() + 1, "%f", &fVolume); + } + + if (aStrConfig.size() >= 3) + { + if (aStrConfig[2][0] == 'd' && fDistAudible > -2.f) + { + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unresolved double instruction for 'distance of audibility'", GEN_MSG_LOCATION); + return false; + } + + if (aStrConfig[2][0] == 'v' && fVolume > -2.f) + { + LibReport(REPORT_MSG_LEVEL_ERROR, "%s - unresolved double instruction for 'volume'", GEN_MSG_LOCATION); + return false; + } + + if (aStrConfig[2][0] == 'd' || aStrConfig[2][0] == 'v') + existsData = true; + + if (aStrConfig[2][0] == 'd') + sscanf(aStrConfig[2].c_str() + 1, "%f", &fDistAudible); + else if (aStrConfig[2][0] == 'v') + sscanf(aStrConfig[2].c_str() + 1, "%f", &fVolume); + } + + for (int k = 3, kl = aStrConfig.size(); k < kl; ++k) + { + String str = aStrConfig[k]; + aDelays.push_back(aStrConfig[k].ToUnsLongInt()); + } + + if (aDelays.size() > 0) + existsData = true; + + return existsData; +} + +//########################################################################## + +/*! \name Обработчики ogg +@{*/ + +//! чтение файла +size_t OggCallbackRead(void *ptr, size_t size, size_t nmemb, void *datasource); + +//! закртытие файла +int OggCallbackClose(void* datasource); + +//! позиционирование +int OggCallbackSeek(void *datasource, ogg_int64_t offset, int whence); + +//! размер файла +long OggCallbackTell(void* datasource); + +//!@} + +//########################################################################## + +//структура для загрузки wave файла +struct CSoundWaveHeader +{ + char RiffSig[4]; + int32_t ChunkSize; + char Sig[4]; + char FormatSig[4]; + int32_t FormatChunkSize; + int16_t FormatTag; + int16_t Channels; + int32_t SampleRate; + int32_t BytesPerSec; + int16_t BlockAlign; + int16_t BitsPerSample; + char DataSig[4]; + int32_t DataSize; +}; + +//########################################################################## + +//! менеджер звуков +class CSoundManager +{ +public: + CSoundManager(); + ~CSoundManager(); + + SX_ALIGNED_OP_MEM + + void clear(); + + void init(HWND hWnd); + + //! структура данных для воспроизведения с задержками + struct CPlayDelay + { + CPlayDelay() + { + m_iCurrPlayDelay = 0; + m_uiPlayDelayStart = 0; + } + + //! структура для хранения данных о текущей настройке проигрывания + struct CTimeDelay + { + CTimeDelay(){ m_uiTime = 0; m_isDelay = false; } + CTimeDelay(UINT uiTime, bool isDelay) + { + m_uiTime = uiTime; m_isDelay = isDelay; + } + + //! время в млсек + UINT m_uiTime; + + //! это время задержки в проигрывании или нет? + bool m_isDelay; + }; + + //! массив настроек прогирывания + Array<CTimeDelay> m_aPlayDelay; + + //! текущий индекс в #m_aPlayDelay + int m_iCurrPlayDelay; + + //! стартовое время задержки в млсек (если засекали время) + UINT m_uiPlayDelayStart; + + }; + + //! структура данных базового понятия звука + struct CSoundBase + { + CSoundBase() + { + m_pSoundBuffer = 0; m_state = SOUND_OBJSTATE_STOP; m_isLooping = false; m_isPlayDelay = false; m_uiBytesPerSec = 0; m_fVolume = 1.f; m_fPan = 0; + } + + ~CSoundBase() + { + mem_release(m_pSoundBuffer); + } + + //! звуковой буфер инстанса + IDirectSoundBuffer8 *m_pSoundBuffer; + + //! количество байт в секунде + UINT m_uiBytesPerSec; + + //! состояние воспроизведения + SOUND_OBJSTATE m_state; + + //! зацикливать ли воспроизведение + bool m_isLooping; + + //! используется ли воспроизведение с задержками + bool m_isPlayDelay; + + //! объект с данными проигрывания + CPlayDelay oPlayDelay; + + //! громкость [0, 1] + float m_fVolume; + + //! смещение между ушами слушателя [-1, 1] + float m_fPan; + }; + + //! структура данных инстанса звука + struct CSoundInstance : public CSoundBase + { + CSoundInstance(){ m_pSoundBuffer = 0; m_uiBytesPerSec = 0; m_busy = SOUND_SNDINSTANCE_BUSY_FREE; m_state = SOUND_OBJSTATE_STOP; m_isPlayDelay = false; } + CSoundInstance(IDirectSoundBuffer8 *pBuffer, UINT uiBytesPerSec, const float3_t *vPos, SOUND_SNDINSTANCE_BUSY busy) + { + m_pSoundBuffer = pBuffer; + m_uiBytesPerSec = uiBytesPerSec; + if (vPos) + m_vPos = *vPos; + m_busy = busy; + m_state = SOUND_OBJSTATE_STOP; + m_isPlayDelay = false; + } + + //! позиция воспроизведения (если надо) + float3_t m_vPos; + + //! занят ли инстанс в данный момент #SOUND_SNDINSTANCE_BUSY + SOUND_SNDINSTANCE_BUSY m_busy; + }; + + //! расширенное понятие звука + struct CSound : public CSoundBase + { + CSound(); + ~CSound(); + SX_ALIGNED_OP_MEM + + //! путь загруженного звука + char m_szRPath[SOUND_MAX_SIZE_PATH]; + + //! идентификатор (номер в общем массиве звуков) + ID m_id; + + //! канал + ID m_idChannel; + + //! 3д воспроизвдеение звука? + bool m_is3d; + + /*! количество загрузок звука, в основном сделано для инстансовых, если один и тот же звук загружался несколько раз то он будет загружен единожды, но счетчик будет показывать колиество, + и звук удалиться только тогда когда последний объект его удалит + */ + int m_iCountLoad; + + //! изменение позиционирования звука, на сколько будет смещен звук при поворотах камеры к источнику звука, чем ближе к объекту тем меньше разница в позиционировании при поворотах + float m_fShiftPan; + + //! дистанция слышимости + float m_fDistAudible; + + //! разрешено ли создавать инстансы звука (false по дефолту) + bool m_isInst; + + //! потом чтения файла + FILE *m_pStream; + + //! поток для декодирования ogg + OggVorbis_File *m_pVorbisFile; + + //! массив инстансов + Array<CSoundInstance> m_aInstances; + + //! формат файла + SOUND_FILEFORMAT m_format; + + //! полный размер в байтах (для wav исключая заголовочную структуру) + UINT m_uiSizeFull; + + //! позиция источника звука (если используется без инстансов, хотя устанавливается главному и при инстансах) + float3 m_vPosition; + + //сброс громкости при отдалении на метр, т.е. count_volume = volume - dist * Damping % + //float Damping; + + //! оригинальная частота + UINT m_uiFrecOrigin; + + //! размер потока в байтах + UINT m_uiStreamSize; + + //! длина звука в секундах + int m_iLengthSec; + + //! количество каналов + int m_iChannelsCount; + + //! частота дискретизации + int m_iSampleRate; + + //! количество бит в сэмпле + int m_iBitsPerSample; + + //размеры сплитов потока + UINT m_uiSplit1Size; + UINT m_uiSplit2Size; + UINT m_uiSplit3Size; + + //заглушки для работы апдейта на каждый сплит в отдельности + bool m_isWork1; + bool m_isWork2; + bool m_isWork3; + bool m_isWork4; + + //! воспроизведение только началось? (для потока) + bool m_isStarting; + + //! номер текущего активного сплита + int m_iSplitActive; + + //! сколько раз был полностью перезагружен поток + int m_iRePlayCount; + + //! сколько раз нужно полностью перезагрузить поток чтоб дойти до конца + int m_iRePlayEndCount; + }; + + //********************************************************************** + + //! набор звуков, для случайного воспроизведения звуков из массива однотипных звуков + struct СSoundKit + { + СSoundKit(); + ~СSoundKit(); + + //! имя набора + char m_szName[SOUND_MAX_SIZE_SNDKIT_NAME]; + + //! объект набора + struct CSoundKitObject + { + //! идентификатор звука + ID m_id; + + //! массив задержек + Array<UINT> m_aDelays; + + //! громкость звука [0,1] + float m_fVolume; + }; + + //! массив звуков + Array<CSoundKitObject> m_aSounds; + + //! канал набора звуков + ID m_idChannel; + + //! 3d (true) или 2d (false) набор? + bool m_is3D; + + //! общая дистанция слышимости для 3д звуков + float m_fDistAudible; + }; + + //! создать набор + ID sndkitCreate(const char *szName, ID idChannel, bool is3D, float fDistAudible = SOUND_DIST_AUDIBLE_DEFAULT); + + ID sndkitCreateFromList(const char *szName, ID idChannel, Array<String> aStrings, bool is3D, float fDistAudible = SOUND_DIST_AUDIBLE_DEFAULT, float fVolume = 1.f); + + //! добавить звук в набор, если fDistAudible < 0 то будут задействованы настройки самого набора + void sndkitAddSound(ID idSndKit, const char *szFile, float fDistAudible, float fVolume = 1.f, UINT *pArrDelay = 0, int iSizeArrDelay = 0); + + //! получить id по имени набора + ID sndkitGetID(const char *szName); + + //! получить номер канала + ID sndkitGetChannel(ID idSndKit); + + //! получить имя по id набора + void sndkitGetName(ID idSndKit, char *szName); + + //! удалить набор + void sndkitDelete(ID idSndKit); + + //! удалить все наборы + void sndkitDeleteAll(); + + /*! проиграть случайный звук + \note если набор 3д звуков, то позиция обязательна + \note id2 должен принимать либо #SOUND_SNDKIT_INSTANCE_BLOCK либо #SOUND_SNDKIT_INSTANCE_NOTBLOCK либо должен быть упакованным значением идентификаторов заблокированного инстанса звука + если инстанс воспроизводимого звука заблокирован, то он не будет использоваться другими пока владелец его не разблокирует + \return возвращает упакованные значения порядкового номера звука (в массиве набора) в 32 старших битах и id инстанса звука в 32 младших битах + */ + uint64_t sndkitPlay(ID idSndKit, uint64_t id2, const float3 *pPos = 0, float fVolume = -1.f, float fPan = 0.f); + + //! остановить проигрывание звуков в наборе + void sndkitStop(ID idSndKit, uint64_t id2); + + //********************************************************************** + + //! добавить канал + void channelAdd(ID idChannel, bool isPlaying = false); + + //! существует ил канал + bool channelExists(ID idChannel); + + //! количество звуков в канале + int channelGetSndCount(ID idChannel); + + //! проигрывать звуки канала + void channelPlay(ID idChannel); + + //! проигрывается ли канал? + bool channelPlaying(ID idChannel); + + //! остановить проигрывание звуков канала + void channelStop(ID idChannel); + + //! проигрывать звуки только этого канала + void channelPlayOnly(ID idChannel); + + //! воспроизвести звук канала (используется внутри функций каналов для воспроизведения каналов) + void channelSndPlay(ID idChannel, ID idSound); + + //! остановить звук канала (используется внутри функций каналов для воспроизведения каналов) + void channelSndStop(ID idChannel, ID idSound); + + //********************************************************************** + + ID soundCreate2d(const char *szFile, ID idChannel, UINT uiSizeStream = 0); + ID soundCreate3d(const char *szFile, ID idChannel, UINT uiSizeStream, float fDist); + + ID soundCreate2dInst(const char *szFile, ID idChannel); + ID soundCreate3dInst(const char *szFile, ID idChannel, float fDist); + + ID soundFind2dInst(const char *szFile, ID idChannel); + ID soundFind3dInst(const char *szFile, ID idChannel); + + /*! воспроизведение инстанса звука, если нужны задержки то надо их указывать в pArrDelay и iSizeArrDelay, иначе в обоих 0, + если нужен 3д звук (если это на самом деле 3д звук) то надо указать pPos, иначе 0 и будет 2д, для 2д по желанию можно указать громкость iVolume и смещение между ушами iPan + */ + ID soundInstancePlay(ID idSound, bool isBlocked, bool isLooping, UINT *pArrDelay, int iSizeArrDelay, const float3 *pPos, float fVolume = 1.f, float fPan = 0.f); + + bool soundInstancePlaying(ID idSound, ID idInstance); + void soundInstanceStop(ID idSound, ID idInstance); + void soundInstanceFree(ID idSound, ID idInstance); + + bool soundIsInit(ID idSound); + void soundDelete(ID idSound); + + //! проиграть + void soundPlay(ID idSound, bool isLooping = false, UINT *pArrDelay = 0, int iSizeArrDelay = 0); + + //! инициализация масисва задержек для воспроизведения звука, если указать iSizeArrDelay = -1 тогда будут задействованы прошлые настройки + void soundInitPlayDelay(CSoundBase *pSndbase, UINT *pArrDelay, int iSizeArrDelay); + + //! продолжить воспроизведение (с задержками) остановленного звука + void soundResumePlayDelay(CSoundBase *pSndBase); + + //! приостановить + void soundPause(ID idSound); + + //! остановить + void soundStop(ID idSound); + + void soundSetState(ID idSound, SOUND_OBJSTATE state); + SOUND_OBJSTATE soundGetState(ID idSound); + + //текащая позиция проигрывания + void soundSetPosPlay(ID idSound, UINT uiPos); + UINT soundGetPosPlay(ID idSound); + + //громкость + void soundSetVolume(ID idSound, float fVolume); + float soundGetVolume(ID idSound); + + //позиционирование между динамиками + void soundSetPan(ID idSound, float fPan); + float soundGetPan(ID idSound); + + //частота + void soundSetFreqCurr(ID idSound, UINT uiFrec); + UINT soundGetFreqCurr(ID idSound); + UINT soundGetFreqOrigin(ID idSound); + + void soundSetPosWorld(ID idSound, const float3 *pPos); + void soundGetPosWorld(ID idSound, float3 *pPos); + + + //длина в секундах + int soundGetLengthSec(ID idSound); + + //байт в секунде + UINT soundGetBytesPerSec(ID idSound); + + //размер в байтах PCM данных + UINT soundGetSize(ID idSound); + + //путь до звукового файла + void soundGetFile(ID idSound, char *szPath); + + float soundGetDistAudible(ID idSound); + void soundSetDistAudible(ID idSound, float fDistAudible); + + void UpdatePlayDelay(CSoundBase *pSndBase); + + void update(const float3 *pViewPos, const float3 *pViewDir); + + SOUND_FILEFORMAT fileFormat(const char *szFile); + + int soundsGetPlayCount(); + int soundsGetLoadCount(); + +private: + + void load(CSound *pSnd, const char *szPath, SOUND_FILEFORMAT fmt); + + void loadWAV(CSound *pSnd, const char *szPath); + + void loadOGG(CSound *pSnd, const char *szPath); + + IDirectSoundBuffer8* soundBufferCreate(CSoundWaveHeader *pHeader); + + void soundDataWAVLoad(IDirectSoundBuffer8 *pBuffer, int iLockPos, FILE *pData, int iSize, UINT uiFlag = 0); + void soundDataOGGLoad(OggVorbis_File *pVorbisFile, IDirectSoundBuffer8 *pBuffer, int iLockPos, int iSize, UINT uiFlag); + + void reLoadSplit(ID id, UINT Pos, UINT Size); + + ID addSound(CSound *pSnd); + + //********************************************************************** + + //! массив со всеми звуковыми объектами + Array<CSound*> m_aSounds; + + //! ассоциативный массив всех 2д звуков arr[name] = id; + AssotiativeArray<AAStringNR, ID, false, 16> m_a2dInst; + + //! ассоциативный массив всех 3д звуков arr[name] = id; + AssotiativeArray<AAStringNR, ID, false, 16> m_a3dInst; + + //! массив наборов звуков + Array<СSoundKit*> m_aSoundKits; + + //! массив каналов + int m_aChannels[SOUND_CHANNELS_COUNT]; + + //! звуковое устройство + IDirectSound8 *m_pDeviceSound; + + //! первичный буфер + IDirectSoundBuffer *m_pPrimaryBuffer; + + //! количество проигрываемых звуков + int m_iSoundsPlayCount; + + //! количество загруженных звуков (с учетом как проигрывающихся так и простаивающих) + int m_iSoundsLoadCount; + + //! предыдущая позиция наблюдателя + float3 m_vOldViewPos; + + //! предыдущее направление взгляда наблюдателя + float3 m_vOldViewDir; +}; + +#endif diff --git a/source/score/sxscore.cpp b/source/score/sxscore.cpp index 31197743bc4f962a26158c20ad0dba38b8edc33e..6c8842c988aec793bb28de2a00a4953618d43ab7 100644 --- a/source/score/sxscore.cpp +++ b/source/score/sxscore.cpp @@ -14,7 +14,7 @@ See the license in LICENSE report_func g_fnReportf = DefReport; #endif -MainSound *g_pManagerSound = 0; +CSoundManager *g_pManagerSound = 0; #define SCORE_PRECOND(retval) if(!g_pManagerSound){LibReport(-1, "%s - sxsound is not init", GEN_MSG_LOCATION); return retval;} @@ -44,14 +44,14 @@ SX_LIB_API void SSCore_0Create(const char *szName, HWND hWnd, bool isUnic) } else { - g_pManagerSound = new MainSound(); - g_pManagerSound->Init(hWnd); + g_pManagerSound = new CSoundManager(); + g_pManagerSound->init(hWnd); } } else { - g_pManagerSound = new MainSound(); - g_pManagerSound->Init(hWnd); + g_pManagerSound = new CSoundManager(); + g_pManagerSound->init(hWnd); } } else @@ -69,7 +69,7 @@ SX_LIB_API void SSCore_Clear() { SCORE_PRECOND(_VOID); - g_pManagerSound->Clear(); + g_pManagerSound->clear(); } @@ -77,77 +77,174 @@ SX_LIB_API void SSCore_Update(const float3 *pViewPos, const float3 *pViewDir) { SCORE_PRECOND(_VOID); - g_pManagerSound->Update(pViewPos, pViewDir); + g_pManagerSound->update(pViewPos, pViewDir); } -SX_LIB_API int SSCore_SndsPlayCountGet() +SX_LIB_API int SSCore_SndsGetCountPlay() { SCORE_PRECOND(0); - return g_pManagerSound->SoundsPlayCountGet(); + return g_pManagerSound->soundsGetPlayCount(); } -SX_LIB_API int SSCore_SndsLoadCountGet() +SX_LIB_API int SSCore_SndsGetCountLoad() { SCORE_PRECOND(0); - return g_pManagerSound->SoundsLoadCountGet(); + return g_pManagerSound->soundsGetLoadCount(); } -SX_LIB_API ID SSCore_SndCreate2d(const char *szFile, bool isLooping, UINT uiSizeStream) +//########################################################################## + +SX_LIB_API void SSCore_ChannelAdd(ID idChannel, bool isPlaying) +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->channelAdd(idChannel, isPlaying); +} + +SX_LIB_API bool SSCore_ChannelExists(ID idChannel) +{ + SCORE_PRECOND(false); + + return g_pManagerSound->channelExists(idChannel); +} + +SX_LIB_API int SSCore_ChannelGetSndCount(ID idChannel) { SCORE_PRECOND(-1); - return g_pManagerSound->SoundCreate2d(szFile, isLooping, uiSizeStream); + return g_pManagerSound->channelGetSndCount(idChannel); } -SX_LIB_API ID SSCore_SndCreate3d(const char *szFile, bool isLooping, UINT uiSizeStream, float fDist, float fShiftPan) +SX_LIB_API void SSCore_ChannelPlay(ID idChannel) +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->channelPlay(idChannel); +} + +SX_LIB_API void SSCore_ChannelPlayOnly(ID idChannel) +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->channelPlayOnly(idChannel); +} + +SX_LIB_API bool SSCore_ChannelPlaying(ID idChannel) +{ + SCORE_PRECOND(false); + + return g_pManagerSound->channelPlaying(idChannel); +} + +SX_LIB_API void SSCore_ChannelStop(ID idChannel) +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->channelStop(idChannel); +} + +//########################################################################## + +SX_LIB_API ID SSCore_SndCreate2d(const char *szFile, ID idChannel, UINT uiSizeStream) { SCORE_PRECOND(-1); - return g_pManagerSound->SoundCreate3d(szFile, isLooping, uiSizeStream, fDist, fShiftPan); + return g_pManagerSound->soundCreate2d(szFile, idChannel, uiSizeStream); } -SX_LIB_API ID SSCore_SndCreate2dInst(const char *szFile, bool isLooping, UINT uiSizeStream) +SX_LIB_API ID SSCore_SndCreate3d(const char *szFile, ID idChannel, UINT uiSizeStream, float fDist) { SCORE_PRECOND(-1); - return g_pManagerSound->SoundCreate2dInst(szFile, isLooping, uiSizeStream); + return g_pManagerSound->soundCreate3d(szFile, idChannel, uiSizeStream, fDist); } -SX_LIB_API ID SSCore_SndCreate3dInst(const char *szFile, bool isLooping, UINT uiSizeStream, float fDist, float fShiftPan) +SX_LIB_API ID SSCore_SndCreate2dInst(const char *szFile, ID idChannel) { SCORE_PRECOND(-1); - return g_pManagerSound->SoundCreate3dInst(szFile, isLooping, uiSizeStream, fDist, fShiftPan); + return g_pManagerSound->soundCreate2dInst(szFile, idChannel); } -SX_LIB_API ID SSCore_SndFind2dInst(const char *szFile) +SX_LIB_API ID SSCore_SndCreate3dInst(const char *szFile, ID idChannel, float fDist) { SCORE_PRECOND(-1); - return g_pManagerSound->SoundFind2dInst(szFile); + return g_pManagerSound->soundCreate3dInst(szFile, idChannel, fDist); } -SX_LIB_API ID SSCore_SndFind3dInst(const char *szFile) +SX_LIB_API ID SSCore_SndFind2dInst(const char *szFile, ID idChannel) { SCORE_PRECOND(-1); - return g_pManagerSound->SoundFind3dInst(szFile); + return g_pManagerSound->soundFind2dInst(szFile, idChannel); +} + +SX_LIB_API ID SSCore_SndFind3dInst(const char *szFile, ID idChannel) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->soundFind3dInst(szFile, idChannel); +} + + +SX_LIB_API ID SSCore_SndInstancePlay(ID idSound, bool isBlocked, bool isLooping, UINT *pArrDelay, int iSizeArrDelay, const float3 *pPos, float fVolume, float fPan) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->soundInstancePlay(idSound, isBlocked, isLooping, pArrDelay, iSizeArrDelay, pPos, fVolume, fPan); +} + +/*SX_LIB_API ID SSCore_SndInstancePlay2d(ID idSound, bool isBlocked, bool isLooping, int iVolume, int iPan) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->soundInstancePlay(idSound, isBlocked, isLooping, 0, 0, 0, iVolume, iPan); +} + +SX_LIB_API ID SSCore_SndInstancePlayDelay2d(ID idSound, bool isBlocked, bool isLooping, UINT *pArrDelay, int iSizeArrDelay, int iVolume, int iPan) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->soundInstancePlay(idSound, isBlocked, isLooping, pArrDelay, iSizeArrDelay, 0, iVolume, iPan); +} + +SX_LIB_API ID SSCore_SndInstancePlay3d(ID idSound, bool isBlocked, bool isLooping, const float3 *pPos) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->soundInstancePlay(idSound, isBlocked, isLooping, 0, 0, pPos); +} + +SX_LIB_API ID SSCore_SndInstancePlayDelay3d(ID idSound, bool isBlocked, bool isLooping, UINT *pArrDelay, int iSizeArrDelay, const float3 *pPos) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->soundInstancePlay(idSound, isBlocked, isLooping, pArrDelay, iSizeArrDelay, pPos); +}*/ + + +SX_LIB_API bool SSCore_SndInstancePlaying(ID idSound, ID idInstance) +{ + SCORE_PRECOND(false); + + return g_pManagerSound->soundInstancePlaying(idSound, idInstance); } -SX_LIB_API void SSCore_SndInstancePlay2d(ID idSound, int iVolume, int iPan) +SX_LIB_API void SSCore_SndInstanceStop(ID idSound, ID idInstance) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundInstancePlay2d(idSound, iVolume, iPan); + g_pManagerSound->soundInstanceStop(idSound, idInstance); } -SX_LIB_API void SSCore_SndInstancePlay3d(ID idSound, const float3 *pPos) +SX_LIB_API void SSCore_SndInstanceFree(ID idSound, ID idInstance) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundInstancePlay3d(idSound, pPos); + g_pManagerSound->soundInstanceStop(idSound, idInstance); } @@ -155,173 +252,290 @@ SX_LIB_API bool SSCore_SndIsInit(ID idSound) { SCORE_PRECOND(false); - return g_pManagerSound->SoundIsInit(idSound); + return g_pManagerSound->soundIsInit(idSound); } SX_LIB_API void SSCore_SndDelete(ID idSound) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundDelete(idSound); + g_pManagerSound->soundDelete(idSound); } -SX_LIB_API void SSCore_SndPlay(ID idSound, int isLooping) +SX_LIB_API void SSCore_SndPlay(ID idSound, bool isLooping, UINT *pArrDelay, int iSizeArrDelay) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundPlay(idSound, isLooping); + g_pManagerSound->soundPlay(idSound, isLooping, pArrDelay, iSizeArrDelay); } +/*SX_LIB_API void SSCore_SndPlayDelay(ID idSound, bool isLooping, UINT *pArrDelay, int iSizeArrDelay) +{ + SCORE_PRECOND(_VOID);*/ + + /*Array<UINT> aValues; + + UINT uiCurrVal = 0; + va_list va; + va_start(va, isLooping); + + uiCurrVal = va_arg(va, UINT); + while (uiCurrVal > 0) + { + aValues.push_back(uiCurrVal); + uiCurrVal = va_arg(va, UINT); + } + + va_end(va);*/ + + /*g_pManagerSound->soundPlayDelay(idSound, isLooping, pArrDelay, iSizeArrDelay); +}*/ + SX_LIB_API void SSCore_SndPause(ID idSound) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundPause(idSound); + g_pManagerSound->soundPause(idSound); } SX_LIB_API void SSCore_SndStop(ID idSound) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundStop(idSound); + g_pManagerSound->soundStop(idSound); } -SX_LIB_API void SSCore_SndStateSet(ID idSound, SOUND_OBJSTATE state) +SX_LIB_API void SSCore_SndSetState(ID idSound, SOUND_OBJSTATE state) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundStateSet(idSound, state); + g_pManagerSound->soundSetState(idSound, state); } -SX_LIB_API SOUND_OBJSTATE SSCore_SndStateGet(ID idSound) +SX_LIB_API SOUND_OBJSTATE SSCore_SndGetState(ID idSound) { SCORE_PRECOND(SOUND_OBJSTATE_STOP); - return g_pManagerSound->SoundStateGet(idSound); + return g_pManagerSound->soundGetState(idSound); } -SX_LIB_API void SSCore_SndPosCurrSet(ID idSound, UINT uiPos, int iType) +SX_LIB_API void SSCore_SndSetPosPlay(ID idSound, UINT uiPosMls) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundPosCurrSet(idSound, uiPos, iType); + g_pManagerSound->soundSetPosPlay(idSound, uiPosMls); } -SX_LIB_API UINT SSCore_SndPosCurrGet(ID idSound, int iType) +SX_LIB_API UINT SSCore_SndGetPosPlay(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundPosCurrGet(idSound, iType); + return g_pManagerSound->soundGetPosPlay(idSound); } -SX_LIB_API void SSCore_SndVolumeSet(ID idSound, int iVolume, int iType) +SX_LIB_API void SSCore_SndSetVolume(ID idSound, float fVolume) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundVolumeSet(idSound, iVolume, iType); + g_pManagerSound->soundSetVolume(idSound, fVolume); } -SX_LIB_API int SSCore_SndVolumeGet(ID idSound, int iType) +SX_LIB_API float SSCore_SndGetVolume(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundVolumeGet(idSound, iType); + return g_pManagerSound->soundGetVolume(idSound); } -SX_LIB_API void SSCore_SndPanSet(ID idSound, int iValue, int iType) +SX_LIB_API void SSCore_SndSetPan(ID idSound, float fValue) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundPanSet(idSound, iValue, iType); + g_pManagerSound->soundSetPan(idSound, fValue); } -SX_LIB_API int SSCore_SndPanGet(ID idSound, int iType) +SX_LIB_API float SSCore_SndGetPan(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundPanGet(idSound, iType); + return g_pManagerSound->soundGetPan(idSound); } -SX_LIB_API void SSCore_SndFreqCurrSet(ID idSound, UINT fValue) +SX_LIB_API void SSCore_SndSetCurrFreq(ID idSound, UINT fValue) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundFreqCurrSet(idSound, fValue); + g_pManagerSound->soundSetFreqCurr(idSound, fValue); } -SX_LIB_API UINT SSCore_SndFreqCurrGet(ID idSound) +SX_LIB_API UINT SSCore_SndGetCurrFreq(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundFreqCurrGet(idSound); + return g_pManagerSound->soundGetFreqCurr(idSound); } -SX_LIB_API UINT SSCore_SndFreqOriginGet(ID idSound) +SX_LIB_API UINT SSCore_SndGetOriginFreq(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundFreqOriginGet(idSound); + return g_pManagerSound->soundGetFreqOrigin(idSound); } -SX_LIB_API void SSCore_SndPosWSet(ID idSound, const float3 *pPos) +SX_LIB_API void SSCore_SndSetPosWorld(ID idSound, const float3 *pPos) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundPosWSet(idSound, pPos); + g_pManagerSound->soundSetPosWorld(idSound, pPos); } -SX_LIB_API void SSCore_SndPosWGet(ID idSound, float3 *pPos) +SX_LIB_API void SSCore_SndGetPosWorld(ID idSound, float3 *pPos) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundPosWGet(idSound, pPos); + g_pManagerSound->soundGetPosWorld(idSound, pPos); } -SX_LIB_API int SSCore_SndLengthSecGet(ID idSound) +SX_LIB_API int SSCore_SndGetLengthSec(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundLengthSecGet(idSound); + return g_pManagerSound->soundGetLengthSec(idSound); } -SX_LIB_API UINT SSCore_SndBytesPerSecGet(ID idSound) +SX_LIB_API UINT SSCore_SndGetBytesPerSec(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundBytesPerSecGet(idSound); + return g_pManagerSound->soundGetBytesPerSec(idSound); } -SX_LIB_API UINT SSCore_SndSizeGet(ID idSound) +SX_LIB_API UINT SSCore_SndGetSize(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundSizeGet(idSound); + return g_pManagerSound->soundGetSize(idSound); } -SX_LIB_API void SSCore_SndFileGet(ID idSound, char *szPath) +SX_LIB_API void SSCore_SndGetFile(ID idSound, char *szPath) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundFileGet(idSound, szPath); + g_pManagerSound->soundGetFile(idSound, szPath); } -SX_LIB_API float SSCore_SndDistAudibleGet(ID idSound) +SX_LIB_API float SSCore_SndGetDistAudible(ID idSound) { SCORE_PRECOND(0); - return g_pManagerSound->SoundDistAudibleGet(idSound); + return g_pManagerSound->soundGetDistAudible(idSound); +} + +SX_LIB_API void SSCore_SndSetDistAudible(ID idSound, float fValue) +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->soundSetDistAudible(idSound, fValue); +} + +//########################################################################## + +SX_LIB_API ID SSCore_SndkitCreate(const char *szName, ID idChannel, bool is3D, float fDistAudible) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->sndkitCreate(szName, idChannel, is3D, fDistAudible); +} + +SX_LIB_API ID SSCore_SndkitCreateFromList(const char *szName, ID idChannel, bool is3D, float fDistAudible, float fVolume, const char *szFileOrList, ...) +{ + SCORE_PRECOND(-1); + + Array<String> aStrings; + // если в первой строке есть запятые тогда будем парсить строку + if (strstr(szFileOrList, ",")) + { + aStrings = StrExplode(szFileOrList, ","); + } + // иначе считываем все строчные аргументы + else if (szFileOrList) + { + const char *szStrCurr = 0; + va_list va; + va_start(va, szFileOrList); + + szStrCurr = szFileOrList; + while (szStrCurr) + { + aStrings.push_back(szStrCurr); + szStrCurr = va_arg(va, const char *); + } + + va_end(va); + } + + return g_pManagerSound->sndkitCreateFromList(szName, idChannel, aStrings, is3D, fDistAudible, fVolume); } -SX_LIB_API void SSCore_SndDistAudibleSet(ID idSound, float fValue) +SX_LIB_API void SSCore_SndkitAddSound(ID idSndKit, const char *szFile, float fDistAudible, float fVolume, UINT *pArrDelay, int iSizeArrDelay) { SCORE_PRECOND(_VOID); - g_pManagerSound->SoundDistAudibleSet(idSound, fValue); + g_pManagerSound->sndkitAddSound(idSndKit, szFile, fDistAudible, fVolume, pArrDelay, iSizeArrDelay); } + +SX_LIB_API uint64_t SSCore_SndkitPlay(ID idSndKit, uint64_t id2, const float3 *pPos, float fVolume, float fPan) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->sndkitPlay(idSndKit, id2, pPos, fVolume, fPan); +} + +SX_LIB_API void SSCore_SndkitStop(ID idSndKit, uint64_t id2) +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->sndkitStop(idSndKit, id2); +} + +SX_LIB_API ID SSCore_SndkitGetID(const char *szName) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->sndkitGetID(szName); +} + +SX_LIB_API ID SSCore_SndkitGetChannel(ID idSndKit) +{ + SCORE_PRECOND(-1); + + return g_pManagerSound->sndkitGetChannel(idSndKit); +} + +SX_LIB_API void SSCore_SndkitGetName(ID idSndKit, char *szName) +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->sndkitGetName(idSndKit, szName); +} + +SX_LIB_API void SSCore_SndkitDelete(ID idSndKit) +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->sndkitDelete(idSndKit); +} + +SX_LIB_API void SSCore_SndkitDeleteAll() +{ + SCORE_PRECOND(_VOID); + + g_pManagerSound->sndkitDeleteAll(); +} \ No newline at end of file diff --git a/source/score/sxscore.h b/source/score/sxscore.h index 05472b192f826f93ca89438953b55c8265245ca9..720b23952a27f0aa5e20fd74a9f9cf6f82f87513 100644 --- a/source/score/sxscore.h +++ b/source/score/sxscore.h @@ -16,9 +16,15 @@ See the license in LICENSE - "Ogg Vorbis" (загрузка ogg файлов). \note Загружаемые звуки wav и ogg формата (автоматическое определение и загрузка нужных данных). \note Поддерживаются 2d и 3d звуки, полная загрузка и потоковое воспроизвдение. - \note Также для полностью загруженных (не потоковое воспроизведение) доступно воспроизвдение инстансов (копий), без выдеения дополнительной равноценной памяти, и без дополнительных возможностей управления инстансом. + \note Также для полностью загруженных (не потоковое воспроизведение) доступно воспроизвдение инстансов (копий), без выделения дополнительной равноценной памяти, и без дополнительных возможностей управления инстансом. Однако источник выдачи инстансов должен быть создан одной из функций #SSCore_SndInstancePlay2d #SSCore_SndInstancePlay3d \note Идентификация звука происходит на основании его числового идентификатора выдаваемого создаваемыми функциями (#SSCore_SndCreate2d/#SSCore_SndCreate2dInst #SSCore_SndCreate3d/#SSCore_SndCreate3dInst) и является константной, идентификатор является порядковым номером + \note каждый звук, который проигрывается не потоково, может проигрываться с задержками + \note каждый звук может загружаться с настройками прямо в строке, при этом настройки в строке будут приоритетными, формат строки следующий: +путь_до_файла_без_пробелов dдистанция_слышимости_в_метрах vгромкость_от_0_до_1 задержка_перед_проигрыванием_в_млсек задержка2_в_млсек ... \n +данные громкости и дальности должны быть первыми (но между собой у них нет правила), и только после них идут задержки \n +на пример: messages/artefact_lead.ogg d100 v1.0 300 300 300 \n +парсинг строки осуществляется на основании пробелов, то есть в имени файла недопустимы пробелы @{*/ #ifndef __SXSCORE_H @@ -67,15 +73,52 @@ SX_LIB_API void SSCore_AKill(); //############################################################################# -/*! абсолюный путь до директории с файлами */ +/*! размер абсолюного пути до директории с файлами */ #define SOUND_MAX_SIZE_STDPATH 256 -/*! относительный путь до файла со звуком */ +/*! размер относительного пути до файла со звуком */ #define SOUND_MAX_SIZE_PATH 128 +/*! размер полного пути до файла со звуком */ +#define SOUND_MAX_SIZE_FULLPATH (SOUND_MAX_SIZE_STDPATH + SOUND_MAX_SIZE_PATH) + /*! минимально возможный размер потока для воспроизведения */ #define SOUND_MIN_SIZE_STREAM 1024*64 +/*! ошибочный идентификатор */ +#define SOUND_FAIL_ID -1 + + +/*! коэффициент смещения между ушами слушателя для 3d звуков */ +#define SOUND_SHIFTPAN_3D 0.1f + +/*! дистанция слышимости по умолчанию, в метрах */ +#define SOUND_DIST_AUDIBLE_DEFAULT 100 + + +/*! максимальное количество каналов */ +#define SOUND_CHANNELS_COUNT 100 + + +/*! упаковка двух int32_t в uint64_t */ +#define SOUND_ENCODE2ID(id1, id2)( (((uint64_t)((uint32_t)id1))<<32) | (uint32_t)id2 ) + +/*! извлечение первого int32_t из uint64_t из старших битов */ +#define SOUND_DECODE2ID_HI(id)( (int32_t)(uint32_t)(((uint64_t)id) >> 32) ) + +/*! извлечение первого int32_t из uint64_t из младших битов */ +#define SOUND_DECODE2ID_LO(id)( (int32_t)(uint32_t)(((uint64_t)id) & 0xFFFFFFFF) ) + + +/*! масимальная длина имени набора звуков */ +#define SOUND_MAX_SIZE_SNDKIT_NAME 128 + +/*! блокировать инстанс набора */ +#define SOUND_SNDKIT_INSTANCE_BLOCK -1 + +/*! не блокировать инстанс набора */ +#define SOUND_SNDKIT_INSTANCE_NOTBLOCK -2 + //************************************************************************** /*! \name Данные для первичного буфера @@ -92,25 +135,12 @@ SX_LIB_API void SSCore_AKill(); //!@} -//************************************************************************** - /*! количество бит на сэмпл для ogg, возможно 8 или 16 */ #define SOUND_OGG_BITS_PER_SAMPLE 16 /*! тип количества бит на сэмпл для ogg, 1 - для 8 бит, 2 - для 16 */ #define SOUND_OGG_BITS_PER_SAMPLE_WORD SOUND_OGG_BITS_PER_SAMPLE/8 -#define SOUND_POS_BYTES 0 /*!< байты */ -#define SOUND_POS_SEC 1 /*!< секунды */ -#define SOUND_POS_MLS 2 /*!< млсек */ - -#define SOUND_VOL_DB 0 /*!< децибелы */ -#define SOUND_VOL_PCT 1 /*!< проценты */ - -#define SOUND_EFF_ON 1 /*!< включение эффекта */ -#define SOUND_EFF_OFF 0 /*!< выключение эффекта */ -#define SOUND_EFF_INVALID_KEY -1 /*!< неверно указан ключ при обращении к функциям эффектов */ - //############################################################################# //! форматы звукрвых файлов @@ -129,6 +159,22 @@ enum SOUND_OBJSTATE SOUND_OBJSTATE_PLAY, //!< проигрывается }; +//! остояние занятости инстансов +enum SOUND_SNDINSTANCE_BUSY +{ + SOUND_SNDINSTANCE_BUSY_FREE, /*!< свободный */ + SOUND_SNDINSTANCE_BUSY_TEMP, /*!< времено занятый */ + SOUND_SNDINSTANCE_BUSY_LOCKED, /*!< заблокированный владельцем */ +}; + +//! значения каналов +enum SOUND_CHANNEL +{ + SOUND_CHANNEL_NONE = -1, /*!< значение не инициализованного канала */ + SOUND_CHANNEL_STOP = 0, /*!< значение не проигрывающегося в данный момент канала */ + SOUND_CHANNEL_PLAY = 1, /*!< значение проигрывающегося в данный момент канала */ +}; + //############################################################################# //! очистка всего списка звуков (полное их удаление) @@ -141,52 +187,110 @@ SX_LIB_API void SSCore_Update( ); //! количество проигрываемых на данный момент звуков -SX_LIB_API int SSCore_SndsPlayCountGet(); +SX_LIB_API int SSCore_SndsGetCountPlay(); //! количество загруженных на данный момент звуков -SX_LIB_API int SSCore_SndsLoadCountGet(); +SX_LIB_API int SSCore_SndsGetCountLoad(); + +//########################################################################## + +//! добавить канал +SX_LIB_API void SSCore_ChannelAdd(ID idChannel, bool isPlaying = false); + +//! существует ли канал +SX_LIB_API bool SSCore_ChannelExists(ID idChannel); + +//! количество звуков в канале +SX_LIB_API int SSCore_ChannelGetSndCount(ID idChannel); + +//! проигрывать звуки канала +SX_LIB_API void SSCore_ChannelPlay(ID idChannel); + +//! проигрывать звуки только этого канала +SX_LIB_API void SSCore_ChannelPlayOnly(ID idChannel); + +//! проигрывается ли канал? +SX_LIB_API bool SSCore_ChannelPlaying(ID idChannel); + +//! остановить проигрывание звуков канала +SX_LIB_API void SSCore_ChannelStop(ID idChannel); + +//############################################################################### //! загрузка 2d (фонового) звука SX_LIB_API ID SSCore_SndCreate2d( const char *szFile, //!< путь до файла, относительно стандартного - bool isLooping = false, //!< зацикливать ли воспроизведение + ID idChannel, //!< идентификатор канала UINT uiSizeStream = 0 //!< размер потока в байтах для потокового воспроизведения, если 0 тогда полностью грузить в память ); //! загрузка 3d звука SX_LIB_API ID SSCore_SndCreate3d( const char *szFile, //!< путь до файла, относительно стандартного - bool isLooping, //!< зацикливать ли воспроизведение + ID idChannel, //!< идентификатор канала UINT uiSizeStream, //!< размер потока в байтах для потокового воспроизведения, если 0 тогда полностью грузить в память - float fDist, //!< радиус слышимости в метрах - float fShiftPan = 0.1f //!< изменение позиционирования звука [0-1], на сколько будет смещен звук (между ушами слушателя) при поворотах камеры к источнику звука, чем ближе к объекту тем меньше разница в позиционировании при поворотах + float fDist //!< радиус слышимости в метрах ); -//! воспроизведение инстанса 2d звука -SX_LIB_API void SSCore_SndInstancePlay2d( - ID idSound, //!< идентификатор звука - int iVolume = 100, //!< громкость [0-100] - int iPan = 0 //!< смещение между ушами [-100 - 100] - ); - -//! воспроизведение инстанса 3d звука -SX_LIB_API void SSCore_SndInstancePlay3d( - ID idSound, //!< идентификатор звука - const float3 *pPos //!< позиция воспроизведения инстанса - ); +//############################################################################### //! загрузка 2d звукового файла и пометка его как объект выдающий инстансы, аргументы аналогичны #SSCore_SndCreate2d -SX_LIB_API ID SSCore_SndCreate2dInst(const char *szFile, bool isLooping = false, UINT uiSizeStream = 0); +SX_LIB_API ID SSCore_SndCreate2dInst(const char *szFile, ID idChannel); //! загрузка 3d звукового файла и пометка его как объект выдающий инстансы, аргументы аналогичны #SSCore_SndCreate3d -SX_LIB_API ID SSCore_SndCreate3dInst(const char *szFile, bool isLooping, UINT uiSizeStream, float fDist, float fShiftPan = 0.1f); +SX_LIB_API ID SSCore_SndCreate3dInst(const char *szFile, ID idChannel, float fDist); + +//************************************************************************** //! поиск 2d звука (выдающего инстансы) по относительному пути загрузки,возвращает его ID (в случае успеха) иначе <0 -SX_LIB_API ID SSCore_SndFind2dInst(const char *szFile); +SX_LIB_API ID SSCore_SndFind2dInst(const char *szFile, ID idChannel); //! поиск 3d звука (выдающего инстансы) по относительному пути загрузки,возвращает его ID (в случае успеха) иначе <0 -SX_LIB_API ID SSCore_SndFind3dInst(const char *szFile); +SX_LIB_API ID SSCore_SndFind3dInst(const char *szFile, ID idChannel); + +//************************************************************************** + +/*! воспроизведение инстанса звука, если нужны задержки то надо их указывать в pArrDelay и iSizeArrDelay, иначе в обоих 0, если указать iSizeArrDelay = -1 тогда будут задействованы предыдущие настройки +если нужен 3д звук (если это на самом деле 3д звук) то надо указать pPos, иначе 0 и будет 2д, для 2д по желанию можно указать громкость iVolume и смещение между ушами iPan +*/ +SX_LIB_API ID SSCore_SndInstancePlay( + ID idSound, //!< идентификатор звука + bool isBlocked, //!< блокировать ли файл? если true то вернет id который будет занят до тех пор пока его не освободит владалец через #SSCore_SndInstanceFree + bool isLooping, //!< зацикливать ли воспроизведение звука? если да то звук будет заблокирован, а возвращенный id будет приндалежать вызывавшему и именно он несет ответсвенность за остановку и освобождение инстанса + UINT *pArrDelay, //!< массив задержек в млсек, первое значение задержка перед воспроизведением + int iSizeArrDelay, //!< размер #pArrDelay + const float3 *pPos, //!< если это 3д звук то позиция обязательна, если 2д то нужно указать NULL + float fVolume = 1.f, //!< громкость [0, 1] + float fPan = 0.f //!< смещение между ушами [-1, 1] + ); + +//! воспроизведение инстанса 2d звука, аргументы аналогичны #SSCore_SndInstancePlay +#define SSCore_SndInstancePlay2d(idSound, isBlocked, isLooping, iVolume, iPan) (SSCore_SndInstancePlay(idSound, isBlocked, isLooping, 0, 0, 0, iVolume, iPan)) + +//! воспроизведение инстанса 2d звука с задержками, аргументы аналогичны #SSCore_SndInstancePlay +#define SSCore_SndInstancePlayDelay2d(idSound, isBlocked, isLooping, pArrDelay, iSizeArrDelay, iVolume, iPan) (SSCore_SndInstancePlay(idSound, isBlocked, isLooping, pArrDelay, iSizeArrDelay, 0, iVolume, iPan)) +//! воспроизведение инстанса 3d звука, аргументы аналогичны #SSCore_SndInstancePlay +#define SSCore_SndInstancePlay3d(idSound, isBlocked, isLooping, pPos) (SSCore_SndInstancePlay(idSound, isBlocked, isLooping, 0, 0, pPos)) + +//! воспроизведение инстанса 3d звука с задержками, аргументы аналогичны #SSCore_SndInstancePlay +#define SSCore_SndInstancePlayDelay3d(idSound, isBlocked, isLooping, pArrDelay, iSizeArrDelay, pPos) (SSCore_SndInstancePlay(idSound, isBlocked, isLooping, pArrDelay, iSizeArrDelay, pPos)) + +//************************************************************************** + +//! проигрывается ли инстанс звука с id idInstance +SX_LIB_API bool SSCore_SndInstancePlaying( + ID idSound, //!< идентификатор звука + ID idInstance //!< идентификатор инстанса звука который был возвращен функцией #SSCore_SndInstancePlay2d или #SSCore_SndInstancePlay3d + ); + +//! остановка инстанса звука с id idInstance +SX_LIB_API void SSCore_SndInstanceStop(ID idSound, ID idInstance); + +//! освобождает инстанс звука с id idInstance, будет иметь статус занятости #SOUND_SNDINSTANCE_BUSY_TEMP если был #SOUND_SNDINSTANCE_BUSY_LOCKED, а при следующем обновлении если инстанс не проигрывается статус поменяется на #SOUND_SNDINSTANCE_BUSY_FREE +SX_LIB_API void SSCore_SndInstanceFree(ID idSound, ID idInstance); + +//############################################################################### //! инициализирован ли звук с идентификатором id SX_LIB_API bool SSCore_SndIsInit(ID idSound); @@ -194,9 +298,15 @@ SX_LIB_API bool SSCore_SndIsInit(ID idSound); //! удалить звук по его id SX_LIB_API void SSCore_SndDelete(ID idSound); +//############################################################################### -//! воспроизвести звук, looping зацикливать ли воспроизведение, 0 - нет, >0 да, <0 не учитывать данное значение -SX_LIB_API void SSCore_SndPlay(ID idSound, int looping = -1); +//! воспроизвести звук, isLooping зацикливать ли воспроизведение +SX_LIB_API void SSCore_SndPlay( + ID idSound, //!< идентификатор звука + bool isLooping = false, //!< зацикливать ли воспроизведение? + UINT *pArrDelay = 0, //!< массив задержек в млсек, первое значение задержка перед воспроизведением + int iSizeArrDelay = 0 //!< размер массива pArrDelay, если указать iSizeArrDelay = -1 тогда будут задействованы предыдущие настройки + ); //! приостановить SX_LIB_API void SSCore_SndPause(ID idSound); @@ -206,89 +316,177 @@ SX_LIB_API void SSCore_SndStop(ID idSound); //! устанавливает состояние проигрывания звука -SX_LIB_API void SSCore_SndStateSet(ID idSound, SOUND_OBJSTATE state); +SX_LIB_API void SSCore_SndSetState(ID idSound, SOUND_OBJSTATE state); //! возвращает состояние проигрывания звука на данный момент -SX_LIB_API SOUND_OBJSTATE SSCore_SndStateGet(ID idSound); +SX_LIB_API SOUND_OBJSTATE SSCore_SndGetState(ID idSound); + +//************************************************************************** //! устанавить позицию проигрывания -SX_LIB_API void SSCore_SndPosCurrSet( - ID idSound, //!< идентификатор звука - UINT uiPos, //!< значение позиции исходя из параметра type - int iType = SOUND_POS_BYTES //!< тип значения pos, SOUND_POS_ +SX_LIB_API void SSCore_SndSetPosPlay( + ID idSound, //!< идентификатор звука + UINT uiPosMls //!< значение позиции в млсек ); //! возвращает позицию проигрывания -SX_LIB_API UINT SSCore_SndPosCurrGet( - ID idSound, //!< идентификатор звука - int iType = SOUND_POS_BYTES //!< тип возвращаемого значения, SOUND_POS_ - ); +SX_LIB_API UINT SSCore_SndGetPosPlay(ID idSound); //! устанавить громкость -SX_LIB_API void SSCore_SndVolumeSet( - ID idSound, //!< идентификатор звука - int iVolume, //!< значение громкости исходя из параметра type - int iType = SOUND_VOL_PCT //!< тип значения volume, SOUND_VOL_ +SX_LIB_API void SSCore_SndSetVolume( + ID idSound, //!< идентификатор звука + float fVolume //!< значение громкости [0, 1] ); -//! возвращает громкость -SX_LIB_API int SSCore_SndVolumeGet( - ID idSound, //!< идентификатор звука - int iType = SOUND_VOL_PCT //!< тип возвращаемого значения, SOUND_VOL_ - ); +//! возвращает громкость [0, 1] +SX_LIB_API float SSCore_SndGetVolume(ID idSound); //! установка позиционирования между ушами -SX_LIB_API void SSCore_SndPanSet( - ID idSound, //!< идентификатор звука - int iValue, //!< значение позиционирования исходя из параметра type - int iType = SOUND_VOL_PCT //!< тип значения value, SOUND_VOL_ +SX_LIB_API void SSCore_SndSetPan( + ID idSound, //!< идентификатор звука + float fValue //!< значение позиционирования [-1, 1] ); -//! возвращает позиционирование между ушами -SX_LIB_API int SSCore_SndPanGet( - ID idSound, //!< идентификатор звука - int type = SOUND_VOL_PCT //!< тип возвращаемого значения, SOUND_VOL_ - ); +//! возвращает позиционирование между ушами [-1, 1] +SX_LIB_API float SSCore_SndGetPan(ID idSound); //! установка частоты воспроизведения -SX_LIB_API void SSCore_SndFreqCurrSet(ID idSound, UINT uiValue); +SX_LIB_API void SSCore_SndSetCurrFreq(ID idSound, UINT uiValue); //! возвращает текущую частоту воспроизведения -SX_LIB_API UINT SSCore_SndFreqCurrGet(ID idSound); +SX_LIB_API UINT SSCore_SndGetCurrFreq(ID idSound); //! возвращает оригинальную частоту воспроизведения -SX_LIB_API UINT SSCore_SndFreqOriginGet(ID idSound); +SX_LIB_API UINT SSCore_SndGetOriginFreq(ID idSound); //! установка мировой позиции звука (только для 3d звуков) -SX_LIB_API void SSCore_SndPosWSet(ID idSound, const float3 *pPos); +SX_LIB_API void SSCore_SndSetPosWorld(ID idSound, const float3 *pPos); //! возвращает мировую позицию звука (только для 3d звуков) -SX_LIB_API void SSCore_SndPosWGet(ID idSound, float3 *pPos); +SX_LIB_API void SSCore_SndGetPosWorld(ID idSound, float3 *pPos); //! длина в секундах -SX_LIB_API int SSCore_SndLengthSecGet(ID idSound); +SX_LIB_API int SSCore_SndGetLengthSec(ID idSound); //! количество байт в секунде -SX_LIB_API UINT SSCore_SndBytesPerSecGet(ID idSound); +SX_LIB_API UINT SSCore_SndGetBytesPerSec(ID idSound); //! размер в байтах PCM данных -SX_LIB_API UINT SSCore_SndSizeGet(ID idSound); +SX_LIB_API UINT SSCore_SndGetSize(ID idSound); //! относительный путь до звукового файла -SX_LIB_API void SSCore_SndFileGet(ID idSound, char *szPath); +SX_LIB_API void SSCore_SndGetFile(ID idSound, char *szPath); //! возвращает дистанцию слышимости -SX_LIB_API float SSCore_SndDistAudibleGet(ID idSound); +SX_LIB_API float SSCore_SndGetDistAudible(ID idSound); //! установка дистанции слышимости в метрах -SX_LIB_API void SSCore_SndDistAudibleSet(ID idSound, float fVfalue); +SX_LIB_API void SSCore_SndSetDistAudible(ID idSound, float fVfalue); + +//!@} + +//############################################################################### + +/*! \name Наборы звуков для воспроизведения случайного звука из набора + \note Все звуки создаются инстансовыми +@{*/ + +//! создать набор звуков +SX_LIB_API ID SSCore_SndkitCreate( + const char *szName, //!< имя набора + ID idChannel, //!< id канала + bool is3D, //!< набор 3д звуков? + float fDistAudible = SOUND_DIST_AUDIBLE_DEFAULT //!< дистанция слышимости + ); + +//! загрузить список звуков (с настройками) из строки либо из строк +SX_LIB_API ID SSCore_SndkitCreateFromList( + const char *szName, //!< имя набора + ID idChannel, //!< id канала + bool is3D, //!< набор 3д звуков? + float fDistAudible, //!< дистанция слышимости + float fVolume, //!< громкость [0, 1] + const char *szFileOrList, //!< строка с первым файлом и настройками (последующие аргументы учитываются), либо строка со всеми файлами (через запятую) и настройками (последующие аргументы не учитываются) + ... //!< если #szFileOrList один файл тогда здесь должны быть строки с файлами до звуков (с настройками) + ); + +//************************************************************************** + +//! добавить звук в набор +SX_LIB_API void SSCore_SndkitAddSound( + ID idSndKit, //!< id набора + const char *szFile, //!< путь к файлу звука + float fDistAudible, //!< дистанция слышимости для 3d звуков, для 2d можно просто 0, если < 0 тогда установит то значение которое было передано в #SSCore_SndkitCreate + float fVolume = 1.f, //!< громскость [0, 1] + UINT *pArrDelay = 0, //!< массив задержек + int iSizeArrDelay = 0 //!< количество элементов в #pArrDelay + ); + +//! добавить в набор 2d звук +#define SSCore_SndkitAddSound2d(idSndKit, szFile, fVolume) (SSCore_SndkitAddSound(idSndKit, szFile, 0, fVolume, 0, 0)) + +//! добавить в набор 2d звук с задержками при воспроизведении +#define SSCore_SndkitAddSoundDelay2d(idSndKit, szFile, fVolume, pArrDelay, iSizeArrDelay) (SSCore_SndkitAddSound(idSndKit, szFile, 0, fVolume, pArrDelay, iSizeArrDelay)) + +//! добавить в набор 3d звук +#define SSCore_SndkitAddSound3d(idSndKit, szFile, fDistAudible, fVolume) (SSCore_SndkitAddSound(idSndKit, szFile, fDistAudible, fVolume, 0, 0)) + +//! добавить в набор 3d звук с задержками при воспроизведении +#define SSCore_SndkitAddSoundDelay3d(idSndKit, szFile, fDistAudible, fVolume, pArrDelay, iSizeArrDelay) (SSCore_SndkitAddSound(idSndKit, szFile, fDistAudible, fVolume, pArrDelay, iSizeArrDelay)) + +//************************************************************************** + +/*! проиграть случайны звук + \note если набор 3д звуков, то позиция обязательна + \note id2 должен принимать либо #SOUND_SNDKIT_INSTANCE_BLOCK либо #SOUND_SNDKIT_INSTANCE_NOTBLOCK либо должен быть упакованным значением идентификаторов заблокированного инстанса звука +если инстанс воспроизводимого звука заблокирован, то он не будет использоваться другими пока владелец его не разблокирует +если было передано упакованное значение, и инстанс уже отыграл свое, значит он разблокируется и будет воспроизведен другой инстанс и заблокируется + \return возвращает упакованные значения порядкового номера звука (в массиве набора) в 32 старших битах и id инстанса звука в 32 младших битах +*/ +SX_LIB_API uint64_t SSCore_SndkitPlay( + ID idSndKit, //!< id набора + uint64_t id2, //!< либо #SOUND_SNDKIT_INSTANCE_BLOCK либо #SOUND_SNDKIT_INSTANCE_NOTBLOCK либо должен быть упакованным значением идентификаторов заблокированного инстанса звука + const float3 *pPos = 0, //!< если 3d, позиция звука в пространстве + float fVolume = -1.f, //!< громкость [0, 1], если <0 тогда будет использовано ранее заданное значение + float fPan = 0.f //!< если 2d, смещение между ушами [-1, 1] + ); + +//! проиграть случайны звук из 2d набора, аргументы аналогичны #SSCore_SndkitPlay +#define SSCore_SndkitPlay2d(idSndKit, id2, fVolume, fPan) (SSCore_SndkitPlay(idSndKit, id2, 0, fVolume, fPan)) + +//! проиграть случайны звук из 3d набора, аргументы аналогичны #SSCore_SndkitPlay +#define SSCore_SndkitPlay3d(idSndKit, id2, pPos) (SSCore_SndkitPlay(idSndKit, id2, pPos)) + +//! остановить проигрывание звуков в наборе +SX_LIB_API void SSCore_SndkitStop( + ID idSndKit, //!< id набора + uint64_t id2 //!< результат SSCore_SndkitPlay если параметр id2 имел значение отличное от #SOUND_SNDKIT_INSTANCE_NOTBLOCK + ); + +//************************************************************************** + +//! получить id по имени набора +SX_LIB_API ID SSCore_SndkitGetID(const char *szName); + +//! получить номер канала +SX_LIB_API ID SSCore_SndkitGetChannel(ID idSndKit); + +//! получить имя по id набора +SX_LIB_API void SSCore_SndkitGetName(ID idSndKit, char *szName); + +//! удалить набор +SX_LIB_API void SSCore_SndkitDelete(ID idSndKit); + +//! удалить все наборы +SX_LIB_API void SSCore_SndkitDeleteAll(); //!@} + #endif //!@} sxscore diff --git a/source/skyxengine.cpp b/source/skyxengine.cpp index d806ac1c4a2823438f0fe84b0f91b81cbc724a4e..4224de6bb4f73e1359b9f823a3434b5536bab65a 100644 --- a/source/skyxengine.cpp +++ b/source/skyxengine.cpp @@ -143,12 +143,21 @@ void SkyXEngine_Init(HWND hWnd3D, HWND hWndParent3D) SkyXEngine_InitOutLog(); SkyXEngine_InitPaths(); - if (!Core_0IsProcessRun("sxconsole.exe")) - ShellExecute(0, "open", "sxconsole.exe", 0, Core_RStringGet(G_RI_STRING_PATH_EXE), SW_SHOWNORMAL); + char szConsoleName[64]; + if (hWnd3D == 0) + sprintf(szConsoleName, "build"); + else + { + GetWindowText(hWndParent3D, szConsoleName, 64); + } + + /*if (!Core_0IsProcessRun("sxconsole.exe")) + ShellExecute(0, "open", "sxconsole.exe", (String("0 ") + szConsoleName).c_str(), Core_RStringGet(G_RI_STRING_PATH_EXE), SW_SHOWNORMAL); +*/ - Core_0Create("sxcore", false); + Core_0Create("sxcore", szConsoleName, false); Core_Dbg_Set(SkyXEngine_PrintfLog); Core_SetOutPtr(); @@ -193,6 +202,8 @@ void SkyXEngine_Init(HWND hWnd3D, HWND hWndParent3D) SSCore_0Create("sxsound", hWnd3DCurr, false); SSCore_Dbg_Set(SkyXEngine_PrintfLog); + SSCore_ChannelAdd(SX_SOUND_CHANNEL_GAME, true); + //SSCore_SndkitCreateFromList("test", SX_SOUND_CHANNEL_GAME, false, 0, 1.f, " messages/artefact_lead.ogg d100 v1.0 300 300 300 , messages/artefact_lose.ogg d50 v0.7 400 400 400, messages/artefact_lost.ogg d30 v1.0 200 200 200, messages/artefact_new.ogg d35 v0.9 250 250 250"); SGCore_0Create("sxgcore", hWnd3DCurr, *r_win_width, *r_win_height, *r_win_windowed, 0, false); SGCore_Dbg_Set(SkyXEngine_PrintfLog); @@ -284,7 +295,7 @@ void SkyXEngine_Init(HWND hWnd3D, HWND hWndParent3D) #ifndef SX_GAME ISXCamera *pCamera = SGCore_CrCamera(); static const float *r_default_fov = GET_PCVAR_FLOAT("r_default_fov"); - pCamera->SetFOV(*r_default_fov); + pCamera->setFOV(*r_default_fov); SRender_SetCamera(pCamera); #endif @@ -327,42 +338,47 @@ void SkyXEngine_InitPaths() sprintf(tmppath, "%s%s", tmppathexe, "/worktex/"); Core_RStringSet(G_RI_STRING_PATH_WORKTEX, tmppath); + FileCreateDir(tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/"); + sprintf(tmppath, "%s/%s/", tmppathexe, SKYXENGINE_RELPATH_GAMESOURCE); Core_RStringSet(G_RI_STRING_PATH_GAMESOURCE, tmppath); SetCurrentDirectoryA(tmppath); + sprintf(tmppath, "%s/%s/", tmppathexe, SKYXENGINE_RELPATH_EDITOR_CACHE); + Core_RStringSet(G_RI_STRING_PATH_EDITOR_CACHE, tmppath); + sprintf(tmppath, "%s%s", tmppathexe, "/screenshots/"); Core_RStringSet(G_RI_STRING_PATH_SCREENSHOTS, tmppath); + FileCreateDir(tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/config/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "config"); Core_RStringSet(G_RI_STRING_PATH_GS_CONFIGS, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/levels/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "levels"); Core_RStringSet(G_RI_STRING_PATH_GS_LEVELS, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/meshes/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "meshes"); Core_RStringSet(G_RI_STRING_PATH_GS_MESHES, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/models/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "models"); Core_RStringSet(G_RI_STRING_PATH_GS_MODELS, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/shaders/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "shaders"); Core_RStringSet(G_RI_STRING_PATH_GS_SHADERS, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/sounds/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "sounds"); Core_RStringSet(G_RI_STRING_PATH_GS_SOUNDS, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/scripts/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "scripts"); Core_RStringSet(G_RI_STRING_PATH_GS_SCRIPTS, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/textures/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "textures"); Core_RStringSet(G_RI_STRING_PATH_GS_TEXTURES, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/materials/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "materials"); Core_RStringSet(G_RI_STRING_PATH_GS_MTRLS, tmppath); - sprintf(tmppath, "%s%s", tmppathexe, "/gamesource/resource/"); + sprintf(tmppath, "%s%s/", Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), "resource"); Core_RStringSet(G_RI_STRING_PATH_GS_GUI, tmppath); } @@ -455,7 +471,7 @@ LRESULT CALLBACK SkyXEngine_WndProc(HWND hWnd, UINT uiMessage, WPARAM wParam, LP SSInput_AddMsg(msg); switch (uiMessage) -{ + { case WM_PAINT: hdc = BeginPaint(hWnd, &ps); EndPaint(hWnd, &ps); @@ -467,7 +483,7 @@ LRESULT CALLBACK SkyXEngine_WndProc(HWND hWnd, UINT uiMessage, WPARAM wParam, LP } return(DefWindowProc(hWnd, uiMessage, wParam, lParam)); - } +} HWND SkyXEngine_CreateWindow(const char *szName, const char *szCaption, int iWidth, int iHeight) { @@ -478,7 +494,11 @@ HWND SkyXEngine_CreateWindow(const char *szName, const char *szCaption, int iWid wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = GetModuleHandle(0); +#ifdef IDI_ICON_LOGO wcex.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON_LOGO)); +#else + wcex.hIcon = 0; +#endif wcex.hCursor = 0; wcex.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wcex.lpszMenuName = NULL; @@ -669,7 +689,8 @@ void SkyXEngine_Frame(DWORD timeDelta) #if defined(SX_GAME) ttime = TimeGetMcsU(Core_RIntGet(G_RI_INT_TIMER_RENDER)); - SRender_RenderPostProcess(timeDelta); + if (!SSInput_GetKeyState(SIK_P)) + SRender_RenderPostProcess(timeDelta); DelayPostProcess += TimeGetMcsU(Core_RIntGet(G_RI_INT_TIMER_RENDER)) - ttime; #endif @@ -808,11 +829,11 @@ void SkyXEngine_Frame(DWORD timeDelta) SPE_EffectComputeAll(); SPE_EffectComputeLightingAll(); DelayUpdateParticles += TimeGetMcsU(Core_RIntGet(G_RI_INT_TIMER_RENDER)) - ttime; - + ttime = TimeGetMcsU(Core_RIntGet(G_RI_INT_TIMER_RENDER)); pDXDevice->Present(0, 0, 0, 0); DelayPresent += TimeGetMcsU(Core_RIntGet(G_RI_INT_TIMER_RENDER)) - ttime; - + SkyXEngind_UpdateDataCVar(); } @@ -1029,6 +1050,7 @@ void SkyXEngind_UpdateDataCVar() int SkyXEngine_CycleMain() { + //ID idSnd = SSCore_SndCreate2dInst("ak74_reload.ogg",SX_SOUND_CHANNEL_GAME); MSG msg; ::ZeroMemory(&msg, sizeof(MSG)); @@ -1051,8 +1073,28 @@ int SkyXEngine_CycleMain() } else { - SGCore_LoadTexAllLoad(); SGCore_ShaderAllLoad(); + SGCore_LoadTexAllLoad(); + + /*if (SSInput_GetKeyState(SIK_BACKSPACE)) + SSCore_ChannelPlay(SX_SOUND_CHANNEL_GAME); + else if (SSInput_GetKeyState(SIK_ENTER)) + SSCore_ChannelStop(SX_SOUND_CHANNEL_GAME); + + UINT arr[] = {3000, 350, 1000, 800, 300 }; + if (SSInput_GetKeyState(SIK_RSHIFT)) + SSCore_SndInstancePlayDelay2d(idSnd, false, true, arr, 5, 1, 0); + + if (SSInput_GetKeyState(SIK_RCONTROL)) + SSCore_SndStop(idSnd); + + // + static uint64_t id2 = SOUND_SNDKIT_INSTANCE_BLOCK; + id2 = SSCore_SndkitPlay(0, id2); + if (SSInput_GetKeyState(SIK_TAB)) + SSCore_SndkitStop(0, id2);*/ + + Core_TimesUpdate(); Core_0ConsoleUpdate(); SSInput_Update(); @@ -1136,10 +1178,13 @@ void SkyXEngine_Kill() SSCore_AKill(); SGCore_AKill(); Core_AKill(); + + mem_delete(g_pPreviewBuffer); } //############################################################################# +#ifdef IDB_BITMAP_PREVIEW LRESULT CALLBACK SkyXEngine_PreviewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { PAINTSTRUCT ps; @@ -1229,7 +1274,7 @@ void SkyXEngine_PreviewKill() DestroyWindow(g_hWinPreview); g_hWinPreview = 0; } - +#endif //########################################################################## void SkyXEngine_RFuncDIP(UINT type_primitive, long base_vertexIndex, UINT min_vertex_index, UINT num_vertices, UINT start_index, UINT prim_count) @@ -1344,4 +1389,146 @@ bool SkyXEngine_RFuncParticlesPhyCollision(const float3 * lastpos, const float3* } return false; -} \ No newline at end of file +} + + +IDirect3DTexture9* SkyXEngine_LoadAsPreviewData(const char *szPath) +{ + D3DXIMAGE_INFO imageinfo; + memset(&imageinfo, 0, sizeof(D3DXIMAGE_INFO)); + + D3DXGetImageInfoFromFile(szPath, &imageinfo); + + float fCoef = float(SKYXENGINE_PREVIEW_SIZE) / (imageinfo.Width > imageinfo.Height ? imageinfo.Width : imageinfo.Height); + + int iNewWidth = float(imageinfo.Width) * fCoef; + int iNewHeight = float(imageinfo.Height) * fCoef; + + IDirect3DTexture9 *pTexture = 0; + + if (FAILED(D3DXCreateTextureFromFileEx( + SGCore_GetDXDevice(), + szPath, + iNewWidth, + iNewHeight, + 0, + 0, + D3DFMT_A8R8G8B8, + D3DPOOL_SYSTEMMEM, + D3DX_FILTER_BOX, + D3DX_FILTER_BOX, + 0, + 0, + 0, + &pTexture + ) + ) + ) + { + return 0; + } + + return pTexture; +} + +IDirect3DTexture9* SkyXEngine_GetPreviewData(const char *szPath) +{ + String sPath = szPath; + sPath.Replace(SKYXENGINE_RELPATH_GAMESOURCE, SKYXENGINE_RELPATH_EDITOR_CACHE, 0); + sPath = FileSetStrExt(sPath.c_str(), "jpg"); + + if (FileExistsFile(sPath.c_str())) + return SkyXEngine_LoadAsPreviewData(sPath.c_str()); + /*else + { + String sDir = FileGetPrevDir(sPath.c_str()); + FileCreateDir(sDir.c_str()); + return SkyXEngine_LoadCacheTexture(szPath, sPath.c_str()); + }*/ + + return 0; +} + +void SkyXEngine_RunGenPreview() +{ + String sRunGenPreview = (FileAppendSlash(Core_RStringGet(G_RI_STRING_PATH_EXE)) + "sxgenpreview.exe").c_str(); + + SHELLEXECUTEINFO ShExecInfo = { 0 }; + ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); + ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; + ShExecInfo.hwnd = NULL; + ShExecInfo.lpVerb = NULL; + ShExecInfo.lpFile = sRunGenPreview.c_str(); + ShExecInfo.lpParameters = ""; + ShExecInfo.lpDirectory = NULL; + ShExecInfo.nShow = SW_SHOW; + ShExecInfo.hInstApp = NULL; + ShellExecuteEx(&ShExecInfo); + WaitForSingleObject(ShExecInfo.hProcess, INFINITE); +} + +//########################################################################## + +BYTE *g_pPreviewBuffer = new BYTE[SKYXENGINE_PREVIEWBUF_SIZE]; + +bool SkyXEngine_EditorHandlerGetPreviewData(const char *szPath, void **pBuf, int *pSizeBuf, int *pWidth, int *pHeight) +{ + if (!pBuf || !pSizeBuf || !pWidth || !pHeight) + return false; + + IDirect3DTexture9 *pTexture = SkyXEngine_GetPreviewData(szPath); + + if (!pTexture) + return false; + + D3DSURFACE_DESC desc; + pTexture->GetLevelDesc(0, &desc); + + D3DLOCKED_RECT LockedRect; + pTexture->LockRect(0, &LockedRect, 0, 0); + + int iSizeBuf = (desc.Width * desc.Height * 4); + memcpy(g_pPreviewBuffer, LockedRect.pBits, iSizeBuf); + + pTexture->UnlockRect(0); + mem_release(pTexture); + + *pBuf = g_pPreviewBuffer; + *pSizeBuf = iSizeBuf; + *pWidth = desc.Width; + *pHeight = desc.Height; + + return true; +} + +bool SkyXEngine_EditorHandlerGetTextureInfo(const char *szPath, char *szBuf) +{ + D3DXIMAGE_INFO imageinfo; + memset(&imageinfo, 0, sizeof(D3DXIMAGE_INFO)); + + if (FAILED(D3DXGetImageInfoFromFile(szPath, &imageinfo))) + return false; + + sprintf(szBuf, "Width: %d\nHeight: %d\nSize: %d kb", imageinfo.Width, imageinfo.Height, (FileGetSizeFile(szPath) / 1024)); + return true; +} + +bool SkyXEngine_EditorHandlerGetDSEinfo(const char *szPath, char *szBuf) +{ + CDSEinfo info; + + if (!SGCore_DSEgetInfo(szPath, &info)) + return false; + + if (info.type == DSE_TYPE_STATIC) + sprintf(szBuf, "Count subset: %d\nCount poly: %d\nCount vertex: %d\nDimensions: %.2f | %.2f | %.2f\nCenter: %.2f | %.2f | %.2f\nSize: %d kb", info.iCountSubsets, info.iCountIndex / 3, info.iCountVertex, info.vDimensions.x, info.vDimensions.y, info.vDimensions.z, info.vCenter.x, info.vCenter.y, info.vCenter.z, (FileGetSizeFile(szPath) / 1024)); + else if (info.type == DSE_TYPE_ANIMATION) + sprintf(szBuf, "Count bone: %d\nCount animations: %d\nSize: %d kb", info.iCountBone, info.iCountAnimation, (FileGetSizeFile(szPath) / 1024)); + else if (info.type == DSE_TYPE_ANIM_MESH) + sprintf(szBuf, "Count subset: %d\nCount poly: %d\nCount vertex: %d\nDimensions: %.2f | %.2f | %.2f\nCenter: %.2f | %.2f | %.2f\nCount bone: %d\nCount animations: %d\nSize: %d kb", info.iCountSubsets, info.iCountIndex / 3, info.iCountVertex, info.vDimensions.x, info.vDimensions.y, info.vDimensions.z, info.vCenter.x, info.vCenter.y, info.vCenter.z, info.iCountBone, info.iCountAnimation, (FileGetSizeFile(szPath) / 1024)); + else + return false; + + return true; +} + diff --git a/source/sxae/Editor.cpp b/source/sxae/Editor.cpp index b624fc6ac13491e916e15fae77433ce322c2a9c9..8209f2c35893c9b79bbeb53e99239a1d209c76a7 100644 --- a/source/sxae/Editor.cpp +++ b/source/sxae/Editor.cpp @@ -54,7 +54,7 @@ void msgbx(int level, const char* format, ...) } } -report_func reportf = msgbx; +report_func g_fnReportf = SkyXEngine_PrintfLog;// msgbx; Editor::Editor(): m_bCamMove(false), @@ -74,19 +74,27 @@ m_bDirty(false) SetCurrentDirectoryA(m_szGamesourceDir); InitUI(); + + SkyXEngine_InitOutLog(); + SkyXEngine_InitPaths(); + InitD3D(); + Core_0Create("sxcore", "GenPreview", false); + Core_Dbg_Set(SkyXEngine_PrintfLog); + Core_SetOutPtr(); + m_pvActivities = &((TabActivities*)m_pTM->m_pTabActivities)->m_vItems; m_pEditor = this; m_szAnimFilter[0] = 0; m_szEditFile[0] = 0; - ((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlGB->AddHandler(AnimTBProc, WM_HSCROLL); - ((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlProgressTrack->AddHandler(AnimTBProc, WM_SETFOCUS); - //((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlProgress->AddHandler(AnimTBProc, WM_SETFOCUS); - ((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlProgressTrack->AddHandler(AnimTBProc, WM_KILLFOCUS); - //((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlProgress->AddHandler(AnimTBProc, WM_KILLFOCUS); + ((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlGB->addHandler(AnimTBProc, WM_HSCROLL); + ((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlProgressTrack->addHandler(AnimTBProc, WM_SETFOCUS); + //((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlProgress->addHandler(AnimTBProc, WM_SETFOCUS); + ((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlProgressTrack->addHandler(AnimTBProc, WM_KILLFOCUS); + //((TabAnimation*)m_pTM->m_pTabAnimation)->AnimCtlProgress->addHandler(AnimTBProc, WM_KILLFOCUS); /*m_szGamesourceDir[0] = 0; @@ -147,6 +155,14 @@ m_bDirty(false) } } +HWND Editor::getRenderHWND() +{ + if (D3DWindow) + return D3DWindow->getHWND(); + + return 0; +} + bool Editor::GetRegGSdir() { HKEY hKey; @@ -198,7 +214,7 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return(0); } ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - Editor * edt = (Editor*)cmp->GetUserPtr(); + Editor * edt = (Editor*)cmp->getUserPtr(); switch(msg) { case WM_COMMAND: @@ -302,21 +318,21 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIComboBox * pList = ((TabAnimation*)edt->m_pTM->m_pTabAnimation)->AnimPropActCmb; - m_pEditor->m_vAnims[m_pEditor->m_iCurIdx].seq->activity = pList->GetSel(); + m_pEditor->m_vAnims[m_pEditor->m_iCurIdx].seq->activity = pList->getSel(); } break; case IDC_ATTACH_RB_BONE: { TabAttachments * tab = (TabAttachments*)m_pEditor->m_pTM->m_pTabAttachments; - tab->AttachBone->Enable(1); + tab->AttachBone->setEnable(1); } break; case IDC_ATTACH_RB_SKIN: { TabAttachments * tab = (TabAttachments*)m_pEditor->m_pTM->m_pTabAttachments; - tab->AttachBone->Enable(0); + tab->AttachBone->setEnable(0); } break; @@ -324,12 +340,12 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIListBox * pList = ((TabAttachments*)edt->m_pTM->m_pTabAttachments)->AttachmentsList; int len = MODEL_MAX_NAME; - int sel = pList->GetSel(); + int sel = pList->getSel(); if(sel < 0) { break; } - sel = pList->GetItemData(sel); + sel = pList->getItemData(sel); Tools::DlgPrompt(edt->m_vMdlParts[sel]->name, &len, "New name", "Rename", edt->m_vMdlParts[sel]->name); edt->RenderPartList(); @@ -340,12 +356,12 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIListBox * pList = ((TabAttachments*)edt->m_pTM->m_pTabAttachments)->AttachmentsList; int len = MODEL_MAX_NAME; - int sel = pList->GetSel(); + int sel = pList->getSel(); if(sel < 0) { break; } - sel = pList->GetItemData(sel); + sel = pList->getItemData(sel); if(Tools::DlgConfirm()) { @@ -358,7 +374,7 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { m_pEditor->addModel(""); ISXGUIListBox * pList = ((TabAttachments*)edt->m_pTM->m_pTabAttachments)->AttachmentsList; - pList->SetSel(pList->GetCountItem() - 1); + pList->setSel(pList->getItemCount() - 1); m_pEditor->OnPartListSelChg(); } break; @@ -397,12 +413,12 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIListBox * pList = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->HBList; int len = MODEL_MAX_NAME; - int sel = pList->GetSel(); + int sel = pList->getSel(); if(sel < 0) { break; } - sel = pList->GetItemData(sel); + sel = pList->getItemData(sel); if(Tools::DlgConfirm()) { @@ -426,7 +442,7 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) m_pEditor->UpdateHitboxList(m_pEditor->m_pHitboxesPart, false); ISXGUIListBox * pList = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->HBList; - pList->SetSel(pList->GetCountItem() - 1); + pList->setSel(pList->getItemCount() - 1); m_pEditor->OnHitboxListSelChg(); } break; @@ -444,8 +460,8 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if(HIWORD(wParam) == EN_CHANGE) { ISXGUIListBox * pList = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->HBList; - int sel = pList->GetSel(); - if(sel < 0 || (sel = pList->GetItemData(sel)) < 0) + int sel = pList->getSel(); + if(sel < 0 || (sel = pList->getItemData(sel)) < 0) { break; } @@ -457,7 +473,7 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) GetWindowTextA((HWND)lParam, hbx->hb->name, MODEL_MAX_NAME); char tmpSN[MODEL_MAX_NAME + 32]; sprintf(tmpSN, "[%c] %s", hbx->isImported ? 'I' : '_', hbx->hb->name); - pList->SetTextItem(pList->GetSel(), tmpSN); + pList->setItemText(pList->getSel(), tmpSN); //m_pEditor->RenderHitboxList(); } break; @@ -466,8 +482,8 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if(HIWORD(wParam) == CBN_SELCHANGE) { ISXGUIListBox * pList = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->HBList; - int sel = pList->GetSel(); - if(sel < 0 || (sel = pList->GetItemData(sel)) < 0) + int sel = pList->getSel(); + if(sel < 0 || (sel = pList->getItemData(sel)) < 0) { break; } @@ -481,13 +497,13 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIListBox * pList = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->HBList; ISXGUIComboBox * cmb = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->CBBodyPart; - int sel = pList->GetSel(); - if(sel < 0 || (sel = pList->GetItemData(sel)) < 0) + int sel = pList->getSel(); + if(sel < 0 || (sel = pList->getItemData(sel)) < 0) { break; } HitboxItem * hbx = &m_pEditor->m_vHitboxes[sel]; - hbx->hb->part = (HITBOX_BODYPART)cmb->GetItemData(cmb->GetSel()); + hbx->hb->part = (HITBOX_BODYPART)cmb->getItemData(cmb->getSel()); } break; @@ -496,13 +512,13 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIListBox * pList = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->HBList; ISXGUIComboBox * cmb = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->CBType; - int sel = pList->GetSel(); - if(sel < 0 || (sel = pList->GetItemData(sel)) < 0) + int sel = pList->getSel(); + if(sel < 0 || (sel = pList->getItemData(sel)) < 0) { break; } HitboxItem * hbx = &m_pEditor->m_vHitboxes[sel]; - hbx->hb->type = (HITBOX_TYPE)cmb->GetItemData(cmb->GetSel()); + hbx->hb->type = (HITBOX_TYPE)cmb->getItemData(cmb->getSel()); } break; @@ -518,8 +534,8 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if(HIWORD(wParam) == EN_CHANGE) { ISXGUIListBox * pList = ((TabHitboxes*)edt->m_pTM->m_pTabHitboxes)->HBList; - int sel = pList->GetSel(); - if(sel < 0 || (sel = pList->GetItemData(sel)) < 0) + int sel = pList->getSel(); + if(sel < 0 || (sel = pList->getItemData(sel)) < 0) { break; } @@ -607,11 +623,11 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case EM_LOADACTIVITIES: TabAnimation * tAnim = (TabAnimation*)edt->m_pTM->m_pTabAnimation; - tAnim->AnimPropActCmb->Clear(); - tAnim->AnimPropActCmb->AddItem(""); + tAnim->AnimPropActCmb->clear(); + tAnim->AnimPropActCmb->addItem(""); for(int i = 0, l = edt->m_pvActivities->size(); i < l; ++i) { - tAnim->AnimPropActCmb->AddItem(edt->m_pvActivities[0][i].act.c_str()); + tAnim->AnimPropActCmb->addItem(edt->m_pvActivities[0][i].act.c_str()); } break; } @@ -621,14 +637,14 @@ LRESULT Editor::MenuCmd(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT Editor::CamInput(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - Editor * edt = (Editor*)cmp->GetUserPtr(); + Editor * edt = (Editor*)cmp->getUserPtr(); switch(msg) { case WM_RBUTTONDOWN: edt->CenterMouse(); edt->m_bCamMove = true; ShowCursor(0); - SetFocus(edt->MainWindow->GetHWND()); + SetFocus(edt->MainWindow->getHWND()); break; case WM_RBUTTONUP: edt->m_bCamMove = false; @@ -691,21 +707,21 @@ LRESULT Editor::CamInput(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT Editor::AnimListCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - Editor * edt = (Editor*)cmp->GetUserPtr(); + Editor * edt = (Editor*)cmp->getUserPtr(); ISXGUIListBox * lb = edt->AnimList; - int curSel = lb->GetSel(); + int curSel = lb->getSel(); switch(msg) { case WM_LBUTTONDBLCLK: if(curSel != -1) { - UINT seqi = (UINT)lb->GetItemData(curSel); + UINT seqi = (UINT)lb->getItemData(curSel); edt->m_pCurAnim->play(edt->m_vAnims[seqi].seq->name, 100); } break; } - return(CallWindowProc(cmp->OldProc, hwnd, msg, wParam, lParam)); + return(CallWindowProc(cmp->getPrevWndProc(), hwnd, msg, wParam, lParam)); } LRESULT Editor::AnimFilterCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -713,7 +729,7 @@ LRESULT Editor::AnimFilterCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) switch(msg) { case WM_KEYUP: - m_pEditor->AnimFilter->GetText(m_pEditor->m_szAnimFilter, sizeof(m_pEditor->m_szAnimFilter) - 1); + m_pEditor->AnimFilter->getText(m_pEditor->m_szAnimFilter, sizeof(m_pEditor->m_szAnimFilter) - 1); m_pEditor->RenderAnimList(); break; } @@ -727,17 +743,17 @@ void Editor::AnimPlayCB(int slot, ANIM_STATE state, Animation * pAnim) switch(state) { case AS_STOP: - m_pEditor->CurAnimName->SetText(""); - ta->AnimCtlPauseBtn->Enable(0); - ta->AnimCtlPlayBtn->Enable(1); + m_pEditor->CurAnimName->setText(""); + ta->AnimCtlPauseBtn->setEnable(0); + ta->AnimCtlPlayBtn->setEnable(1); break; case AS_PLAY: char name[MODEL_MAX_NAME + 16]; sprintf(name, "Animation: %s", seq->name); - m_pEditor->CurAnimName->SetText(name); + m_pEditor->CurAnimName->setText(name); - ta->AnimCtlPauseBtn->Enable(1); - ta->AnimCtlPlayBtn->Enable(0); + ta->AnimCtlPauseBtn->setEnable(1); + ta->AnimCtlPlayBtn->setEnable(0); break; } @@ -745,9 +761,9 @@ void Editor::AnimPlayCB(int slot, ANIM_STATE state, Animation * pAnim) void Editor::AnimProgressCB(int slot, float progress, Animation * pAnim) { TabAnimation * ta = (TabAnimation*)m_pEditor->m_pTM->m_pTabAnimation; - ta->AnimCtlProgress->SetText(String(progress).c_str()); + ta->AnimCtlProgress->setText(String(progress).c_str()); - ta->AnimCtlProgressTrack->SetPos((int)(progress * 1000)); + ta->AnimCtlProgressTrack->setPos((int)(progress * 1000)); } LRESULT Editor::AnimTBProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -756,7 +772,7 @@ LRESULT Editor::AnimTBProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) switch(msg) { case WM_HSCROLL: - pos = ((TabAnimation*)m_pEditor->m_pTM->m_pTabAnimation)->AnimCtlProgressTrack->GetPos(); + pos = ((TabAnimation*)m_pEditor->m_pTM->m_pTabAnimation)->AnimCtlProgressTrack->getPos(); m_pEditor->m_pCurAnim->setProgress(pos / 1000.0f); break; case WM_SETFOCUS: @@ -785,7 +801,7 @@ void Editor::MenuNew(HWND hwnd) void Editor::MenuBrowse(HWND hwnd) { - OPENFILENAMEA ofn; + //OPENFILENAMEA ofn; char szFile[260]; if(m_bDirty && MessageBoxA(hwnd, "All unsaved changes will be lost", "Open?", MB_OKCANCEL | MB_ICONWARNING | MB_DEFBUTTON2) != IDOK) @@ -793,9 +809,9 @@ void Editor::MenuBrowse(HWND hwnd) return; } - ZeroMemory(&ofn, sizeof(OPENFILENAMEA)); + //ZeroMemory(&ofn, sizeof(OPENFILENAMEA)); ZeroMemory(szFile, sizeof(szFile)); - ofn.lStructSize = sizeof(OPENFILENAMEA); + /*ofn.lStructSize = sizeof(OPENFILENAMEA); ofn.hwndOwner = NULL; ofn.lpstrFile = szFile; ofn.nMaxFile = sizeof(szFile); @@ -807,12 +823,12 @@ void Editor::MenuBrowse(HWND hwnd) ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR; wchar_t bf[256]; - GetCurrentDirectoryW(256, bf); + GetCurrentDirectoryW(256, bf);*/ - if(GetOpenFileNameA(&ofn) == TRUE) + if (gui_func::dialogs::SelectFileOwn(0, szFile, Core_RStringGet(G_RI_STRING_PATH_GS_MODELS), "dse", "Open file", true, Core_RStringGet(G_RI_STRING_PATH_GS_MODELS), MainWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetDSEinfo)/*GetOpenFileNameA(&ofn) == TRUE*/) { - SetCurrentDirectoryW(bf); - strcpy(m_szEditFile, ofn.lpstrFile); + //SetCurrentDirectoryW(bf); + //strcpy(m_szEditFile, ofn.lpstrFile); //wprintf(L"File: %s\n", ofn.lpstrFile); //unload all parts @@ -820,7 +836,7 @@ void Editor::MenuBrowse(HWND hwnd) { m_pEditor->delModel(0); } - m_pEditor->addModel(ofn.lpstrFile, MI_ALL, false, true); + m_pEditor->addModel(szFile, MI_ALL, false, true); m_pEditor->m_pCurAnim->assembly(); RenderBoneList(); m_bDirty = false; @@ -863,7 +879,7 @@ void Editor::MenuBrowseImport(HWND hwnd, bool use) TabAttachments * tab = (TabAttachments*)m_pEditor->m_pTM->m_pTabAttachments; canonize_path(ofn.lpstrFile); ofn.lpstrFile = (char*)strip_prefix(ofn.lpstrFile, m_pEditor->m_szGamesourceDir); - tab->AttachFileField->SetText(ofn.lpstrFile); + tab->AttachFileField->setText(ofn.lpstrFile); tab->m_iflags = iflags; } } @@ -1074,80 +1090,82 @@ Editor * Editor::m_pEditor; void Editor::InitUI() { - MainWindow = SXGUICrBaseWnd("MainWindow", "MainWindow", 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, 1320, 730, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); - SXGUIBaseHandlers::InitHandlerMsg(MainWindow); - MainWindow->AddHandler(MenuCmd, WM_COMMAND); - MainWindow->AddHandler(MenuCmd, WM_CLOSE, 0, 0, 0, 0, 1); - MainWindow->AddHandler(MenuCmd, WM_PARENTNOTIFY); - MainWindow->AddHandler(MenuCmd, EM_LOADACTIVITIES); - //MainWindow->AddHandler(MenuCmd, WM_KEYDOWN); - MainWindow->MinSizeX = MAINWIN_SIZE_X; - MainWindow->MinSizeY = MAINWIN_SIZE_Y; - - - MainWindow->SetUserPtr(this); - - Menu = SXGUICrMenuEx(IDR_MENU1); - Menu->SetToWindow(MainWindow->GetHWND()); - - D3DWindow = SXGUICrBaseWnd("Window1", "Window1", 0, 0, 279, 6, 1023, 473, 0, 0, CreateSolidBrush(RGB(200, 200, 200)), 0, CS_HREDRAW | CS_VREDRAW, WS_CHILD | WS_VISIBLE | WS_BORDER, MainWindow->GetHWND(), 0); - D3DWindow->GAlign = {true, true, true, true}; - D3DWindow->SetUserPtr(this); - - D3DWindow->AddHandler(CamInput, WM_RBUTTONDOWN); - D3DWindow->AddHandler(CamInput, WM_RBUTTONUP); - MainWindow->AddHandler(CamInput, WM_KEYDOWN); - MainWindow->AddHandler(CamInput, WM_KEYUP); - D3DWindow->AddHandler(CamInput, WM_LBUTTONDOWN); - D3DWindow->AddHandler(CamInput, WM_LBUTTONUP); - D3DWindow->AddHandler(CamInput, WM_MOUSEMOVE); + MainWindow = SXGUICrBaseWndEx("MainWindow", "MainWindow", CW_USEDEFAULT, CW_USEDEFAULT, 1320, 730, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); + gui_func::base_handlers::InitHandlerMsg(MainWindow); + MainWindow->addHandler(MenuCmd, WM_COMMAND); + MainWindow->addHandler(MenuCmd, WM_CLOSE, 0, 0, 0, 0, 1); + MainWindow->addHandler(MenuCmd, WM_PARENTNOTIFY); + MainWindow->addHandler(MenuCmd, EM_LOADACTIVITIES); + //MainWindow->addHandler(MenuCmd, WM_KEYDOWN); + MainWindow->setMixSize(MAINWIN_SIZE_X, MAINWIN_SIZE_Y); + + + MainWindow->setUserPtr(this); + + Menu = SXGUICrMenuWindowEx(IDR_MENU1); + Menu->setToWindow(MainWindow->getHWND()); + + D3DWindow = SXGUICrBaseWndEx("Window1", "Window1", 279, 6, 1023, 473, 0, 0, CreateSolidBrush(RGB(200, 200, 200)), 0, CS_HREDRAW | CS_VREDRAW, WS_CHILD | WS_VISIBLE | WS_BORDER, MainWindow->getHWND(), 0); + D3DWindow->setFollowParentSides(true, true, true, true); + D3DWindow->setUserPtr(this); + + D3DWindow->addHandler(CamInput, WM_RBUTTONDOWN); + D3DWindow->addHandler(CamInput, WM_RBUTTONUP); + MainWindow->addHandler(CamInput, WM_KEYDOWN); + MainWindow->addHandler(CamInput, WM_KEYUP); + D3DWindow->addHandler(CamInput, WM_LBUTTONDOWN); + D3DWindow->addHandler(CamInput, WM_LBUTTONUP); + D3DWindow->addHandler(CamInput, WM_MOUSEMOVE); m_pTM = new TabManager(MainWindow); - AnimationsGB = SXGUICrGroupBox("Animations", 3, 0, 275, 669, MainWindow->GetHWND(), 0, 0); - AnimationsGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimationsGB->SetColorText(0, 0, 0); - AnimationsGB->SetColorTextBk(255, 255, 255); - AnimationsGB->SetTransparentTextBk(true); - AnimationsGB->SetColorBrush(255, 255, 255); - AnimationsGB->GAlign = {true, true, true, false}; - AnimationsGB->SetUserPtr(this); - AnimationsGB->AddHandler(AnimGBProc, WM_COMMAND); - - AnimList = SXGUICrListBoxEx("", 2, 43, 270, 623, 0, WS_CHILD | WS_VISIBLE | LBS_HASSTRINGS | WS_VSCROLL | WS_BORDER | LBS_NOTIFY/* | LBS_SORT*/, AnimationsGB->GetHWND(), 0, IDC_LISTBOX); - AnimList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimList->SetColorText(0, 0, 0); - AnimList->SetColorTextBk(255, 255, 255); - AnimList->SetTransparentTextBk(true); - AnimList->SetColorBrush(255, 255, 255); - AnimList->GAlign = {true, true, true, true}; - //AnimList->SetUserPtr(this); - //AnimList->AddHandler(AnimListCB, WM_LBUTTONDBLCLK); - - AnimFilter = SXGUICrEdit("", 44, 16, 228, 23, AnimationsGB->GetHWND(), 0, 0); - AnimFilter->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimFilter->SetColorText(0, 0, 0); - AnimFilter->SetColorTextBk(255, 255, 255); - AnimFilter->SetTransparentTextBk(true); - AnimFilter->SetColorBrush(255, 255, 255); - - AnimFilter->AddHandler(AnimFilterCB, WM_KEYUP); - - Static1 = SXGUICrStatic("Filter:", 8, 18, 32, 20, AnimationsGB->GetHWND(), 0, 0); - Static1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static1->SetColorText(0, 0, 0); - Static1->SetColorTextBk(255, 255, 255); - Static1->SetTransparentTextBk(true); - Static1->SetColorBrush(255, 255, 255); - - - CurAnimName = SXGUICrStatic("Animation: idle", 1149, 649, 145, 19, MainWindow->GetHWND(), 0, 0); - CurAnimName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CurAnimName->SetColorText(0, 0, 0); - CurAnimName->SetColorTextBk(255, 255, 255); - CurAnimName->SetTransparentTextBk(true); - CurAnimName->SetColorBrush(255, 255, 255); - CurAnimName->GAlign = {false, false, true, true}; + AnimationsGB = SXGUICrGroupBox("Animations", 3, 0, 275, 669, MainWindow->getHWND(), 0, 0); + AnimationsGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimationsGB->setColorText(RGB(0, 0, 0)); + AnimationsGB->setColorTextBk(RGB(255, 255, 255)); + AnimationsGB->setTransparentTextBk(true); + AnimationsGB->setColorBrush(RGB(255, 255, 255)); + AnimationsGB->setFollowParentSides(true, true, true, false); + AnimationsGB->setUserPtr(this); + AnimationsGB->addHandler(AnimGBProc, WM_COMMAND); + + AnimList = SXGUICrListBoxEx(2, 43, 270, 623, 0, WS_CHILD | WS_VISIBLE | LBS_HASSTRINGS | WS_VSCROLL | WS_BORDER | LBS_NOTIFY/* | LBS_SORT*/, AnimationsGB->getHWND(), 0, IDC_LISTBOX); + AnimList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimList->setColorText(RGB(0, 0, 0)); + AnimList->setColorTextBk(RGB(255, 255, 255)); + AnimList->setTransparentTextBk(true); + AnimList->setColorBrush(RGB(255, 255, 255)); + AnimList->setFollowParentSides(true, true, true, true); + //AnimList->setUserPtr(this); + //AnimList->addHandler(AnimListCB, WM_LBUTTONDBLCLK); + + AnimFilter = SXGUICrEdit("", 44, 16, 228, 23, AnimationsGB->getHWND(), 0, 0); + AnimFilter->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimFilter->setColorText(RGB(0, 0, 0)); + AnimFilter->setColorTextBk(RGB(255, 255, 255)); + AnimFilter->setTransparentTextBk(true); + AnimFilter->setColorBrush(RGB(255, 255, 255)); + + AnimFilter->addHandler(AnimFilterCB, WM_KEYUP); + + Static1 = SXGUICrStatic("Filter:", 8, 18, 32, 20, AnimationsGB->getHWND(), 0, 0); + Static1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static1->setColorText(RGB(0, 0, 0)); + Static1->setColorTextBk(RGB(255, 255, 255)); + Static1->setTransparentTextBk(true); + Static1->setColorBrush(RGB(255, 255, 255)); + + + CurAnimName = SXGUICrStatic("Animation: idle", 1149, 649, 145, 19, MainWindow->getHWND(), 0, 0); + CurAnimName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CurAnimName->setColorText(RGB(0, 0, 0)); + CurAnimName->setColorTextBk(RGB(255, 255, 255)); + CurAnimName->setTransparentTextBk(true); + CurAnimName->setColorBrush(RGB(255, 255, 255)); + CurAnimName->setFollowParentSides(false, false, true, true); + + + MainWindow->setVisible(true); } void Editor::DestroyUI() { @@ -1164,7 +1182,7 @@ void Editor::DestroyUI() void Editor::InitD3D() { - HWND hWnd = D3DWindow->GetHWND(); + HWND hWnd = D3DWindow->getHWND(); HRESULT hr = S_OK; RECT rc; GetClientRect(hWnd, &rc); @@ -1172,14 +1190,14 @@ void Editor::InitD3D() UINT height = m_uHeight = rc.bottom - rc.top; SGCore_0Create("SXAnimEditor", hWnd, width, height, 1, 0, true); - SGCore_Dbg_Set(msgbx); + SGCore_Dbg_Set(SkyXEngine_PrintfLog/*msgbx*/); - char tmp[260]; + /*char tmp[260]; sprintf(tmp, "%stextures/", m_szGamesourceDir); //SGCore_LoadTexStdPath(tmp); sprintf(tmp, "%sshaders/", m_szGamesourceDir); - SGCore_ShaderSetStdPath(tmp); + SGCore_ShaderSetStdPath(tmp);*/ m_pd3dDevice = SGCore_GetDXDevice(); /* @@ -1260,17 +1278,19 @@ void Editor::DrawAxis() void Editor::CenterMouse() { POINT p = {0, 0}; - ClientToScreen(D3DWindow->GetHWND(), &p); + ClientToScreen(D3DWindow->getHWND(), &p); SetCursorPos(m_uWidth / 2 + p.x, m_uHeight / 2 + p.y); } void Editor::Update() { + SGCore_ShaderAllLoad(); + SGCore_LoadTexAllLoad(); if(m_bCamMove) { POINT pt; GetCursorPos(&pt); - ScreenToClient(D3DWindow->GetHWND(), &pt); + ScreenToClient(D3DWindow->getHWND(), &pt); float sens = 0.003f; m_cam.Rotate(((int)m_uWidth / 2 - pt.x) * sens, ((int)m_uHeight / 2 - pt.y) * sens); @@ -1398,41 +1418,41 @@ void Editor::RenderAnimList() AnimItem * ai; char tmpSN[MODEL_MAX_NAME + 32]; bool filt = m_szAnimFilter[0] != 0; - int cur = AnimList->GetSel(); + int cur = AnimList->getSel(); if(cur < 0) { cur = 0; } - AnimList->Clear(); + AnimList->clear(); for(UINT i = 0; i < c; ++i) { ai = &m_vAnims[i]; if(!filt || filterStr(ai->seq->name, m_szAnimFilter)) { sprintf(tmpSN, "[%c%c] %s", ai->isImported ? 'I' : '_', ai->seq->bLooped ? 'L' : '_', ai->seq->name); //I|_, L|_ - AnimList->AddItem(tmpSN); - AnimList->SetItemData(AnimList->GetCountItem() - 1, (LPARAM)i); + AnimList->addItem(tmpSN); + AnimList->setItemData(AnimList->getItemCount() - 1, (LPARAM)i); } } - AnimList->SetSel(cur); + AnimList->setSel(cur); } void Editor::RenderBoneList() { ISXGUIComboBox * cmb = ((TabAttachments*)(m_pTM->m_pTabAttachments))->AttachBone; ISXGUIComboBox * cmb_2 = ((TabHitboxes*)(m_pTM->m_pTabHitboxes))->CBBone; - int sel = cmb->GetSel(); - char * text = (char*)alloca(sizeof(char) * (cmb->GetItemTextLength(sel) + 1)); - cmb->GetItemText(sel, text); + int sel = cmb->getSel(); + char * text = (char*)alloca(sizeof(char) * (cmb->getItemTextLength(sel) + 1)); + cmb->getItemText(sel, text); - int sel2 = cmb_2->GetSel(); - char * text2 = (char*)alloca(sizeof(char)* (cmb_2->GetItemTextLength(sel2) + 1)); - cmb_2->GetItemText(sel2, text2); + int sel2 = cmb_2->getSel(); + char * text2 = (char*)alloca(sizeof(char)* (cmb_2->getItemTextLength(sel2) + 1)); + cmb_2->getItemText(sel2, text2); char tmp[MODEL_BONE_MAX_NAME + 1]; - cmb->Clear(); - cmb_2->Clear(); - cmb_2->AddItem(""); + cmb->clear(); + cmb_2->clear(); + cmb_2->addItem(""); for(int i = 0, l = m_pCurAnim->getBoneCount(); i < l; ++i) { m_pCurAnim->getBoneName(i, tmp, sizeof(tmp)); @@ -1444,18 +1464,18 @@ void Editor::RenderBoneList() { sel2 = i; } - cmb->AddItem(tmp); - cmb_2->AddItem(tmp); + cmb->addItem(tmp); + cmb_2->addItem(tmp); } - cmb->SetSel(sel); - cmb_2->SetSel(sel2); + cmb->setSel(sel); + cmb_2->setSel(sel2); /*UINT c = m_vAnims.size(); AnimItem * ai; char tmpSN[MODEL_MAX_NAME + 32]; bool filt = m_szAnimFilter[0] != 0; - int cur = AnimList->GetSel(); + int cur = AnimList->getSel(); if(cur < 0) { cur = 0; @@ -1468,10 +1488,10 @@ void Editor::RenderBoneList() { sprintf(tmpSN, "[%c%c] %s", ai->isImported ? 'I' : '_', ai->seq->bLooped ? 'L' : '_', ai->seq->name); //I|_, L|_ AnimList->AddItem(tmpSN); - AnimList->SetItemData(AnimList->GetCountItem() - 1, (LPARAM)i); + AnimList->SetItemData(AnimList->getItemCount() - 1, (LPARAM)i); } } - AnimList->SetSel(cur);*/ + AnimList->setSel(cur);*/ } void Editor::RenderPartList() @@ -1482,12 +1502,12 @@ void Editor::RenderPartList() ISXGUIListBox * pList = ((TabAttachments*)m_pTM->m_pTabAttachments)->AttachmentsList; - int cur = pList->GetSel(); + int cur = pList->getSel(); if(cur < 0) { cur = 0; } - pList->Clear(); + pList->clear(); for(UINT i = 0; i < c; ++i) { @@ -1496,19 +1516,19 @@ void Editor::RenderPartList() //sprintf(tmpSN, "[%c%c] %s", ai->isImported ? 'I' : '_', ai->seq->bLooped ? 'L' : '_', ai->seq->name); //I|_, L|_ if(par->file[0] != '!') { - pList->AddItem(par->name); - pList->SetItemData(pList->GetCountItem() - 1, (LPARAM)i); + pList->addItem(par->name); + pList->setItemData(pList->getItemCount() - 1, (LPARAM)i); } } - pList->SetSel(cur); + pList->setSel(cur); OnPartListSelChg(); } LRESULT Editor::AnimGBProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - Editor * self = (Editor*)cmp->GetUserPtr(); + Editor * self = (Editor*)cmp->getUserPtr(); switch(LOWORD(wParam)) { @@ -1526,19 +1546,19 @@ LRESULT Editor::AnimGBProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) void Editor::OnAnimListSelChg() { - int sel = AnimList->GetSel(); + int sel = AnimList->getSel(); AnimItem * item; - int idx = AnimList->GetItemData(sel); + int idx = AnimList->getItemData(sel); TabAnimation * tab = (TabAnimation*)m_pEditor->m_pTM->m_pTabAnimation; if(idx < 0) { - tab->AnimPropActChance->Enable(0); - tab->AnimPropName->Enable(0); - tab->AnimPropLoopCB->Enable(0); - tab->AnimPropSpeed->Enable(0); - tab->AnimPropActCmb->Enable(0); - tab->AnimCtlPlayBtn->Enable(0); - tab->AnimCtlPauseBtn->Enable(0); + tab->AnimPropActChance->setEnable(0); + tab->AnimPropName->setEnable(0); + tab->AnimPropLoopCB->setEnable(0); + tab->AnimPropSpeed->setEnable(0); + tab->AnimPropActCmb->setEnable(0); + tab->AnimCtlPlayBtn->setEnable(0); + tab->AnimCtlPauseBtn->setEnable(0); } else { @@ -1547,17 +1567,17 @@ void Editor::OnAnimListSelChg() m_pCurAnim->play(item->seq->name, 100); - tab->AnimPropActCmb->SetSel(item->seq->activity); - tab->AnimPropActChance->SetText(String((DWORD)item->seq->act_chance).c_str()); - tab->AnimPropName->SetText(item->seq->name); - tab->AnimPropLoopCB->SetCheck(item->seq->bLooped); - tab->AnimPropSpeed->SetText(String(item->seq->framerate).c_str()); + tab->AnimPropActCmb->setSel(item->seq->activity); + tab->AnimPropActChance->setText(String((DWORD)item->seq->act_chance).c_str()); + tab->AnimPropName->setText(item->seq->name); + tab->AnimPropLoopCB->setCheck(item->seq->bLooped); + tab->AnimPropSpeed->setText(String(item->seq->framerate).c_str()); - tab->AnimPropActChance->Enable(!item->isImported); - tab->AnimPropName->Enable(!item->isImported); - tab->AnimPropLoopCB->Enable(!item->isImported); - tab->AnimPropSpeed->Enable(!item->isImported); - tab->AnimPropActCmb->Enable(!item->isImported); + tab->AnimPropActChance->setEnable(!item->isImported); + tab->AnimPropName->setEnable(!item->isImported); + tab->AnimPropLoopCB->setEnable(!item->isImported); + tab->AnimPropSpeed->setEnable(!item->isImported); + tab->AnimPropActCmb->setEnable(!item->isImported); } } @@ -1565,9 +1585,9 @@ void Editor::SetPartFlag(MODEL_PART_FLAGS f, byte v) { TabAttachments * tab = (TabAttachments*)m_pEditor->m_pTM->m_pTabAttachments; ISXGUIListBox * pList = tab->AttachmentsList; - int sel = pList->GetSel(); + int sel = pList->getSel(); ModelPart * pt; - int idx = pList->GetItemData(sel); + int idx = pList->getItemData(sel); if(idx >= 0) { pt = m_vMdlParts[idx]; @@ -1586,58 +1606,58 @@ void Editor::OnPartListSelChg() { TabAttachments * tab = (TabAttachments*)m_pEditor->m_pTM->m_pTabAttachments; ISXGUIListBox * pList = tab->AttachmentsList; - int sel = pList->GetSel(); + int sel = pList->getSel(); ModelPart * pt; - int idx = pList->GetItemData(sel); + int idx = pList->getItemData(sel); if(idx < 0) { - tab->AttachSkinRB->Enable(0); - tab->AttachBoneRB->Enable(0); - tab->AttachBone->Enable(0); + tab->AttachSkinRB->setEnable(0); + tab->AttachBoneRB->setEnable(0); + tab->AttachBone->setEnable(0); - tab->AttachFileBrowse->Enable(0); - tab->AttachFileField->Enable(0); + tab->AttachFileBrowse->setEnable(0); + tab->AttachFileField->setEnable(0); - tab->AttachHideCB->Enable(0); - tab->AttachEnaCollisionCB->Enable(0); - tab->AttachEnaRaytraceCB->Enable(0); + tab->AttachHideCB->setEnable(0); + tab->AttachEnaCollisionCB->setEnable(0); + tab->AttachEnaRaytraceCB->setEnable(0); - tab->AttachXshift->Enable(0); - tab->AttachXshiftSpin->Enable(0); - tab->AttachYshift->Enable(0); - tab->AttachYshiftSpin->Enable(0); - tab->AttachZshift->Enable(0); - tab->AttachZshiftSpin->Enable(0); + tab->AttachXshift->setEnable(0); + tab->AttachXshiftSpin->setEnable(0); + tab->AttachYshift->setEnable(0); + tab->AttachYshiftSpin->setEnable(0); + tab->AttachZshift->setEnable(0); + tab->AttachZshiftSpin->setEnable(0); - tab->AttachFileApply->Enable(0); + tab->AttachFileApply->setEnable(0); } else { pt = m_vMdlParts[idx]; - tab->AttachSkinRB->Enable(1); - tab->AttachBoneRB->Enable(1); + tab->AttachSkinRB->setEnable(1); + tab->AttachBoneRB->setEnable(1); switch(pt->attachDesc.type) { case MA_SKIN: - tab->AttachSkinRB->SetCheck(1); - tab->AttachBoneRB->SetCheck(0); - tab->AttachBone->Enable(0); + tab->AttachSkinRB->setCheck(1); + tab->AttachBoneRB->setCheck(0); + tab->AttachBone->setEnable(0); break; case MA_BONE: - tab->AttachBoneRB->SetCheck(1); - tab->AttachSkinRB->SetCheck(0); - tab->AttachBone->Enable(1); - tab->AttachBone->SetSel(-1); + tab->AttachBoneRB->setCheck(1); + tab->AttachSkinRB->setCheck(0); + tab->AttachBone->setEnable(1); + tab->AttachBone->setSel(-1); { char tmpBone[MODEL_BONE_MAX_NAME + 1]; - for(int i = 0, l = tab->AttachBone->GetCount(); i < l; ++i) + for(int i = 0, l = tab->AttachBone->getCount(); i < l; ++i) { - tab->AttachBone->GetItemText(i, tmpBone); + tab->AttachBone->getItemText(i, tmpBone); if(!strcmp(pt->attachDesc.szBone, tmpBone)) { - tab->AttachBone->SetSel(i); + tab->AttachBone->setSel(i); break; } } @@ -1645,28 +1665,28 @@ void Editor::OnPartListSelChg() break; } - tab->AttachFileApply->Enable(1); + tab->AttachFileApply->setEnable(1); - tab->AttachHideCB->Enable(1); - tab->AttachHideCB->SetCheck(pt->uFlags & MP_HIDDEN); + tab->AttachHideCB->setEnable(1); + tab->AttachHideCB->setCheck(pt->uFlags & MP_HIDDEN); - tab->AttachEnaCollisionCB->Enable(1); - tab->AttachEnaCollisionCB->SetCheck(pt->uFlags & MP_COLLISIONS); + tab->AttachEnaCollisionCB->setEnable(1); + tab->AttachEnaCollisionCB->setCheck(pt->uFlags & MP_COLLISIONS); - tab->AttachEnaRaytraceCB->Enable(1); - tab->AttachEnaRaytraceCB->SetCheck(pt->uFlags & MP_RAYTRACE); + tab->AttachEnaRaytraceCB->setEnable(1); + tab->AttachEnaRaytraceCB->setCheck(pt->uFlags & MP_RAYTRACE); - tab->AttachFileBrowse->Enable(1); - tab->AttachFileField->Enable(1); + tab->AttachFileBrowse->setEnable(1); + tab->AttachFileField->setEnable(1); - tab->AttachFileField->SetText(pt->file); + tab->AttachFileField->setText(pt->file); - tab->AttachXshift->Enable(0); - tab->AttachXshiftSpin->Enable(0); - tab->AttachYshift->Enable(0); - tab->AttachYshiftSpin->Enable(0); - tab->AttachZshift->Enable(0); - tab->AttachZshiftSpin->Enable(0); + tab->AttachXshift->setEnable(0); + tab->AttachXshiftSpin->setEnable(0); + tab->AttachYshift->setEnable(0); + tab->AttachYshiftSpin->setEnable(0); + tab->AttachZshift->setEnable(0); + tab->AttachZshiftSpin->setEnable(0); } } @@ -1827,31 +1847,31 @@ void Editor::OnPartApply() { TabAttachments * tab = (TabAttachments*)m_pEditor->m_pTM->m_pTabAttachments; ISXGUIListBox * pList = tab->AttachmentsList; - int sel = pList->GetSel(); + int sel = pList->getSel(); ModelPart * pt; - int idx = pList->GetItemData(sel); + int idx = pList->getItemData(sel); if(idx < 0) { return; } pt = m_vMdlParts[idx]; - MODEL_ATTACH ma = tab->AttachBoneRB->GetCheck() ? MA_BONE : MA_SKIN; + MODEL_ATTACH ma = tab->AttachBoneRB->getCheck() ? MA_BONE : MA_SKIN; if(ma == MA_BONE) { - int sel = tab->AttachBone->GetSel(); + int sel = tab->AttachBone->getSel(); if(sel < 0) { MessageBoxA(NULL, "Please select bone", "Error!", MB_OK | MB_ICONSTOP); return; } - tab->AttachBone->GetItemText(sel, pt->attachDesc.szBone); + tab->AttachBone->getItemText(sel, pt->attachDesc.szBone); } pt->attachDesc.type = ma; char szFile[MODEL_MAX_FILE]; - tab->AttachFileField->GetText(szFile, sizeof(szFile)); + tab->AttachFileField->getText(szFile, sizeof(szFile)); if(strcmp(pt->file, szFile)) { @@ -1970,22 +1990,22 @@ void Editor::RenderHitboxList() ISXGUIListBox * pList = tab->HBList; - int cur = pList->GetSel(); + int cur = pList->getSel(); if(cur < 0) { cur = 0; } - pList->Clear(); + pList->clear(); for(UINT i = 0; i < c; ++i) { hbi = &m_vHitboxes[i]; sprintf(tmpSN, "[%c] %s", hbi->isImported ? 'I' : '_', hbi->hb->name); - pList->AddItem(tmpSN); - pList->SetItemData(pList->GetCountItem() - 1, (LPARAM)i); + pList->addItem(tmpSN); + pList->setItemData(pList->getItemCount() - 1, (LPARAM)i); } - pList->SetSel(cur); + pList->setSel(cur); OnHitboxListSelChg(); } @@ -1995,80 +2015,80 @@ void Editor::OnHitboxListSelChg() TabHitboxes * tab = (TabHitboxes*)m_pEditor->m_pTM->m_pTabHitboxes; ISXGUIListBox * pList = tab->HBList; - int sel = pList->GetSel(); + int sel = pList->getSel(); HitboxItem * hbx; - int idx = pList->GetItemData(sel); + int idx = pList->getItemData(sel); if(idx < 0) { - tab->CBBodyPart->Enable(0); - tab->CBBone->Enable(0); - tab->CBType->Enable(0); + tab->CBBodyPart->setEnable(0); + tab->CBBone->setEnable(0); + tab->CBType->setEnable(0); - tab->EdL->Enable(0); - tab->EdW->Enable(0); - tab->EdH->Enable(0); + tab->EdL->setEnable(0); + tab->EdW->setEnable(0); + tab->EdH->setEnable(0); - tab->EdName->Enable(0); + tab->EdName->setEnable(0); - tab->EdPosX->Enable(0); - tab->EdPosY->Enable(0); - tab->EdPosZ->Enable(0); + tab->EdPosX->setEnable(0); + tab->EdPosY->setEnable(0); + tab->EdPosZ->setEnable(0); - tab->EdRotX->Enable(0); - tab->EdRotY->Enable(0); - tab->EdRotZ->Enable(0); + tab->EdRotX->setEnable(0); + tab->EdRotY->setEnable(0); + tab->EdRotZ->setEnable(0); - tab->BtnDel->Enable(0); + tab->BtnDel->setEnable(0); } else { hbx = &m_vHitboxes[idx]; m_iActiveHitbox = idx; - tab->CBBodyPart->Enable(!hbx->isImported); - tab->CBBone->Enable(!hbx->isImported); - tab->CBType->Enable(!hbx->isImported); + tab->CBBodyPart->setEnable(!hbx->isImported); + tab->CBBone->setEnable(!hbx->isImported); + tab->CBType->setEnable(!hbx->isImported); - tab->EdL->Enable(!hbx->isImported); - tab->EdW->Enable(!hbx->isImported); - tab->EdH->Enable(!hbx->isImported); + tab->EdL->setEnable(!hbx->isImported); + tab->EdW->setEnable(!hbx->isImported); + tab->EdH->setEnable(!hbx->isImported); - tab->EdName->Enable(!hbx->isImported); + tab->EdName->setEnable(!hbx->isImported); - tab->EdPosX->Enable(!hbx->isImported); - tab->EdPosY->Enable(!hbx->isImported); - tab->EdPosZ->Enable(!hbx->isImported); + tab->EdPosX->setEnable(!hbx->isImported); + tab->EdPosY->setEnable(!hbx->isImported); + tab->EdPosZ->setEnable(!hbx->isImported); - tab->EdRotX->Enable(!hbx->isImported); - tab->EdRotY->Enable(!hbx->isImported); - tab->EdRotZ->Enable(!hbx->isImported); + tab->EdRotX->setEnable(!hbx->isImported); + tab->EdRotY->setEnable(!hbx->isImported); + tab->EdRotZ->setEnable(!hbx->isImported); - tab->BtnDel->Enable(1); + tab->BtnDel->setEnable(1); - tab->EdName->SetText(hbx->hb->name); + tab->EdName->setText(hbx->hb->name); - tab->CBBodyPart->SetSel(hbx->hb->part); - tab->CBType->SetSel(hbx->hb->type); + tab->CBBodyPart->setSel(hbx->hb->part); + tab->CBType->setSel(hbx->hb->type); char tmp[MODEL_BONE_MAX_NAME]; - for(int i = 0, l = tab->CBBone->GetCount(); i < l; ++i) + for(int i = 0, l = tab->CBBone->getCount(); i < l; ++i) { - tab->CBBone->GetItemText(i, tmp); + tab->CBBone->getItemText(i, tmp); if(!strcmp(tmp, hbx->hb->bone)) { - tab->CBBone->SetSel(i); + tab->CBBone->setSel(i); } } - sprintf(tmp, "%f", hbx->hb->lwh.x); tab->EdL->SetText(tmp); - sprintf(tmp, "%f", hbx->hb->lwh.y); tab->EdW->SetText(tmp); - sprintf(tmp, "%f", hbx->hb->lwh.z); tab->EdH->SetText(tmp); + sprintf(tmp, "%f", hbx->hb->lwh.x); tab->EdL->setText(tmp); + sprintf(tmp, "%f", hbx->hb->lwh.y); tab->EdW->setText(tmp); + sprintf(tmp, "%f", hbx->hb->lwh.z); tab->EdH->setText(tmp); - sprintf(tmp, "%f", hbx->hb->pos.x); tab->EdPosX->SetText(tmp); - sprintf(tmp, "%f", hbx->hb->pos.y); tab->EdPosY->SetText(tmp); - sprintf(tmp, "%f", hbx->hb->pos.z); tab->EdPosZ->SetText(tmp); + sprintf(tmp, "%f", hbx->hb->pos.x); tab->EdPosX->setText(tmp); + sprintf(tmp, "%f", hbx->hb->pos.y); tab->EdPosY->setText(tmp); + sprintf(tmp, "%f", hbx->hb->pos.z); tab->EdPosZ->setText(tmp); - sprintf(tmp, "%f", SMToAngle(hbx->hb->rot.x)); tab->EdRotX->SetText(tmp); - sprintf(tmp, "%f", SMToAngle(hbx->hb->rot.y)); tab->EdRotY->SetText(tmp); - sprintf(tmp, "%f", SMToAngle(hbx->hb->rot.z)); tab->EdRotZ->SetText(tmp); + sprintf(tmp, "%f", SMToAngle(hbx->hb->rot.x)); tab->EdRotX->setText(tmp); + sprintf(tmp, "%f", SMToAngle(hbx->hb->rot.y)); tab->EdRotY->setText(tmp); + sprintf(tmp, "%f", SMToAngle(hbx->hb->rot.z)); tab->EdRotZ->setText(tmp); } } @@ -3409,9 +3429,9 @@ void Editor::OnMouseDown(int x, int y) HitboxItem * hbi = &m_vHitboxes[m_iActiveHitbox]; float3 vec = SMVector3Transform(m_fOldHitboxLWH, m_res); - sprintf(tmp, "%f", vec.x); tab->EdL->SetText(tmp); - sprintf(tmp, "%f", vec.y); tab->EdW->SetText(tmp); - sprintf(tmp, "%f", vec.z); tab->EdH->SetText(tmp); + sprintf(tmp, "%f", vec.x); tab->EdL->setText(tmp); + sprintf(tmp, "%f", vec.y); tab->EdW->setText(tmp); + sprintf(tmp, "%f", vec.z); tab->EdH->setText(tmp); } m_res = m_res * m_mOldDragMat; break; @@ -3422,14 +3442,14 @@ void Editor::OnMouseDown(int x, int y) m_mHelperMat = m_res;/* * SMMatrixTranslation(float3(mBone._41, mBone._42, mBone._43)); m_mHitboxMat *= SMMatrixTranslation(float3(mBone._41, mBone._42, mBone._43));*/ - sprintf(tmp, "%f", m_mHitboxMat._41); tab->EdPosX->SetText(tmp); - sprintf(tmp, "%f", m_mHitboxMat._42); tab->EdPosY->SetText(tmp); - sprintf(tmp, "%f", m_mHitboxMat._43); tab->EdPosZ->SetText(tmp); + sprintf(tmp, "%f", m_mHitboxMat._41); tab->EdPosX->setText(tmp); + sprintf(tmp, "%f", m_mHitboxMat._42); tab->EdPosY->setText(tmp); + sprintf(tmp, "%f", m_mHitboxMat._43); tab->EdPosZ->setText(tmp); float3 rot = SMMatrixToEuler(m_mHitboxMat); - sprintf(tmp, "%f", SMToAngle(-rot.x)); tab->EdRotX->SetText(tmp); - sprintf(tmp, "%f", SMToAngle(rot.y)); tab->EdRotY->SetText(tmp); - sprintf(tmp, "%f", SMToAngle(-rot.z)); tab->EdRotZ->SetText(tmp); + sprintf(tmp, "%f", SMToAngle(-rot.x)); tab->EdRotX->setText(tmp); + sprintf(tmp, "%f", SMToAngle(rot.y)); tab->EdRotY->setText(tmp); + sprintf(tmp, "%f", SMToAngle(-rot.z)); tab->EdRotZ->setText(tmp); } } diff --git a/source/sxae/Editor.h b/source/sxae/Editor.h index af22a898929d0c30b121a35155315d5b5f0e8abc..5a9ff18f7cf7cb036a64be4cbbc28cb46a94e1aa 100644 --- a/source/sxae/Editor.h +++ b/source/sxae/Editor.h @@ -18,6 +18,8 @@ See the license in LICENSE #include "TabManager.h" +#include <skyxengine.h> + //#include <anim/ModelFile.h> #include <anim/animated.h> @@ -89,6 +91,8 @@ public: _In_ LPARAM lParam ); + HWND getRenderHWND(); + protected: void InitUI(); void DestroyUI(); @@ -109,7 +113,7 @@ protected: ISXGUIStatic* CurAnimName; - ISXGUIMenu * Menu; + ISXGUIMenuWindow * Menu; TabManager * m_pTM; diff --git a/source/sxae/EditorTab.cpp b/source/sxae/EditorTab.cpp index f06f57d9533b5aeec3cee1c2812dc3ff4b4619f5..5af314ff093f934318f921e6f3c8bf6a6decd77b 100644 --- a/source/sxae/EditorTab.cpp +++ b/source/sxae/EditorTab.cpp @@ -26,10 +26,10 @@ void EditorTab::Show() void EditorTab::Show(bool bShow) { - m_pRoot->Visible(bShow); + m_pRoot->setVisible(bShow); - m_pTabBtn->Enable(!bShow); - SendMessage(m_pTabBtn->GetHWND(), BM_SETCHECK, bShow ? BST_CHECKED : BST_UNCHECKED, 0); + m_pTabBtn->setEnable(!bShow); + SendMessage(m_pTabBtn->getHWND(), BM_SETCHECK, bShow ? BST_CHECKED : BST_UNCHECKED, 0); } LRESULT EditorTab::TabBtnHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -38,7 +38,7 @@ LRESULT EditorTab::TabBtnHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar { ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); //cmp->Enable(false); - EditorTab * tab = (EditorTab*)cmp->GetUserPtr(); + EditorTab * tab = (EditorTab*)cmp->getUserPtr(); tab->Show(); } return(0); diff --git a/source/sxae/TabActivities.cpp b/source/sxae/TabActivities.cpp index 2c14f5173870aabd4c5c2045243338a3fa6f4564..337c498ca919e7d72390ebae03ecd945bd593fdc 100644 --- a/source/sxae/TabActivities.cpp +++ b/source/sxae/TabActivities.cpp @@ -9,49 +9,49 @@ See the license in LICENSE TabActivities::TabActivities(TabManager * tm):EditorTab(tm) { - m_pTabBtn = SXGUICrButtonEx("Activities", 479, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pTabBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pTabBtn->GAlign = {false, true, true, false}; - m_pTabBtn->SetUserPtr(this); - m_pTabBtn->AddHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); - - m_pRoot = SXGUICrGroupBox("Activities", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pRoot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pRoot->SetColorText(0, 0, 0); - m_pRoot->SetColorTextBk(255, 255, 255); - m_pRoot->SetTransparentTextBk(true); - m_pRoot->SetColorBrush(255, 255, 255); - m_pRoot->GAlign = {0, 1, 1, 1}; - m_pRoot->SetUserPtr(this); - m_pRoot->AddHandler(OnCommand, WM_COMMAND); - - ActList = SXGUICrListBoxEx("", 6, 16, 1003, 122, 0, WS_CHILD | WS_VISIBLE | LBS_HASSTRINGS | WS_VSCROLL | WS_BORDER | LBS_NOTIFY/* | LBS_SORT*/, m_pRoot->GetHWND(), 0, IDC_LISTBOX); - ActList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - ActList->SetColorText(0, 0, 0); - ActList->SetColorTextBk(255, 255, 255); - ActList->SetTransparentTextBk(true); - ActList->SetColorBrush(255, 255, 255); - ActList->GAlign = {1, 1, 1, 1}; - - ActNewBtn = SXGUICrButton("New", 7, 140, 100, 20, 0, m_pRoot->GetHWND(), 0, 0); - ActNewBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - ActNewBtn->GAlign = {0, 1, 1, 0}; - ActNewBtn->AddHandler(AddBtnCB, WM_LBUTTONUP); - ActNewBtn->SetUserPtr(this); - - ActRenameBtn = SXGUICrButton("Rename", 110, 140, 100, 20, 0, m_pRoot->GetHWND(), 0, 0); - ActRenameBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - ActRenameBtn->GAlign = {0, 1, 1, 0}; - ActRenameBtn->AddHandler(RenBtnCB, WM_LBUTTONUP); - ActRenameBtn->SetUserPtr(this); - ActRenameBtn->Enable(0); - - ActRemoveBtn = SXGUICrButton("Remove", 213, 140, 100, 20, 0, m_pRoot->GetHWND(), 0, 0); - ActRemoveBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - ActRemoveBtn->GAlign = {0, 1, 1, 0}; - ActRemoveBtn->AddHandler(DelBtnCB, WM_LBUTTONUP); - ActRemoveBtn->SetUserPtr(this); - ActRemoveBtn->Enable(0); + m_pTabBtn = SXGUICrButtonEx("Activities", 479, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pTabBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pTabBtn->setFollowParentSides(false, true, true, false); + m_pTabBtn->setUserPtr(this); + m_pTabBtn->addHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); + + m_pRoot = SXGUICrGroupBox("Activities", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pRoot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pRoot->setColorText(RGB(0, 0, 0)); + m_pRoot->setColorTextBk(RGB(255, 255, 255)); + m_pRoot->setTransparentTextBk(true); + m_pRoot->setColorBrush(RGB(255, 255, 255)); + m_pRoot->setFollowParentSides(0, 1, 1, 1); + m_pRoot->setUserPtr(this); + m_pRoot->addHandler(OnCommand, WM_COMMAND); + + ActList = SXGUICrListBoxEx(6, 16, 1003, 122, 0, WS_CHILD | WS_VISIBLE | LBS_HASSTRINGS | WS_VSCROLL | WS_BORDER | LBS_NOTIFY/* | LBS_SORT*/, m_pRoot->getHWND(), 0, IDC_LISTBOX); + ActList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + ActList->setColorText(RGB(0, 0, 0)); + ActList->setColorTextBk(RGB(255, 255, 255)); + ActList->setTransparentTextBk(true); + ActList->setColorBrush(RGB(255, 255, 255)); + ActList->setFollowParentSides(1, 1, 1, 1); + + ActNewBtn = SXGUICrButton("New", 7, 140, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + ActNewBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + ActNewBtn->setFollowParentSides(0, 1, 1, 0); + ActNewBtn->addHandler(AddBtnCB, WM_LBUTTONUP); + ActNewBtn->setUserPtr(this); + + ActRenameBtn = SXGUICrButton("Rename", 110, 140, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + ActRenameBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + ActRenameBtn->setFollowParentSides(0, 1, 1, 0); + ActRenameBtn->addHandler(RenBtnCB, WM_LBUTTONUP); + ActRenameBtn->setUserPtr(this); + ActRenameBtn->setEnable(0); + + ActRemoveBtn = SXGUICrButton("Remove", 213, 140, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + ActRemoveBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + ActRemoveBtn->setFollowParentSides(0, 1, 1, 0); + ActRemoveBtn->addHandler(DelBtnCB, WM_LBUTTONUP); + ActRemoveBtn->setUserPtr(this); + ActRemoveBtn->setEnable(0); Show(false); @@ -71,35 +71,35 @@ TabActivities::~TabActivities() void TabActivities::RenderList() { - ActRenameBtn->Enable(0); - ActRemoveBtn->Enable(0); + ActRenameBtn->setEnable(0); + ActRemoveBtn->setEnable(0); UINT c = m_vItems.size(); ActivityItem * item; char tmpSN[MODEL_MAX_NAME + 32]; - int cur = ActList->GetSel(); + int cur = ActList->getSel(); if(cur < 0) { cur = 0; } - ActList->Clear(); + ActList->clear(); for(UINT i = 0; i < c; ++i) { item = &m_vItems[i]; sprintf(tmpSN, "[%c] %s", item->isImported ? 'I' : '_', item->act); //I|_, L|_ - ActList->AddItem(tmpSN); - ActList->SetItemData(ActList->GetCountItem() - 1, (LPARAM)i); + ActList->addItem(tmpSN); + ActList->setItemData(ActList->getItemCount() - 1, (LPARAM)i); } - ActList->SetSel(cur); + ActList->setSel(cur); - PostMessage(GetAncestor(m_pRoot->GetHWND(), GA_ROOTOWNER), EM_LOADACTIVITIES, 0, 0); + PostMessage(GetAncestor(m_pRoot->getHWND(), GA_ROOTOWNER), EM_LOADACTIVITIES, 0, 0); } LRESULT TabActivities::AddBtnCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - TabActivities * self = (TabActivities*)cmp->GetUserPtr(); + TabActivities * self = (TabActivities*)cmp->getUserPtr(); char out[MODEL_MAX_NAME]; int size = MODEL_MAX_NAME; @@ -127,12 +127,12 @@ LRESULT TabActivities::AddBtnCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara LRESULT TabActivities::DelBtnCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - TabActivities * self = (TabActivities*)cmp->GetUserPtr(); + TabActivities * self = (TabActivities*)cmp->getUserPtr(); if(Tools::DlgConfirm("Are you shure want to remove this item?", "Remove?")) { - int cur = self->ActList->GetSel(); - cur = self->ActList->GetItemData(cur); + int cur = self->ActList->getSel(); + cur = self->ActList->getItemData(cur); self->m_vItems.erase(cur); self->RenderList(); } @@ -143,10 +143,10 @@ LRESULT TabActivities::DelBtnCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara LRESULT TabActivities::RenBtnCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - TabActivities * self = (TabActivities*)cmp->GetUserPtr(); + TabActivities * self = (TabActivities*)cmp->getUserPtr(); - int cur = self->ActList->GetSel(); - cur = self->ActList->GetItemData(cur); + int cur = self->ActList->getSel(); + cur = self->ActList->getItemData(cur); ActivityItem * item = &self->m_vItems[cur]; char out[MODEL_MAX_NAME]; @@ -168,7 +168,7 @@ LRESULT TabActivities::RenBtnCB(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara LRESULT TabActivities::OnCommand(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIComponent * cmp = (ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA); - TabActivities * self = (TabActivities*)cmp->GetUserPtr(); + TabActivities * self = (TabActivities*)cmp->getUserPtr(); switch(LOWORD(wParam)) { @@ -177,11 +177,11 @@ LRESULT TabActivities::OnCommand(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar { case LBN_SELCHANGE: { - int sel = self->ActList->GetSel(); + int sel = self->ActList->getSel(); ActivityItem * item; - item = &self->m_vItems[self->ActList->GetItemData(sel)]; - self->ActRenameBtn->Enable(!item->isImported); - self->ActRemoveBtn->Enable(!item->isImported); + item = &self->m_vItems[self->ActList->getItemData(sel)]; + self->ActRenameBtn->setEnable(!item->isImported); + self->ActRemoveBtn->setEnable(!item->isImported); } break; } diff --git a/source/sxae/TabAnimation.cpp b/source/sxae/TabAnimation.cpp index 6e81dbe420d02ff69392bd226405aedccdd15544..49af5eda3dca782fa76d62344762bd4c2d29730d 100644 --- a/source/sxae/TabAnimation.cpp +++ b/source/sxae/TabAnimation.cpp @@ -8,147 +8,147 @@ See the license in LICENSE TabAnimation::TabAnimation(TabManager * tm):EditorTab(tm) { - m_pTabBtn = SXGUICrButtonEx("Animation", 579, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pTabBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pTabBtn->GAlign = {false, true, true, false}; - m_pTabBtn->SetUserPtr(this); - m_pTabBtn->AddHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); - - m_pRoot = SXGUICrGroupBox("Animation", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pRoot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pRoot->SetColorText(0, 0, 0); - m_pRoot->SetColorTextBk(255, 255, 255); - m_pRoot->SetTransparentTextBk(true); - m_pRoot->SetColorBrush(255, 255, 255); - m_pRoot->GAlign = {false, true, true, true}; - m_pRoot->AddHandler(Tools::ProxyCommandProc, WM_COMMAND); - - AnimCtlGB = SXGUICrGroupBox("Control", 6, 15, 500, 145, m_pRoot->GetHWND(), 0, 0); - AnimCtlGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimCtlGB->SetColorText(0, 0, 0); - AnimCtlGB->SetColorTextBk(255, 255, 255); - AnimCtlGB->SetTransparentTextBk(true); - AnimCtlGB->SetColorBrush(255, 255, 255); - AnimCtlGB->GAlign = {1, 1, 1, 0}; - AnimCtlGB->AddHandler(Tools::ProxyCommandProc, WM_COMMAND); - - Static7 = SXGUICrStatic("Progress:", 7, 15, 52, 20, AnimCtlGB->GetHWND(), 0, 0); - Static7->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static7->SetColorText(0, 0, 0); - Static7->SetColorTextBk(255, 255, 255); - Static7->SetTransparentTextBk(true); - Static7->SetColorBrush(255, 255, 255); - Static7->GAlign = {1, 1, 0, 0}; - - AnimCtlProgress = SXGUICrEdit("Progress", 65, 15, 100, 20, AnimCtlGB->GetHWND(), 0, IDC_ANIM_PROGRESS); - AnimCtlProgress->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimCtlProgress->SetColorText(0, 0, 0); - AnimCtlProgress->SetColorTextBk(255, 255, 255); - AnimCtlProgress->SetTransparentTextBk(true); - AnimCtlProgress->SetColorBrush(255, 255, 255); - AnimCtlProgress->GAlign = {1, 1, 0, 0}; - AnimCtlProgress->ModifyStyle(0, 0); - - AnimCtlPlayBtn = SXGUICrButton("Play", 178, 15, 61, 20, 0, AnimCtlGB->GetHWND(), 0, IDC_ANIM_PLAY); - AnimCtlPlayBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimCtlPlayBtn->GAlign = {1, 1, 0, 0}; - AnimCtlPlayBtn->Enable(0); + m_pTabBtn = SXGUICrButtonEx("Animation", 579, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pTabBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pTabBtn->setFollowParentSides(false, true, true, false); + m_pTabBtn->setUserPtr(this); + m_pTabBtn->addHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); + + m_pRoot = SXGUICrGroupBox("Animation", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pRoot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pRoot->setColorText(RGB(0, 0, 0)); + m_pRoot->setColorTextBk(RGB(255, 255, 255)); + m_pRoot->setTransparentTextBk(true); + m_pRoot->setColorBrush(RGB(255, 255, 255)); + m_pRoot->setFollowParentSides(false, true, true, true); + m_pRoot->addHandler(Tools::ProxyCommandProc, WM_COMMAND); + + AnimCtlGB = SXGUICrGroupBox("Control", 6, 15, 500, 145, m_pRoot->getHWND(), 0, 0); + AnimCtlGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimCtlGB->setColorText(RGB(0, 0, 0)); + AnimCtlGB->setColorTextBk(RGB(255, 255, 255)); + AnimCtlGB->setTransparentTextBk(true); + AnimCtlGB->setColorBrush(RGB(255, 255, 255)); + AnimCtlGB->setFollowParentSides(1, 1, 1, 0); + AnimCtlGB->addHandler(Tools::ProxyCommandProc, WM_COMMAND); + + Static7 = SXGUICrStatic("Progress:", 7, 15, 52, 20, AnimCtlGB->getHWND(), 0, 0); + Static7->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static7->setColorText(RGB(0, 0, 0)); + Static7->setColorTextBk(RGB(255, 255, 255)); + Static7->setTransparentTextBk(true); + Static7->setColorBrush(RGB(255, 255, 255)); + Static7->setFollowParentSides(1, 1, 0, 0); + + AnimCtlProgress = SXGUICrEdit("Progress", 65, 15, 100, 20, AnimCtlGB->getHWND(), 0, IDC_ANIM_PROGRESS); + AnimCtlProgress->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimCtlProgress->setColorText(RGB(0, 0, 0)); + AnimCtlProgress->setColorTextBk(RGB(255, 255, 255)); + AnimCtlProgress->setTransparentTextBk(true); + AnimCtlProgress->setColorBrush(RGB(255, 255, 255)); + AnimCtlProgress->setFollowParentSides(1, 1, 0, 0); + AnimCtlProgress->modifyStyle(0, 0); + + AnimCtlPlayBtn = SXGUICrButton("Play", 178, 15, 61, 20, SXGUI_BUTTON_IMAGE_NONE, AnimCtlGB->getHWND(), 0, IDC_ANIM_PLAY); + AnimCtlPlayBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimCtlPlayBtn->setFollowParentSides(1, 1, 0, 0); + AnimCtlPlayBtn->setEnable(0); - AnimCtlPauseBtn = SXGUICrButton("Pause", 240, 15, 59, 20, 0, AnimCtlGB->GetHWND(), 0, IDC_ANIM_PAUSE); - AnimCtlPauseBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimCtlPauseBtn->GAlign = {1, 1, 0, 0}; - AnimCtlPauseBtn->Enable(0); - - AnimCtlProgressTrack = SXGUICrTrackBar("", 6, 43, 489, 20, AnimCtlGB->GetHWND(), 0, IDC_ANIM_TB); - AnimCtlProgressTrack->GAlign = {1, 1, 0, 0}; - AnimCtlProgressTrack->SetMinMax(0, 1000); - AnimCtlProgressTrack->SetTickFrequency(0); - AnimCtlProgressTrack->SetTick(500); - - AnimPropsGB = SXGUICrGroupBox("Props", 509, 15, 500, 145, m_pRoot->GetHWND(), 0, 0); - AnimPropsGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimPropsGB->SetColorText(0, 0, 0); - AnimPropsGB->SetColorTextBk(255, 255, 255); - AnimPropsGB->SetTransparentTextBk(true); - AnimPropsGB->SetColorBrush(255, 255, 255); - AnimPropsGB->GAlign = {1, 1, 1, 1}; - AnimPropsGB->AddHandler(Tools::ProxyCommandProc, WM_COMMAND); - - AnimPropLoopCB = SXGUICrCheckBox("Loop animation", 10, 88, 100, 20, AnimPropsGB->GetHWND(), 0, IDC_ANIM_LOOPED, false); - AnimPropLoopCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimPropLoopCB->SetColorText(0, 0, 0); - AnimPropLoopCB->SetColorTextBk(255, 255, 255); - AnimPropLoopCB->SetTransparentTextBk(true); - AnimPropLoopCB->SetColorBrush(255, 255, 255); - AnimPropLoopCB->GAlign = {1, 1, 0, 0}; - AnimPropLoopCB->ModifyStyle(BS_NOTIFY, 0); - - Static8 = SXGUICrStatic("Activity", 10, 42, 43, 20, AnimPropsGB->GetHWND(), 0, 0); - Static8->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static8->SetColorText(0, 0, 0); - Static8->SetColorTextBk(255, 255, 255); - Static8->SetTransparentTextBk(true); - Static8->SetColorBrush(255, 255, 255); - Static8->GAlign = {1, 1, 0, 0}; - - AnimPropSpeed = SXGUICrEdit("Speed", 54, 65, 246, 20, AnimPropsGB->GetHWND(), 0, IDC_ANIM_SPEED); - AnimPropSpeed->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimPropSpeed->SetColorText(0, 0, 0); - AnimPropSpeed->SetColorTextBk(255, 255, 255); - AnimPropSpeed->SetTransparentTextBk(true); - AnimPropSpeed->SetColorBrush(255, 255, 255); - AnimPropSpeed->GAlign = {1, 1, 0, 0}; - - AnimPropSpeedSpin = SXGUICrUpDownEx(283, 65, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, AnimPropsGB->GetHWND(), 0, 0, AnimPropSpeed->GetHWND()); - AnimPropSpeedSpin->GAlign = {1, 1, 0, 0}; - - Static9 = SXGUICrStatic("Name", 10, 19, 43, 20, AnimPropsGB->GetHWND(), 0, 0); - Static9->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static9->SetColorText(0, 0, 0); - Static9->SetColorTextBk(255, 255, 255); - Static9->SetTransparentTextBk(true); - Static9->SetColorBrush(255, 255, 255); - Static9->GAlign = {1, 1, 0, 0}; - - AnimPropName = SXGUICrEdit("Name", 54, 19, 246, 20, AnimPropsGB->GetHWND(), 0, IDC_ANIM_NAME); - AnimPropName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimPropName->SetColorText(0, 0, 0); - AnimPropName->SetColorTextBk(255, 255, 255); - AnimPropName->SetTransparentTextBk(true); - AnimPropName->SetColorBrush(255, 255, 255); - AnimPropName->GAlign = {1, 1, 0, 0}; - - Static10 = SXGUICrStatic("Speed", 10, 65, 43, 20, AnimPropsGB->GetHWND(), 0, 0); - Static10->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static10->SetColorText(0, 0, 0); - Static10->SetColorTextBk(255, 255, 255); - Static10->SetTransparentTextBk(true); - Static10->SetColorBrush(255, 255, 255); - Static10->GAlign = {1, 1, 0, 0}; - - AnimPropActCmb = SXGUICrComboBoxEx("", 54, 42, 123, 210, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, AnimPropsGB->GetHWND(), 0, IDC_ANIM_ACT_NAME); - AnimPropActCmb->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimPropActCmb->SetColorText(0, 0, 0); - AnimPropActCmb->SetColorTextBk(255, 255, 255); - AnimPropActCmb->SetTransparentTextBk(true); - AnimPropActCmb->SetColorBrush(255, 255, 255); - AnimPropActCmb->GAlign = {1, 1, 0, 0}; - - Static11 = SXGUICrStatic("Chance", 184, 42, 44, 20, AnimPropsGB->GetHWND(), 0, 0); - Static11->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static11->SetColorText(0, 0, 0); - Static11->SetColorTextBk(255, 255, 255); - Static11->SetTransparentTextBk(true); - Static11->SetColorBrush(255, 255, 255); - Static11->GAlign = {1, 1, 0, 0}; - - AnimPropActChance = SXGUICrEdit("Chance", 229, 42, 71, 20, AnimPropsGB->GetHWND(), 0, IDC_ANIM_ACT_CNANCE); - AnimPropActChance->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AnimPropActChance->SetColorText(0, 0, 0); - AnimPropActChance->SetColorTextBk(255, 255, 255); - AnimPropActChance->SetTransparentTextBk(true); - AnimPropActChance->SetColorBrush(255, 255, 255); - AnimPropActChance->GAlign = {1, 1, 0, 0}; + AnimCtlPauseBtn = SXGUICrButton("Pause", 240, 15, 59, 20, SXGUI_BUTTON_IMAGE_NONE, AnimCtlGB->getHWND(), 0, IDC_ANIM_PAUSE); + AnimCtlPauseBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimCtlPauseBtn->setFollowParentSides(1, 1, 0, 0); + AnimCtlPauseBtn->setEnable(0); + + AnimCtlProgressTrack = SXGUICrTrackBar("", 6, 43, 489, 20, AnimCtlGB->getHWND(), 0, IDC_ANIM_TB); + AnimCtlProgressTrack->setFollowParentSides(1, 1, 0, 0); + AnimCtlProgressTrack->setMinMax(0, 1000); + AnimCtlProgressTrack->setTickFrequency(0); + AnimCtlProgressTrack->setTick(500); + + AnimPropsGB = SXGUICrGroupBox("Props", 509, 15, 500, 145, m_pRoot->getHWND(), 0, 0); + AnimPropsGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimPropsGB->setColorText(RGB(0, 0, 0)); + AnimPropsGB->setColorTextBk(RGB(255, 255, 255)); + AnimPropsGB->setTransparentTextBk(true); + AnimPropsGB->setColorBrush(RGB(255, 255, 255)); + AnimPropsGB->setFollowParentSides(1, 1, 1, 1); + AnimPropsGB->addHandler(Tools::ProxyCommandProc, WM_COMMAND); + + AnimPropLoopCB = SXGUICrCheckBox("Loop animation", 10, 88, 100, 20, AnimPropsGB->getHWND(), 0, IDC_ANIM_LOOPED, false); + AnimPropLoopCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimPropLoopCB->setColorText(RGB(0, 0, 0)); + AnimPropLoopCB->setColorTextBk(RGB(255, 255, 255)); + AnimPropLoopCB->setTransparentTextBk(true); + AnimPropLoopCB->setColorBrush(RGB(255, 255, 255)); + AnimPropLoopCB->setFollowParentSides(1, 1, 0, 0); + AnimPropLoopCB->modifyStyle(BS_NOTIFY, 0); + + Static8 = SXGUICrStatic("Activity", 10, 42, 43, 20, AnimPropsGB->getHWND(), 0, 0); + Static8->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static8->setColorText(RGB(0, 0, 0)); + Static8->setColorTextBk(RGB(255, 255, 255)); + Static8->setTransparentTextBk(true); + Static8->setColorBrush(RGB(255, 255, 255)); + Static8->setFollowParentSides(1, 1, 0, 0); + + AnimPropSpeed = SXGUICrEdit("Speed", 54, 65, 246, 20, AnimPropsGB->getHWND(), 0, IDC_ANIM_SPEED); + AnimPropSpeed->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimPropSpeed->setColorText(RGB(0, 0, 0)); + AnimPropSpeed->setColorTextBk(RGB(255, 255, 255)); + AnimPropSpeed->setTransparentTextBk(true); + AnimPropSpeed->setColorBrush(RGB(255, 255, 255)); + AnimPropSpeed->setFollowParentSides(1, 1, 0, 0); + + AnimPropSpeedSpin = SXGUICrUpDownEx(283, 65, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, AnimPropsGB->getHWND(), 0, 0, AnimPropSpeed->getHWND()); + AnimPropSpeedSpin->setFollowParentSides(1, 1, 0, 0); + + Static9 = SXGUICrStatic("Name", 10, 19, 43, 20, AnimPropsGB->getHWND(), 0, 0); + Static9->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static9->setColorText(RGB(0, 0, 0)); + Static9->setColorTextBk(RGB(255, 255, 255)); + Static9->setTransparentTextBk(true); + Static9->setColorBrush(RGB(255, 255, 255)); + Static9->setFollowParentSides(1, 1, 0, 0); + + AnimPropName = SXGUICrEdit("Name", 54, 19, 246, 20, AnimPropsGB->getHWND(), 0, IDC_ANIM_NAME); + AnimPropName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimPropName->setColorText(RGB(0, 0, 0)); + AnimPropName->setColorTextBk(RGB(255, 255, 255)); + AnimPropName->setTransparentTextBk(true); + AnimPropName->setColorBrush(RGB(255, 255, 255)); + AnimPropName->setFollowParentSides(1, 1, 0, 0); + + Static10 = SXGUICrStatic("Speed", 10, 65, 43, 20, AnimPropsGB->getHWND(), 0, 0); + Static10->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static10->setColorText(RGB(0, 0, 0)); + Static10->setColorTextBk(RGB(255, 255, 255)); + Static10->setTransparentTextBk(true); + Static10->setColorBrush(RGB(255, 255, 255)); + Static10->setFollowParentSides(1, 1, 0, 0); + + AnimPropActCmb = SXGUICrComboBoxEx(54, 42, 123, 210, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, AnimPropsGB->getHWND(), 0, IDC_ANIM_ACT_NAME); + AnimPropActCmb->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimPropActCmb->setColorText(RGB(0, 0, 0)); + AnimPropActCmb->setColorTextBk(RGB(255, 255, 255)); + AnimPropActCmb->setTransparentTextBk(true); + AnimPropActCmb->setColorBrush(RGB(255, 255, 255)); + AnimPropActCmb->setFollowParentSides(1, 1, 0, 0); + + Static11 = SXGUICrStatic("Chance", 184, 42, 44, 20, AnimPropsGB->getHWND(), 0, 0); + Static11->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static11->setColorText(RGB(0, 0, 0)); + Static11->setColorTextBk(RGB(255, 255, 255)); + Static11->setTransparentTextBk(true); + Static11->setColorBrush(RGB(255, 255, 255)); + Static11->setFollowParentSides(1, 1, 0, 0); + + AnimPropActChance = SXGUICrEdit("Chance", 229, 42, 71, 20, AnimPropsGB->getHWND(), 0, IDC_ANIM_ACT_CNANCE); + AnimPropActChance->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AnimPropActChance->setColorText(RGB(0, 0, 0)); + AnimPropActChance->setColorTextBk(RGB(255, 255, 255)); + AnimPropActChance->setTransparentTextBk(true); + AnimPropActChance->setColorBrush(RGB(255, 255, 255)); + AnimPropActChance->setFollowParentSides(1, 1, 0, 0); Show(false); diff --git a/source/sxae/TabAttachments.cpp b/source/sxae/TabAttachments.cpp index dea3e7e8a6ad34c91764cb7c51b32c025ce96924..55b8c027de6f2a4f04acc7fd440ae1e4e6abcd11 100644 --- a/source/sxae/TabAttachments.cpp +++ b/source/sxae/TabAttachments.cpp @@ -8,151 +8,151 @@ See the license in LICENSE TabAttachments::TabAttachments(TabManager * tm):EditorTab(tm) { - m_pTabBtn = SXGUICrButtonEx("Attachments", 279, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pTabBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pTabBtn->GAlign = {false, true, true, false}; - m_pTabBtn->SetUserPtr(this); - m_pTabBtn->AddHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); - - m_pRoot = SXGUICrGroupBox("Attachments", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pRoot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pRoot->SetColorText(0, 0, 0); - m_pRoot->SetColorTextBk(255, 255, 255); - m_pRoot->SetTransparentTextBk(true); - m_pRoot->SetColorBrush(255, 255, 255); - m_pRoot->GAlign = {false, true, true, true}; - m_pRoot->AddHandler(Tools::ProxyCommandProc, WM_COMMAND); - - AttachmentsList = SXGUICrListBoxEx("", 10, 15, 312, 127, 0, WS_CHILD | WS_VISIBLE | LBS_HASSTRINGS | WS_VSCROLL | WS_BORDER | LBS_NOTIFY/* | LBS_SORT*/, m_pRoot->GetHWND(), 0, IDC_PT_LB); - AttachmentsList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachmentsList->SetColorText(0, 0, 0); - AttachmentsList->SetColorTextBk(255, 255, 255); - AttachmentsList->SetTransparentTextBk(true); - AttachmentsList->SetColorBrush(255, 255, 255); - AttachmentsList->GAlign = {true, true, true, false}; - - AttachNew = SXGUICrButton("New", 11, 144, 100, 20, 0, m_pRoot->GetHWND(), 0, IDC_PT_ADD); - AttachNew->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachNew->GAlign = {true, true, true, false}; - - AttachRename = SXGUICrButton("Rename", 116, 144, 100, 20, 0, m_pRoot->GetHWND(), 0, IDC_PT_REN); - AttachRename->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachRename->GAlign = {true, true, true, false}; - - AttachRemove = SXGUICrButton("Remove", 220, 144, 100, 20, 0, m_pRoot->GetHWND(), 0, IDC_PT_DEL); - AttachRemove->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachRemove->GAlign = {true, true, true, false}; - - AttachPropsGB = SXGUICrGroupBox("Props", 331, 14, 677, 144, m_pRoot->GetHWND(), 0, 0); - AttachPropsGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachPropsGB->SetColorText(0, 0, 0); - AttachPropsGB->SetColorTextBk(255, 255, 255); - AttachPropsGB->SetTransparentTextBk(true); - AttachPropsGB->SetColorBrush(255, 255, 255); - AttachPropsGB->GAlign = {false, true, true, true}; - AttachPropsGB->AddHandler(Tools::ProxyCommandProc, WM_COMMAND); - - AttachBoneRB = SXGUICrRadioButton("Bone attachment", 17, 19, 100, 20, AttachPropsGB->GetHWND(), 0, IDC_ATTACH_RB_BONE); - AttachBoneRB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachBoneRB->SetColorText(0, 0, 0); - AttachBoneRB->SetColorTextBk(255, 255, 255); - AttachBoneRB->SetTransparentTextBk(true); - AttachBoneRB->SetColorBrush(255, 255, 255); - AttachBoneRB->GAlign = {true, true, true, false}; - - AttachSkinRB = SXGUICrRadioButton("Skin attachment", 17, 39, 100, 20, AttachPropsGB->GetHWND(), 0, IDC_ATTACH_RB_SKIN); - AttachSkinRB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachSkinRB->SetColorText(0, 0, 0); - AttachSkinRB->SetColorTextBk(255, 255, 255); - AttachSkinRB->SetTransparentTextBk(true); - AttachSkinRB->SetColorBrush(255, 255, 255); - AttachSkinRB->GAlign = {true, true, true, false}; - - AttachHideCB = SXGUICrCheckBox("Hide", 17, 62, 100, 20, AttachPropsGB->GetHWND(), 0, IDC_PT_CB_HIDDEN, false); - AttachHideCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachHideCB->SetColorText(0, 0, 0); - AttachHideCB->SetColorTextBk(255, 255, 255); - AttachHideCB->SetTransparentTextBk(true); - AttachHideCB->SetColorBrush(255, 255, 255); - AttachHideCB->GAlign = {true, true, true, false}; - - AttachEnaCollisionCB = SXGUICrCheckBox("Enable collisions", 17, 82, 100, 20, AttachPropsGB->GetHWND(), 0, IDC_PT_CB_COLLIDE, false); - AttachEnaCollisionCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachEnaCollisionCB->SetColorText(0, 0, 0); - AttachEnaCollisionCB->SetColorTextBk(255, 255, 255); - AttachEnaCollisionCB->SetTransparentTextBk(true); - AttachEnaCollisionCB->SetColorBrush(255, 255, 255); - AttachEnaCollisionCB->GAlign = {true, true, true, false}; - - AttachEnaRaytraceCB = SXGUICrCheckBox("Enable raytrace", 17, 102, 100, 20, AttachPropsGB->GetHWND(), 0, IDC_PT_CB_RAYTRACE, false); - AttachEnaRaytraceCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachEnaRaytraceCB->SetColorText(0, 0, 0); - AttachEnaRaytraceCB->SetColorTextBk(255, 255, 255); - AttachEnaRaytraceCB->SetTransparentTextBk(true); - AttachEnaRaytraceCB->SetColorBrush(255, 255, 255); - AttachEnaRaytraceCB->GAlign = {true, true, true, false}; - - AttachBone = SXGUICrComboBoxEx("", 141, 18, 350, 350, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, AttachPropsGB->GetHWND(), 0, 0); - AttachBone->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachBone->SetColorText(0, 0, 0); - AttachBone->SetColorTextBk(255, 255, 255); - AttachBone->SetTransparentTextBk(true); - AttachBone->SetColorBrush(255, 255, 255); - AttachBone->GAlign = {true, true, true, false}; - AttachBone->Enable(0); - - AttachXshift = SXGUICrEdit("x-shift", 143, 42, 90, 20, AttachPropsGB->GetHWND(), 0, 0); - AttachXshift->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachXshift->SetColorText(0, 0, 0); - AttachXshift->SetColorTextBk(255, 255, 255); - AttachXshift->SetTransparentTextBk(true); - AttachXshift->SetColorBrush(255, 255, 255); - AttachXshift->GAlign = {true, true, true, false}; - AttachXshiftSpin = SXGUICrUpDown(233, 42, 17, 20, AttachPropsGB->GetHWND(), 0, 0, 0, 0); - AttachXshiftSpin->GAlign = {true, true, true, false}; - AttachYshift = SXGUICrEdit("y-shift", 270, 42, 87, 20, AttachPropsGB->GetHWND(), 0, 0); - AttachYshift->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachYshift->SetColorText(0, 0, 0); - AttachYshift->SetColorTextBk(255, 255, 255); - AttachYshift->SetTransparentTextBk(true); - AttachYshift->SetColorBrush(255, 255, 255); - AttachYshift->GAlign = {true, true, true, false}; - AttachYshiftSpin = SXGUICrUpDown(357, 42, 17, 20, AttachPropsGB->GetHWND(), 0, 0, 0, 0); - AttachYshiftSpin->GAlign = {true, true, true, false}; - AttachZshift = SXGUICrEdit("z-shift", 392, 42, 81, 20, AttachPropsGB->GetHWND(), 0, 0); - AttachZshift->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachZshift->SetColorText(0, 0, 0); - AttachZshift->SetColorTextBk(255, 255, 255); - AttachZshift->SetTransparentTextBk(true); - AttachZshift->SetColorBrush(255, 255, 255); - AttachZshift->GAlign = {true, true, true, false}; - AttachZshiftSpin = SXGUICrUpDown(473, 42, 17, 20, AttachPropsGB->GetHWND(), 0, 0, 0, 0); - AttachZshiftSpin->GAlign = {true, true, true, false}; - - Static5 = SXGUICrStatic("File", 142, 80, 38, 20, AttachPropsGB->GetHWND(), 0, 0); - Static5->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static5->SetColorText(0, 0, 0); - Static5->SetColorTextBk(255, 255, 255); - Static5->SetTransparentTextBk(true); - Static5->SetColorBrush(255, 255, 255); - Static5->GAlign = {true, true, true, false}; - - AttachFileField = SXGUICrEdit("file", 182, 80, 279, 20, AttachPropsGB->GetHWND(), 0, 0); - AttachFileField->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachFileField->SetColorText(0, 0, 0); - AttachFileField->SetColorTextBk(255, 255, 255); - AttachFileField->SetTransparentTextBk(true); - AttachFileField->SetColorBrush(255, 255, 255); - AttachFileField->GAlign = {true, true, true, false}; - SendMessage(AttachFileField->GetHWND(), EM_SETREADONLY, TRUE, NULL); - - AttachFileBrowse = SXGUICrButton("...", 464, 80, 27, 20, 0, AttachPropsGB->GetHWND(), 0, IDC_PT_BROWSE); - AttachFileBrowse->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachFileBrowse->GAlign = {true, true, true, false}; - - AttachFileApply = SXGUICrButton("Apply", 364, 102, 127, 20, 0, AttachPropsGB->GetHWND(), 0, IDC_PT_APPLY); - AttachFileApply->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - AttachFileApply->GAlign = {true, false, true, true}; + m_pTabBtn = SXGUICrButtonEx("Attachments", 279, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pTabBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pTabBtn->setFollowParentSides(false, true, true, false); + m_pTabBtn->setUserPtr(this); + m_pTabBtn->addHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); + + m_pRoot = SXGUICrGroupBox("Attachments", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pRoot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pRoot->setColorText(RGB(0, 0, 0)); + m_pRoot->setColorTextBk(RGB(255, 255, 255)); + m_pRoot->setTransparentTextBk(true); + m_pRoot->setColorBrush(RGB(255, 255, 255)); + m_pRoot->setFollowParentSides(false, true, true, true); + m_pRoot->addHandler(Tools::ProxyCommandProc, WM_COMMAND); + + AttachmentsList = SXGUICrListBoxEx(10, 15, 312, 127, 0, WS_CHILD | WS_VISIBLE | LBS_HASSTRINGS | WS_VSCROLL | WS_BORDER | LBS_NOTIFY/* | LBS_SORT*/, m_pRoot->getHWND(), 0, IDC_PT_LB); + AttachmentsList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachmentsList->setColorText(RGB(0, 0, 0)); + AttachmentsList->setColorTextBk(RGB(255, 255, 255)); + AttachmentsList->setTransparentTextBk(true); + AttachmentsList->setColorBrush(RGB(255, 255, 255)); + AttachmentsList->setFollowParentSides(true, true, true, false); + + AttachNew = SXGUICrButton("New", 11, 144, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, IDC_PT_ADD); + AttachNew->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachNew->setFollowParentSides(true, true, true, false); + + AttachRename = SXGUICrButton("Rename", 116, 144, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, IDC_PT_REN); + AttachRename->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachRename->setFollowParentSides(true, true, true, false); + + AttachRemove = SXGUICrButton("Remove", 220, 144, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, IDC_PT_DEL); + AttachRemove->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachRemove->setFollowParentSides(true, true, true, false); + + AttachPropsGB = SXGUICrGroupBox("Props", 331, 14, 677, 144, m_pRoot->getHWND(), 0, 0); + AttachPropsGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachPropsGB->setColorText(RGB(0, 0, 0)); + AttachPropsGB->setColorTextBk(RGB(255, 255, 255)); + AttachPropsGB->setTransparentTextBk(true); + AttachPropsGB->setColorBrush(RGB(255, 255, 255)); + AttachPropsGB->setFollowParentSides(false, true, true, true); + AttachPropsGB->addHandler(Tools::ProxyCommandProc, WM_COMMAND); + + AttachBoneRB = SXGUICrRadioButton("Bone attachment", 17, 19, 100, 20, AttachPropsGB->getHWND(), 0, IDC_ATTACH_RB_BONE); + AttachBoneRB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachBoneRB->setColorText(RGB(0, 0, 0)); + AttachBoneRB->setColorTextBk(RGB(255, 255, 255)); + AttachBoneRB->setTransparentTextBk(true); + AttachBoneRB->setColorBrush(RGB(255, 255, 255)); + AttachBoneRB->setFollowParentSides(true, true, true, false); + + AttachSkinRB = SXGUICrRadioButton("Skin attachment", 17, 39, 100, 20, AttachPropsGB->getHWND(), 0, IDC_ATTACH_RB_SKIN); + AttachSkinRB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachSkinRB->setColorText(RGB(0, 0, 0)); + AttachSkinRB->setColorTextBk(RGB(255, 255, 255)); + AttachSkinRB->setTransparentTextBk(true); + AttachSkinRB->setColorBrush(RGB(255, 255, 255)); + AttachSkinRB->setFollowParentSides(true, true, true, false); + + AttachHideCB = SXGUICrCheckBox("Hide", 17, 62, 100, 20, AttachPropsGB->getHWND(), 0, IDC_PT_CB_HIDDEN, false); + AttachHideCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachHideCB->setColorText(RGB(0, 0, 0)); + AttachHideCB->setColorTextBk(RGB(255, 255, 255)); + AttachHideCB->setTransparentTextBk(true); + AttachHideCB->setColorBrush(RGB(255, 255, 255)); + AttachHideCB->setFollowParentSides(true, true, true, false); + + AttachEnaCollisionCB = SXGUICrCheckBox("Enable collisions", 17, 82, 100, 20, AttachPropsGB->getHWND(), 0, IDC_PT_CB_COLLIDE, false); + AttachEnaCollisionCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachEnaCollisionCB->setColorText(RGB(0, 0, 0)); + AttachEnaCollisionCB->setColorTextBk(RGB(255, 255, 255)); + AttachEnaCollisionCB->setTransparentTextBk(true); + AttachEnaCollisionCB->setColorBrush(RGB(255, 255, 255)); + AttachEnaCollisionCB->setFollowParentSides(true, true, true, false); + + AttachEnaRaytraceCB = SXGUICrCheckBox("Enable raytrace", 17, 102, 100, 20, AttachPropsGB->getHWND(), 0, IDC_PT_CB_RAYTRACE, false); + AttachEnaRaytraceCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachEnaRaytraceCB->setColorText(RGB(0, 0, 0)); + AttachEnaRaytraceCB->setColorTextBk(RGB(255, 255, 255)); + AttachEnaRaytraceCB->setTransparentTextBk(true); + AttachEnaRaytraceCB->setColorBrush(RGB(255, 255, 255)); + AttachEnaRaytraceCB->setFollowParentSides(true, true, true, false); + + AttachBone = SXGUICrComboBoxEx(141, 18, 350, 350, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, AttachPropsGB->getHWND(), 0, 0); + AttachBone->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachBone->setColorText(RGB(0, 0, 0)); + AttachBone->setColorTextBk(RGB(255, 255, 255)); + AttachBone->setTransparentTextBk(true); + AttachBone->setColorBrush(RGB(255, 255, 255)); + AttachBone->setFollowParentSides(true, true, true, false); + AttachBone->setEnable(0); + + AttachXshift = SXGUICrEdit("x-shift", 143, 42, 90, 20, AttachPropsGB->getHWND(), 0, 0); + AttachXshift->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachXshift->setColorText(RGB(0, 0, 0)); + AttachXshift->setColorTextBk(RGB(255, 255, 255)); + AttachXshift->setTransparentTextBk(true); + AttachXshift->setColorBrush(RGB(255, 255, 255)); + AttachXshift->setFollowParentSides(true, true, true, false); + AttachXshiftSpin = SXGUICrUpDown(233, 42, 17, 20, AttachPropsGB->getHWND(), 0, 0, 0, 0); + AttachXshiftSpin->setFollowParentSides(true, true, true, false); + AttachYshift = SXGUICrEdit("y-shift", 270, 42, 87, 20, AttachPropsGB->getHWND(), 0, 0); + AttachYshift->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachYshift->setColorText(RGB(0, 0, 0)); + AttachYshift->setColorTextBk(RGB(255, 255, 255)); + AttachYshift->setTransparentTextBk(true); + AttachYshift->setColorBrush(RGB(255, 255, 255)); + AttachYshift->setFollowParentSides(true, true, true, false); + AttachYshiftSpin = SXGUICrUpDown(357, 42, 17, 20, AttachPropsGB->getHWND(), 0, 0, 0, 0); + AttachYshiftSpin->setFollowParentSides(true, true, true, false); + AttachZshift = SXGUICrEdit("z-shift", 392, 42, 81, 20, AttachPropsGB->getHWND(), 0, 0); + AttachZshift->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachZshift->setColorText(RGB(0, 0, 0)); + AttachZshift->setColorTextBk(RGB(255, 255, 255)); + AttachZshift->setTransparentTextBk(true); + AttachZshift->setColorBrush(RGB(255, 255, 255)); + AttachZshift->setFollowParentSides(true, true, true, false); + AttachZshiftSpin = SXGUICrUpDown(473, 42, 17, 20, AttachPropsGB->getHWND(), 0, 0, 0, 0); + AttachZshiftSpin->setFollowParentSides(true, true, true, false); + + Static5 = SXGUICrStatic("File", 142, 80, 38, 20, AttachPropsGB->getHWND(), 0, 0); + Static5->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static5->setColorText(RGB(0, 0, 0)); + Static5->setColorTextBk(RGB(255, 255, 255)); + Static5->setTransparentTextBk(true); + Static5->setColorBrush(RGB(255, 255, 255)); + Static5->setFollowParentSides(true, true, true, false); + + AttachFileField = SXGUICrEdit("file", 182, 80, 279, 20, AttachPropsGB->getHWND(), 0, 0); + AttachFileField->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachFileField->setColorText(RGB(0, 0, 0)); + AttachFileField->setColorTextBk(RGB(255, 255, 255)); + AttachFileField->setTransparentTextBk(true); + AttachFileField->setColorBrush(RGB(255, 255, 255)); + AttachFileField->setFollowParentSides(true, true, true, false); + SendMessage(AttachFileField->getHWND(), EM_SETREADONLY, TRUE, NULL); + + AttachFileBrowse = SXGUICrButton("...", 464, 80, 27, 20, SXGUI_BUTTON_IMAGE_NONE, AttachPropsGB->getHWND(), 0, IDC_PT_BROWSE); + AttachFileBrowse->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachFileBrowse->setFollowParentSides(true, true, true, false); + + AttachFileApply = SXGUICrButton("Apply", 364, 102, 127, 20, SXGUI_BUTTON_IMAGE_NONE, AttachPropsGB->getHWND(), 0, IDC_PT_APPLY); + AttachFileApply->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + AttachFileApply->setFollowParentSides(true, false, true, true); Show(false); } diff --git a/source/sxae/TabControllers.cpp b/source/sxae/TabControllers.cpp index 9b9db41cb779ce664a43761a53eeed71c870e86d..e8ff876c0d5b43a47b5611fe85fdd12fbe6a9b63 100644 --- a/source/sxae/TabControllers.cpp +++ b/source/sxae/TabControllers.cpp @@ -8,340 +8,340 @@ See the license in LICENSE TabControllers::TabControllers(TabManager * tm):EditorTab(tm) { - m_pTabBtn = SXGUICrButtonEx("Controllers", 679, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pTabBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pTabBtn->GAlign = {false, true, true, false}; - m_pTabBtn->SetUserPtr(this); - m_pTabBtn->AddHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); - - m_pRoot = SXGUICrGroupBox("Controllers", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pRoot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pRoot->SetColorText(0, 0, 0); - m_pRoot->SetColorTextBk(255, 255, 255); - m_pRoot->SetTransparentTextBk(true); - m_pRoot->SetColorBrush(255, 255, 255); - m_pRoot->GAlign = {0, 1, 1, 1}; - - CtlsList = SXGUICrListBox("", 8, 16, 150, 145, m_pRoot->GetHWND(), 0, 0, false); - CtlsList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsList->SetColorText(0, 0, 0); - CtlsList->SetColorTextBk(255, 255, 255); - CtlsList->SetTransparentTextBk(true); - CtlsList->SetColorBrush(255, 255, 255); - CtlsList->GAlign = {1, 1, 1, 0}; - - CtlsNewBtn = SXGUICrButton("New", 8, 143, 50, 20, 0, m_pRoot->GetHWND(), 0, 0); - CtlsNewBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsNewBtn->GAlign = {0, 1, 1, 0}; - - CtlsRenameBtn = SXGUICrButton("Rename", 58, 143, 50, 20, 0, m_pRoot->GetHWND(), 0, 0); - CtlsRenameBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsRenameBtn->GAlign = {0, 1, 1, 0}; - - CtlsRemove = SXGUICrButton("Remove", 108, 143, 50, 20, 0, m_pRoot->GetHWND(), 0, 0); - CtlsRemove->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsRemove->GAlign = {0, 1, 1, 0}; - - m_pstBones = SXGUICrStatic("Bones", 160, 16, 50, 16, m_pRoot->GetHWND(), 0, 0); - - //CtlsBonesGB = SXGUICrGroupBox("Bones", 160, 16, 298, 145, m_pRoot->GetHWND(), 0, 0); - //CtlsBonesGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - //CtlsBonesGB->SetColorText(0, 0, 0); - //CtlsBonesGB->SetColorTextBk(255, 255, 255); - //CtlsBonesGB->SetTransparentTextBk(true); - //CtlsBonesGB->SetColorBrush(255, 255, 255); - //CtlsBonesGB->GAlign = {1, 1, 0, 0}; - - CtlsBoneList = SXGUICrListBox("", 160, 29, 150, 114, m_pRoot->GetHWND(), 0, 0, false); - CtlsBoneList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsBoneList->SetColorText(0, 0, 0); - CtlsBoneList->SetColorTextBk(255, 255, 255); - CtlsBoneList->SetTransparentTextBk(true); - CtlsBoneList->SetColorBrush(255, 255, 255); - CtlsBoneList->GAlign = {1, 1, 1, 0}; - - CtlsBoneAddBtn = SXGUICrButton("Add", 160, 143, 75, 20, 0, m_pRoot->GetHWND(), 0, 0); - CtlsBoneAddBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsBoneAddBtn->GAlign = {0, 1, 1, 0}; - - CtlsBoneRemoveBtn = SXGUICrButton("Remove", 235, 143, 75, 20, 0, m_pRoot->GetHWND(), 0, 0); - CtlsBoneRemoveBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsBoneRemoveBtn->GAlign = {0, 1, 1, 0}; - - - CtlsPropsGB = SXGUICrGroupBox("Props", 315, 15, 693, 146, m_pRoot->GetHWND(), 0, 0); - CtlsPropsGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropsGB->SetColorText(0, 0, 0); - CtlsPropsGB->SetColorTextBk(255, 255, 255); - CtlsPropsGB->SetTransparentTextBk(true); - CtlsPropsGB->SetColorBrush(255, 255, 255); - CtlsPropsGB->GAlign = {1, 1, 0, 0}; - CtlsPropCurTrack = SXGUICrTrackBar("", 7, 16, 286, 20, CtlsPropsGB->GetHWND(), 0, 0); - CtlsPropCurTrack->GAlign = {1, 1, 0, 0}; - CtlsPropCur = SXGUICrEdit("1.0", 297, 16, 84, 20, CtlsPropsGB->GetHWND(), 0, 0); - CtlsPropCur->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropCur->SetColorText(0, 0, 0); - CtlsPropCur->SetColorTextBk(255, 255, 255); - CtlsPropCur->SetTransparentTextBk(true); - CtlsPropCur->SetColorBrush(255, 255, 255); - CtlsPropCur->GAlign = {1, 1, 0, 0}; - - - CtlsPropTranslationGB = SXGUICrGroupBox("Translation From", 6, 38, 316, 50, CtlsPropsGB->GetHWND(), 0, 0); - CtlsPropTranslationGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTranslationGB->SetColorText(0, 0, 0); - CtlsPropTranslationGB->SetColorTextBk(255, 255, 255); - CtlsPropTranslationGB->SetTransparentTextBk(true); - CtlsPropTranslationGB->SetColorBrush(255, 255, 255); - CtlsPropTranslationGB->GAlign = {1, 1, 0, 0}; - - CtlsPropTrXCB = SXGUICrCheckBox("x", 6, 19, 30, 20, CtlsPropTranslationGB->GetHWND(), 0, 0, false); - CtlsPropTrXCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrXCB->SetColorText(0, 0, 0); - CtlsPropTrXCB->SetColorTextBk(255, 255, 255); - CtlsPropTrXCB->SetTransparentTextBk(true); - CtlsPropTrXCB->SetColorBrush(255, 255, 255); - CtlsPropTrXCB->GAlign = {1, 1, 0, 0}; - CtlsPropTrYCB = SXGUICrCheckBox("y", 109, 19, 30, 20, CtlsPropTranslationGB->GetHWND(), 0, 0, false); - CtlsPropTrYCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrYCB->SetColorText(0, 0, 0); - CtlsPropTrYCB->SetColorTextBk(255, 255, 255); - CtlsPropTrYCB->SetTransparentTextBk(true); - CtlsPropTrYCB->SetColorBrush(255, 255, 255); - CtlsPropTrYCB->GAlign = {1, 1, 0, 0}; - CtlsPropTrZCB = SXGUICrCheckBox("z", 212, 19, 30, 20, CtlsPropTranslationGB->GetHWND(), 0, 0, false); - CtlsPropTrZCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrZCB->SetColorText(0, 0, 0); - CtlsPropTrZCB->SetColorTextBk(255, 255, 255); - CtlsPropTrZCB->SetTransparentTextBk(true); - CtlsPropTrZCB->SetColorBrush(255, 255, 255); - CtlsPropTrZCB->GAlign = {1, 1, 0, 0}; - - CtlsPropTrX = SXGUICrEdit("0.0", 33, 19, 72, 20, CtlsPropTranslationGB->GetHWND(), 0, 0); - CtlsPropTrX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrX->SetColorText(0, 0, 0); - CtlsPropTrX->SetColorTextBk(255, 255, 255); - CtlsPropTrX->SetTransparentTextBk(true); - CtlsPropTrX->SetColorBrush(255, 255, 255); - CtlsPropTrX->GAlign = {1, 1, 0, 0}; - CtlsPropTrY = SXGUICrEdit("0.0", 137, 19, 72, 20, CtlsPropTranslationGB->GetHWND(), 0, 0); - CtlsPropTrY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrY->SetColorText(0, 0, 0); - CtlsPropTrY->SetColorTextBk(255, 255, 255); - CtlsPropTrY->SetTransparentTextBk(true); - CtlsPropTrY->SetColorBrush(255, 255, 255); - CtlsPropTrY->GAlign = {1, 1, 0, 0}; - CtlsPropTrZ = SXGUICrEdit("0.0", 242, 19, 72, 20, CtlsPropTranslationGB->GetHWND(), 0, 0); - CtlsPropTrZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrZ->SetColorText(0, 0, 0); - CtlsPropTrZ->SetColorTextBk(255, 255, 255); - CtlsPropTrZ->SetTransparentTextBk(true); - CtlsPropTrZ->SetColorBrush(255, 255, 255); - CtlsPropTrZ->GAlign = {1, 1, 0, 0}; - - - CtlsPropTrXSpin = SXGUICrUpDownEx(105, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB->GetHWND(), 0, 0, CtlsPropTrX->GetHWND()); - CtlsPropTrYSpin = SXGUICrUpDownEx(354, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB->GetHWND(), 0, 0, CtlsPropTrY->GetHWND()); - CtlsPropTrZSpin = SXGUICrUpDownEx(229, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB->GetHWND(), 0, 0, CtlsPropTrZ->GetHWND()); - CtlsPropTrXSpin->GAlign = {1, 1, 0, 0}; - CtlsPropTrYSpin->GAlign = {1, 1, 0, 0}; - CtlsPropTrZSpin->GAlign = {1, 1, 0, 0}; + m_pTabBtn = SXGUICrButtonEx("Controllers", 679, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pTabBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pTabBtn->setFollowParentSides(false, true, true, false); + m_pTabBtn->setUserPtr(this); + m_pTabBtn->addHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); + + m_pRoot = SXGUICrGroupBox("Controllers", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pRoot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pRoot->setColorText(RGB(0, 0, 0)); + m_pRoot->setColorTextBk(RGB(255, 255, 255)); + m_pRoot->setTransparentTextBk(true); + m_pRoot->setColorBrush(RGB(255, 255, 255)); + m_pRoot->setFollowParentSides(0, 1, 1, 1); + + CtlsList = SXGUICrListBox(8, 16, 150, 145, m_pRoot->getHWND(), 0, 0, false); + CtlsList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsList->setColorText(RGB(0, 0, 0)); + CtlsList->setColorTextBk(RGB(255, 255, 255)); + CtlsList->setTransparentTextBk(true); + CtlsList->setColorBrush(RGB(255, 255, 255)); + CtlsList->setFollowParentSides(1, 1, 1, 0); + + CtlsNewBtn = SXGUICrButton("New", 8, 143, 50, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + CtlsNewBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsNewBtn->setFollowParentSides(0, 1, 1, 0); + + CtlsRenameBtn = SXGUICrButton("Rename", 58, 143, 50, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + CtlsRenameBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsRenameBtn->setFollowParentSides(0, 1, 1, 0); + + CtlsRemove = SXGUICrButton("Remove", 108, 143, 50, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + CtlsRemove->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsRemove->setFollowParentSides(0, 1, 1, 0); + + m_pstBones = SXGUICrStatic("Bones", 160, 16, 50, 16, m_pRoot->getHWND(), 0, 0); + + //CtlsBonesGB = SXGUICrGroupBox("Bones", 160, 16, 298, 145, m_pRoot->getHWND(), 0, 0); + //CtlsBonesGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + //CtlsBonesGB->setColorText(RGB(0, 0, 0)); + //CtlsBonesGB->setColorTextBk(RGB(255, 255, 255)); + //CtlsBonesGB->setTransparentTextBk(true); + //CtlsBonesGB->setColorBrush(RGB(255, 255, 255)); + //CtlsBonesGB->setFollowParentSides(1, 1, 0, 0); + + CtlsBoneList = SXGUICrListBox(160, 29, 150, 114, m_pRoot->getHWND(), 0, 0, false); + CtlsBoneList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsBoneList->setColorText(RGB(0, 0, 0)); + CtlsBoneList->setColorTextBk(RGB(255, 255, 255)); + CtlsBoneList->setTransparentTextBk(true); + CtlsBoneList->setColorBrush(RGB(255, 255, 255)); + CtlsBoneList->setFollowParentSides(1, 1, 1, 0); + + CtlsBoneAddBtn = SXGUICrButton("Add", 160, 143, 75, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + CtlsBoneAddBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsBoneAddBtn->setFollowParentSides(0, 1, 1, 0); + + CtlsBoneRemoveBtn = SXGUICrButton("Remove", 235, 143, 75, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + CtlsBoneRemoveBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsBoneRemoveBtn->setFollowParentSides(0, 1, 1, 0); + + + CtlsPropsGB = SXGUICrGroupBox("Props", 315, 15, 693, 146, m_pRoot->getHWND(), 0, 0); + CtlsPropsGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropsGB->setColorText(RGB(0, 0, 0)); + CtlsPropsGB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropsGB->setTransparentTextBk(true); + CtlsPropsGB->setColorBrush(RGB(255, 255, 255)); + CtlsPropsGB->setFollowParentSides(1, 1, 0, 0); + CtlsPropCurTrack = SXGUICrTrackBar("", 7, 16, 286, 20, CtlsPropsGB->getHWND(), 0, 0); + CtlsPropCurTrack->setFollowParentSides(1, 1, 0, 0); + CtlsPropCur = SXGUICrEdit("1.0", 297, 16, 84, 20, CtlsPropsGB->getHWND(), 0, 0); + CtlsPropCur->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropCur->setColorText(RGB(0, 0, 0)); + CtlsPropCur->setColorTextBk(RGB(255, 255, 255)); + CtlsPropCur->setTransparentTextBk(true); + CtlsPropCur->setColorBrush(RGB(255, 255, 255)); + CtlsPropCur->setFollowParentSides(1, 1, 0, 0); + + + CtlsPropTranslationGB = SXGUICrGroupBox("Translation From", 6, 38, 316, 50, CtlsPropsGB->getHWND(), 0, 0); + CtlsPropTranslationGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTranslationGB->setColorText(RGB(0, 0, 0)); + CtlsPropTranslationGB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTranslationGB->setTransparentTextBk(true); + CtlsPropTranslationGB->setColorBrush(RGB(255, 255, 255)); + CtlsPropTranslationGB->setFollowParentSides(1, 1, 0, 0); + + CtlsPropTrXCB = SXGUICrCheckBox("x", 6, 19, 30, 20, CtlsPropTranslationGB->getHWND(), 0, 0, false); + CtlsPropTrXCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrXCB->setColorText(RGB(0, 0, 0)); + CtlsPropTrXCB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrXCB->setTransparentTextBk(true); + CtlsPropTrXCB->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrXCB->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrYCB = SXGUICrCheckBox("y", 109, 19, 30, 20, CtlsPropTranslationGB->getHWND(), 0, 0, false); + CtlsPropTrYCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrYCB->setColorText(RGB(0, 0, 0)); + CtlsPropTrYCB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrYCB->setTransparentTextBk(true); + CtlsPropTrYCB->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrYCB->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrZCB = SXGUICrCheckBox("z", 212, 19, 30, 20, CtlsPropTranslationGB->getHWND(), 0, 0, false); + CtlsPropTrZCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrZCB->setColorText(RGB(0, 0, 0)); + CtlsPropTrZCB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrZCB->setTransparentTextBk(true); + CtlsPropTrZCB->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrZCB->setFollowParentSides(1, 1, 0, 0); + + CtlsPropTrX = SXGUICrEdit("0.0", 33, 19, 72, 20, CtlsPropTranslationGB->getHWND(), 0, 0); + CtlsPropTrX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrX->setColorText(RGB(0, 0, 0)); + CtlsPropTrX->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrX->setTransparentTextBk(true); + CtlsPropTrX->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrX->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrY = SXGUICrEdit("0.0", 137, 19, 72, 20, CtlsPropTranslationGB->getHWND(), 0, 0); + CtlsPropTrY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrY->setColorText(RGB(0, 0, 0)); + CtlsPropTrY->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrY->setTransparentTextBk(true); + CtlsPropTrY->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrY->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrZ = SXGUICrEdit("0.0", 242, 19, 72, 20, CtlsPropTranslationGB->getHWND(), 0, 0); + CtlsPropTrZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrZ->setColorText(RGB(0, 0, 0)); + CtlsPropTrZ->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrZ->setTransparentTextBk(true); + CtlsPropTrZ->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrZ->setFollowParentSides(1, 1, 0, 0); + + + CtlsPropTrXSpin = SXGUICrUpDownEx(105, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB->getHWND(), 0, 0, CtlsPropTrX->getHWND()); + CtlsPropTrYSpin = SXGUICrUpDownEx(354, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB->getHWND(), 0, 0, CtlsPropTrY->getHWND()); + CtlsPropTrZSpin = SXGUICrUpDownEx(229, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB->getHWND(), 0, 0, CtlsPropTrZ->getHWND()); + CtlsPropTrXSpin->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrYSpin->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrZSpin->setFollowParentSides(1, 1, 0, 0); //6, 89, 316, 50 - CtlsPropTranslationGB2 = SXGUICrGroupBox("Translation To", 6, 89, 316, 50, CtlsPropsGB->GetHWND(), 0, 0); - CtlsPropTranslationGB2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTranslationGB2->SetColorText(0, 0, 0); - CtlsPropTranslationGB2->SetColorTextBk(255, 255, 255); - CtlsPropTranslationGB2->SetTransparentTextBk(true); - CtlsPropTranslationGB2->SetColorBrush(255, 255, 255); - CtlsPropTranslationGB2->GAlign = {1, 1, 0, 0}; - - CtlsPropTrXCB2 = SXGUICrCheckBox("x", 6, 19, 30, 20, CtlsPropTranslationGB2->GetHWND(), 0, 0, false); - CtlsPropTrXCB2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrXCB2->SetColorText(0, 0, 0); - CtlsPropTrXCB2->SetColorTextBk(255, 255, 255); - CtlsPropTrXCB2->SetTransparentTextBk(true); - CtlsPropTrXCB2->SetColorBrush(255, 255, 255); - CtlsPropTrXCB2->GAlign = {1, 1, 0, 0}; - CtlsPropTrXCB2->Enable(0); - CtlsPropTrYCB2 = SXGUICrCheckBox("y", 109, 19, 30, 20, CtlsPropTranslationGB2->GetHWND(), 0, 0, false); - CtlsPropTrYCB2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrYCB2->SetColorText(0, 0, 0); - CtlsPropTrYCB2->SetColorTextBk(255, 255, 255); - CtlsPropTrYCB2->SetTransparentTextBk(true); - CtlsPropTrYCB2->SetColorBrush(255, 255, 255); - CtlsPropTrYCB2->GAlign = {1, 1, 0, 0}; - CtlsPropTrYCB2->Enable(0); - CtlsPropTrZCB2 = SXGUICrCheckBox("z", 212, 19, 30, 20, CtlsPropTranslationGB2->GetHWND(), 0, 0, false); - CtlsPropTrZCB2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrZCB2->SetColorText(0, 0, 0); - CtlsPropTrZCB2->SetColorTextBk(255, 255, 255); - CtlsPropTrZCB2->SetTransparentTextBk(true); - CtlsPropTrZCB2->SetColorBrush(255, 255, 255); - CtlsPropTrZCB2->GAlign = {1, 1, 0, 0}; - CtlsPropTrZCB2->Enable(0); - - CtlsPropTrX2 = SXGUICrEdit("0.0", 33, 19, 72, 20, CtlsPropTranslationGB2->GetHWND(), 0, 0); - CtlsPropTrX2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrX2->SetColorText(0, 0, 0); - CtlsPropTrX2->SetColorTextBk(255, 255, 255); - CtlsPropTrX2->SetTransparentTextBk(true); - CtlsPropTrX2->SetColorBrush(255, 255, 255); - CtlsPropTrX2->GAlign = {1, 1, 0, 0}; - CtlsPropTrY2 = SXGUICrEdit("0.0", 137, 19, 72, 20, CtlsPropTranslationGB2->GetHWND(), 0, 0); - CtlsPropTrY2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrY2->SetColorText(0, 0, 0); - CtlsPropTrY2->SetColorTextBk(255, 255, 255); - CtlsPropTrY2->SetTransparentTextBk(true); - CtlsPropTrY2->SetColorBrush(255, 255, 255); - CtlsPropTrY2->GAlign = {1, 1, 0, 0}; - CtlsPropTrZ2 = SXGUICrEdit("0.0", 242, 19, 72, 20, CtlsPropTranslationGB2->GetHWND(), 0, 0); - CtlsPropTrZ2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropTrZ2->SetColorText(0, 0, 0); - CtlsPropTrZ2->SetColorTextBk(255, 255, 255); - CtlsPropTrZ2->SetTransparentTextBk(true); - CtlsPropTrZ2->SetColorBrush(255, 255, 255); - CtlsPropTrZ2->GAlign = {1, 1, 0, 0}; - - - CtlsPropTrXSpin2 = SXGUICrUpDownEx(105, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB2->GetHWND(), 0, 0, CtlsPropTrX2->GetHWND()); - CtlsPropTrYSpin2 = SXGUICrUpDownEx(354, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB2->GetHWND(), 0, 0, CtlsPropTrY2->GetHWND()); - CtlsPropTrZSpin2 = SXGUICrUpDownEx(229, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB2->GetHWND(), 0, 0, CtlsPropTrZ2->GetHWND()); - CtlsPropTrXSpin2->GAlign = {1, 1, 0, 0}; - CtlsPropTrYSpin2->GAlign = {1, 1, 0, 0}; - CtlsPropTrZSpin2->GAlign = {1, 1, 0, 0}; - - - - CtlsPropRotationGB = SXGUICrGroupBox("Rotation From", 322, 38, 316, 50, CtlsPropsGB->GetHWND(), 0, 0); - CtlsPropRotationGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotationGB->SetColorText(0, 0, 0); - CtlsPropRotationGB->SetColorTextBk(255, 255, 255); - CtlsPropRotationGB->SetTransparentTextBk(true); - CtlsPropRotationGB->SetColorBrush(255, 255, 255); - CtlsPropRotationGB->GAlign = {1, 1, 0, 0}; - - CtlsPropRotXCB = SXGUICrCheckBox("x", 6, 19, 30, 20, CtlsPropRotationGB->GetHWND(), 0, 0, false); - CtlsPropRotXCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotXCB->SetColorText(0, 0, 0); - CtlsPropRotXCB->SetColorTextBk(255, 255, 255); - CtlsPropRotXCB->SetTransparentTextBk(true); - CtlsPropRotXCB->SetColorBrush(255, 255, 255); - CtlsPropRotXCB->GAlign = {1, 1, 0, 0}; - CtlsPropRotYCB = SXGUICrCheckBox("y", 109, 19, 30, 20, CtlsPropRotationGB->GetHWND(), 0, 0, false); - CtlsPropRotYCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotYCB->SetColorText(0, 0, 0); - CtlsPropRotYCB->SetColorTextBk(255, 255, 255); - CtlsPropRotYCB->SetTransparentTextBk(true); - CtlsPropRotYCB->SetColorBrush(255, 255, 255); - CtlsPropRotYCB->GAlign = {1, 1, 0, 0}; - CtlsPropRotZCB = SXGUICrCheckBox("z", 212, 19, 30, 20, CtlsPropRotationGB->GetHWND(), 0, 0, false); - CtlsPropRotZCB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotZCB->SetColorText(0, 0, 0); - CtlsPropRotZCB->SetColorTextBk(255, 255, 255); - CtlsPropRotZCB->SetTransparentTextBk(true); - CtlsPropRotZCB->SetColorBrush(255, 255, 255); - CtlsPropRotZCB->GAlign = {1, 1, 0, 0}; - - CtlsPropRotX = SXGUICrEdit("0.0", 33, 19, 72, 20, CtlsPropRotationGB->GetHWND(), 0, 0); - CtlsPropRotX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotX->SetColorText(0, 0, 0); - CtlsPropRotX->SetColorTextBk(255, 255, 255); - CtlsPropRotX->SetTransparentTextBk(true); - CtlsPropRotX->SetColorBrush(255, 255, 255); - CtlsPropRotX->GAlign = {1, 1, 0, 0}; - CtlsPropRotY = SXGUICrEdit("0.0", 137, 19, 72, 20, CtlsPropRotationGB->GetHWND(), 0, 0); - CtlsPropRotY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotY->SetColorText(0, 0, 0); - CtlsPropRotY->SetColorTextBk(255, 255, 255); - CtlsPropRotY->SetTransparentTextBk(true); - CtlsPropRotY->SetColorBrush(255, 255, 255); - CtlsPropRotY->GAlign = {1, 1, 0, 0}; - CtlsPropRotZ = SXGUICrEdit("0.0", 242, 19, 72, 20, CtlsPropRotationGB->GetHWND(), 0, 0); - CtlsPropRotZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotZ->SetColorText(0, 0, 0); - CtlsPropRotZ->SetColorTextBk(255, 255, 255); - CtlsPropRotZ->SetTransparentTextBk(true); - CtlsPropRotZ->SetColorBrush(255, 255, 255); - CtlsPropRotZ->GAlign = {1, 1, 0, 0}; - - CtlsPropRotXSpin = SXGUICrUpDownEx(105, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB->GetHWND(), 0, 0, CtlsPropRotX->GetHWND()); - CtlsPropRotYSpin = SXGUICrUpDownEx(229, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB->GetHWND(), 0, 0, CtlsPropRotY->GetHWND()); - CtlsPropRotZSpin = SXGUICrUpDownEx(354, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB->GetHWND(), 0, 0, CtlsPropRotZ->GetHWND()); - - CtlsPropRotXSpin->GAlign = {1, 1, 0, 0}; - CtlsPropRotYSpin->GAlign = {1, 1, 0, 0}; - CtlsPropRotZSpin->GAlign = {1, 1, 0, 0}; - - - - - CtlsPropRotationGB2 = SXGUICrGroupBox("Rotation To", 322, 89, 316, 50, CtlsPropsGB->GetHWND(), 0, 0); - CtlsPropRotationGB2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotationGB2->SetColorText(0, 0, 0); - CtlsPropRotationGB2->SetColorTextBk(255, 255, 255); - CtlsPropRotationGB2->SetTransparentTextBk(true); - CtlsPropRotationGB2->SetColorBrush(255, 255, 255); - CtlsPropRotationGB2->GAlign = {1, 1, 0, 0}; - - CtlsPropRotXCB2 = SXGUICrCheckBox("x", 6, 19, 30, 20, CtlsPropRotationGB2->GetHWND(), 0, 0, false); - CtlsPropRotXCB2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotXCB2->SetColorText(0, 0, 0); - CtlsPropRotXCB2->SetColorTextBk(255, 255, 255); - CtlsPropRotXCB2->SetTransparentTextBk(true); - CtlsPropRotXCB2->SetColorBrush(255, 255, 255); - CtlsPropRotXCB2->GAlign = {1, 1, 0, 0}; - CtlsPropRotXCB2->Enable(0); - CtlsPropRotYCB2 = SXGUICrCheckBox("y", 109, 19, 30, 20, CtlsPropRotationGB2->GetHWND(), 0, 0, false); - CtlsPropRotYCB2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotYCB2->SetColorText(0, 0, 0); - CtlsPropRotYCB2->SetColorTextBk(255, 255, 255); - CtlsPropRotYCB2->SetTransparentTextBk(true); - CtlsPropRotYCB2->SetColorBrush(255, 255, 255); - CtlsPropRotYCB2->GAlign = {1, 1, 0, 0}; - CtlsPropRotYCB2->Enable(0); - CtlsPropRotZCB2 = SXGUICrCheckBox("z", 212, 19, 30, 20, CtlsPropRotationGB2->GetHWND(), 0, 0, false); - CtlsPropRotZCB2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotZCB2->SetColorText(0, 0, 0); - CtlsPropRotZCB2->SetColorTextBk(255, 255, 255); - CtlsPropRotZCB2->SetTransparentTextBk(true); - CtlsPropRotZCB2->SetColorBrush(255, 255, 255); - CtlsPropRotZCB2->GAlign = {1, 1, 0, 0}; - CtlsPropRotZCB2->Enable(0); - - CtlsPropRotX2 = SXGUICrEdit("0.0", 33, 19, 72, 20, CtlsPropRotationGB2->GetHWND(), 0, 0); - CtlsPropRotX2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotX2->SetColorText(0, 0, 0); - CtlsPropRotX2->SetColorTextBk(255, 255, 255); - CtlsPropRotX2->SetTransparentTextBk(true); - CtlsPropRotX2->SetColorBrush(255, 255, 255); - CtlsPropRotX2->GAlign = {1, 1, 0, 0}; - CtlsPropRotY2 = SXGUICrEdit("0.0", 137, 19, 72, 20, CtlsPropRotationGB2->GetHWND(), 0, 0); - CtlsPropRotY2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotY2->SetColorText(0, 0, 0); - CtlsPropRotY2->SetColorTextBk(255, 255, 255); - CtlsPropRotY2->SetTransparentTextBk(true); - CtlsPropRotY2->SetColorBrush(255, 255, 255); - CtlsPropRotY2->GAlign = {1, 1, 0, 0}; - CtlsPropRotZ2 = SXGUICrEdit("0.0", 242, 19, 72, 20, CtlsPropRotationGB2->GetHWND(), 0, 0); - CtlsPropRotZ2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CtlsPropRotZ2->SetColorText(0, 0, 0); - CtlsPropRotZ2->SetColorTextBk(255, 255, 255); - CtlsPropRotZ2->SetTransparentTextBk(true); - CtlsPropRotZ2->SetColorBrush(255, 255, 255); - CtlsPropRotZ2->GAlign = {1, 1, 0, 0}; - - CtlsPropRotXSpin2 = SXGUICrUpDownEx(105, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB2->GetHWND(), 0, 0, CtlsPropRotX2->GetHWND()); - CtlsPropRotYSpin2 = SXGUICrUpDownEx(229, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB2->GetHWND(), 0, 0, CtlsPropRotY2->GetHWND()); - CtlsPropRotZSpin2 = SXGUICrUpDownEx(354, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB2->GetHWND(), 0, 0, CtlsPropRotZ2->GetHWND()); - - CtlsPropRotXSpin2->GAlign = {1, 1, 0, 0}; - CtlsPropRotYSpin2->GAlign = {1, 1, 0, 0}; - CtlsPropRotZSpin2->GAlign = {1, 1, 0, 0}; + CtlsPropTranslationGB2 = SXGUICrGroupBox("Translation To", 6, 89, 316, 50, CtlsPropsGB->getHWND(), 0, 0); + CtlsPropTranslationGB2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTranslationGB2->setColorText(RGB(0, 0, 0)); + CtlsPropTranslationGB2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTranslationGB2->setTransparentTextBk(true); + CtlsPropTranslationGB2->setColorBrush(RGB(255, 255, 255)); + CtlsPropTranslationGB2->setFollowParentSides(1, 1, 0, 0); + + CtlsPropTrXCB2 = SXGUICrCheckBox("x", 6, 19, 30, 20, CtlsPropTranslationGB2->getHWND(), 0, 0, false); + CtlsPropTrXCB2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrXCB2->setColorText(RGB(0, 0, 0)); + CtlsPropTrXCB2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrXCB2->setTransparentTextBk(true); + CtlsPropTrXCB2->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrXCB2->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrXCB2->setEnable(0); + CtlsPropTrYCB2 = SXGUICrCheckBox("y", 109, 19, 30, 20, CtlsPropTranslationGB2->getHWND(), 0, 0, false); + CtlsPropTrYCB2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrYCB2->setColorText(RGB(0, 0, 0)); + CtlsPropTrYCB2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrYCB2->setTransparentTextBk(true); + CtlsPropTrYCB2->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrYCB2->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrYCB2->setEnable(0); + CtlsPropTrZCB2 = SXGUICrCheckBox("z", 212, 19, 30, 20, CtlsPropTranslationGB2->getHWND(), 0, 0, false); + CtlsPropTrZCB2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrZCB2->setColorText(RGB(0, 0, 0)); + CtlsPropTrZCB2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrZCB2->setTransparentTextBk(true); + CtlsPropTrZCB2->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrZCB2->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrZCB2->setEnable(0); + + CtlsPropTrX2 = SXGUICrEdit("0.0", 33, 19, 72, 20, CtlsPropTranslationGB2->getHWND(), 0, 0); + CtlsPropTrX2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrX2->setColorText(RGB(0, 0, 0)); + CtlsPropTrX2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrX2->setTransparentTextBk(true); + CtlsPropTrX2->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrX2->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrY2 = SXGUICrEdit("0.0", 137, 19, 72, 20, CtlsPropTranslationGB2->getHWND(), 0, 0); + CtlsPropTrY2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrY2->setColorText(RGB(0, 0, 0)); + CtlsPropTrY2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrY2->setTransparentTextBk(true); + CtlsPropTrY2->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrY2->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrZ2 = SXGUICrEdit("0.0", 242, 19, 72, 20, CtlsPropTranslationGB2->getHWND(), 0, 0); + CtlsPropTrZ2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropTrZ2->setColorText(RGB(0, 0, 0)); + CtlsPropTrZ2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropTrZ2->setTransparentTextBk(true); + CtlsPropTrZ2->setColorBrush(RGB(255, 255, 255)); + CtlsPropTrZ2->setFollowParentSides(1, 1, 0, 0); + + + CtlsPropTrXSpin2 = SXGUICrUpDownEx(105, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB2->getHWND(), 0, 0, CtlsPropTrX2->getHWND()); + CtlsPropTrYSpin2 = SXGUICrUpDownEx(354, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB2->getHWND(), 0, 0, CtlsPropTrY2->getHWND()); + CtlsPropTrZSpin2 = SXGUICrUpDownEx(229, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropTranslationGB2->getHWND(), 0, 0, CtlsPropTrZ2->getHWND()); + CtlsPropTrXSpin2->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrYSpin2->setFollowParentSides(1, 1, 0, 0); + CtlsPropTrZSpin2->setFollowParentSides(1, 1, 0, 0); + + + + CtlsPropRotationGB = SXGUICrGroupBox("Rotation From", 322, 38, 316, 50, CtlsPropsGB->getHWND(), 0, 0); + CtlsPropRotationGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotationGB->setColorText(RGB(0, 0, 0)); + CtlsPropRotationGB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotationGB->setTransparentTextBk(true); + CtlsPropRotationGB->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotationGB->setFollowParentSides(1, 1, 0, 0); + + CtlsPropRotXCB = SXGUICrCheckBox("x", 6, 19, 30, 20, CtlsPropRotationGB->getHWND(), 0, 0, false); + CtlsPropRotXCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotXCB->setColorText(RGB(0, 0, 0)); + CtlsPropRotXCB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotXCB->setTransparentTextBk(true); + CtlsPropRotXCB->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotXCB->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotYCB = SXGUICrCheckBox("y", 109, 19, 30, 20, CtlsPropRotationGB->getHWND(), 0, 0, false); + CtlsPropRotYCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotYCB->setColorText(RGB(0, 0, 0)); + CtlsPropRotYCB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotYCB->setTransparentTextBk(true); + CtlsPropRotYCB->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotYCB->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotZCB = SXGUICrCheckBox("z", 212, 19, 30, 20, CtlsPropRotationGB->getHWND(), 0, 0, false); + CtlsPropRotZCB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotZCB->setColorText(RGB(0, 0, 0)); + CtlsPropRotZCB->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotZCB->setTransparentTextBk(true); + CtlsPropRotZCB->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotZCB->setFollowParentSides(1, 1, 0, 0); + + CtlsPropRotX = SXGUICrEdit("0.0", 33, 19, 72, 20, CtlsPropRotationGB->getHWND(), 0, 0); + CtlsPropRotX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotX->setColorText(RGB(0, 0, 0)); + CtlsPropRotX->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotX->setTransparentTextBk(true); + CtlsPropRotX->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotX->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotY = SXGUICrEdit("0.0", 137, 19, 72, 20, CtlsPropRotationGB->getHWND(), 0, 0); + CtlsPropRotY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotY->setColorText(RGB(0, 0, 0)); + CtlsPropRotY->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotY->setTransparentTextBk(true); + CtlsPropRotY->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotY->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotZ = SXGUICrEdit("0.0", 242, 19, 72, 20, CtlsPropRotationGB->getHWND(), 0, 0); + CtlsPropRotZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotZ->setColorText(RGB(0, 0, 0)); + CtlsPropRotZ->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotZ->setTransparentTextBk(true); + CtlsPropRotZ->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotZ->setFollowParentSides(1, 1, 0, 0); + + CtlsPropRotXSpin = SXGUICrUpDownEx(105, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB->getHWND(), 0, 0, CtlsPropRotX->getHWND()); + CtlsPropRotYSpin = SXGUICrUpDownEx(229, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB->getHWND(), 0, 0, CtlsPropRotY->getHWND()); + CtlsPropRotZSpin = SXGUICrUpDownEx(354, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB->getHWND(), 0, 0, CtlsPropRotZ->getHWND()); + + CtlsPropRotXSpin->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotYSpin->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotZSpin->setFollowParentSides(1, 1, 0, 0); + + + + + CtlsPropRotationGB2 = SXGUICrGroupBox("Rotation To", 322, 89, 316, 50, CtlsPropsGB->getHWND(), 0, 0); + CtlsPropRotationGB2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotationGB2->setColorText(RGB(0, 0, 0)); + CtlsPropRotationGB2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotationGB2->setTransparentTextBk(true); + CtlsPropRotationGB2->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotationGB2->setFollowParentSides(1, 1, 0, 0); + + CtlsPropRotXCB2 = SXGUICrCheckBox("x", 6, 19, 30, 20, CtlsPropRotationGB2->getHWND(), 0, 0, false); + CtlsPropRotXCB2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotXCB2->setColorText(RGB(0, 0, 0)); + CtlsPropRotXCB2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotXCB2->setTransparentTextBk(true); + CtlsPropRotXCB2->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotXCB2->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotXCB2->setEnable(0); + CtlsPropRotYCB2 = SXGUICrCheckBox("y", 109, 19, 30, 20, CtlsPropRotationGB2->getHWND(), 0, 0, false); + CtlsPropRotYCB2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotYCB2->setColorText(RGB(0, 0, 0)); + CtlsPropRotYCB2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotYCB2->setTransparentTextBk(true); + CtlsPropRotYCB2->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotYCB2->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotYCB2->setEnable(0); + CtlsPropRotZCB2 = SXGUICrCheckBox("z", 212, 19, 30, 20, CtlsPropRotationGB2->getHWND(), 0, 0, false); + CtlsPropRotZCB2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotZCB2->setColorText(RGB(0, 0, 0)); + CtlsPropRotZCB2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotZCB2->setTransparentTextBk(true); + CtlsPropRotZCB2->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotZCB2->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotZCB2->setEnable(0); + + CtlsPropRotX2 = SXGUICrEdit("0.0", 33, 19, 72, 20, CtlsPropRotationGB2->getHWND(), 0, 0); + CtlsPropRotX2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotX2->setColorText(RGB(0, 0, 0)); + CtlsPropRotX2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotX2->setTransparentTextBk(true); + CtlsPropRotX2->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotX2->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotY2 = SXGUICrEdit("0.0", 137, 19, 72, 20, CtlsPropRotationGB2->getHWND(), 0, 0); + CtlsPropRotY2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotY2->setColorText(RGB(0, 0, 0)); + CtlsPropRotY2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotY2->setTransparentTextBk(true); + CtlsPropRotY2->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotY2->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotZ2 = SXGUICrEdit("0.0", 242, 19, 72, 20, CtlsPropRotationGB2->getHWND(), 0, 0); + CtlsPropRotZ2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CtlsPropRotZ2->setColorText(RGB(0, 0, 0)); + CtlsPropRotZ2->setColorTextBk(RGB(255, 255, 255)); + CtlsPropRotZ2->setTransparentTextBk(true); + CtlsPropRotZ2->setColorBrush(RGB(255, 255, 255)); + CtlsPropRotZ2->setFollowParentSides(1, 1, 0, 0); + + CtlsPropRotXSpin2 = SXGUICrUpDownEx(105, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB2->getHWND(), 0, 0, CtlsPropRotX2->getHWND()); + CtlsPropRotYSpin2 = SXGUICrUpDownEx(229, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB2->getHWND(), 0, 0, CtlsPropRotY2->getHWND()); + CtlsPropRotZSpin2 = SXGUICrUpDownEx(354, 19, 17, 20, 0, WS_CHILD | WS_VISIBLE | UDS_WRAP | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_NOTHOUSANDS, CtlsPropRotationGB2->getHWND(), 0, 0, CtlsPropRotZ2->getHWND()); + + CtlsPropRotXSpin2->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotYSpin2->setFollowParentSides(1, 1, 0, 0); + CtlsPropRotZSpin2->setFollowParentSides(1, 1, 0, 0); Show(false); - m_pTabBtn->Enable(0); + m_pTabBtn->setEnable(0); } TabControllers::~TabControllers() diff --git a/source/sxae/TabFiles.cpp b/source/sxae/TabFiles.cpp index c7d81059f0500f994dc7508d6a910fc7852e1cf2..1450a4c6c344f2a6269fab0116cd4b95c59d44ae 100644 --- a/source/sxae/TabFiles.cpp +++ b/source/sxae/TabFiles.cpp @@ -8,32 +8,32 @@ See the license in LICENSE TabFiles::TabFiles(TabManager * tm):EditorTab(tm) { - m_pTabBtn = SXGUICrButtonEx("Files", 780, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pTabBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pTabBtn->GAlign = {false, true, true, false}; - m_pTabBtn->SetUserPtr(this); - m_pTabBtn->AddHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); + m_pTabBtn = SXGUICrButtonEx("Files", 780, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pTabBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pTabBtn->setFollowParentSides(false, true, true, false); + m_pTabBtn->setUserPtr(this); + m_pTabBtn->addHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); - m_pRoot = SXGUICrGroupBox("Files", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pRoot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pRoot->SetColorText(0, 0, 0); - m_pRoot->SetColorTextBk(255, 255, 255); - m_pRoot->SetTransparentTextBk(true); - m_pRoot->SetColorBrush(255, 255, 255); - m_pRoot->GAlign = {false, true, true, true}; - FileList = SXGUICrListBox("", 6, 15, 1002, 140, m_pRoot->GetHWND(), 0, 0, false); - FileList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - FileList->SetColorText(0, 0, 0); - FileList->SetColorTextBk(255, 255, 255); - FileList->SetTransparentTextBk(true); - FileList->SetColorBrush(255, 255, 255); - FileList->GAlign = {true, true, true, true}; - FileAddBtn = SXGUICrButton("Add file", 6, 144, 100, 20, 0, m_pRoot->GetHWND(), 0, 0); - FileAddBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - FileAddBtn->GAlign = {false, true, true, false}; - FileRemoveBtn = SXGUICrButton("Remove selected", 108, 144, 100, 20, 0, m_pRoot->GetHWND(), 0, 0); - FileRemoveBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - FileRemoveBtn->GAlign = {false, true, true, false}; + m_pRoot = SXGUICrGroupBox("Files", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pRoot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pRoot->setColorText(RGB(0, 0, 0)); + m_pRoot->setColorTextBk(RGB(255, 255, 255)); + m_pRoot->setTransparentTextBk(true); + m_pRoot->setColorBrush(RGB(255, 255, 255)); + m_pRoot->setFollowParentSides(false, true, true, true); + FileList = SXGUICrListBox(6, 15, 1002, 140, m_pRoot->getHWND(), 0, 0, false); + FileList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + FileList->setColorText(RGB(0, 0, 0)); + FileList->setColorTextBk(RGB(255, 255, 255)); + FileList->setTransparentTextBk(true); + FileList->setColorBrush(RGB(255, 255, 255)); + FileList->setFollowParentSides(true, true, true, true); + FileAddBtn = SXGUICrButton("Add file", 6, 144, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + FileAddBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + FileAddBtn->setFollowParentSides(false, true, true, false); + FileRemoveBtn = SXGUICrButton("Remove selected", 108, 144, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + FileRemoveBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + FileRemoveBtn->setFollowParentSides(false, true, true, false); Show(false); } diff --git a/source/sxae/TabHitboxes.cpp b/source/sxae/TabHitboxes.cpp index 36742fba67485430fcc093748147e1b3d25e42d5..8c4aaca417dd9384ea159eac44097dc7fe45338e 100644 --- a/source/sxae/TabHitboxes.cpp +++ b/source/sxae/TabHitboxes.cpp @@ -15,291 +15,291 @@ void TabHitboxes::Show(bool bShow) TabHitboxes::TabHitboxes(TabManager * tm):EditorTab(tm) { - m_pTabBtn = SXGUICrButtonEx("Hitboxes", 780, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pTabBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pTabBtn->GAlign = {false, true, true, false}; - m_pTabBtn->SetUserPtr(this); - m_pTabBtn->AddHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); - - m_pRoot = SXGUICrGroupBox("Hitboxes", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pRoot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pRoot->SetColorText(0, 0, 0); - m_pRoot->SetColorTextBk(255, 255, 255); - m_pRoot->SetTransparentTextBk(true); - m_pRoot->SetColorBrush(255, 255, 255); - m_pRoot->GAlign = {false, true, true, true}; - m_pRoot->AddHandler(Tools::ProxyCommandProc, WM_COMMAND); - - HBList = SXGUICrListBoxEx("", 3, 12, 236, 135, 0, WS_CHILD | WS_VISIBLE | LBS_HASSTRINGS | WS_VSCROLL | WS_BORDER | LBS_NOTIFY/* | LBS_SORT*/, m_pRoot->GetHWND(), 0, IDC_HB_LB); - HBList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - HBList->SetColorText(0, 0, 0); - HBList->SetColorTextBk(255, 255, 255); - HBList->SetTransparentTextBk(true); - HBList->SetColorBrush(255, 255, 255); - - BtnAdd = SXGUICrButton("Add", 5, 139, 130, 20, 0, m_pRoot->GetHWND(), 0, IDC_HB_ADD); - BtnAdd->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - - BtnDel = SXGUICrButton("Remove", 138, 139, 100, 20, 0, m_pRoot->GetHWND(), 0, IDC_HB_DEL); - BtnDel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - - - PropsGB = SXGUICrGroupBox("Props", 242, 10, 768, 150, m_pRoot->GetHWND(), 0, 0); - PropsGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - PropsGB->SetColorText(0, 0, 0); - PropsGB->SetColorTextBk(255, 255, 255); - PropsGB->SetTransparentTextBk(true); - PropsGB->SetColorBrush(255, 255, 255); - PropsGB->AddHandler(Tools::ProxyCommandProc, WM_COMMAND); - - Static1 = SXGUICrStatic("Name:", 6, 16, 50, 20, PropsGB->GetHWND(), 0, 0); - Static1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static1->SetColorText(0, 0, 0); - Static1->SetColorTextBk(255, 255, 255); - Static1->SetTransparentTextBk(true); - Static1->SetColorBrush(255, 255, 255); - - Static2 = SXGUICrStatic("Bone:", 6, 38, 50, 20, PropsGB->GetHWND(), 0, 0); - Static2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static2->SetColorText(0, 0, 0); - Static2->SetColorTextBk(255, 255, 255); - Static2->SetTransparentTextBk(true); - Static2->SetColorBrush(255, 255, 255); - - Static3 = SXGUICrStatic("Bodypart:", 6, 60, 50, 20, PropsGB->GetHWND(), 0, 0); - Static3->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static3->SetColorText(0, 0, 0); - Static3->SetColorTextBk(255, 255, 255); - Static3->SetTransparentTextBk(true); - Static3->SetColorBrush(255, 255, 255); - - EdName = SXGUICrEdit("", 57, 16, 100, 20, PropsGB->GetHWND(), 0, IDC_HB_NAME); - EdName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdName->SetColorText(0, 0, 0); - EdName->SetColorTextBk(255, 255, 255); - EdName->SetTransparentTextBk(true); - EdName->SetColorBrush(255, 255, 255); - - CBBone = SXGUICrComboBoxEx("", 57, 37, 100, 300, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, PropsGB->GetHWND(), 0, IDC_HB_BONE); - CBBone->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CBBone->SetColorText(0, 0, 0); - CBBone->SetColorTextBk(255, 255, 255); - CBBone->SetTransparentTextBk(true); - CBBone->SetColorBrush(255, 255, 255); - - CBBodyPart = SXGUICrComboBoxEx("", 57, 59, 100, 300, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, PropsGB->GetHWND(), 0, IDC_HB_BODYPART); - CBBodyPart->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CBBodyPart->SetColorText(0, 0, 0); - CBBodyPart->SetColorTextBk(255, 255, 255); - CBBodyPart->SetTransparentTextBk(true); - CBBodyPart->SetColorBrush(255, 255, 255); - - Static4 = SXGUICrStatic("Position", 172, 15, 241, 20, PropsGB->GetHWND(), 0, 0); - Static4->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static4->SetColorText(0, 0, 0); - Static4->SetColorTextBk(255, 255, 255); - Static4->SetTransparentTextBk(true); - Static4->SetColorBrush(255, 255, 255); - - Static5 = SXGUICrStatic("X", 172, 35, 15, 20, PropsGB->GetHWND(), 0, 0); - Static5->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static5->SetColorText(0, 0, 0); - Static5->SetColorTextBk(255, 255, 255); - Static5->SetTransparentTextBk(true); - Static5->SetColorBrush(255, 255, 255); - - EdPosX = SXGUICrEdit("0.0", 187, 35, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_POS_X); - EdPosX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdPosX->SetColorText(0, 0, 0); - EdPosX->SetColorTextBk(255, 255, 255); - EdPosX->SetTransparentTextBk(true); - EdPosX->SetColorBrush(255, 255, 255); - - Static6 = SXGUICrStatic("Y", 256, 35, 15, 20, PropsGB->GetHWND(), 0, 0); - Static6->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static6->SetColorText(0, 0, 0); - Static6->SetColorTextBk(255, 255, 255); - Static6->SetTransparentTextBk(true); - Static6->SetColorBrush(255, 255, 255); - - EdPosY = SXGUICrEdit("0.0", 271, 35, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_POS_Y); - EdPosY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdPosY->SetColorText(0, 0, 0); - EdPosY->SetColorTextBk(255, 255, 255); - EdPosY->SetTransparentTextBk(true); - EdPosY->SetColorBrush(255, 255, 255); - - Static7 = SXGUICrStatic("Z", 338, 35, 15, 20, PropsGB->GetHWND(), 0, 0); - Static7->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static7->SetColorText(0, 0, 0); - Static7->SetColorTextBk(255, 255, 255); - Static7->SetTransparentTextBk(true); - Static7->SetColorBrush(255, 255, 255); - - EdPosZ = SXGUICrEdit("0.0", 353, 35, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_POS_Z); - EdPosZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdPosZ->SetColorText(0, 0, 0); - EdPosZ->SetColorTextBk(255, 255, 255); - EdPosZ->SetTransparentTextBk(true); - EdPosZ->SetColorBrush(255, 255, 255); - - Static8 = SXGUICrStatic("Rotation", 171, 59, 241, 20, PropsGB->GetHWND(), 0, 0); - Static8->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static8->SetColorText(0, 0, 0); - Static8->SetColorTextBk(255, 255, 255); - Static8->SetTransparentTextBk(true); - Static8->SetColorBrush(255, 255, 255); - - Static9 = SXGUICrStatic("X", 172, 79, 15, 20, PropsGB->GetHWND(), 0, 0); - Static9->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static9->SetColorText(0, 0, 0); - Static9->SetColorTextBk(255, 255, 255); - Static9->SetTransparentTextBk(true); - Static9->SetColorBrush(255, 255, 255); - - Static10 = SXGUICrStatic("Y", 256, 79, 15, 20, PropsGB->GetHWND(), 0, 0); - Static10->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static10->SetColorText(0, 0, 0); - Static10->SetColorTextBk(255, 255, 255); - Static10->SetTransparentTextBk(true); - Static10->SetColorBrush(255, 255, 255); - - Static11 = SXGUICrStatic("Z", 338, 79, 15, 20, PropsGB->GetHWND(), 0, 0); - Static11->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static11->SetColorText(0, 0, 0); - Static11->SetColorTextBk(255, 255, 255); - Static11->SetTransparentTextBk(true); - Static11->SetColorBrush(255, 255, 255); - - EdRotX = SXGUICrEdit("0.0", 187, 79, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_ROT_X); - EdRotX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdRotX->SetColorText(0, 0, 0); - EdRotX->SetColorTextBk(255, 255, 255); - EdRotX->SetTransparentTextBk(true); - EdRotX->SetColorBrush(255, 255, 255); - - EdRotY = SXGUICrEdit("0.0", 271, 79, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_ROT_Y); - EdRotY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdRotY->SetColorText(0, 0, 0); - EdRotY->SetColorTextBk(255, 255, 255); - EdRotY->SetTransparentTextBk(true); - EdRotY->SetColorBrush(255, 255, 255); - - EdRotZ = SXGUICrEdit("0.0", 353, 79, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_ROT_Z); - EdRotZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdRotZ->SetColorText(0, 0, 0); - EdRotZ->SetColorTextBk(255, 255, 255); - EdRotZ->SetTransparentTextBk(true); - EdRotZ->SetColorBrush(255, 255, 255); - - Static16 = SXGUICrStatic("L", 172, 104, 15, 20, PropsGB->GetHWND(), 0, 0); - Static16->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static16->SetColorText(0, 0, 0); - Static16->SetColorTextBk(255, 255, 255); - Static16->SetTransparentTextBk(true); - Static16->SetColorBrush(255, 255, 255); - - Static13 = SXGUICrStatic("W", 256, 104, 15, 20, PropsGB->GetHWND(), 0, 0); - Static13->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static13->SetColorText(0, 0, 0); - Static13->SetColorTextBk(255, 255, 255); - Static13->SetTransparentTextBk(true); - Static13->SetColorBrush(255, 255, 255); - - Static14 = SXGUICrStatic("H", 338, 104, 15, 20, PropsGB->GetHWND(), 0, 0); - Static14->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static14->SetColorText(0, 0, 0); - Static14->SetColorTextBk(255, 255, 255); - Static14->SetTransparentTextBk(true); - Static14->SetColorBrush(255, 255, 255); - - EdL = SXGUICrEdit("0.0", 187, 104, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_L); - EdL->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdL->SetColorText(0, 0, 0); - EdL->SetColorTextBk(255, 255, 255); - EdL->SetTransparentTextBk(true); - EdL->SetColorBrush(255, 255, 255); - - EdW = SXGUICrEdit("0.0", 271, 104, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_W); - EdW->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdW->SetColorText(0, 0, 0); - EdW->SetColorTextBk(255, 255, 255); - EdW->SetTransparentTextBk(true); - EdW->SetColorBrush(255, 255, 255); - - EdH = SXGUICrEdit("0.0", 353, 104, 60, 20, PropsGB->GetHWND(), 0, IDC_HB_ED_H); - EdH->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - EdH->SetColorText(0, 0, 0); - EdH->SetColorTextBk(255, 255, 255); - EdH->SetTransparentTextBk(true); - EdH->SetColorBrush(255, 255, 255); - - Static15 = SXGUICrStatic("Type:", 6, 104, 50, 20, PropsGB->GetHWND(), 0, 0); - Static15->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static15->SetColorText(0, 0, 0); - Static15->SetColorTextBk(255, 255, 255); - Static15->SetTransparentTextBk(true); - Static15->SetColorBrush(255, 255, 255); - - CBType = SXGUICrComboBoxEx("", 57, 104, 100, 300, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, PropsGB->GetHWND(), 0, IDC_HB_TYPE); - CBType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - CBType->SetColorText(0, 0, 0); - CBType->SetColorTextBk(255, 255, 255); - CBType->SetTransparentTextBk(true); - CBType->SetColorBrush(255, 255, 255); + m_pTabBtn = SXGUICrButtonEx("Hitboxes", 780, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pTabBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pTabBtn->setFollowParentSides(false, true, true, false); + m_pTabBtn->setUserPtr(this); + m_pTabBtn->addHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); + + m_pRoot = SXGUICrGroupBox("Hitboxes", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pRoot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pRoot->setColorText(RGB(0, 0, 0)); + m_pRoot->setColorTextBk(RGB(255, 255, 255)); + m_pRoot->setTransparentTextBk(true); + m_pRoot->setColorBrush(RGB(255, 255, 255)); + m_pRoot->setFollowParentSides(false, true, true, true); + m_pRoot->addHandler(Tools::ProxyCommandProc, WM_COMMAND); + + HBList = SXGUICrListBoxEx(3, 12, 236, 135, 0, WS_CHILD | WS_VISIBLE | LBS_HASSTRINGS | WS_VSCROLL | WS_BORDER | LBS_NOTIFY/* | LBS_SORT*/, m_pRoot->getHWND(), 0, IDC_HB_LB); + HBList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + HBList->setColorText(RGB(0, 0, 0)); + HBList->setColorTextBk(RGB(255, 255, 255)); + HBList->setTransparentTextBk(true); + HBList->setColorBrush(RGB(255, 255, 255)); + + BtnAdd = SXGUICrButton("Add", 5, 139, 130, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, IDC_HB_ADD); + BtnAdd->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + + BtnDel = SXGUICrButton("Remove", 138, 139, 100, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, IDC_HB_DEL); + BtnDel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + + + PropsGB = SXGUICrGroupBox("Props", 242, 10, 768, 150, m_pRoot->getHWND(), 0, 0); + PropsGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + PropsGB->setColorText(RGB(0, 0, 0)); + PropsGB->setColorTextBk(RGB(255, 255, 255)); + PropsGB->setTransparentTextBk(true); + PropsGB->setColorBrush(RGB(255, 255, 255)); + PropsGB->addHandler(Tools::ProxyCommandProc, WM_COMMAND); + + Static1 = SXGUICrStatic("Name:", 6, 16, 50, 20, PropsGB->getHWND(), 0, 0); + Static1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static1->setColorText(RGB(0, 0, 0)); + Static1->setColorTextBk(RGB(255, 255, 255)); + Static1->setTransparentTextBk(true); + Static1->setColorBrush(RGB(255, 255, 255)); + + Static2 = SXGUICrStatic("Bone:", 6, 38, 50, 20, PropsGB->getHWND(), 0, 0); + Static2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static2->setColorText(RGB(0, 0, 0)); + Static2->setColorTextBk(RGB(255, 255, 255)); + Static2->setTransparentTextBk(true); + Static2->setColorBrush(RGB(255, 255, 255)); + + Static3 = SXGUICrStatic("Bodypart:", 6, 60, 50, 20, PropsGB->getHWND(), 0, 0); + Static3->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static3->setColorText(RGB(0, 0, 0)); + Static3->setColorTextBk(RGB(255, 255, 255)); + Static3->setTransparentTextBk(true); + Static3->setColorBrush(RGB(255, 255, 255)); + + EdName = SXGUICrEdit("", 57, 16, 100, 20, PropsGB->getHWND(), 0, IDC_HB_NAME); + EdName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdName->setColorText(RGB(0, 0, 0)); + EdName->setColorTextBk(RGB(255, 255, 255)); + EdName->setTransparentTextBk(true); + EdName->setColorBrush(RGB(255, 255, 255)); + + CBBone = SXGUICrComboBoxEx(57, 37, 100, 300, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, PropsGB->getHWND(), 0, IDC_HB_BONE); + CBBone->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CBBone->setColorText(RGB(0, 0, 0)); + CBBone->setColorTextBk(RGB(255, 255, 255)); + CBBone->setTransparentTextBk(true); + CBBone->setColorBrush(RGB(255, 255, 255)); + + CBBodyPart = SXGUICrComboBoxEx(57, 59, 100, 300, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, PropsGB->getHWND(), 0, IDC_HB_BODYPART); + CBBodyPart->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CBBodyPart->setColorText(RGB(0, 0, 0)); + CBBodyPart->setColorTextBk(RGB(255, 255, 255)); + CBBodyPart->setTransparentTextBk(true); + CBBodyPart->setColorBrush(RGB(255, 255, 255)); + + Static4 = SXGUICrStatic("Position", 172, 15, 241, 20, PropsGB->getHWND(), 0, 0); + Static4->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static4->setColorText(RGB(0, 0, 0)); + Static4->setColorTextBk(RGB(255, 255, 255)); + Static4->setTransparentTextBk(true); + Static4->setColorBrush(RGB(255, 255, 255)); + + Static5 = SXGUICrStatic("X", 172, 35, 15, 20, PropsGB->getHWND(), 0, 0); + Static5->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static5->setColorText(RGB(0, 0, 0)); + Static5->setColorTextBk(RGB(255, 255, 255)); + Static5->setTransparentTextBk(true); + Static5->setColorBrush(RGB(255, 255, 255)); + + EdPosX = SXGUICrEdit("0.0", 187, 35, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_POS_X); + EdPosX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdPosX->setColorText(RGB(0, 0, 0)); + EdPosX->setColorTextBk(RGB(255, 255, 255)); + EdPosX->setTransparentTextBk(true); + EdPosX->setColorBrush(RGB(255, 255, 255)); + + Static6 = SXGUICrStatic("Y", 256, 35, 15, 20, PropsGB->getHWND(), 0, 0); + Static6->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static6->setColorText(RGB(0, 0, 0)); + Static6->setColorTextBk(RGB(255, 255, 255)); + Static6->setTransparentTextBk(true); + Static6->setColorBrush(RGB(255, 255, 255)); + + EdPosY = SXGUICrEdit("0.0", 271, 35, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_POS_Y); + EdPosY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdPosY->setColorText(RGB(0, 0, 0)); + EdPosY->setColorTextBk(RGB(255, 255, 255)); + EdPosY->setTransparentTextBk(true); + EdPosY->setColorBrush(RGB(255, 255, 255)); + + Static7 = SXGUICrStatic("Z", 338, 35, 15, 20, PropsGB->getHWND(), 0, 0); + Static7->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static7->setColorText(RGB(0, 0, 0)); + Static7->setColorTextBk(RGB(255, 255, 255)); + Static7->setTransparentTextBk(true); + Static7->setColorBrush(RGB(255, 255, 255)); + + EdPosZ = SXGUICrEdit("0.0", 353, 35, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_POS_Z); + EdPosZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdPosZ->setColorText(RGB(0, 0, 0)); + EdPosZ->setColorTextBk(RGB(255, 255, 255)); + EdPosZ->setTransparentTextBk(true); + EdPosZ->setColorBrush(RGB(255, 255, 255)); + + Static8 = SXGUICrStatic("Rotation", 171, 59, 241, 20, PropsGB->getHWND(), 0, 0); + Static8->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static8->setColorText(RGB(0, 0, 0)); + Static8->setColorTextBk(RGB(255, 255, 255)); + Static8->setTransparentTextBk(true); + Static8->setColorBrush(RGB(255, 255, 255)); + + Static9 = SXGUICrStatic("X", 172, 79, 15, 20, PropsGB->getHWND(), 0, 0); + Static9->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static9->setColorText(RGB(0, 0, 0)); + Static9->setColorTextBk(RGB(255, 255, 255)); + Static9->setTransparentTextBk(true); + Static9->setColorBrush(RGB(255, 255, 255)); + + Static10 = SXGUICrStatic("Y", 256, 79, 15, 20, PropsGB->getHWND(), 0, 0); + Static10->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static10->setColorText(RGB(0, 0, 0)); + Static10->setColorTextBk(RGB(255, 255, 255)); + Static10->setTransparentTextBk(true); + Static10->setColorBrush(RGB(255, 255, 255)); + + Static11 = SXGUICrStatic("Z", 338, 79, 15, 20, PropsGB->getHWND(), 0, 0); + Static11->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static11->setColorText(RGB(0, 0, 0)); + Static11->setColorTextBk(RGB(255, 255, 255)); + Static11->setTransparentTextBk(true); + Static11->setColorBrush(RGB(255, 255, 255)); + + EdRotX = SXGUICrEdit("0.0", 187, 79, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_ROT_X); + EdRotX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdRotX->setColorText(RGB(0, 0, 0)); + EdRotX->setColorTextBk(RGB(255, 255, 255)); + EdRotX->setTransparentTextBk(true); + EdRotX->setColorBrush(RGB(255, 255, 255)); + + EdRotY = SXGUICrEdit("0.0", 271, 79, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_ROT_Y); + EdRotY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdRotY->setColorText(RGB(0, 0, 0)); + EdRotY->setColorTextBk(RGB(255, 255, 255)); + EdRotY->setTransparentTextBk(true); + EdRotY->setColorBrush(RGB(255, 255, 255)); + + EdRotZ = SXGUICrEdit("0.0", 353, 79, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_ROT_Z); + EdRotZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdRotZ->setColorText(RGB(0, 0, 0)); + EdRotZ->setColorTextBk(RGB(255, 255, 255)); + EdRotZ->setTransparentTextBk(true); + EdRotZ->setColorBrush(RGB(255, 255, 255)); + + Static16 = SXGUICrStatic("L", 172, 104, 15, 20, PropsGB->getHWND(), 0, 0); + Static16->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static16->setColorText(RGB(0, 0, 0)); + Static16->setColorTextBk(RGB(255, 255, 255)); + Static16->setTransparentTextBk(true); + Static16->setColorBrush(RGB(255, 255, 255)); + + Static13 = SXGUICrStatic("W", 256, 104, 15, 20, PropsGB->getHWND(), 0, 0); + Static13->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static13->setColorText(RGB(0, 0, 0)); + Static13->setColorTextBk(RGB(255, 255, 255)); + Static13->setTransparentTextBk(true); + Static13->setColorBrush(RGB(255, 255, 255)); + + Static14 = SXGUICrStatic("H", 338, 104, 15, 20, PropsGB->getHWND(), 0, 0); + Static14->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static14->setColorText(RGB(0, 0, 0)); + Static14->setColorTextBk(RGB(255, 255, 255)); + Static14->setTransparentTextBk(true); + Static14->setColorBrush(RGB(255, 255, 255)); + + EdL = SXGUICrEdit("0.0", 187, 104, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_L); + EdL->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdL->setColorText(RGB(0, 0, 0)); + EdL->setColorTextBk(RGB(255, 255, 255)); + EdL->setTransparentTextBk(true); + EdL->setColorBrush(RGB(255, 255, 255)); + + EdW = SXGUICrEdit("0.0", 271, 104, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_W); + EdW->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdW->setColorText(RGB(0, 0, 0)); + EdW->setColorTextBk(RGB(255, 255, 255)); + EdW->setTransparentTextBk(true); + EdW->setColorBrush(RGB(255, 255, 255)); + + EdH = SXGUICrEdit("0.0", 353, 104, 60, 20, PropsGB->getHWND(), 0, IDC_HB_ED_H); + EdH->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + EdH->setColorText(RGB(0, 0, 0)); + EdH->setColorTextBk(RGB(255, 255, 255)); + EdH->setTransparentTextBk(true); + EdH->setColorBrush(RGB(255, 255, 255)); + + Static15 = SXGUICrStatic("Type:", 6, 104, 50, 20, PropsGB->getHWND(), 0, 0); + Static15->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static15->setColorText(RGB(0, 0, 0)); + Static15->setColorTextBk(RGB(255, 255, 255)); + Static15->setTransparentTextBk(true); + Static15->setColorBrush(RGB(255, 255, 255)); + + CBType = SXGUICrComboBoxEx(57, 104, 100, 300, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, PropsGB->getHWND(), 0, IDC_HB_TYPE); + CBType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + CBType->setColorText(RGB(0, 0, 0)); + CBType->setColorTextBk(RGB(255, 255, 255)); + CBType->setTransparentTextBk(true); + CBType->setColorBrush(RGB(255, 255, 255)); - RBTranslate = SXGUICrRadioButton("Translate", 417, 15, 100, 20, PropsGB->GetHWND(), 0, IDC_HB_TRANS); - RBTranslate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - RBTranslate->SetColorText(0, 0, 0); - RBTranslate->SetColorTextBk(255, 255, 255); - RBTranslate->SetTransparentTextBk(true); - RBTranslate->SetColorBrush(255, 255, 255); - - RBRotate = SXGUICrRadioButton("Rotate", 417, 59, 100, 20, PropsGB->GetHWND(), 0, IDC_HB_ROT); - RBRotate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - RBRotate->SetColorText(0, 0, 0); - RBRotate->SetColorTextBk(255, 255, 255); - RBRotate->SetTransparentTextBk(true); - RBRotate->SetColorBrush(255, 255, 255); - - RBScale = SXGUICrRadioButton("Scale", 417, 104, 100, 20, PropsGB->GetHWND(), 0, IDC_HB_SCALE); - RBScale->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - RBScale->SetColorText(0, 0, 0); - RBScale->SetColorTextBk(255, 255, 255); - RBScale->SetTransparentTextBk(true); - RBScale->SetColorBrush(255, 255, 255); - - - - CBType->AddItem("Box"); - CBType->SetItemData(CBType->GetCount() - 1, HT_BOX); - CBType->AddItem("Cylinder"); - CBType->SetItemData(CBType->GetCount() - 1, HT_CYLINDER); - CBType->AddItem("Capsule"); - CBType->SetItemData(CBType->GetCount() - 1, HT_CAPSULE); - CBType->AddItem("Elipsoid"); - CBType->SetItemData(CBType->GetCount() - 1, HT_ELIPSOID); - - CBType->SetSel(0); - - CBBodyPart->AddItem("Default"); - CBBodyPart->SetItemData(CBBodyPart->GetCount() - 1, HBP_DEFAULT); - CBBodyPart->AddItem("Head"); - CBBodyPart->SetItemData(CBBodyPart->GetCount() - 1, HBP_HEAD); - CBBodyPart->AddItem("Chest"); - CBBodyPart->SetItemData(CBBodyPart->GetCount() - 1, HBP_CHEST); - CBBodyPart->AddItem("Stomach"); - CBBodyPart->SetItemData(CBBodyPart->GetCount() - 1, HBP_STOMACH); - CBBodyPart->AddItem("Left arm"); - CBBodyPart->SetItemData(CBBodyPart->GetCount() - 1, HBP_LEFTARM); - CBBodyPart->AddItem("Right arm"); - CBBodyPart->SetItemData(CBBodyPart->GetCount() - 1, HBP_RIGHTARM); - CBBodyPart->AddItem("Left leg"); - CBBodyPart->SetItemData(CBBodyPart->GetCount() - 1, HBP_LEFTLEG); - CBBodyPart->AddItem("Right leg"); - CBBodyPart->SetItemData(CBBodyPart->GetCount() - 1, HBP_RIGHTLEG); + RBTranslate = SXGUICrRadioButton("Translate", 417, 15, 100, 20, PropsGB->getHWND(), 0, IDC_HB_TRANS); + RBTranslate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + RBTranslate->setColorText(RGB(0, 0, 0)); + RBTranslate->setColorTextBk(RGB(255, 255, 255)); + RBTranslate->setTransparentTextBk(true); + RBTranslate->setColorBrush(RGB(255, 255, 255)); + + RBRotate = SXGUICrRadioButton("Rotate", 417, 59, 100, 20, PropsGB->getHWND(), 0, IDC_HB_ROT); + RBRotate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + RBRotate->setColorText(RGB(0, 0, 0)); + RBRotate->setColorTextBk(RGB(255, 255, 255)); + RBRotate->setTransparentTextBk(true); + RBRotate->setColorBrush(RGB(255, 255, 255)); + + RBScale = SXGUICrRadioButton("Scale", 417, 104, 100, 20, PropsGB->getHWND(), 0, IDC_HB_SCALE); + RBScale->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + RBScale->setColorText(RGB(0, 0, 0)); + RBScale->setColorTextBk(RGB(255, 255, 255)); + RBScale->setTransparentTextBk(true); + RBScale->setColorBrush(RGB(255, 255, 255)); + + + + CBType->addItem("Box"); + CBType->setItemData(CBType->getCount() - 1, HT_BOX); + CBType->addItem("Cylinder"); + CBType->setItemData(CBType->getCount() - 1, HT_CYLINDER); + CBType->addItem("Capsule"); + CBType->setItemData(CBType->getCount() - 1, HT_CAPSULE); + CBType->addItem("Elipsoid"); + CBType->setItemData(CBType->getCount() - 1, HT_ELIPSOID); + + CBType->setSel(0); + + CBBodyPart->addItem("Default"); + CBBodyPart->setItemData(CBBodyPart->getCount() - 1, HBP_DEFAULT); + CBBodyPart->addItem("Head"); + CBBodyPart->setItemData(CBBodyPart->getCount() - 1, HBP_HEAD); + CBBodyPart->addItem("Chest"); + CBBodyPart->setItemData(CBBodyPart->getCount() - 1, HBP_CHEST); + CBBodyPart->addItem("Stomach"); + CBBodyPart->setItemData(CBBodyPart->getCount() - 1, HBP_STOMACH); + CBBodyPart->addItem("Left arm"); + CBBodyPart->setItemData(CBBodyPart->getCount() - 1, HBP_LEFTARM); + CBBodyPart->addItem("Right arm"); + CBBodyPart->setItemData(CBBodyPart->getCount() - 1, HBP_RIGHTARM); + CBBodyPart->addItem("Left leg"); + CBBodyPart->setItemData(CBBodyPart->getCount() - 1, HBP_LEFTLEG); + CBBodyPart->addItem("Right leg"); + CBBodyPart->setItemData(CBBodyPart->getCount() - 1, HBP_RIGHTLEG); - CBBodyPart->SetSel(0); + CBBodyPart->setSel(0); Show(false); } diff --git a/source/sxae/TabSkins.cpp b/source/sxae/TabSkins.cpp index adce7dc6231e9bae3a410cf52cfa71309447adfa..c135ca3ec2ea46e44bcc07c5fa8a891122b79954 100644 --- a/source/sxae/TabSkins.cpp +++ b/source/sxae/TabSkins.cpp @@ -8,83 +8,83 @@ See the license in LICENSE TabSkins::TabSkins(TabManager * tm):EditorTab(tm) { - m_pTabBtn = SXGUICrButtonEx("Skins", 379, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pTabBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pTabBtn->GAlign = {false, true, true, false}; - m_pTabBtn->SetUserPtr(this); - m_pTabBtn->AddHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); + m_pTabBtn = SXGUICrButtonEx("Skins", 379, 648, 100, 20, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pTabBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pTabBtn->setFollowParentSides(false, true, true, false); + m_pTabBtn->setUserPtr(this); + m_pTabBtn->addHandler(EditorTab::TabBtnHandler, WM_LBUTTONUP); - m_pRoot = SXGUICrGroupBox("Skins", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->GetHWND(), 0, 0); - m_pRoot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - m_pRoot->SetColorText(0, 0, 0); - m_pRoot->SetColorTextBk(255, 255, 255); - m_pRoot->SetTransparentTextBk(true); - m_pRoot->SetColorBrush(255, 255, 255); - m_pRoot->GAlign = {false, true, true, true}; - SkinsList = SXGUICrListBox("", 7, 16, 335, 124, m_pRoot->GetHWND(), 0, 0, false); - SkinsList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinsList->SetColorText(0, 0, 0); - SkinsList->SetColorTextBk(255, 255, 255); - SkinsList->SetTransparentTextBk(true); - SkinsList->SetColorBrush(255, 255, 255); - SkinsList->GAlign = {1, 1, 1, 0}; - SkinNewBtn = SXGUICrButton("New", 7, 143, 79, 20, 0, m_pRoot->GetHWND(), 0, 0); - SkinNewBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinNewBtn->GAlign = {1, 1, 1, 0}; - SkinRenameBtn = SXGUICrButton("Rename", 90, 143, 78, 20, 0, m_pRoot->GetHWND(), 0, 0); - SkinRenameBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinRenameBtn->GAlign = {1, 1, 1, 0}; - SkinRemoveBtn = SXGUICrButton("Remove", 174, 143, 77, 20, 0, m_pRoot->GetHWND(), 0, 0); - SkinRemoveBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinRemoveBtn->GAlign = {1, 1, 1, 0}; - SkinDuplicateBtn = SXGUICrButton("Duplicate", 256, 143, 85, 20, 0, m_pRoot->GetHWND(), 0, 0); - SkinDuplicateBtn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinDuplicateBtn->GAlign = {1, 1, 1, 0}; - SkinMatsGB = SXGUICrGroupBox("Materials", 347, 16, 661, 143, m_pRoot->GetHWND(), 0, 0); - SkinMatsGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinMatsGB->SetColorText(0, 0, 0); - SkinMatsGB->SetColorTextBk(255, 255, 255); - SkinMatsGB->SetTransparentTextBk(true); - SkinMatsGB->SetColorBrush(255, 255, 255); - SkinMatsGB->GAlign = {1, 1, 1, 1}; - SkinMatsList = SXGUICrListBox("", 9, 15, 294, 121, SkinMatsGB->GetHWND(), 0, 0, false); - SkinMatsList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinMatsList->SetColorText(0, 0, 0); - SkinMatsList->SetColorTextBk(255, 255, 255); - SkinMatsList->SetTransparentTextBk(true); - SkinMatsList->SetColorBrush(255, 255, 255); - SkinMatsList->GAlign = {1, 1, 1, 0}; - SkinMatPropsGB = SXGUICrGroupBox("Props", 310, 15, 342, 121, SkinMatsGB->GetHWND(), 0, 0); - SkinMatPropsGB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinMatPropsGB->SetColorText(0, 0, 0); - SkinMatPropsGB->SetColorTextBk(255, 255, 255); - SkinMatPropsGB->SetTransparentTextBk(true); - SkinMatPropsGB->SetColorBrush(255, 255, 255); - SkinMatPropsGB->GAlign = {1, 1, 1, 1}; - SkinMatFile = SXGUICrEdit("Material", 10, 40, 288, 20, SkinMatPropsGB->GetHWND(), 0, 0); - SkinMatFile->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinMatFile->SetColorText(0, 0, 0); - SkinMatFile->SetColorTextBk(255, 255, 255); - SkinMatFile->SetTransparentTextBk(true); - SkinMatFile->SetColorBrush(255, 255, 255); - SkinMatFile->GAlign = {1, 1, 0, 0}; - Static6 = SXGUICrStatic("Material", 10, 17, 100, 20, SkinMatPropsGB->GetHWND(), 0, 0); - Static6->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - Static6->SetColorText(0, 0, 0); - Static6->SetColorTextBk(255, 255, 255); - Static6->SetTransparentTextBk(true); - Static6->SetColorBrush(255, 255, 255); - Static6->GAlign = {1, 1, 0, 0}; - SkinMatBrowse = SXGUICrButton("...", 302, 39, 31, 20, 0, SkinMatPropsGB->GetHWND(), 0, 0); - SkinMatBrowse->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinMatBrowse->GAlign = {1, 1, 0, 0}; - SkinMatReset = SXGUICrButton("Reset to default", 234, 92, 100, 20, 0, SkinMatPropsGB->GetHWND(), 0, 0); - SkinMatReset->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SkinMatReset->GAlign = {0, 0, 1, 1}; + m_pRoot = SXGUICrGroupBox("Skins", 279, 480, 1016, 167, m_pTM->GetBaseWnd()->getHWND(), 0, 0); + m_pRoot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + m_pRoot->setColorText(RGB(0, 0, 0)); + m_pRoot->setColorTextBk(RGB(255, 255, 255)); + m_pRoot->setTransparentTextBk(true); + m_pRoot->setColorBrush(RGB(255, 255, 255)); + m_pRoot->setFollowParentSides(false, true, true, true); + SkinsList = SXGUICrListBox(7, 16, 335, 124, m_pRoot->getHWND(), 0, 0, false); + SkinsList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinsList->setColorText(RGB(0, 0, 0)); + SkinsList->setColorTextBk(RGB(255, 255, 255)); + SkinsList->setTransparentTextBk(true); + SkinsList->setColorBrush(RGB(255, 255, 255)); + SkinsList->setFollowParentSides(1, 1, 1, 0); + SkinNewBtn = SXGUICrButton("New", 7, 143, 79, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + SkinNewBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinNewBtn->setFollowParentSides(1, 1, 1, 0); + SkinRenameBtn = SXGUICrButton("Rename", 90, 143, 78, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + SkinRenameBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinRenameBtn->setFollowParentSides(1, 1, 1, 0); + SkinRemoveBtn = SXGUICrButton("Remove", 174, 143, 77, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + SkinRemoveBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinRemoveBtn->setFollowParentSides(1, 1, 1, 0); + SkinDuplicateBtn = SXGUICrButton("Duplicate", 256, 143, 85, 20, SXGUI_BUTTON_IMAGE_NONE, m_pRoot->getHWND(), 0, 0); + SkinDuplicateBtn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinDuplicateBtn->setFollowParentSides(1, 1, 1, 0); + SkinMatsGB = SXGUICrGroupBox("Materials", 347, 16, 661, 143, m_pRoot->getHWND(), 0, 0); + SkinMatsGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinMatsGB->setColorText(RGB(0, 0, 0)); + SkinMatsGB->setColorTextBk(RGB(255, 255, 255)); + SkinMatsGB->setTransparentTextBk(true); + SkinMatsGB->setColorBrush(RGB(255, 255, 255)); + SkinMatsGB->setFollowParentSides(1, 1, 1, 1); + SkinMatsList = SXGUICrListBox(9, 15, 294, 121, SkinMatsGB->getHWND(), 0, 0, false); + SkinMatsList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinMatsList->setColorText(RGB(0, 0, 0)); + SkinMatsList->setColorTextBk(RGB(255, 255, 255)); + SkinMatsList->setTransparentTextBk(true); + SkinMatsList->setColorBrush(RGB(255, 255, 255)); + SkinMatsList->setFollowParentSides(1, 1, 1, 0); + SkinMatPropsGB = SXGUICrGroupBox("Props", 310, 15, 342, 121, SkinMatsGB->getHWND(), 0, 0); + SkinMatPropsGB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinMatPropsGB->setColorText(RGB(0, 0, 0)); + SkinMatPropsGB->setColorTextBk(RGB(255, 255, 255)); + SkinMatPropsGB->setTransparentTextBk(true); + SkinMatPropsGB->setColorBrush(RGB(255, 255, 255)); + SkinMatPropsGB->setFollowParentSides(1, 1, 1, 1); + SkinMatFile = SXGUICrEdit("Material", 10, 40, 288, 20, SkinMatPropsGB->getHWND(), 0, 0); + SkinMatFile->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinMatFile->setColorText(RGB(0, 0, 0)); + SkinMatFile->setColorTextBk(RGB(255, 255, 255)); + SkinMatFile->setTransparentTextBk(true); + SkinMatFile->setColorBrush(RGB(255, 255, 255)); + SkinMatFile->setFollowParentSides(1, 1, 0, 0); + Static6 = SXGUICrStatic("Material", 10, 17, 100, 20, SkinMatPropsGB->getHWND(), 0, 0); + Static6->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + Static6->setColorText(RGB(0, 0, 0)); + Static6->setColorTextBk(RGB(255, 255, 255)); + Static6->setTransparentTextBk(true); + Static6->setColorBrush(RGB(255, 255, 255)); + Static6->setFollowParentSides(1, 1, 0, 0); + SkinMatBrowse = SXGUICrButton("...", 302, 39, 31, 20, SXGUI_BUTTON_IMAGE_NONE, SkinMatPropsGB->getHWND(), 0, 0); + SkinMatBrowse->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinMatBrowse->setFollowParentSides(1, 1, 0, 0); + SkinMatReset = SXGUICrButton("Reset to default", 234, 92, 100, 20, SXGUI_BUTTON_IMAGE_NONE, SkinMatPropsGB->getHWND(), 0, 0); + SkinMatReset->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SkinMatReset->setFollowParentSides(0, 0, 1, 1); Show(false); - m_pTabBtn->Enable(0); + m_pTabBtn->setEnable(0); } diff --git a/source/sxae/main.cpp b/source/sxae/main.cpp index b66a0be942f9373bc50e1ac34425df44537b78f3..ee6885c102bbee314b7eb9c36d2463a10975ad49 100644 --- a/source/sxae/main.cpp +++ b/source/sxae/main.cpp @@ -15,15 +15,12 @@ See the license in LICENSE # pragma comment(lib, "sxguiwinapi.lib") #endif -int APIENTRY wWinMain(_In_ HINSTANCE hInstance, - _In_opt_ HINSTANCE hPrevInstance, - _In_ LPTSTR lpCmdLine, - _In_ int nCmdShow) +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); - SXGUIRegClass::RegGroupBox(); + SXGUIinit(); Editor edt; diff --git a/source/sxconsole/sxconsole.cpp b/source/sxconsole/sxconsole.cpp index 61c8b6670b0ea8a422f2fe257436f59c7dcc5450..fee218ce0cf36cc5efd7d493056587d0ad4d5d94 100644 --- a/source/sxconsole/sxconsole.cpp +++ b/source/sxconsole/sxconsole.cpp @@ -725,11 +725,21 @@ int main(int argc, char ** argv) g_iHistoryPointer = 0; g_vHistory.push_back({NULL, NULL}); - if(argc == 2) + char szTitle[64]; + + if (argc >= 2) { - g_bExitOnDisconnect = true; - sscanf(argv[1], "%d", &g_iServerPort); + int iPort = 0; + sscanf(argv[1], "%d", &iPort); + if (iPort > 0) + { + g_bExitOnDisconnect = true; + g_iServerPort = iPort; + } } + sprintf(szTitle, "sxconsole - %s", argc >= 3 ? argv[2] : ""); + SetConsoleTitleA(szTitle); + sprintf(g_szServerPort, "%d", g_iServerPort); sprintf(g_szClientPort, "%d", g_iServerPort + 1); @@ -746,7 +756,7 @@ int main(int argc, char ** argv) //strcpy(str, "Some " COLOR_RED "red " COLOR_RESET "text\n"); //WriteColored(str); - SetConsoleTitle(L"sxconsole"); + //SetConsoleTitle(L"sxconsole"); while(1) { diff --git a/source/sxgenpreview/sxgenpreview.cpp b/source/sxgenpreview/sxgenpreview.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc20e7509c68a2ed99666e4b2ab7464838ae89c1 --- /dev/null +++ b/source/sxgenpreview/sxgenpreview.cpp @@ -0,0 +1,427 @@ + +/****************************************************** +Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2018 +See the license in LICENSE +******************************************************/ + +/*! +\file +Главный файл генератора превью игровых ресурсов sxgenpreview +*/ + +/*! +\page genpreview Генератор превью игровых ресурсов sxgenpreview +Основная задача - генерация превью для некоторых игровых ресурсов, таких как: + - статическая геометрия + - анимационные модели + - текстуры +Основывается на основных данных движка, запускается и работает в скрытом режиме, показывает только консоль. +Поддерживает сравнение времени изменения файлов, то есть при запуске не будет создавать все первью заного, а только те которые более неактуальны по времени. +*/ + +#include <skyxengine.h> + +UINT CreatePreviewTextures() +{ + UINT uStartTime = GetTickCount(); + String sGameTextures = Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES); + String sPreviewTextures = Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES); + sPreviewTextures.Replace(SKYXENGINE_RELPATH_GAMESOURCE, SKYXENGINE_RELPATH_EDITOR_CACHE, 0); + + Array<String> aDirs = FileGetListDirs(sGameTextures.c_str()); + + for (int i = 0, il = aDirs.size(); i < il; ++i) + { + Array<String> aFiles = FileGetListFiles((sGameTextures + aDirs[i]).c_str()); + + FileCreateDir((sPreviewTextures + aDirs[i]).c_str()); + + for (int k = 0, kl = aFiles.size(); k < kl; ++k) + { + String sFullPathFile = sGameTextures + aDirs[i] + "/" + aFiles[k]; + String sFullPathFileSave = sPreviewTextures + aDirs[i] + "/" + aFiles[k]; + sFullPathFileSave = FileSetStrExt(sFullPathFileSave.c_str(), "jpg"); + + if (FileGetTimeLastModify(sFullPathFile.c_str()) >= FileGetTimeLastModify(sFullPathFileSave.c_str())) + { + IDirect3DTexture9 *pTexture = SkyXEngine_LoadAsPreviewData(sFullPathFile.c_str()); + + if (pTexture) + D3DXSaveTextureToFile(sFullPathFileSave.c_str(), D3DXIFF_JPG, pTexture, 0); + + mem_release(pTexture); + } + } + } + + return GetTickCount() - uStartTime; +} + +UINT CreatePreviewModels() +{ + UINT uStartTime = GetTickCount(); + static IDirect3DDevice9 *pDXDevice = SGCore_GetDXDevice(); + + if (!pDXDevice) + return 1; + + pDXDevice->SetRenderState(D3DRS_LIGHTING, FALSE); + + pDXDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); + pDXDevice->SetRenderState(D3DRS_ZWRITEENABLE, D3DZB_TRUE); + + pDXDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); + pDXDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); + pDXDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR); + + pDXDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP); + pDXDevice->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP); + pDXDevice->SetSamplerState(0, D3DSAMP_ADDRESSW, D3DTADDRESS_WRAP); + + pDXDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); + pDXDevice->SetRenderState(D3DRS_ALPHAREF, 16); + pDXDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); + + float4x4 mView; + float4x4 mProjection = SMMatrixPerspectiveFovLH(SM_PIDIV2, 1.f, 0.025f, 100000.f); + + + ISXCamera *pCamera = SGCore_CrCamera(); + //pCamera->setFOV(SM_PIDIV2); + + + String sGameMeshes = Core_RStringGet(G_RI_STRING_PATH_GS_MESHES); + String sGameModels = Core_RStringGet(G_RI_STRING_PATH_GS_MODELS); + + Array<String> aFiles = FileGetListRec(sGameMeshes.c_str(), FILE_LIST_TYPE_FILES); + + for (int i = 0, il = aFiles.size(); i < il; ++i) + { + aFiles[i] = String(Core_RStringGet(G_RI_STRING_PATH_GS_MESHES)) + aFiles[i]; + } + + Array<String> aFilesModels = FileGetListRec(sGameModels.c_str(), FILE_LIST_TYPE_FILES); + + for (int i = 0, il = aFilesModels.size(); i < il; ++i) + { + aFiles.push_back(String(Core_RStringGet(G_RI_STRING_PATH_GS_MODELS)) + aFilesModels[i]); + } + + + for (int i = 0; i < aFiles.size(); ++i) + { + //printf("%s\n", aFiles[i].c_str()); + + String sPreview = aFiles[i]; + sPreview.Replace(SKYXENGINE_RELPATH_GAMESOURCE, SKYXENGINE_RELPATH_EDITOR_CACHE, 0); + sPreview = FileSetStrExt(sPreview.c_str(), "jpg"); + + if (FileGetTimeLastModify(sPreview.c_str()) >= FileGetTimeLastModify(aFiles[i].c_str())) + continue; + + String sPath = aFiles[i]; + if (!SGCore_DSE_IsModel(sPath.c_str())) + continue; + + FileCreateDir(FileGetPrevDir(sPreview.c_str()).c_str()); + + SGCore_LoadTexClearLoaded(); + + IAnimPlayer *pModel = SXAnim_CreatePlayer(sPath.c_str()); + + const ISXBound *pBound = pModel->getBound(); + float3 vMin, vMax; + pBound->getMinMax(&vMin, &vMax); + float3 vCenter = (vMax + vMin) * 0.5f; + float3 vDimensions = (vMax - vMin); + float3 vBias; + SMQuaternion qBias; + + if ( + (vDimensions.x >= vDimensions.y && vDimensions.x >= vDimensions.z && vDimensions.y >= vDimensions.z) || + (vDimensions.y >= vDimensions.x && vDimensions.y >= vDimensions.z && vDimensions.x >= vDimensions.z) + ) + { + vBias = float3(vCenter.x, vCenter.y, vCenter.z - 1.f); + } + else if ( + (vDimensions.x >= vDimensions.y && vDimensions.x >= vDimensions.z && vDimensions.z >= vDimensions.y) || + (vDimensions.z >= vDimensions.x && vDimensions.z >= vDimensions.y && vDimensions.y >= vDimensions.x) + ) + { + vBias = float3(vCenter.x, vCenter.y + 1, vCenter.z); + qBias = SMQuaternion(-SM_PIDIV2, 'x'); + } + else if ( + (vDimensions.y >= vDimensions.x && vDimensions.y >= vDimensions.z && vDimensions.z >= vDimensions.x) || + (vDimensions.z >= vDimensions.x && vDimensions.z >= vDimensions.y && vDimensions.y >= vDimensions.x) + ) + { + vBias = float3(vCenter.x + 1.f, vCenter.y, vCenter.z); + qBias = SMQuaternion(-SM_PIDIV2, 'y'); + } + + + float3 vCamPos(vBias); + pCamera->setOrientation(&(qBias)); + + float3 vCamLook; + pCamera->getLook(&vCamLook); + + pCamera->getViewMatrix(&mView); + pCamera->updateFrustum(&mProjection); + + float3 aBoxPoints[8]; + aBoxPoints[0] = vMin; + aBoxPoints[1] = float3(vMin.x, vMin.y, vMax.z); + aBoxPoints[2] = float3(vMin.x, vMax.y, vMin.z); + aBoxPoints[3] = float3(vMax.x, vMin.y, vMin.z); + aBoxPoints[4] = float3(vMax.x, vMax.y, vMin.z); + aBoxPoints[5] = float3(vMax.x, vMin.y, vMax.z); + aBoxPoints[5] = float3(vMin.x, vMax.y, vMax.z); + aBoxPoints[7] = vMax; + + while (true) + { + if ( + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[0]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[1]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[2]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[3]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[4]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[5]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[6]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[7]) + ) + { + vCamPos += -(vCamLook); + pCamera->setPosition(&vCamPos); + + pCamera->getViewMatrix(&mView); + pCamera->updateFrustum(&mProjection); + } + else + break; + } + + + SGCore_ShaderAllLoad(); + SGCore_LoadTexAllLoad(); + + SXAnim_Update(); + SXAnim_Sync(); + + pCamera->getViewMatrix(&mView); + pCamera->updateFrustum(&mProjection); + + pDXDevice->SetTransform(D3DTS_WORLD, &((D3DXMATRIX)SMMatrixIdentity())); + pDXDevice->SetTransform(D3DTS_VIEW, &((D3DXMATRIX)mView)); + pDXDevice->SetTransform(D3DTS_PROJECTION, &((D3DXMATRIX)mProjection)); + + pDXDevice->BeginScene(); + pDXDevice->Clear(0, 0, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB(0, 0, 0, 0), 1.0f, 0); + + SXAnim_Render(); + + pDXDevice->EndScene(); + pDXDevice->Present(0, 0, 0, 0); + + IDirect3DSurface9 *pBackBuf; + pDXDevice->GetRenderTarget(0, &pBackBuf); + D3DXSaveSurfaceToFile(sPreview.c_str(), D3DXIFF_JPG, pBackBuf, NULL, NULL); + + mem_release(pBackBuf); + mem_release(pModel); + } + + mem_release(pCamera); + + return GetTickCount() - uStartTime; +} + +//########################################################################## + +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) +{ + SkyXEngine_InitOutLog(); + SkyXEngine_InitPaths(); + HWND hWnd = SkyXEngine_CreateWindow("GenPreview", "GenPreview", SKYXENGINE_PREVIEW_SIZE, SKYXENGINE_PREVIEW_SIZE); + + /*if (!Core_0IsProcessRun("sxconsole.exe")) + ShellExecute(0, "open", "sxconsole.exe", "0 GenPreview", Core_RStringGet(G_RI_STRING_PATH_EXE), SW_SHOWNORMAL);*/ + + Core_0Create("sxcore", "GenPreview", false); + Core_Dbg_Set(SkyXEngine_PrintfLog); + Core_SetOutPtr(); + + /*ID idTimerRender = Core_TimeAdd(); + Core_RIntSet(G_RI_INT_TIMER_RENDER, idTimerRender); + + Core_TimeWorkingSet(idTimerRender, true);*/ + + SSInput_0Create("sxinput", hWnd, false); + SSInput_Dbg_Set(SkyXEngine_PrintfLog); + + SGCore_0Create("sxgcore", hWnd, SKYXENGINE_PREVIEW_SIZE, SKYXENGINE_PREVIEW_SIZE, true, 0, false); + SGCore_Dbg_Set(SkyXEngine_PrintfLog); + + SXAnim_0Create(); + SXAnim_Dbg_Set(SkyXEngine_PrintfLog); + + //ShowWindow(hWnd, SW_SHOW); + CreatePreviewModels(); + CreatePreviewTextures(); + + return 0; + + //********************************************************************** + + /*static IDirect3DDevice9 *pDXDevice = SGCore_GetDXDevice(); + + if (!pDXDevice) + return 1; + + pDXDevice->SetRenderState(D3DRS_LIGHTING, FALSE); + + pDXDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); + pDXDevice->SetRenderState(D3DRS_ZWRITEENABLE, D3DZB_TRUE); + + pDXDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); + pDXDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); + pDXDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR); + + pDXDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP); + pDXDevice->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP); + pDXDevice->SetSamplerState(0, D3DSAMP_ADDRESSW, D3DTADDRESS_WRAP); + + pDXDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); + pDXDevice->SetRenderState(D3DRS_ALPHAREF, 16); + pDXDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); + + ShowWindow(hWnd, SW_SHOW); + + ISXCamera *pCamera = SGCore_CrCamera(); + pCamera->setFOV(1.57f); + + //IAnimPlayer *pModel = SXAnim_CreatePlayer("models/stalker_zombi/stalker_zombi.dse"); + IAnimPlayer *pModel = SXAnim_CreatePlayer("meshes/light/light_1.dse"); + + float4x4 mView; + float4x4 mProjection = SMMatrixPerspectiveFovLH(1.57f, 1.f, 0.025f, 100000.f); + + const ISXBound *pBound = pModel->getBound(); + float3 vMin, vMax; + pBound->getMinMax(&vMin, &vMax); + float3 vCenter = (vMax + vMin) * 0.5f; + float3 vDimensions = (vMax - vMin); + float3 vBias; + SMQuaternion qBias; + + if ( + (vDimensions.x >= vDimensions.y && vDimensions.x >= vDimensions.z && vDimensions.y >= vDimensions.z) || + (vDimensions.y >= vDimensions.x && vDimensions.y >= vDimensions.z && vDimensions.x >= vDimensions.z) + ) + { + vBias = float3(vCenter.x, vCenter.y, vCenter.z - 1.f); + } + else if ( + (vDimensions.x >= vDimensions.y && vDimensions.x >= vDimensions.z && vDimensions.z >= vDimensions.y) || + (vDimensions.z >= vDimensions.x && vDimensions.z >= vDimensions.y && vDimensions.y >= vDimensions.x) + ) + { + vBias = float3(vCenter.x, vCenter.y + 1, vCenter.z); + qBias = SMQuaternion(-SM_PIDIV2, 'x'); + } + else if ( + (vDimensions.y >= vDimensions.x && vDimensions.y >= vDimensions.z && vDimensions.z >= vDimensions.x) || + (vDimensions.z >= vDimensions.x && vDimensions.z >= vDimensions.y && vDimensions.y >= vDimensions.x) + ) + { + vBias = float3(vCenter.x + 1.f, vCenter.y, vCenter.z); + qBias = SMQuaternion(-SM_PIDIV2, 'y'); + } + + float3 vCamPos(vBias); + pCamera->setOrientation(&(qBias)); + + float3 vCamLook; + pCamera->getLook(&vCamLook); + + pCamera->getViewMatrix(&mView); + pCamera->updateFrustum(&mProjection); + + float3 aBoxPoints[8]; + aBoxPoints[0] = vMin; + aBoxPoints[1] = float3(vMin.x, vMin.y, vMax.z); + aBoxPoints[2] = float3(vMin.x, vMax.y, vMin.z); + aBoxPoints[3] = float3(vMax.x, vMin.y, vMin.z); + aBoxPoints[4] = float3(vMax.x, vMax.y, vMin.z); + aBoxPoints[5] = float3(vMax.x, vMin.y, vMax.z); + aBoxPoints[5] = float3(vMin.x, vMax.y, vMax.z); + aBoxPoints[7] = vMax; + + while (true) + { + if ( + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[0]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[1]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[2]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[3]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[4]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[5]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[6]) || + !pCamera->getFrustum()->pointInFrustum(&aBoxPoints[7]) + ) + { + vCamPos += -(vCamLook); + pCamera->setPosition(&vCamPos); + + pCamera->getViewMatrix(&mView); + pCamera->updateFrustum(&mProjection); + } + else + break; + } + + MSG msg; + ::ZeroMemory(&msg, sizeof(MSG)); + + while (msg.message != WM_QUIT) + { + if (::PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) + { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + else + { + SGCore_ShaderAllLoad(); + SGCore_LoadTexAllLoad(); + + pCamera->updateFrustum(&mProjection); + + SXAnim_Update(); + SXAnim_Sync(); + + pCamera->getViewMatrix(&mView); + + pDXDevice->SetTransform(D3DTS_WORLD, &((D3DXMATRIX)SMMatrixIdentity())); + pDXDevice->SetTransform(D3DTS_VIEW, &((D3DXMATRIX)mView)); + pDXDevice->SetTransform(D3DTS_PROJECTION, &((D3DXMATRIX)mProjection)); + + pDXDevice->BeginScene(); + pDXDevice->Clear(0, 0, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB(0, 0, 0, 0), 1.0f, 0); + + SXAnim_Render(); + + pDXDevice->EndScene(); + pDXDevice->Present(0, 0, 0, 0); + } + } + + SGCore_LoadTexClearLoaded(); + mem_release(pCamera); + mem_release(pModel); + + return msg.message;*/ +} \ No newline at end of file diff --git a/source/sxleveleditor/aigrid_callback.cpp b/source/sxleveleditor/aigrid_callback.cpp index cf3a5d96b1073f9c96ad3bb34acb4d38e2436c1e..5f00f6e68229bc86bb0cb42b164e0f6eea34c01a 100644 --- a/source/sxleveleditor/aigrid_callback.cpp +++ b/source/sxleveleditor/aigrid_callback.cpp @@ -3,41 +3,41 @@ void SXLevelEditor::AIGridActivateAll(bool bf) { - ButtonAIQuadsDelSel->Visible(bf); - ButtonAIGridClear->Visible(bf); - ButtonAIGridGen->Visible(bf); - ButtonAIClearAll->Visible(bf); - StatiAIBBDimensions->Visible(bf); - StaticAIBBDimensionsWidth->Visible(bf); - EditAIBBDimensionsWidth->Visible(bf); - StaticAIBBDimensionsHeight->Visible(bf); - EditAIBBDimensionsHeight->Visible(bf); - StaticAIBBDimensionsDepth->Visible(bf); - EditAIBBDimensionsDepth->Visible(bf); - StaticAIBBPos->Visible(bf); - StaticAIBBPosX->Visible(bf); - EditAIBBPosX->Visible(bf); - StaticAIBBPosY->Visible(bf); - EditAIBBPosY->Visible(bf); - StaticAIBBPosZ->Visible(bf); - EditAIBBPosZ->Visible(bf); - ButtonAIBBFinish->Visible(bf); - ButtonAIGPGen->Visible(bf); - ButtonAIGPClear->Visible(bf); - RadioButtonAIGPAdd->Visible(bf); - RadioButtonAIGPDel->Visible(bf); - RadioButtonAIQuadAdd->Visible(bf); - RadioButtonAIQuadsMSel->Visible(bf); - RadioButtonAIQuadsSelDel->Visible(bf); - ButtonAIGridValidation->Visible(bf); - CheckBoxAIGridMarkedSplits->Visible(bf); - StaticAIStatistics->Visible(bf); - StaticAIStatsCountQuads->Visible(bf); - StaticAIStatsCountGP->Visible(bf); - StaticAIStatsCountSplits->Visible(bf); - EditAIStatsCountQuads->Visible(bf); - EditAIStatsCountGP->Visible(bf); - EditAIStatsCountSplits->Visible(bf); + ButtonAIQuadsDelSel->setVisible(bf); + ButtonAIGridClear->setVisible(bf); + ButtonAIGridGen->setVisible(bf); + ButtonAIClearAll->setVisible(bf); + StatiAIBBDimensions->setVisible(bf); + StaticAIBBDimensionsWidth->setVisible(bf); + EditAIBBDimensionsWidth->setVisible(bf); + StaticAIBBDimensionsHeight->setVisible(bf); + EditAIBBDimensionsHeight->setVisible(bf); + StaticAIBBDimensionsDepth->setVisible(bf); + EditAIBBDimensionsDepth->setVisible(bf); + StaticAIBBPos->setVisible(bf); + StaticAIBBPosX->setVisible(bf); + EditAIBBPosX->setVisible(bf); + StaticAIBBPosY->setVisible(bf); + EditAIBBPosY->setVisible(bf); + StaticAIBBPosZ->setVisible(bf); + EditAIBBPosZ->setVisible(bf); + ButtonAIBBFinish->setVisible(bf); + ButtonAIGPGen->setVisible(bf); + ButtonAIGPClear->setVisible(bf); + RadioButtonAIGPAdd->setVisible(bf); + RadioButtonAIGPDel->setVisible(bf); + RadioButtonAIQuadAdd->setVisible(bf); + RadioButtonAIQuadsMSel->setVisible(bf); + RadioButtonAIQuadsSelDel->setVisible(bf); + ButtonAIGridValidation->setVisible(bf); + CheckBoxAIGridMarkedSplits->setVisible(bf); + StaticAIStatistics->setVisible(bf); + StaticAIStatsCountQuads->setVisible(bf); + StaticAIStatsCountGP->setVisible(bf); + StaticAIStatsCountSplits->setVisible(bf); + EditAIStatsCountQuads->setVisible(bf); + EditAIStatsCountGP->setVisible(bf); + EditAIStatsCountSplits->setVisible(bf); SXLevelEditor::AIGridEnableBB(!(SAIG_BBIsCreatedFinish())); @@ -48,57 +48,57 @@ void SXLevelEditor::AIGridActivateAll(bool bf) SAIG_BBGetDimensions(&tmpdim); SAIG_BBGetPos(&tmppos); - EditAIBBDimensionsWidth->SetText(String(tmpdim.x).c_str()); - EditAIBBDimensionsHeight->SetText(String(tmpdim.y).c_str()); - EditAIBBDimensionsDepth->SetText(String(tmpdim.z).c_str()); + EditAIBBDimensionsWidth->setText(String(tmpdim.x).c_str()); + EditAIBBDimensionsHeight->setText(String(tmpdim.y).c_str()); + EditAIBBDimensionsDepth->setText(String(tmpdim.z).c_str()); - EditAIBBPosX->SetText(String(tmppos.x).c_str()); - EditAIBBPosY->SetText(String(tmppos.y).c_str()); - EditAIBBPosZ->SetText(String(tmppos.z).c_str()); + EditAIBBPosX->setText(String(tmppos.x).c_str()); + EditAIBBPosY->setText(String(tmppos.y).c_str()); + EditAIBBPosZ->setText(String(tmppos.z).c_str()); - EditAIStatsCountQuads->SetText(String((DWORD)SAIG_GridGetCountQuads()).c_str()); - EditAIStatsCountGP->SetText(String((DWORD)SAIG_GraphPointGetCount()).c_str()); - EditAIStatsCountSplits->SetText(String((DWORD)SAIG_GridGetCountSplits()).c_str()); + EditAIStatsCountQuads->setText(String((DWORD)SAIG_GridGetCountQuads()).c_str()); + EditAIStatsCountGP->setText(String((DWORD)SAIG_GraphPointGetCount()).c_str()); + EditAIStatsCountSplits->setText(String((DWORD)SAIG_GridGetCountSplits()).c_str()); } void SXLevelEditor::AIGridEnableBB(bool bf) { - StatiAIBBDimensions->Enable(bf); - StaticAIBBDimensionsWidth->Enable(bf); - EditAIBBDimensionsWidth->Enable(bf); - StaticAIBBDimensionsHeight->Enable(bf); - EditAIBBDimensionsHeight->Enable(bf); - StaticAIBBDimensionsDepth->Enable(bf); - EditAIBBDimensionsDepth->Enable(bf); - StaticAIBBPos->Enable(bf); - StaticAIBBPosX->Enable(bf); - EditAIBBPosX->Enable(bf); - StaticAIBBPosY->Enable(bf); - EditAIBBPosY->Enable(bf); - StaticAIBBPosZ->Enable(bf); - EditAIBBPosZ->Enable(bf); - ButtonAIBBFinish->Enable(bf); - - ButtonAIGridClear->Enable(!bf); - ButtonAIGPGen->Enable(!bf); - ButtonAIGPClear->Enable(!bf); - RadioButtonAIGPAdd->Enable(!bf); - RadioButtonAIGPDel->Enable(!bf); - RadioButtonAIQuadAdd->Enable(!bf); - RadioButtonAIQuadsMSel->Enable(!bf); - RadioButtonAIQuadsSelDel->Enable(!bf); - ButtonAIGridValidation->Enable(!bf); - CheckBoxAIGridMarkedSplits->Enable(!bf); - StaticAIStatistics->Enable(!bf); - StaticAIStatsCountQuads->Enable(!bf); - StaticAIStatsCountGP->Enable(!bf); - StaticAIStatsCountSplits->Enable(!bf); - EditAIStatsCountQuads->Enable(!bf); - EditAIStatsCountGP->Enable(!bf); - EditAIStatsCountSplits->Enable(!bf); - ButtonAIQuadsDelSel->Enable(!bf); - ButtonAIGridGen->Enable(!bf); - ButtonAIClearAll->Enable(!bf); + StatiAIBBDimensions->setEnable(bf); + StaticAIBBDimensionsWidth->setEnable(bf); + EditAIBBDimensionsWidth->setEnable(bf); + StaticAIBBDimensionsHeight->setEnable(bf); + EditAIBBDimensionsHeight->setEnable(bf); + StaticAIBBDimensionsDepth->setEnable(bf); + EditAIBBDimensionsDepth->setEnable(bf); + StaticAIBBPos->setEnable(bf); + StaticAIBBPosX->setEnable(bf); + EditAIBBPosX->setEnable(bf); + StaticAIBBPosY->setEnable(bf); + EditAIBBPosY->setEnable(bf); + StaticAIBBPosZ->setEnable(bf); + EditAIBBPosZ->setEnable(bf); + ButtonAIBBFinish->setEnable(bf); + + ButtonAIGridClear->setEnable(!bf); + ButtonAIGPGen->setEnable(!bf); + ButtonAIGPClear->setEnable(!bf); + RadioButtonAIGPAdd->setEnable(!bf); + RadioButtonAIGPDel->setEnable(!bf); + RadioButtonAIQuadAdd->setEnable(!bf); + RadioButtonAIQuadsMSel->setEnable(!bf); + RadioButtonAIQuadsSelDel->setEnable(!bf); + ButtonAIGridValidation->setEnable(!bf); + CheckBoxAIGridMarkedSplits->setEnable(!bf); + StaticAIStatistics->setEnable(!bf); + StaticAIStatsCountQuads->setEnable(!bf); + StaticAIStatsCountGP->setEnable(!bf); + StaticAIStatsCountSplits->setEnable(!bf); + EditAIStatsCountQuads->setEnable(!bf); + EditAIStatsCountGP->setEnable(!bf); + EditAIStatsCountSplits->setEnable(!bf); + ButtonAIQuadsDelSel->setEnable(!bf); + ButtonAIGridGen->setEnable(!bf); + ButtonAIClearAll->setEnable(!bf); } LRESULT SXLevelEditor_EditAIBBDimensions_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -107,19 +107,19 @@ LRESULT SXLevelEditor_EditAIBBDimensions_Enter(HWND hwnd, UINT msg, WPARAM wPara float3 tmpdim; SAIG_BBGetDimensions(&tmpdim); - if (hwnd == SXLevelEditor::EditAIBBDimensionsWidth->GetHWND()) + if (hwnd == SXLevelEditor::EditAIBBDimensionsWidth->getHWND()) { - SXLevelEditor::EditAIBBDimensionsWidth->GetText(txt, 64); + SXLevelEditor::EditAIBBDimensionsWidth->getText(txt, 64); sscanf(txt, "%f", &(tmpdim.x)); } - else if (hwnd == SXLevelEditor::EditAIBBDimensionsHeight->GetHWND()) + else if (hwnd == SXLevelEditor::EditAIBBDimensionsHeight->getHWND()) { - SXLevelEditor::EditAIBBDimensionsHeight->GetText(txt, 64); + SXLevelEditor::EditAIBBDimensionsHeight->getText(txt, 64); sscanf(txt, "%f", &(tmpdim.y)); } - else if (hwnd == SXLevelEditor::EditAIBBDimensionsDepth->GetHWND()) + else if (hwnd == SXLevelEditor::EditAIBBDimensionsDepth->getHWND()) { - SXLevelEditor::EditAIBBDimensionsDepth->GetText(txt, 64); + SXLevelEditor::EditAIBBDimensionsDepth->getText(txt, 64); sscanf(txt, "%f", &(tmpdim.z)); } @@ -134,19 +134,19 @@ LRESULT SXLevelEditor_EditAIBBPos_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPAR float3 tmppos; SAIG_BBGetPos(&tmppos); - if (hwnd == SXLevelEditor::EditAIBBPosX->GetHWND()) + if (hwnd == SXLevelEditor::EditAIBBPosX->getHWND()) { - SXLevelEditor::EditAIBBPosX->GetText(txt, 64); + SXLevelEditor::EditAIBBPosX->getText(txt, 64); sscanf(txt, "%f", &(tmppos.x)); } - else if (hwnd == SXLevelEditor::EditAIBBPosY->GetHWND()) + else if (hwnd == SXLevelEditor::EditAIBBPosY->getHWND()) { - SXLevelEditor::EditAIBBPosY->GetText(txt, 64); + SXLevelEditor::EditAIBBPosY->getText(txt, 64); sscanf(txt, "%f", &(tmppos.y)); } - else if (hwnd == SXLevelEditor::EditAIBBPosZ->GetHWND()) + else if (hwnd == SXLevelEditor::EditAIBBPosZ->getHWND()) { - SXLevelEditor::EditAIBBPosZ->GetText(txt, 64); + SXLevelEditor::EditAIBBPosZ->getText(txt, 64); sscanf(txt, "%f", &(tmppos.z)); } diff --git a/source/sxleveleditor/common_callback.cpp b/source/sxleveleditor/common_callback.cpp index 74c518bc1fbdcc12c0801c6c05ae964ea8048cb3..6da764c94e33da451d304e3a12877b8b2dbccca6 100644 --- a/source/sxleveleditor/common_callback.cpp +++ b/source/sxleveleditor/common_callback.cpp @@ -1,6 +1,17 @@ #include "common_callback.h" +bool HandlerPreviewLevel(const char *szPath, char *szBuff) +{ + String sPathImg = FileAppendSlash(szPath) + "preview.bmp"; + if (FileExistsFile(sPathImg.c_str())) + { + sprintf(szBuff, "%s", sPathImg.c_str()); + return true; + } + return false; +} + LRESULT TrueExit(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { if (MessageBox(0, "Exit?", "Exit?!", MB_YESNO | MB_ICONWARNING | MB_TASKMODAL) == IDYES) @@ -17,7 +28,7 @@ void SXLevelEditor::LevelNew(bool mess) SLevel_Clear(); char tmpcaption[256]; sprintf(tmpcaption, "%s: new level ** ", "SXLevelEditor"); - SXLevelEditor::JobWindow->SetText(tmpcaption); + SXLevelEditor::JobWindow->setText(tmpcaption); SXLevelEditor::ActiveGroupType = 0; SXLevelEditor::ActiveElement = -1; SXLevelEditor::ActiveGreenSplit = -1; @@ -27,9 +38,9 @@ void SXLevelEditor::LevelNew(bool mess) if (gid >= 0) SML_LigthsDeleteLight(gid); - SXLevelEditor::CheckBoxTBLevelType->SetBmpInResourse(IDB_BITMAP25); - SXLevelEditor::CheckBoxTBLevelType->SetCheck(false); - SXLevelEditor::CheckBoxTBGLightEnable->SetCheck(false); + SXLevelEditor::CheckBoxTBLevelType->setBmpFromResourse(IDB_BITMAP25); + SXLevelEditor::CheckBoxTBLevelType->setCheck(false); + SXLevelEditor::CheckBoxTBGLightEnable->setCheck(false); } void SXLevelEditor::LevelOpen() @@ -42,27 +53,31 @@ void SXLevelEditor::LevelOpen() char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), FILE_FILTER_LEVEL); + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), FILE_FILTER_LEVEL); + //char szSelName[MAX_PATH]; + //char szSelPath[2014]; + gui_func::dialogs::SelectDirOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), "Open level", false, false, 0, HandlerPreviewLevel); + if (def_str_validate(tmppath)) { - StrCutNameNEx(tmppath, tmpname); + //StrCutNameNEx(tmppath, tmpname); SLevel_Load(tmpname, false); char tmpcaption[256]; sprintf(tmpcaption, "%s: %s", "SXLevelEditor", tmpname); - SXLevelEditor::JobWindow->SetText(tmpcaption); + SXLevelEditor::JobWindow->setText(tmpcaption); ID gid = SML_LigthsGetGlobal(); if (gid >= 0) { - SXLevelEditor::CheckBoxTBLevelType->SetBmpInResourse(IDB_BITMAP26); - SXLevelEditor::CheckBoxTBLevelType->SetCheck(true); - SXLevelEditor::CheckBoxTBGLightEnable->SetCheck(true); + SXLevelEditor::CheckBoxTBLevelType->setBmpFromResourse(IDB_BITMAP26); + SXLevelEditor::CheckBoxTBLevelType->setCheck(true); + SXLevelEditor::CheckBoxTBGLightEnable->setCheck(true); } else { - SXLevelEditor::CheckBoxTBLevelType->SetBmpInResourse(IDB_BITMAP25); - SXLevelEditor::CheckBoxTBLevelType->SetCheck(false); - SXLevelEditor::CheckBoxTBGLightEnable->SetCheck(false); + SXLevelEditor::CheckBoxTBLevelType->setBmpFromResourse(IDB_BITMAP25); + SXLevelEditor::CheckBoxTBLevelType->setCheck(false); + SXLevelEditor::CheckBoxTBGLightEnable->setCheck(false); } } } @@ -91,14 +106,15 @@ void SXLevelEditor::LevelSaveAs() char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_SAVE, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), FILE_FILTER_LEVEL); + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_SAVE, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), FILE_FILTER_LEVEL); + gui_func::dialogs::SelectDirOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_LEVELS), "Save level", false, true, 0/*, HandlerPreviewLevel*/); if (StrValidate(tmppath)) { - StrCutNameNEx(tmppath, tmpname); + //StrCutNameNEx(tmppath, tmpname); SLevel_Save(tmpname); char tmpcaption[256]; sprintf(tmpcaption, "%s: %s", "SXLevelEditor", tmpname); - SXLevelEditor::JobWindow->SetText(tmpcaption); + SXLevelEditor::JobWindow->setText(tmpcaption); } } @@ -135,13 +151,13 @@ LRESULT ComMenuId(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) else if (id == ID_VIEW_GRID) { - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); - SRender_EditorSetRenderGrid(SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); + SRender_EditorSetRenderGrid(SXLevelEditor::MainMenu->getCheckedItem(id)); } else if (id == ID_VIEW_AXES) { - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); - SRender_EditorSetRenderAxesStatic(SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); + SRender_EditorSetRenderAxesStatic(SXLevelEditor::MainMenu->getCheckedItem(id)); } // @@ -149,77 +165,77 @@ LRESULT ComMenuId(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { Core_0SetCVarInt("r_final_image", DS_RT_COLOR); SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_NORMALS) { Core_0SetCVarInt("r_final_image", DS_RT_NORMAL); SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_PARAMETERS) { Core_0SetCVarInt("r_final_image", DS_RT_PARAM); SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_AMBIENTDIFFUSE) { Core_0SetCVarInt("r_final_image", DS_RT_AMBIENTDIFF); SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_SPECULAR) { Core_0SetCVarInt("r_final_image", DS_RT_SPECULAR); SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_LIGHTINGSCENE) { Core_0SetCVarInt("r_final_image", DS_RT_SCENELIGHT); SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_SELECTIONSETTINGS_SELECTION) { - SXLevelEditor::SelSelection = !SXLevelEditor::MainMenu->GetCheckedItem(id); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::SelSelection = !SXLevelEditor::MainMenu->getCheckedItem(id); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_SELECTIONSETTINGS_ZTEST) { - SXLevelEditor::SelZTest = !SXLevelEditor::MainMenu->GetCheckedItem(id); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::SelZTest = !SXLevelEditor::MainMenu->getCheckedItem(id); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_SELECTIONSETTINGS_MESH) { - SXLevelEditor::SelMesh = !SXLevelEditor::MainMenu->GetCheckedItem(id); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::SelMesh = !SXLevelEditor::MainMenu->getCheckedItem(id); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_SELECTIONSETTINGS_BACKFACESCULL) { - SXLevelEditor::SelBackFacesCull = !SXLevelEditor::MainMenu->GetCheckedItem(id); - SXLevelEditor::MainMenu->CheckItem(id, !SXLevelEditor::MainMenu->GetCheckedItem(id)); + SXLevelEditor::SelBackFacesCull = !SXLevelEditor::MainMenu->getCheckedItem(id); + SXLevelEditor::MainMenu->setCheckItem(id, !SXLevelEditor::MainMenu->getCheckedItem(id)); } else if (id >= SX_LE_MMENU_WEATHER_BEGIN_ID) { for (int i = 0; i < SXLevelEditor::MenuWeatherCount; ++i) { - SXLevelEditor::MainMenu->CheckItem(SX_LE_MMENU_WEATHER_BEGIN_ID+i, false); + SXLevelEditor::MainMenu->setCheckItem(SX_LE_MMENU_WEATHER_BEGIN_ID+i, false); } - SXLevelEditor::MainMenu->CheckItem(id, true); + SXLevelEditor::MainMenu->setCheckItem(id, true); SXLevelEditor::MenuWeatherCurrID = (id - SX_LE_MMENU_WEATHER_BEGIN_ID) - 1; if (SXLevelEditor::MenuWeatherCurrID >= 0) @@ -311,7 +327,7 @@ LRESULT SXLevelEditor_RenderWindow_MouseMove(HWND hwnd, UINT msg, WPARAM wParam, } else if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GREEN && SXLevelEditor::ActiveElement >= 0 && SXLevelEditor::ActiveGreenSplit >= 0 && SXLevelEditor::ActiveGreenObject >= 0) { - if (SXLevelEditor::ComboBoxGreenSel->GetSel() == 0) + if (SXLevelEditor::ComboBoxGreenSel->getSel() == 0) { float3_t pos; SGeom_GreenGetPosObject(SXLevelEditor::ActiveElement, SXLevelEditor::ActiveGreenSplit, SXLevelEditor::ActiveGreenObject, &pos); @@ -387,7 +403,7 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP ) * mat; camDir = pos - vCamPos; - if (!SXLevelEditor::CheckBoxTBArrow->GetCheck()) + if (!SXLevelEditor::CheckBoxTBArrow->getCheck()) return 0; SXLevelEditor::IdMtl = -1; @@ -396,7 +412,7 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP { if (SGeom_ModelsTraceBeam(&vCamPos, &camDir, &_res, &idmodel, &idmtl)) { - SXLevelEditor::ListBoxList->SetSel(idmodel); + SXLevelEditor::ListBoxList->setSel(idmodel); SXLevelEditor::GeomSel(idmodel); SXLevelEditor::IdMtl = idmtl; } @@ -407,7 +423,7 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP ID idsplit; ID idobj; - if (SXLevelEditor::ComboBoxGreenSel->GetSel() == 0) + if (SXLevelEditor::ComboBoxGreenSel->getSel() == 0) { if (pt.x <= *r_win_width && pt.y <= *r_win_height && SGeom_GreenTraceBeam(&vCamPos, &camDir, &_res, &idgreen, &idsplit, &idobj, &idmtl)) { @@ -415,13 +431,13 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP SXLevelEditor::ActiveGreenObject = idobj; SGeom_GreenGetPosObject(idgreen, idsplit, idobj, &pos2); - SXLevelEditor::StaticGreenSelX->SetText("Pos X:"); - SXLevelEditor::StaticGreenSelY->SetText("Pos Y:"); - SXLevelEditor::StaticGreenSelZ->SetText("Pos Z:"); + SXLevelEditor::StaticGreenSelX->setText("Pos X:"); + SXLevelEditor::StaticGreenSelY->setText("Pos Y:"); + SXLevelEditor::StaticGreenSelZ->setText("Pos Z:"); - SXLevelEditor::EditGreenSelX->SetText(String(pos2.x).c_str()); - SXLevelEditor::EditGreenSelY->SetText(String(pos2.y).c_str()); - SXLevelEditor::EditGreenSelZ->SetText(String(pos2.z).c_str()); + SXLevelEditor::EditGreenSelX->setText(String(pos2.x).c_str()); + SXLevelEditor::EditGreenSelY->setText(String(pos2.y).c_str()); + SXLevelEditor::EditGreenSelZ->setText(String(pos2.z).c_str()); SXLevelEditor::ObjAxesHelper->SetPosition(pos2); SXLevelEditor::ObjAxesHelper->SetRotation(float3(0,0,0)); @@ -430,7 +446,7 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP SXLevelEditor::IdMtl = idmtl; } } - else if (SXLevelEditor::ComboBoxGreenSel->GetSel() == 1) + else if (SXLevelEditor::ComboBoxGreenSel->getSel() == 1) { if (pt.x <= *r_win_width && pt.y <= *r_win_height && SGeom_ModelsTraceBeam(&vCamPos, &camDir, &_res, &idmodel, &idmtl)) { @@ -438,13 +454,13 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP SXLevelEditor::ActiveGreenSplit = idsplit; SXLevelEditor::ActiveGreenObject = idobj; - SXLevelEditor::StaticGreenSelX->SetText("Pos X:"); - SXLevelEditor::StaticGreenSelY->SetText("Pos Y:"); - SXLevelEditor::StaticGreenSelZ->SetText("Pos Z:"); + SXLevelEditor::StaticGreenSelX->setText("Pos X:"); + SXLevelEditor::StaticGreenSelY->setText("Pos Y:"); + SXLevelEditor::StaticGreenSelZ->setText("Pos Z:"); - SXLevelEditor::EditGreenSelX->SetText(String(_res.x).c_str()); - SXLevelEditor::EditGreenSelY->SetText(String(_res.y).c_str()); - SXLevelEditor::EditGreenSelZ->SetText(String(_res.z).c_str()); + SXLevelEditor::EditGreenSelX->setText(String(_res.x).c_str()); + SXLevelEditor::EditGreenSelY->setText(String(_res.y).c_str()); + SXLevelEditor::EditGreenSelZ->setText(String(_res.z).c_str()); SXLevelEditor::ObjAxesHelper->SetPosition(pos2); SXLevelEditor::ObjAxesHelper->SetRotation(float3(0, 0, 0)); @@ -454,12 +470,12 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP } } - else if (SXLevelEditor::ComboBoxGreenSel->GetSel() == 2) + else if (SXLevelEditor::ComboBoxGreenSel->getSel() == 2) { if (pt.x <= *r_win_width && pt.y <= *r_win_height && SGeom_ModelsTraceBeam(&vCamPos, &camDir, &_res, &idmodel, &idmtl)) { SXLevelEditor::GreenBoxPos = _res; - int density = SXLevelEditor::TrackBarGreenDensity->GetPos(); + int density = SXLevelEditor::TrackBarGreenDensity->getPos(); float3 min, max, npos; min.x = _res.x - SXLevelEditor::GreenBoxWHD.x * 0.5f; @@ -480,7 +496,7 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP } } - else if (SXLevelEditor::ComboBoxGreenSel->GetSel() == 3) + else if (SXLevelEditor::ComboBoxGreenSel->getSel() == 3) { static const int *r_win_width = GET_PCVAR_INT("r_win_width"); static const int *r_win_height = GET_PCVAR_INT("r_win_height"); @@ -488,9 +504,9 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP { SXLevelEditor::ActiveGreenSplit = -1; SXLevelEditor::ActiveGreenObject = -1; - SXLevelEditor::EditGreenSelX->SetText(""); - SXLevelEditor::EditGreenSelY->SetText(""); - SXLevelEditor::EditGreenSelZ->SetText(""); + SXLevelEditor::EditGreenSelX->setText(""); + SXLevelEditor::EditGreenSelY->setText(""); + SXLevelEditor::EditGreenSelZ->setText(""); SGeom_GreenDelObject(idgreen, idsplit, idobj); int qwert = 0; } @@ -502,7 +518,7 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP } else if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_AIGRID) { - if (SXLevelEditor::RadioButtonAIQuadAdd->GetCheck()) + if (SXLevelEditor::RadioButtonAIQuadAdd->getCheck()) { float3 start = pos; float3 dir = camDir; @@ -515,28 +531,28 @@ LRESULT SXLevelEditor_RenderWindow_LClick(HWND hwnd, UINT msg, WPARAM wParam, LP SAIG_QuadAdd(&BTVEC_F3(cb.m_hitPointWorld)); } } - else if (SXLevelEditor::RadioButtonAIQuadsMSel->GetCheck()) + else if (SXLevelEditor::RadioButtonAIQuadsMSel->getCheck()) { ID idaq = SAIG_GridTraceBeam(&pos, &camDir); if (idaq > -1) SAIG_QuadSelect(idaq, true); } - else if (SXLevelEditor::RadioButtonAIQuadsSelDel->GetCheck()) + else if (SXLevelEditor::RadioButtonAIQuadsSelDel->getCheck()) { ID idaq = SAIG_GridTraceBeam(&pos, &camDir); if (idaq > -1) SAIG_QuadDelete(idaq); } - else if (SXLevelEditor::RadioButtonAIGPAdd->GetCheck()) + else if (SXLevelEditor::RadioButtonAIGPAdd->getCheck()) { ID idaq = SAIG_GridTraceBeam(&pos, &camDir); if (idaq > -1) SAIG_GraphPointAdd(idaq); } - else if (SXLevelEditor::RadioButtonAIGPDel->GetCheck()) + else if (SXLevelEditor::RadioButtonAIGPDel->getCheck()) { ID idaq = SAIG_GridTraceBeam(&pos, &camDir); @@ -588,7 +604,7 @@ LRESULT SXLevelEditor_RenderWindow_RClick(HWND hwnd, UINT msg, WPARAM wParam, LP ID idsplit; ID idobj; - if (SXLevelEditor::ComboBoxGreenSel->GetSel() == 2) + if (SXLevelEditor::ComboBoxGreenSel->getSel() == 2) { if (pt.x <= *r_win_width && pt.y <= *r_win_height && SGeom_ModelsTraceBeam(&vCamPos, &camDir, &_res, &idmodel, &idmtl)) SXLevelEditor::GreenBoxPos = _res; @@ -597,7 +613,7 @@ LRESULT SXLevelEditor_RenderWindow_RClick(HWND hwnd, UINT msg, WPARAM wParam, LP else if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_AIGRID) { - if (SXLevelEditor::RadioButtonAIQuadsMSel->GetCheck()) + if (SXLevelEditor::RadioButtonAIQuadsMSel->getCheck()) { ID idaq = SAIG_GridTraceBeam(&pos, &camDir); @@ -632,9 +648,9 @@ LRESULT SXLevelEditor_RenderWindow_Delete(HWND hwnd, UINT msg, WPARAM wParam, LP SGeom_GreenDelObject(SXLevelEditor::ActiveElement, SXLevelEditor::ActiveGreenSplit, SXLevelEditor::ActiveGreenObject); SXLevelEditor::ActiveGreenSplit = -1; SXLevelEditor::ActiveGreenObject = -1; - SXLevelEditor::EditGreenSelX->SetText(""); - SXLevelEditor::EditGreenSelY->SetText(""); - SXLevelEditor::EditGreenSelZ->SetText(""); + SXLevelEditor::EditGreenSelX->setText(""); + SXLevelEditor::EditGreenSelY->setText(""); + SXLevelEditor::EditGreenSelZ->setText(""); } return 0; @@ -642,17 +658,17 @@ LRESULT SXLevelEditor_RenderWindow_Delete(HWND hwnd, UINT msg, WPARAM wParam, LP LRESULT SXLevelEditor_ButtonGeometryOpen_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - SXLevelEditor::ListBoxList->Clear(); + SXLevelEditor::ListBoxList->clear(); long tmpcountmodel = SGeom_ModelsGetCount(); char tmptextvalcountmodel[64]; sprintf(tmptextvalcountmodel, "%d", tmpcountmodel); - SXLevelEditor::StaticListValCount->SetText(tmptextvalcountmodel); + SXLevelEditor::StaticListValCount->setText(tmptextvalcountmodel); char tmpnamecountpoly[1024]; for (int i = 0; i < tmpcountmodel;++i) { sprintf(tmpnamecountpoly, "%s | %d", SGeom_ModelsMGetName(i), SGeom_ModelsMGetCountPoly(i)); - SXLevelEditor::ListBoxList->AddItem(tmpnamecountpoly); + SXLevelEditor::ListBoxList->addItem(tmpnamecountpoly); } SXLevelEditor::GreenActivateAll(false); @@ -669,11 +685,11 @@ LRESULT SXLevelEditor_ButtonGeometryOpen_Click(HWND hwnd, UINT msg, WPARAM wPara LRESULT SXLevelEditor_ButtonGreenOpen_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - SXLevelEditor::ListBoxList->Clear(); + SXLevelEditor::ListBoxList->clear(); long tmpcountmodel = SGeom_GreenGetCount(); char tmptextvalcountmodel[64]; sprintf(tmptextvalcountmodel, "%d", tmpcountmodel); - SXLevelEditor::StaticListValCount->SetText(tmptextvalcountmodel); + SXLevelEditor::StaticListValCount->setText(tmptextvalcountmodel); char tmpnamecountpoly[1024]; for (int i = 0; i < tmpcountmodel; ++i) @@ -682,7 +698,7 @@ LRESULT SXLevelEditor_ButtonGreenOpen_Click(HWND hwnd, UINT msg, WPARAM wParam, SGeom_GreenMGetName(i), (SGeom_GreenMGetTypeCountGen(i) == GREEN_TYPE_GRASS ? "grass" : "tree/shrub"), SGeom_GreenMGetCountGen(i)); - SXLevelEditor::ListBoxList->AddItem(tmpnamecountpoly); + SXLevelEditor::ListBoxList->addItem(tmpnamecountpoly); } SXLevelEditor::GeomActivateAll(false); @@ -703,7 +719,7 @@ LRESULT SXLevelEditor_ButtonGreenOpen_Click(HWND hwnd, UINT msg, WPARAM wParam, LRESULT SXLevelEditor_ButtonGameObjectOpen_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - SXLevelEditor::ListBoxList->Clear(); + SXLevelEditor::ListBoxList->clear(); int tmpcoungo = SXGame_EntGetCount(); int tmpcoungo2 = 0; @@ -714,15 +730,15 @@ LRESULT SXLevelEditor_ButtonGameObjectOpen_Click(HWND hwnd, UINT msg, WPARAM wPa if (bEnt) { sprintf(tmpname, "%s / %s", bEnt->getName(), bEnt->getClassName()); - SXLevelEditor::ListBoxList->AddItem(tmpname); - SXLevelEditor::ListBoxList->SetItemData(SXLevelEditor::ListBoxList->GetCountItem() - 1, i); + SXLevelEditor::ListBoxList->addItem(tmpname); + SXLevelEditor::ListBoxList->setItemData(SXLevelEditor::ListBoxList->getItemCount() - 1, i); ++tmpcoungo2; } } char tmptextvalcountgo[64]; sprintf(tmptextvalcountgo, "%d", tmpcoungo2); - SXLevelEditor::StaticListValCount->SetText(tmptextvalcountgo); + SXLevelEditor::StaticListValCount->setText(tmptextvalcountgo); SXLevelEditor::GeomActivateAll(false); SXLevelEditor::GreenActivateAll(false); @@ -736,9 +752,9 @@ LRESULT SXLevelEditor_ButtonGameObjectOpen_Click(HWND hwnd, UINT msg, WPARAM wPa LRESULT SXLevelEditor_ButtonAIGridOpen_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - SXLevelEditor::ListBoxList->Clear(); + SXLevelEditor::ListBoxList->clear(); - SXLevelEditor::StaticListValCount->SetText("0"); + SXLevelEditor::StaticListValCount->setText("0"); SXLevelEditor::GeomActivateAll(false); SXLevelEditor::GreenActivateAll(false); @@ -753,7 +769,7 @@ LRESULT SXLevelEditor_ButtonAIGridOpen_Click(HWND hwnd, UINT msg, WPARAM wParam, LRESULT SXLevelEditor_ListBoxList_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); SXLevelEditor::ActiveGreenSplit = -1; SXLevelEditor::ActiveGreenObject = -1; @@ -782,7 +798,7 @@ LRESULT SXLevelEditor_ListBoxList_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR LRESULT SXLevelEditor_ButtonDelete_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); if (sel < 0) return 0; @@ -792,7 +808,7 @@ LRESULT SXLevelEditor_ButtonDelete_Click(HWND hwnd, UINT msg, WPARAM wParam, LPA if (SGeom_ModelsGetCount() > 0 && sel < SGeom_ModelsGetCount()) { SGeom_ModelsDelModel(sel); - SXLevelEditor::ListBoxList->DeleteItem(sel); + SXLevelEditor::ListBoxList->deleteItem(sel); if (SGeom_ModelsGetCount() > 0) { if (sel > 0) @@ -800,7 +816,7 @@ LRESULT SXLevelEditor_ButtonDelete_Click(HWND hwnd, UINT msg, WPARAM wParam, LPA if (SGeom_ModelsGetCount() <= sel) sel -= 1; } - SXLevelEditor::ListBoxList->SetSel(sel); + SXLevelEditor::ListBoxList->setSel(sel); SXLevelEditor::GeomSel(sel); } else @@ -814,7 +830,7 @@ LRESULT SXLevelEditor_ButtonDelete_Click(HWND hwnd, UINT msg, WPARAM wParam, LPA if (SGeom_GreenGetCount() > 0 && sel < SGeom_GreenGetCount()) { SGeom_GreenDelGreen(sel); - SXLevelEditor::ListBoxList->DeleteItem(sel); + SXLevelEditor::ListBoxList->deleteItem(sel); if (SGeom_GreenGetCount() > 0) { if (sel > 0) @@ -822,7 +838,7 @@ LRESULT SXLevelEditor_ButtonDelete_Click(HWND hwnd, UINT msg, WPARAM wParam, LPA if (SGeom_GreenGetCount() <= sel) sel -= 1; } - SXLevelEditor::ListBoxList->SetSel(sel); + SXLevelEditor::ListBoxList->setSel(sel); SXLevelEditor::GreenSel(sel); } else @@ -835,14 +851,14 @@ LRESULT SXLevelEditor_ButtonDelete_Click(HWND hwnd, UINT msg, WPARAM wParam, LPA { if (SXGame_EntGetCount() > 0 && sel < SXGame_EntGetCount()) { - SXGame_RemoveEntity(SXGame_EntGet(SXLevelEditor::ListBoxList->GetItemData(sel))); + SXGame_RemoveEntity(SXGame_EntGet(SXLevelEditor::ListBoxList->getItemData(sel))); SXLevelEditor_ButtonGameObjectOpen_Click(hwnd, msg, wParam, lParam); - if (sel >= SXLevelEditor::ListBoxList->GetCountItem()) + if (sel >= SXLevelEditor::ListBoxList->getItemCount()) --sel; if (sel >= 0) { - SXLevelEditor::ListBoxList->SetSel(sel); + SXLevelEditor::ListBoxList->setSel(sel); SXLevelEditor::GameSel(sel); } } @@ -857,11 +873,11 @@ LRESULT SXLevelEditor_ButtonDelete_Click(HWND hwnd, UINT msg, WPARAM wParam, LPA LRESULT SXLevelEditor_GroupBox_Notify(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - if (((NMHDR*)lParam)->hwndFrom == SXLevelEditor::ListViewGameClass->GetHWND() && ((NMHDR*)lParam)->code == NM_CLICK) + if (((NMHDR*)lParam)->hwndFrom == SXLevelEditor::ListViewGameClass->getHWND() && ((NMHDR*)lParam)->code == NM_CLICK) { SXLevelEditor_ListViewGameClass_Click(); } - else if (((NMHDR*)lParam)->hwndFrom == SXLevelEditor::ListViewGameConnections->GetHWND() && ((NMHDR*)lParam)->code == NM_CLICK) + else if (((NMHDR*)lParam)->hwndFrom == SXLevelEditor::ListViewGameConnections->getHWND() && ((NMHDR*)lParam)->code == NM_CLICK) { SXLevelEditor_ListViewGameConnections_Click(); } @@ -874,14 +890,14 @@ LRESULT SXLevelEditor_ToolBar1_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, HWND handle_elem = (HWND)(lParam); if (Notification == BN_CLICKED) { - if (SXLevelEditor::CheckBoxTBArrow->GetHWND() == handle_elem) + if (SXLevelEditor::CheckBoxTBArrow->getHWND() == handle_elem) { - SXLevelEditor::CheckBoxTBPos->SetCheck(false); - SXLevelEditor::CheckBoxTBRot->SetCheck(false); - SXLevelEditor::CheckBoxTBScale->SetCheck(false); + SXLevelEditor::CheckBoxTBPos->setCheck(false); + SXLevelEditor::CheckBoxTBRot->setCheck(false); + SXLevelEditor::CheckBoxTBScale->setCheck(false); SXLevelEditor::ObjAxesHelper->SetType(AxesHelper::HT_NONE); } - else if (SXLevelEditor::CheckBoxTBPos->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBPos->getHWND() == handle_elem) { if ( SXLevelEditor::ActiveElement >= 0 && @@ -892,147 +908,147 @@ LRESULT SXLevelEditor_ToolBar1_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, ) ) { - SXLevelEditor::CheckBoxTBArrow->SetCheck(false); - SXLevelEditor::CheckBoxTBRot->SetCheck(false); - SXLevelEditor::CheckBoxTBScale->SetCheck(false); + SXLevelEditor::CheckBoxTBArrow->setCheck(false); + SXLevelEditor::CheckBoxTBRot->setCheck(false); + SXLevelEditor::CheckBoxTBScale->setCheck(false); SXLevelEditor::ObjAxesHelper->SetType(AxesHelper::HT_MOVE); } else - SXLevelEditor::CheckBoxTBPos->SetCheck(false); + SXLevelEditor::CheckBoxTBPos->setCheck(false); } - else if (SXLevelEditor::CheckBoxTBRot->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBRot->getHWND() == handle_elem) { if ((SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GEOM || SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GAME) && SXLevelEditor::ActiveElement >= 0) { - SXLevelEditor::CheckBoxTBArrow->SetCheck(false); - SXLevelEditor::CheckBoxTBPos->SetCheck(false); - SXLevelEditor::CheckBoxTBScale->SetCheck(false); + SXLevelEditor::CheckBoxTBArrow->setCheck(false); + SXLevelEditor::CheckBoxTBPos->setCheck(false); + SXLevelEditor::CheckBoxTBScale->setCheck(false); SXLevelEditor::ObjAxesHelper->SetType(AxesHelper::HT_ROTATE); } else - SXLevelEditor::CheckBoxTBRot->SetCheck(false); + SXLevelEditor::CheckBoxTBRot->setCheck(false); } - else if (SXLevelEditor::CheckBoxTBScale->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBScale->getHWND() == handle_elem) { if ((SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GEOM || SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GAME) && SXLevelEditor::ActiveElement >= 0) { - SXLevelEditor::CheckBoxTBPos->SetCheck(false); - SXLevelEditor::CheckBoxTBRot->SetCheck(false); - SXLevelEditor::CheckBoxTBArrow->SetCheck(false); + SXLevelEditor::CheckBoxTBPos->setCheck(false); + SXLevelEditor::CheckBoxTBRot->setCheck(false); + SXLevelEditor::CheckBoxTBArrow->setCheck(false); SXLevelEditor::ObjAxesHelper->SetType(AxesHelper::HT_SCALE); } else - SXLevelEditor::CheckBoxTBScale->SetCheck(false); + SXLevelEditor::CheckBoxTBScale->setCheck(false); } - else if (SXLevelEditor::ButtonTBNew->GetHWND() == handle_elem) + else if (SXLevelEditor::ButtonTBNew->getHWND() == handle_elem) { SXLevelEditor::LevelNew(true); } - else if (SXLevelEditor::ButtonTBOpen->GetHWND() == handle_elem) + else if (SXLevelEditor::ButtonTBOpen->getHWND() == handle_elem) { SXLevelEditor::LevelOpen(); } - else if (SXLevelEditor::ButtonTBSave->GetHWND() == handle_elem) + else if (SXLevelEditor::ButtonTBSave->getHWND() == handle_elem) { SXLevelEditor::LevelSave(); } - else if (SXLevelEditor::ButtonTBSaveAs->GetHWND() == handle_elem) + else if (SXLevelEditor::ButtonTBSaveAs->getHWND() == handle_elem) { SXLevelEditor::LevelSaveAs(); } - else if (SXLevelEditor::CheckBoxTBGrid->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBGrid->getHWND() == handle_elem) { - SXLevelEditor::MainMenu->CheckItem(ID_VIEW_GRID, SXLevelEditor::CheckBoxTBGrid->GetCheck()); - SRender_EditorSetRenderGrid(SXLevelEditor::CheckBoxTBGrid->GetCheck()); + SXLevelEditor::MainMenu->setCheckItem(ID_VIEW_GRID, SXLevelEditor::CheckBoxTBGrid->getCheck()); + SRender_EditorSetRenderGrid(SXLevelEditor::CheckBoxTBGrid->getCheck()); } - else if (SXLevelEditor::CheckBoxTBAxes->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBAxes->getHWND() == handle_elem) { - SXLevelEditor::MainMenu->CheckItem(ID_VIEW_AXES, SXLevelEditor::CheckBoxTBAxes->GetCheck()); - SRender_EditorSetRenderAxesStatic(SXLevelEditor::CheckBoxTBAxes->GetCheck()); + SXLevelEditor::MainMenu->setCheckItem(ID_VIEW_AXES, SXLevelEditor::CheckBoxTBAxes->getCheck()); + SRender_EditorSetRenderAxesStatic(SXLevelEditor::CheckBoxTBAxes->getCheck()); } - else if (SXLevelEditor::CheckBoxTBRColor->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBRColor->getHWND() == handle_elem) { SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_COLOR, true); - SXLevelEditor::CheckBoxTBRColor->SetCheck(true); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_COLOR, true); + SXLevelEditor::CheckBoxTBRColor->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_COLOR); } - else if (SXLevelEditor::CheckBoxTBRNormal->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBRNormal->getHWND() == handle_elem) { SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_NORMALS, true); - SXLevelEditor::CheckBoxTBRNormal->SetCheck(true); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_NORMALS, true); + SXLevelEditor::CheckBoxTBRNormal->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_NORMAL); } - else if (SXLevelEditor::CheckBoxTBRParam->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBRParam->getHWND() == handle_elem) { SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_PARAMETERS, true); - SXLevelEditor::CheckBoxTBRParam->SetCheck(true); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_PARAMETERS, true); + SXLevelEditor::CheckBoxTBRParam->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_PARAM); } - else if (SXLevelEditor::CheckBoxTBRAmDiff->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBRAmDiff->getHWND() == handle_elem) { SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_AMBIENTDIFFUSE, true); - SXLevelEditor::CheckBoxTBRAmDiff->SetCheck(true); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_AMBIENTDIFFUSE, true); + SXLevelEditor::CheckBoxTBRAmDiff->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_AMBIENTDIFF); } - else if (SXLevelEditor::CheckBoxTBRSpecular->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBRSpecular->getHWND() == handle_elem) { SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_SPECULAR, true); - SXLevelEditor::CheckBoxTBRSpecular->SetCheck(true); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_SPECULAR, true); + SXLevelEditor::CheckBoxTBRSpecular->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_SPECULAR); } - else if (SXLevelEditor::CheckBoxTBRLighting->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBRLighting->getHWND() == handle_elem) { SXLevelEditor::FinalImageUncheckedMenu(); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_LIGHTINGSCENE, true); - SXLevelEditor::CheckBoxTBRLighting->SetCheck(true); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_LIGHTINGSCENE, true); + SXLevelEditor::CheckBoxTBRLighting->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_SCENELIGHT); } - else if (SXLevelEditor::CheckBoxTBSelS->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBSelS->getHWND() == handle_elem) { - SXLevelEditor::SelSelection = SXLevelEditor::CheckBoxTBSelS->GetCheck(); - SXLevelEditor::MainMenu->CheckItem(ID_SELECTIONSETTINGS_SELECTION, SXLevelEditor::CheckBoxTBSelS->GetCheck()); + SXLevelEditor::SelSelection = SXLevelEditor::CheckBoxTBSelS->getCheck(); + SXLevelEditor::MainMenu->setCheckItem(ID_SELECTIONSETTINGS_SELECTION, SXLevelEditor::CheckBoxTBSelS->getCheck()); } - else if (SXLevelEditor::CheckBoxTBSelZTest->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBSelZTest->getHWND() == handle_elem) { - SXLevelEditor::SelZTest = SXLevelEditor::CheckBoxTBSelZTest->GetCheck(); - SXLevelEditor::MainMenu->CheckItem(ID_SELECTIONSETTINGS_ZTEST, SXLevelEditor::CheckBoxTBSelZTest->GetCheck()); + SXLevelEditor::SelZTest = SXLevelEditor::CheckBoxTBSelZTest->getCheck(); + SXLevelEditor::MainMenu->setCheckItem(ID_SELECTIONSETTINGS_ZTEST, SXLevelEditor::CheckBoxTBSelZTest->getCheck()); } - else if (SXLevelEditor::CheckBoxTBSelMesh->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBSelMesh->getHWND() == handle_elem) { - SXLevelEditor::SelMesh = SXLevelEditor::CheckBoxTBSelMesh->GetCheck(); - SXLevelEditor::MainMenu->CheckItem(ID_SELECTIONSETTINGS_MESH, SXLevelEditor::CheckBoxTBSelMesh->GetCheck()); + SXLevelEditor::SelMesh = SXLevelEditor::CheckBoxTBSelMesh->getCheck(); + SXLevelEditor::MainMenu->setCheckItem(ID_SELECTIONSETTINGS_MESH, SXLevelEditor::CheckBoxTBSelMesh->getCheck()); } - else if (SXLevelEditor::CheckBoxTBSelCullBack->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBSelCullBack->getHWND() == handle_elem) { - SXLevelEditor::SelBackFacesCull = SXLevelEditor::CheckBoxTBSelCullBack->GetCheck(); - SXLevelEditor::MainMenu->CheckItem(ID_SELECTIONSETTINGS_BACKFACESCULL, SXLevelEditor::CheckBoxTBSelCullBack->GetCheck()); + SXLevelEditor::SelBackFacesCull = SXLevelEditor::CheckBoxTBSelCullBack->getCheck(); + SXLevelEditor::MainMenu->setCheckItem(ID_SELECTIONSETTINGS_BACKFACESCULL, SXLevelEditor::CheckBoxTBSelCullBack->getCheck()); } - else if (SXLevelEditor::CheckBoxTBAIGBound->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBAIGBound->getHWND() == handle_elem) { - SXLevelEditor::AIGBound = SXLevelEditor::CheckBoxTBAIGBound->GetCheck(); + SXLevelEditor::AIGBound = SXLevelEditor::CheckBoxTBAIGBound->getCheck(); } - else if (SXLevelEditor::CheckBoxTBAIGQuad->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBAIGQuad->getHWND() == handle_elem) { - SXLevelEditor::AIGQuad = SXLevelEditor::CheckBoxTBAIGQuad->GetCheck(); + SXLevelEditor::AIGQuad = SXLevelEditor::CheckBoxTBAIGQuad->getCheck(); } - else if (SXLevelEditor::CheckBoxTBAIGGraphPoint->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBAIGGraphPoint->getHWND() == handle_elem) { - SXLevelEditor::AIGGraphPoint = SXLevelEditor::CheckBoxTBAIGGraphPoint->GetCheck(); + SXLevelEditor::AIGGraphPoint = SXLevelEditor::CheckBoxTBAIGGraphPoint->getCheck(); } - else if (SXLevelEditor::CheckBoxTBLevelType->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBLevelType->getHWND() == handle_elem) { - if (SXLevelEditor::CheckBoxTBLevelType->GetCheck()) + if (SXLevelEditor::CheckBoxTBLevelType->getCheck()) { ID gid = SML_LigthsGetGlobal(); if (gid < 0) @@ -1043,28 +1059,28 @@ LRESULT SXLevelEditor_ToolBar1_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, &float3(1, 1, 1), true, true); - SML_LigthsSetEnable(gid, SXLevelEditor::CheckBoxTBGLightEnable->GetCheck()); + SML_LigthsSetEnable(gid, SXLevelEditor::CheckBoxTBGLightEnable->getCheck()); SML_LigthsSetName(gid, "sun"); } - SXLevelEditor::CheckBoxTBLevelType->SetBmpInResourse(IDB_BITMAP26); + SXLevelEditor::CheckBoxTBLevelType->setBmpFromResourse(IDB_BITMAP26); } else { ID gid = SML_LigthsGetGlobal(); if (gid >= 0) SML_LigthsDeleteLight(gid); - SXLevelEditor::CheckBoxTBLevelType->SetBmpInResourse(IDB_BITMAP25); - SXLevelEditor::CheckBoxTBGLightEnable->SetCheck(false); + SXLevelEditor::CheckBoxTBLevelType->setBmpFromResourse(IDB_BITMAP25); + SXLevelEditor::CheckBoxTBGLightEnable->setCheck(false); } } - else if (SXLevelEditor::CheckBoxTBGLightEnable->GetHWND() == handle_elem) + else if (SXLevelEditor::CheckBoxTBGLightEnable->getHWND() == handle_elem) { ID gid = SML_LigthsGetGlobal(); if (gid >= 0) - SML_LigthsSetEnable(gid, SXLevelEditor::CheckBoxTBGLightEnable->GetCheck()); + SML_LigthsSetEnable(gid, SXLevelEditor::CheckBoxTBGLightEnable->getCheck()); else - SXLevelEditor::CheckBoxTBGLightEnable->SetCheck(false); + SXLevelEditor::CheckBoxTBGLightEnable->setCheck(false); } } @@ -1080,26 +1096,26 @@ LRESULT SXLevelEditor_GroupBox_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, HWND handle_elem = (HWND)(lParam); if (Notification == BN_CLICKED) { - if (handle_elem == SXLevelEditor::CheckBoxAIGridMarkedSplits->GetHWND()) - SAIG_GridSetMarkSplits(SXLevelEditor::CheckBoxAIGridMarkedSplits->GetCheck()); + if (handle_elem == SXLevelEditor::CheckBoxAIGridMarkedSplits->getHWND()) + SAIG_GridSetMarkSplits(SXLevelEditor::CheckBoxAIGridMarkedSplits->getCheck()); else { - ID seldata = SXLevelEditor::ListBoxList->GetItemData(SXLevelEditor::ListBoxList->GetSel()); + ID seldata = SXLevelEditor::ListBoxList->getItemData(SXLevelEditor::ListBoxList->getSel()); CBaseEntity* bEnt = SXGame_EntGet(seldata); - int str = SXLevelEditor::ListViewGameClass->GetSelString(); + int str = SXLevelEditor::ListViewGameClass->getSelString(); if (seldata < 0 || str < 0) return 0; char txtval[256]; - SXLevelEditor::ListViewGameClass->GetTextItem(txtval, 1, str, 256); + SXLevelEditor::ListViewGameClass->getItemText(txtval, 1, str, 256); UINT uiFlags; sscanf(txtval, "%d", &uiFlags); for (int i = 0; i < 16; ++i) { - if (SXLevelEditor::CheckBoxGameFlags[i]->GetHWND() == handle_elem) + if (SXLevelEditor::CheckBoxGameFlags[i]->getHWND() == handle_elem) { - if (SXLevelEditor::CheckBoxGameFlags[i]->GetCheck()) + if (SXLevelEditor::CheckBoxGameFlags[i]->getCheck()) uiFlags |= (1 << (i + 16)); else uiFlags ^= (1 << (i + 16)); @@ -1107,37 +1123,37 @@ LRESULT SXLevelEditor_GroupBox_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, } sprintf(txtval, "%d", uiFlags); - SXLevelEditor::ListViewGameClass->SetTextItem(txtval, 1, str); + SXLevelEditor::ListViewGameClass->setItemText(txtval, 1, str); bEnt->setKV("flags", txtval); } } else if (Notification == CBN_SELCHANGE) { - if (SXLevelEditor::ComboBoxGameValue->GetHWND() == handle_elem) + if (SXLevelEditor::ComboBoxGameValue->getHWND() == handle_elem) { - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); char txt[256]; - SXLevelEditor::ComboBoxGameValue->GetItemText(SXLevelEditor::ComboBoxGameValue->GetSel(), txt); - SXLevelEditor::ListViewGameClass->SetTextItem(txt, 1, SXLevelEditor::ListViewGameClass->GetSelString()); - CBaseEntity* bEnt = SXGame_EntGet(SXLevelEditor::ListBoxList->GetItemData(sel)); + SXLevelEditor::ComboBoxGameValue->getItemText(SXLevelEditor::ComboBoxGameValue->getSel(), txt); + SXLevelEditor::ListViewGameClass->setItemText(txt, 1, SXLevelEditor::ListViewGameClass->getSelString()); + CBaseEntity* bEnt = SXGame_EntGet(SXLevelEditor::ListBoxList->getItemData(sel)); if (bEnt) { - propdata_t* pd = (propdata_t*)SXLevelEditor::ListViewGameClass->GetDataItem(SXLevelEditor::ListViewGameClass->GetSelString()); - SXLevelEditor::ComboBoxGameValue->GetItemData(SXLevelEditor::ComboBoxGameValue->GetSel()); - bEnt->setKV(pd->szKey, (const char*)SXLevelEditor::ComboBoxGameValue->GetItemData(SXLevelEditor::ComboBoxGameValue->GetSel())); + propdata_t* pd = (propdata_t*)SXLevelEditor::ListViewGameClass->getItemData(SXLevelEditor::ListViewGameClass->getSelString()); + SXLevelEditor::ComboBoxGameValue->getItemData(SXLevelEditor::ComboBoxGameValue->getSel()); + bEnt->setKV(pd->szKey, (const char*)SXLevelEditor::ComboBoxGameValue->getItemData(SXLevelEditor::ComboBoxGameValue->getSel())); } } - else if (SXLevelEditor::ComboBoxGameClass->GetHWND() == handle_elem) + else if (SXLevelEditor::ComboBoxGameClass->getHWND() == handle_elem) { - if (SXLevelEditor::ComboBoxGameClass->GetSel() == 0) + if (SXLevelEditor::ComboBoxGameClass->getSel() == 0) return 0; - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); if (sel < 0) return 0; - CBaseEntity* bEnt = SXGame_EntGet(SXLevelEditor::ListBoxList->GetItemData(sel)); + CBaseEntity* bEnt = SXGame_EntGet(SXLevelEditor::ListBoxList->getItemData(sel)); proptable_t* pt = SXGame_EntGetProptable(bEnt->getClassName()); propdata_t* pd; @@ -1197,7 +1213,7 @@ LRESULT SXLevelEditor_GroupBox_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, } char txt[256]; - SXLevelEditor::ComboBoxGameClass->GetItemText(SXLevelEditor::ComboBoxGameClass->GetSel(), txt); + SXLevelEditor::ComboBoxGameClass->getItemText(SXLevelEditor::ComboBoxGameClass->getSel(), txt); SXGame_RemoveEntity(bEnt); bEnt = SXGame_CreateEntity(txt); @@ -1211,9 +1227,9 @@ LRESULT SXLevelEditor_GroupBox_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, SXLevelEditor_ButtonGameObjectOpen_Click(hwnd, msg, wParam, lParam); sel = -1; - for(int i = 0; i < SXLevelEditor::ListBoxList->GetCountItem(); ++i) + for (int i = 0; i < SXLevelEditor::ListBoxList->getItemCount(); ++i) { - if(SXLevelEditor::ListBoxList->GetItemData(i) == bEnt->getId()) + if(SXLevelEditor::ListBoxList->getItemData(i) == bEnt->getId()) { sel = i; break; @@ -1225,70 +1241,70 @@ LRESULT SXLevelEditor_GroupBox_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, } - SXLevelEditor::ListBoxList->SetSel(sel); + SXLevelEditor::ListBoxList->setSel(sel); SXLevelEditor::GameSel(sel); } - else if (SXLevelEditor::ComboBoxGreenSel->GetHWND() == handle_elem) + else if (SXLevelEditor::ComboBoxGreenSel->getHWND() == handle_elem) { - int sel = SXLevelEditor::ComboBoxGreenSel->GetSel(); + int sel = SXLevelEditor::ComboBoxGreenSel->getSel(); SXLevelEditor::GreenRenderBox = false; if (sel == 0) { - SXLevelEditor::StaticGreenSelX->SetText("Position X:"); - SXLevelEditor::StaticGreenSelY->SetText("Position Y:"); - SXLevelEditor::StaticGreenSelZ->SetText("Position Z:"); - SXLevelEditor::EditGreenSelX->SetText(""); - SXLevelEditor::EditGreenSelY->SetText(""); - SXLevelEditor::EditGreenSelZ->SetText(""); + SXLevelEditor::StaticGreenSelX->setText("Position X:"); + SXLevelEditor::StaticGreenSelY->setText("Position Y:"); + SXLevelEditor::StaticGreenSelZ->setText("Position Z:"); + SXLevelEditor::EditGreenSelX->setText(""); + SXLevelEditor::EditGreenSelY->setText(""); + SXLevelEditor::EditGreenSelZ->setText(""); } else if (sel == 2) { SXLevelEditor::GreenRenderBox = true; - SXLevelEditor::StaticGreenSelX->SetText("Width volume:"); - SXLevelEditor::StaticGreenSelY->SetText("Height volume:"); - SXLevelEditor::StaticGreenSelZ->SetText("Depth volume:"); - SXLevelEditor::EditGreenSelX->SetText(String(SXLevelEditor::GreenBoxWHD.x).c_str()); - SXLevelEditor::EditGreenSelY->SetText(String(SXLevelEditor::GreenBoxWHD.y).c_str()); - SXLevelEditor::EditGreenSelZ->SetText(String(SXLevelEditor::GreenBoxWHD.z).c_str()); + SXLevelEditor::StaticGreenSelX->setText("Width volume:"); + SXLevelEditor::StaticGreenSelY->setText("Height volume:"); + SXLevelEditor::StaticGreenSelZ->setText("Depth volume:"); + SXLevelEditor::EditGreenSelX->setText(String(SXLevelEditor::GreenBoxWHD.x).c_str()); + SXLevelEditor::EditGreenSelY->setText(String(SXLevelEditor::GreenBoxWHD.y).c_str()); + SXLevelEditor::EditGreenSelZ->setText(String(SXLevelEditor::GreenBoxWHD.z).c_str()); } } - else if (SXLevelEditor::ComboBoxGameConnectionsEvent->GetHWND() == handle_elem) + else if (SXLevelEditor::ComboBoxGameConnectionsEvent->getHWND() == handle_elem) { - ID idSelListBoxList = SXLevelEditor::ListBoxList->GetSel(); - ID idSelStrTable = SXLevelEditor::ListViewGameConnections->GetSelString(); + ID idSelListBoxList = SXLevelEditor::ListBoxList->getSel(); + ID idSelStrTable = SXLevelEditor::ListViewGameConnections->getSelString(); if (idSelListBoxList < 0 || idSelStrTable < 0) return 0; char szBuffer256[256]; szBuffer256[0] = 0; - SXLevelEditor::ComboBoxGameConnectionsEvent->GetItemText(256, szBuffer256); - SXLevelEditor::ListViewGameConnections->SetTextItem(szBuffer256, 0, idSelStrTable); + SXLevelEditor::ComboBoxGameConnectionsEvent->getItemText(256, szBuffer256); + SXLevelEditor::ListViewGameConnections->setItemText(szBuffer256, 0, idSelStrTable); return SXLevelEditor_EditGameConnections_Enter(hwnd, msg, wParam, lParam); } - else if (SXLevelEditor::ComboBoxGameConnectionsAction->GetHWND() == handle_elem) + else if (SXLevelEditor::ComboBoxGameConnectionsAction->getHWND() == handle_elem) { - ID idSelListBoxList = SXLevelEditor::ListBoxList->GetSel(); - ID idSelStrTable = SXLevelEditor::ListViewGameConnections->GetSelString(); + ID idSelListBoxList = SXLevelEditor::ListBoxList->getSel(); + ID idSelStrTable = SXLevelEditor::ListViewGameConnections->getSelString(); if (idSelListBoxList < 0 || idSelStrTable < 0) return 0; char szBuffer256[256]; szBuffer256[0] = 0; - SXLevelEditor::ComboBoxGameConnectionsAction->GetItemText(SXLevelEditor::ComboBoxGameConnectionsAction->GetSel(), szBuffer256); - SXLevelEditor::ListViewGameConnections->SetTextItem(szBuffer256, 2, idSelStrTable); + SXLevelEditor::ComboBoxGameConnectionsAction->getItemText(SXLevelEditor::ComboBoxGameConnectionsAction->getSel(), szBuffer256); + SXLevelEditor::ListViewGameConnections->setItemText(szBuffer256, 2, idSelStrTable); return SXLevelEditor_EditGameConnections_Enter(hwnd, msg, wParam, lParam); } } /*else if (Notification == EN_CHANGE) { - if (SXLevelEditor::EditGameConnectionsACValue->GetHWND() == handle_elem) + if (SXLevelEditor::EditGameConnectionsACValue->getHWND() == handle_elem) { static int recurion = 0; if (recurion > 0) @@ -1327,8 +1343,8 @@ LRESULT SXLevelEditor_GroupBox_CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, if (qq == 0) { ++recurion; - SXLevelEditor::EditGameConnectionsACValue->SetText(lower_name); - PostMessage(SXLevelEditor::EditGameConnectionsACValue->GetHWND(), EM_SETSEL, strlen(edit_text), strlen(lower_name)); + SXLevelEditor::EditGameConnectionsACValue->setText(lower_name); + PostMessage(SXLevelEditor::EditGameConnectionsACValue->getHWND(), EM_SETSEL, strlen(edit_text), strlen(lower_name)); return 0; } } @@ -1346,7 +1362,7 @@ LRESULT SXLevelEditor_GroupBoxList_CallWmCommand(HWND hwnd, UINT msg, WPARAM wPa HWND handle_elem = (HWND)(lParam); if (Notification == LBN_SELCHANGE) { - if (handle_elem == SXLevelEditor::ListBoxList->GetHWND()) + if (handle_elem == SXLevelEditor::ListBoxList->getHWND()) SXLevelEditor_ListBoxList_Click(hwnd, msg, wParam, lParam); } @@ -1359,19 +1375,19 @@ void SXLevelEditor_Transform(DWORD timeDelta) static bool IsSFirstRBMTransform = false; static int CoordinateTransformation = -1; - if (SXLevelEditor::RadioButtonGeomPosX->GetCheck() || SXLevelEditor::RadioButtonGeomRotX->GetCheck() || SXLevelEditor::RadioButtonGeomScaleX->GetCheck() || SXLevelEditor::RadioButtonGreenSelX->GetCheck()) + if (SXLevelEditor::RadioButtonGeomPosX->getCheck() || SXLevelEditor::RadioButtonGeomRotX->getCheck() || SXLevelEditor::RadioButtonGeomScaleX->getCheck() || SXLevelEditor::RadioButtonGreenSelX->getCheck()) CoordinateTransformation = 0; - else if (SXLevelEditor::RadioButtonGeomPosY->GetCheck() || SXLevelEditor::RadioButtonGeomRotY->GetCheck() || SXLevelEditor::RadioButtonGeomScaleY->GetCheck() || SXLevelEditor::RadioButtonGreenSelY->GetCheck()) + else if (SXLevelEditor::RadioButtonGeomPosY->getCheck() || SXLevelEditor::RadioButtonGeomRotY->getCheck() || SXLevelEditor::RadioButtonGeomScaleY->getCheck() || SXLevelEditor::RadioButtonGreenSelY->getCheck()) CoordinateTransformation = 1; - else if (SXLevelEditor::RadioButtonGeomPosZ->GetCheck() || SXLevelEditor::RadioButtonGeomRotZ->GetCheck() || SXLevelEditor::RadioButtonGeomScaleZ->GetCheck() || SXLevelEditor::RadioButtonGreenSelZ->GetCheck()) + else if (SXLevelEditor::RadioButtonGeomPosZ->getCheck() || SXLevelEditor::RadioButtonGeomRotZ->getCheck() || SXLevelEditor::RadioButtonGeomScaleZ->getCheck() || SXLevelEditor::RadioButtonGreenSelZ->getCheck()) CoordinateTransformation = 2; if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GEOM) { if (SSInput_GetKeyState(SIK_LSHIFT) && SGeom_ModelsGetCount() > 0) { - DWORD selmodel = SXLevelEditor::ListBoxList->GetSel(); - if (SXLevelEditor::RadioButtonGeomPosX->GetCheck() || SXLevelEditor::RadioButtonGeomPosY->GetCheck() || SXLevelEditor::RadioButtonGeomPosZ->GetCheck()) + DWORD selmodel = SXLevelEditor::ListBoxList->getSel(); + if (SXLevelEditor::RadioButtonGeomPosX->getCheck() || SXLevelEditor::RadioButtonGeomPosY->getCheck() || SXLevelEditor::RadioButtonGeomPosZ->getCheck()) { float3& pos = *(SGeom_ModelsMGetPosition(selmodel)); @@ -1413,14 +1429,14 @@ void SXLevelEditor_Transform(DWORD timeDelta) sprintf(tmpPosY, "%f", pos.y); sprintf(tmpPosZ, "%f", pos.z); - SXLevelEditor::EditGeomPosX->SetText(tmpPosX); - SXLevelEditor::EditGeomPosY->SetText(tmpPosY); - SXLevelEditor::EditGeomPosZ->SetText(tmpPosZ); + SXLevelEditor::EditGeomPosX->setText(tmpPosX); + SXLevelEditor::EditGeomPosY->setText(tmpPosY); + SXLevelEditor::EditGeomPosZ->setText(tmpPosZ); SGeom_ModelsMApplyTransform(selmodel); } - else if (SXLevelEditor::RadioButtonGeomRotX->GetCheck() || SXLevelEditor::RadioButtonGeomRotY->GetCheck() || SXLevelEditor::RadioButtonGeomRotZ->GetCheck()) + else if (SXLevelEditor::RadioButtonGeomRotX->getCheck() || SXLevelEditor::RadioButtonGeomRotY->getCheck() || SXLevelEditor::RadioButtonGeomRotZ->getCheck()) { float3& pos = *(SGeom_ModelsMGetRotation(selmodel)); @@ -1463,14 +1479,14 @@ void SXLevelEditor_Transform(DWORD timeDelta) sprintf(tmpPosY, "%f", pos.y); sprintf(tmpPosZ, "%f", pos.z); - SXLevelEditor::EditGeomRotX->SetText(tmpPosX); - SXLevelEditor::EditGeomRotY->SetText(tmpPosY); - SXLevelEditor::EditGeomRotZ->SetText(tmpPosZ); + SXLevelEditor::EditGeomRotX->setText(tmpPosX); + SXLevelEditor::EditGeomRotY->setText(tmpPosY); + SXLevelEditor::EditGeomRotZ->setText(tmpPosZ); SGeom_ModelsMApplyTransform(selmodel); } - else if (SXLevelEditor::RadioButtonGeomScaleX->GetCheck() || SXLevelEditor::RadioButtonGeomScaleY->GetCheck() || SXLevelEditor::RadioButtonGeomScaleZ->GetCheck()) + else if (SXLevelEditor::RadioButtonGeomScaleX->getCheck() || SXLevelEditor::RadioButtonGeomScaleY->getCheck() || SXLevelEditor::RadioButtonGeomScaleZ->getCheck()) { float3& pos = *(SGeom_ModelsMGetScale(selmodel)); @@ -1513,9 +1529,9 @@ void SXLevelEditor_Transform(DWORD timeDelta) sprintf(tmpPosY, "%f", pos.y); sprintf(tmpPosZ, "%f", pos.z); - SXLevelEditor::EditGeomScaleX->SetText(tmpPosX); - SXLevelEditor::EditGeomScaleY->SetText(tmpPosY); - SXLevelEditor::EditGeomScaleZ->SetText(tmpPosZ); + SXLevelEditor::EditGeomScaleX->setText(tmpPosX); + SXLevelEditor::EditGeomScaleY->setText(tmpPosY); + SXLevelEditor::EditGeomScaleZ->setText(tmpPosZ); SGeom_ModelsMApplyTransform(selmodel); } @@ -1523,18 +1539,18 @@ void SXLevelEditor_Transform(DWORD timeDelta) } else if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GREEN && ( - (SXLevelEditor::ComboBoxGreenSel->GetSel() == 0 && SXLevelEditor::ActiveElement >= 0 && SXLevelEditor::ActiveGreenSplit >= 0 && SXLevelEditor::ActiveGreenObject >= 0) || - (SXLevelEditor::ComboBoxGreenSel->GetSel() == 2) + (SXLevelEditor::ComboBoxGreenSel->getSel() == 0 && SXLevelEditor::ActiveElement >= 0 && SXLevelEditor::ActiveGreenSplit >= 0 && SXLevelEditor::ActiveGreenObject >= 0) || + (SXLevelEditor::ComboBoxGreenSel->getSel() == 2) ) ) { if (SSInput_GetKeyState(SIK_LSHIFT) && SGeom_GreenGetCount() > 0) { - DWORD selmodel = SXLevelEditor::ListBoxList->GetSel(); - if (SXLevelEditor::RadioButtonGreenSelX->GetCheck() || SXLevelEditor::RadioButtonGreenSelY->GetCheck() || SXLevelEditor::RadioButtonGreenSelZ->GetCheck()) + DWORD selmodel = SXLevelEditor::ListBoxList->getSel(); + if (SXLevelEditor::RadioButtonGreenSelX->getCheck() || SXLevelEditor::RadioButtonGreenSelY->getCheck() || SXLevelEditor::RadioButtonGreenSelZ->getCheck()) { float3 pos; - if (SXLevelEditor::ComboBoxGreenSel->GetSel() == 2) + if (SXLevelEditor::ComboBoxGreenSel->getSel() == 2) pos = SXLevelEditor::GreenBoxWHD; else { @@ -1582,11 +1598,11 @@ void SXLevelEditor_Transform(DWORD timeDelta) sprintf(tmpPosY, "%f", pos.y); sprintf(tmpPosZ, "%f", pos.z); - SXLevelEditor::EditGreenSelX->SetText(tmpPosX); - SXLevelEditor::EditGreenSelY->SetText(tmpPosY); - SXLevelEditor::EditGreenSelZ->SetText(tmpPosZ); + SXLevelEditor::EditGreenSelX->setText(tmpPosX); + SXLevelEditor::EditGreenSelY->setText(tmpPosY); + SXLevelEditor::EditGreenSelZ->setText(tmpPosZ); - if (SXLevelEditor::ComboBoxGreenSel->GetSel() == 2) + if (SXLevelEditor::ComboBoxGreenSel->getSel() == 2) SXLevelEditor::GreenBoxWHD = pos; else SGeom_GreenSetPosObject(SXLevelEditor::ActiveElement, &SXLevelEditor::ActiveGreenSplit, &SXLevelEditor::ActiveGreenObject, &float3_t(pos)); @@ -1638,17 +1654,17 @@ void SXLevelEditor_Transform(DWORD timeDelta) void SXLevelEditor::FinalImageUncheckedMenu() { - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_COLOR, false); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_NORMALS, false); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_PARAMETERS, false); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_AMBIENTDIFFUSE, false); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_SPECULAR, false); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_LIGHTINGSCENE, false); - - SXLevelEditor::CheckBoxTBRColor->SetCheck(false); - SXLevelEditor::CheckBoxTBRNormal->SetCheck(false); - SXLevelEditor::CheckBoxTBRParam->SetCheck(false); - SXLevelEditor::CheckBoxTBRAmDiff->SetCheck(false); - SXLevelEditor::CheckBoxTBRSpecular->SetCheck(false); - SXLevelEditor::CheckBoxTBRLighting->SetCheck(false); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_COLOR, false); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_NORMALS, false); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_PARAMETERS, false); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_AMBIENTDIFFUSE, false); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_SPECULAR, false); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_LIGHTINGSCENE, false); + + SXLevelEditor::CheckBoxTBRColor->setCheck(false); + SXLevelEditor::CheckBoxTBRNormal->setCheck(false); + SXLevelEditor::CheckBoxTBRParam->setCheck(false); + SXLevelEditor::CheckBoxTBRAmDiff->setCheck(false); + SXLevelEditor::CheckBoxTBRSpecular->setCheck(false); + SXLevelEditor::CheckBoxTBRLighting->setCheck(false); } \ No newline at end of file diff --git a/source/sxleveleditor/common_callback.h b/source/sxleveleditor/common_callback.h index e245a3c73fdcf2dcfdbbd86cc4cfc339f00c4030..38cb4af4491e311f82cbf0e454c31176c128cb8c 100644 --- a/source/sxleveleditor/common_callback.h +++ b/source/sxleveleditor/common_callback.h @@ -2,6 +2,7 @@ #ifndef __COMMON_CALLBACK_H #define __COMMON_CALLBACK_H +#include <common/file_utils.h> #include "level_editor.h" LRESULT TrueExit(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); diff --git a/source/sxleveleditor/game_callback.cpp b/source/sxleveleditor/game_callback.cpp index f953157b4e8b8f0753078096ad4a84ee7b288eca..2f776aa13183295345e58ae77565b92063721903 100644 --- a/source/sxleveleditor/game_callback.cpp +++ b/source/sxleveleditor/game_callback.cpp @@ -3,28 +3,28 @@ void SXLevelEditor::GameActivateAll(bool bf) { - SXLevelEditor::StaticGameClass->Visible(bf); - SXLevelEditor::ComboBoxGameClass->Visible(bf); - SXLevelEditor::ComboBoxGameClass->SetSel(0); - SXLevelEditor::ButtonGameTab->Visible(bf); - SXLevelEditor::ButtonGameTab->SetText("Connections"); - SXLevelEditor::ListViewGameClass->Visible(bf); - SXLevelEditor::ListViewGameClass->ClearStrings(); - SXLevelEditor::ComboBoxGameValue->Visible(false); - SXLevelEditor::ComboBoxGameValue->Clear(); - SXLevelEditor::EditGameValue->Visible(false); - SXLevelEditor::EditGameValue->SetText(""); - SXLevelEditor::ButtonGameValue->Visible(false); - SXLevelEditor::ListViewGameClass->Enable(false); - - SXLevelEditor::StaticGameHelp->Visible(bf); - SXLevelEditor::MemoGameHelp->SetText(""); - SXLevelEditor::MemoGameHelp->Visible(bf); - SXLevelEditor::ButtonGameCreate->Visible(bf); + SXLevelEditor::StaticGameClass->setVisible(bf); + SXLevelEditor::ComboBoxGameClass->setVisible(bf); + SXLevelEditor::ComboBoxGameClass->setSel(0); + SXLevelEditor::ButtonGameTab->setVisible(bf); + SXLevelEditor::ButtonGameTab->setText("Connections"); + SXLevelEditor::ListViewGameClass->setVisible(bf); + SXLevelEditor::ListViewGameClass->clearStrings(); + SXLevelEditor::ComboBoxGameValue->setVisible(false); + SXLevelEditor::ComboBoxGameValue->clear(); + SXLevelEditor::EditGameValue->setVisible(false); + SXLevelEditor::EditGameValue->setText(""); + SXLevelEditor::ButtonGameValue->setVisible(false); + SXLevelEditor::ListViewGameClass->setEnable(false); + + SXLevelEditor::StaticGameHelp->setVisible(bf); + SXLevelEditor::MemoGameHelp->setText(""); + SXLevelEditor::MemoGameHelp->setVisible(bf); + SXLevelEditor::ButtonGameCreate->setVisible(bf); for (int i = 0; i < 16; ++i) { - SXLevelEditor::CheckBoxGameFlags[i]->Visible(false); + SXLevelEditor::CheckBoxGameFlags[i]->setVisible(false); } if (!bf) @@ -35,17 +35,17 @@ void SXLevelEditor::GameSel(int sel) { for (int i = 0; i < 16; ++i) { - SXLevelEditor::CheckBoxGameFlags[i]->Visible(false); + SXLevelEditor::CheckBoxGameFlags[i]->setVisible(false); } - SXLevelEditor::ComboBoxGameValue->Visible(false); - SXLevelEditor::ComboBoxGameValue->Clear(); - SXLevelEditor::EditGameValue->Visible(false); - SXLevelEditor::EditGameValue->SetText(""); - SXLevelEditor::ButtonGameCreate->Visible(false); - SXLevelEditor::ListViewGameClass->Enable(true); - SXLevelEditor::ListViewGameClass->ClearStrings(); - ID seldata = SXLevelEditor::ListBoxList->GetItemData(sel); + SXLevelEditor::ComboBoxGameValue->setVisible(false); + SXLevelEditor::ComboBoxGameValue->clear(); + SXLevelEditor::EditGameValue->setVisible(false); + SXLevelEditor::EditGameValue->setText(""); + SXLevelEditor::ButtonGameCreate->setVisible(false); + SXLevelEditor::ListViewGameClass->setEnable(true); + SXLevelEditor::ListViewGameClass->clearStrings(); + ID seldata = SXLevelEditor::ListBoxList->getItemData(sel); SXLevelEditor::ActiveElement = seldata; SXLevelEditor::ActiveGroupType = EDITORS_LEVEL_GROUPTYPE_GAME; CBaseEntity* bEnt = SXGame_EntGet(seldata); @@ -53,11 +53,11 @@ void SXLevelEditor::GameSel(int sel) char txtclasscb[256]; const char* txtclassent = bEnt->getClassName(); - for (int i = 0; i < SXLevelEditor::ComboBoxGameClass->GetCount(); ++i) + for (int i = 0; i < SXLevelEditor::ComboBoxGameClass->getCount(); ++i) { - SXLevelEditor::ComboBoxGameClass->GetItemText(i, txtclasscb); + SXLevelEditor::ComboBoxGameClass->getItemText(i, txtclasscb); if (strcmp(txtclasscb, txtclassent) == 0) - SXLevelEditor::ComboBoxGameClass->SetSel(i); + SXLevelEditor::ComboBoxGameClass->setSel(i); } propdata_t* pd; @@ -86,10 +86,10 @@ void SXLevelEditor::GameSel(int sel) { sprintf(txtkey, "%s", pd->szEdName); bEnt->getKV(pd->szKey, txtval, 256); - int str = SXLevelEditor::ListViewGameClass->AddString((long)pd); - SXLevelEditor::ListViewGameClass->SetTextItem(txtkey, 0, str); - //propdata_t* pd2 = (propdata_t*)SXLevelEditor::ListViewGameClass->GetDataItem(str); - SXLevelEditor::ListViewGameClass->SetTextItem(txtval, 1, str); + int str = SXLevelEditor::ListViewGameClass->addString((long)pd); + SXLevelEditor::ListViewGameClass->setItemText(txtkey, 0, str); + //propdata_t* pd2 = (propdata_t*)SXLevelEditor::ListViewGameClass->getItemData(str); + SXLevelEditor::ListViewGameClass->setItemText(txtval, 1, str); } if (pd->szEdName && pd->type == PDF_FLAG) @@ -109,10 +109,10 @@ void SXLevelEditor::GameSel(int sel) { sprintf(txtkey, "%s", pd->szEdName); bEnt->getKV(pd->szKey, txtval, 256); - int str = SXLevelEditor::ListViewGameClass->AddString((long)pd); - SXLevelEditor::ListViewGameClass->SetTextItem(txtkey, 0, str); - //propdata_t* pd2 = (propdata_t*)SXLevelEditor::ListViewGameClass->GetDataItem(str); - SXLevelEditor::ListViewGameClass->SetTextItem(txtval, 1, str); + int str = SXLevelEditor::ListViewGameClass->addString((long)pd); + SXLevelEditor::ListViewGameClass->setItemText(txtkey, 0, str); + //propdata_t* pd2 = (propdata_t*)SXLevelEditor::ListViewGameClass->getItemData(str); + SXLevelEditor::ListViewGameClass->setItemText(txtval, 1, str); } if (pd->szEdName && pd->type == PDF_FLAG) @@ -123,12 +123,12 @@ void SXLevelEditor::GameSel(int sel) } //заполнение таблицы и ComboBoxGameConnectionsEvent - SXLevelEditor::ComboBoxGameConnectionsEvent->Clear(); - SXLevelEditor::ComboBoxGameConnectionsAction->Clear(); - SXLevelEditor::ListViewGameConnections->ClearStrings(); - SXLevelEditor::EditGameConnectionsName->SetText(""); - SXLevelEditor::EditGameConnectionsDelay->SetText(""); - SXLevelEditor::EditGameConnectionsParameter->SetText(""); + SXLevelEditor::ComboBoxGameConnectionsEvent->clear(); + SXLevelEditor::ComboBoxGameConnectionsAction->clear(); + SXLevelEditor::ListViewGameConnections->clearStrings(); + SXLevelEditor::EditGameConnectionsName->setText(""); + SXLevelEditor::EditGameConnectionsDelay->setText(""); + SXLevelEditor::EditGameConnectionsParameter->setText(""); char szBuffer4096[4096]; @@ -156,12 +156,12 @@ void SXLevelEditor::GameSel(int sel) if (iConns2 > 0) { - int iNumStr = SXLevelEditor::ListViewGameConnections->AddString((long)pd); + int iNumStr = SXLevelEditor::ListViewGameConnections->addString((long)pd); sprintf(txtkey, "%s", pd->szEdName); - SXLevelEditor::ListViewGameConnections->SetTextItem(txtkey, 0, iNumStr); + SXLevelEditor::ListViewGameConnections->setItemText(txtkey, 0, iNumStr); for (int j = 0; j < iConns2; ++j) - SXLevelEditor::ListViewGameConnections->SetTextItem(parts2[j], j + 1, iNumStr); + SXLevelEditor::ListViewGameConnections->setItemText(parts2[j], j + 1, iNumStr); CBaseEntity *pEnt2 = SXGame_EntGetByName(parts2[0], 0); if (pEnt2) @@ -174,15 +174,15 @@ void SXLevelEditor::GameSel(int sel) if (pPropData2->flags & PDFF_INPUT && strcmp(pPropData2->szKey, parts2[1])==0) { sprintf(txtkey, "%s", pPropData2->szEdName); - SXLevelEditor::ListViewGameConnections->SetTextItem(txtkey, 2, iNumStr); + SXLevelEditor::ListViewGameConnections->setItemText(txtkey, 2, iNumStr); } } } } } - SXLevelEditor::ComboBoxGameConnectionsEvent->AddItem(pd->szEdName); - SXLevelEditor::ComboBoxGameConnectionsEvent->SetItemData(SXLevelEditor::ComboBoxGameConnectionsEvent->GetCount()-1, (LPARAM)(pd->szKey)); + SXLevelEditor::ComboBoxGameConnectionsEvent->addItem(pd->szEdName); + SXLevelEditor::ComboBoxGameConnectionsEvent->setItemData(SXLevelEditor::ComboBoxGameConnectionsEvent->getCount()-1, (LPARAM)(pd->szKey)); } } //------- @@ -201,16 +201,16 @@ void SXLevelEditor::GameUpdatePosRot() propdata_t* pd = 0; char txtval[256]; - for (int i = 0; i < SXLevelEditor::ListViewGameClass->GetCountString(); ++i) + for (int i = 0; i < SXLevelEditor::ListViewGameClass->getStringCount(); ++i) { - pd = (propdata_t*)SXLevelEditor::ListViewGameClass->GetDataItem(i); + pd = (propdata_t*)SXLevelEditor::ListViewGameClass->getItemData(i); if (pd) { if (stricmp(pd->szKey, "origin") == 0 || stricmp(pd->szKey, "rotation") == 0) { bEnt->getKV(pd->szKey, txtval, 256); - SXLevelEditor::ListViewGameClass->SetTextItem(txtval, 1, i); + SXLevelEditor::ListViewGameClass->setItemText(txtval, 1, i); } } } @@ -218,61 +218,61 @@ void SXLevelEditor::GameUpdatePosRot() LRESULT SXLevelEditor_ListViewGameClass_Click() { - int str = SXLevelEditor::ListViewGameClass->GetSelString(); + int str = SXLevelEditor::ListViewGameClass->getSelString(); if (str < 0) { - SXLevelEditor::EditGameValue->Visible(false); - SXLevelEditor::ButtonGameValue->Visible(false); - SXLevelEditor::ComboBoxGameValue->Visible(false); + SXLevelEditor::EditGameValue->setVisible(false); + SXLevelEditor::ButtonGameValue->setVisible(false); + SXLevelEditor::ComboBoxGameValue->setVisible(false); return 0; } - propdata_t* pd = (propdata_t*)SXLevelEditor::ListViewGameClass->GetDataItem(str); + propdata_t* pd = (propdata_t*)SXLevelEditor::ListViewGameClass->getItemData(str); - SXLevelEditor::EditGameValue->Visible(false); - SXLevelEditor::ButtonGameValue->Visible(false); - SXLevelEditor::ComboBoxGameValue->Visible(false); + SXLevelEditor::EditGameValue->setVisible(false); + SXLevelEditor::ButtonGameValue->setVisible(false); + SXLevelEditor::ComboBoxGameValue->setVisible(false); char txtval[256]; for (int i = 0; i < 16; ++i) { - SXLevelEditor::CheckBoxGameFlags[i]->Visible(false); + SXLevelEditor::CheckBoxGameFlags[i]->setVisible(false); } if (pd->editor.type == PDE_TEXTFIELD) { - SXLevelEditor::EditGameValue->Visible(true); - SXLevelEditor::ListViewGameClass->GetTextItem(txtval, 1, str, 256); - SXLevelEditor::EditGameValue->SetText(txtval); + SXLevelEditor::EditGameValue->setVisible(true); + SXLevelEditor::ListViewGameClass->getItemText(txtval, 1, str, 256); + SXLevelEditor::EditGameValue->setText(txtval); - SXLevelEditor::StaticGameHelp->Visible(true); - SXLevelEditor::MemoGameHelp->Visible(true); + SXLevelEditor::StaticGameHelp->setVisible(true); + SXLevelEditor::MemoGameHelp->setVisible(true); } else if (pd->editor.type == PDE_FILEFIELD) { - SXLevelEditor::EditGameValue->Visible(true); - SXLevelEditor::ButtonGameValue->Visible(true); - SXLevelEditor::ListViewGameClass->GetTextItem(txtval, 1, str, 256); - SXLevelEditor::EditGameValue->SetText(txtval); + SXLevelEditor::EditGameValue->setVisible(true); + SXLevelEditor::ButtonGameValue->setVisible(true); + SXLevelEditor::ListViewGameClass->getItemText(txtval, 1, str, 256); + SXLevelEditor::EditGameValue->setText(txtval); - SXLevelEditor::StaticGameHelp->Visible(true); - SXLevelEditor::MemoGameHelp->Visible(true); + SXLevelEditor::StaticGameHelp->setVisible(true); + SXLevelEditor::MemoGameHelp->setVisible(true); } else if (pd->editor.type == PDE_COMBOBOX) { - SXLevelEditor::StaticGameHelp->Visible(true); - SXLevelEditor::MemoGameHelp->Visible(true); + SXLevelEditor::StaticGameHelp->setVisible(true); + SXLevelEditor::MemoGameHelp->setVisible(true); - SXLevelEditor::ComboBoxGameValue->Clear(); - SXLevelEditor::ComboBoxGameValue->Visible(true); + SXLevelEditor::ComboBoxGameValue->clear(); + SXLevelEditor::ComboBoxGameValue->setVisible(true); editor_kv* ekv = (editor_kv*)pd->editor.pData; int elem = 0; while (ekv) { if (ekv->key && ekv->value) { - SXLevelEditor::ComboBoxGameValue->AddItem(ekv->key); - SXLevelEditor::ComboBoxGameValue->SetItemData(elem, (LPARAM)ekv->value); + SXLevelEditor::ComboBoxGameValue->addItem(ekv->key); + SXLevelEditor::ComboBoxGameValue->setItemData(elem, (LPARAM)ekv->value); ++elem; ekv++; } @@ -282,31 +282,31 @@ LRESULT SXLevelEditor_ListViewGameClass_Click() static char tval[256]; tval[0] = 0; - SXLevelEditor::ListViewGameClass->GetTextItem(tval, 1, str, 256); + SXLevelEditor::ListViewGameClass->getItemText(tval, 1, str, 256); const char* tval2; char tval3[256]; bool isfound = false; //проверяем в цикле какая строка из комбобокса выбрана - for (int i = 0; i < SXLevelEditor::ComboBoxGameValue->GetCount(); ++i) + for (int i = 0; i < SXLevelEditor::ComboBoxGameValue->getCount(); ++i) { //сначала проверяем по юзердате (там записано значение) - tval2 = (const char*)SXLevelEditor::ComboBoxGameValue->GetItemData(i); + tval2 = (const char*)SXLevelEditor::ComboBoxGameValue->getItemData(i); if (strcmp(tval, tval2) == 0) { - SXLevelEditor::ComboBoxGameValue->SetSel(i); + SXLevelEditor::ComboBoxGameValue->setSel(i); isfound = true; break; } //затем проверям по имени строки - SXLevelEditor::ComboBoxGameValue->GetItemText(i, tval3); + SXLevelEditor::ComboBoxGameValue->getItemText(i, tval3); if (strcmp(tval, tval3) == 0) { - SXLevelEditor::ComboBoxGameValue->SetSel(i); + SXLevelEditor::ComboBoxGameValue->setSel(i); isfound = true; break; } @@ -316,29 +316,29 @@ LRESULT SXLevelEditor_ListViewGameClass_Click() if (!isfound) { MessageBox(0,"SXLevelEditor_ListViewGameClass_Click data not found",0,0); - SXLevelEditor::ComboBoxGameValue->AddItem(tval); - SXLevelEditor::ComboBoxGameValue->SetItemData(SXLevelEditor::ComboBoxGameValue->GetCount() - 1, (LPARAM)tval); - SXLevelEditor::ComboBoxGameValue->SetSel(SXLevelEditor::ComboBoxGameValue->GetCount()-1); + SXLevelEditor::ComboBoxGameValue->addItem(tval); + SXLevelEditor::ComboBoxGameValue->setItemData(SXLevelEditor::ComboBoxGameValue->getCount() - 1, (LPARAM)tval); + SXLevelEditor::ComboBoxGameValue->setSel(SXLevelEditor::ComboBoxGameValue->getCount()-1); } } else if (pd->editor.type == PDE_FLAGS) { - SXLevelEditor::StaticGameHelp->Visible(false); - SXLevelEditor::MemoGameHelp->Visible(false); + SXLevelEditor::StaticGameHelp->setVisible(false); + SXLevelEditor::MemoGameHelp->setVisible(false); char txtval[256]; - SXLevelEditor::ListViewGameClass->GetTextItem(txtval, 1, str, 256); + SXLevelEditor::ListViewGameClass->getItemText(txtval, 1, str, 256); UINT uiFlags; sscanf(txtval, "%d", &uiFlags); for (int i = 0; i < 16; ++i) { if (SXLevelEditor::aGameObjectFlags[i]) { - SXLevelEditor::CheckBoxGameFlags[i]->SetText(SXLevelEditor::aGameObjectFlags[i]); - SXLevelEditor::CheckBoxGameFlags[i]->Visible(true); + SXLevelEditor::CheckBoxGameFlags[i]->setText(SXLevelEditor::aGameObjectFlags[i]); + SXLevelEditor::CheckBoxGameFlags[i]->setVisible(true); if (uiFlags & ((1 << i + 16))) - SXLevelEditor::CheckBoxGameFlags[i]->SetCheck(true); + SXLevelEditor::CheckBoxGameFlags[i]->setCheck(true); else - SXLevelEditor::CheckBoxGameFlags[i]->SetCheck(false); + SXLevelEditor::CheckBoxGameFlags[i]->setCheck(false); } } } @@ -347,23 +347,23 @@ LRESULT SXLevelEditor_ListViewGameClass_Click() LRESULT SXLevelEditor_EditGameValue_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); if (sel < 0) return 0; - int str = SXLevelEditor::ListViewGameClass->GetSelString(); + int str = SXLevelEditor::ListViewGameClass->getSelString(); if (str < 0) return 0; char txt[256]; - SXLevelEditor::EditGameValue->GetText(txt, 256); - SXLevelEditor::ListViewGameClass->SetTextItem(txt, 1, str); - CBaseEntity* bEnt = SXGame_EntGet(SXLevelEditor::ListBoxList->GetItemData(sel)); + SXLevelEditor::EditGameValue->getText(txt, 256); + SXLevelEditor::ListViewGameClass->setItemText(txt, 1, str); + CBaseEntity* bEnt = SXGame_EntGet(SXLevelEditor::ListBoxList->getItemData(sel)); if (bEnt) { - propdata_t* pd = (propdata_t*)SXLevelEditor::ListViewGameClass->GetDataItem(str); + propdata_t* pd = (propdata_t*)SXLevelEditor::ListViewGameClass->getItemData(str); bool bf = bEnt->setKV(pd->szKey, txt); int qwerty = 0; @@ -371,7 +371,7 @@ LRESULT SXLevelEditor_EditGameValue_Enter(HWND hwnd, UINT msg, WPARAM wParam, LP { char tmpname[512]; sprintf(tmpname, "%s / %s", bEnt->getName(), bEnt->getClassName()); - SXLevelEditor::ListBoxList->SetTextItem(sel, tmpname); + SXLevelEditor::ListBoxList->setItemText(sel, tmpname); } } @@ -380,8 +380,8 @@ LRESULT SXLevelEditor_EditGameValue_Enter(HWND hwnd, UINT msg, WPARAM wParam, LP LRESULT SXLevelEditor_ButtonGameValue_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - int str = SXLevelEditor::ListViewGameClass->GetSelString(); - propdata_t* pd = (propdata_t*)SXLevelEditor::ListViewGameClass->GetDataItem(str); + int str = SXLevelEditor::ListViewGameClass->getSelString(); + propdata_t* pd = (propdata_t*)SXLevelEditor::ListViewGameClass->getItemData(str); int len = 0; editor_kv* ekv = (editor_kv*)pd->editor.pData; @@ -428,17 +428,18 @@ LRESULT SXLevelEditor_ButtonGameValue_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), txtfmt); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE), txtfmt); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_MODELS), "dse", "Select model", true, Core_RStringGet(G_RI_STRING_PATH_GS_MODELS), SXLevelEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetDSEinfo)) { String tmpstr = tmppath + strlen(Core_RStringGet(G_RI_STRING_PATH_GAMESOURCE)); tmpstr.ReplaceAll("\\", "/"); sprintf(tmpname, "%s", tmpstr.c_str()); - SXLevelEditor::EditGameValue->SetText(tmpname); + SXLevelEditor::EditGameValue->setText(tmpname); - int sel = SXLevelEditor::ListBoxList->GetSel(); - SXLevelEditor::ListViewGameClass->SetTextItem(tmpname, 1, str); - CBaseEntity* bEnt = SXGame_EntGet(SXLevelEditor::ListBoxList->GetItemData(sel)); + int sel = SXLevelEditor::ListBoxList->getSel(); + SXLevelEditor::ListViewGameClass->setItemText(tmpname, 1, str); + CBaseEntity* bEnt = SXGame_EntGet(SXLevelEditor::ListBoxList->getItemData(sel)); if (bEnt) { bEnt->setKV(pd->szKey, tmpname); @@ -450,20 +451,20 @@ LRESULT SXLevelEditor_ButtonGameValue_Click(HWND hwnd, UINT msg, WPARAM wParam, LRESULT SXLevelEditor_ButtonGameCreate_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - if (SXLevelEditor::ComboBoxGameClass->GetSel() == 0) + if (SXLevelEditor::ComboBoxGameClass->getSel() == 0) { MessageBox(0, "Class of game object is not selected!", 0, 0); return 0; } char txt[256]; - SXLevelEditor::ComboBoxGameClass->GetItemText(SXLevelEditor::ComboBoxGameClass->GetSel(), txt); + SXLevelEditor::ComboBoxGameClass->getItemText(SXLevelEditor::ComboBoxGameClass->getSel(), txt); CBaseEntity* bEnt = SXGame_CreateEntity(txt); bEnt->setFlags(bEnt->getFlags() | EF_EXPORT | EF_LEVEL); SXLevelEditor_ButtonGameObjectOpen_Click(hwnd, msg, wParam, lParam); - int sel = SXLevelEditor::ListBoxList->GetCountItem()-1; - SXLevelEditor::ListBoxList->SetSel(sel); + int sel = SXLevelEditor::ListBoxList->getItemCount() - 1; + SXLevelEditor::ListBoxList->setSel(sel); SXLevelEditor::GameSel(sel); SXLevelEditor::ActiveElement = sel; SXLevelEditor::ActiveGroupType = EDITORS_LEVEL_GROUPTYPE_GAME; @@ -474,7 +475,7 @@ LRESULT SXLevelEditor_ButtonGameCreate_Click(HWND hwnd, UINT msg, WPARAM wParam, LRESULT SXLevelEditor_EditGameConnectionsName_IN(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { char edit_text[256]; - SXLevelEditor::EditGameConnectionsName->GetText(edit_text, 256); + SXLevelEditor::EditGameConnectionsName->getText(edit_text, 256); if (edit_text[0] == 0) return 0; @@ -501,8 +502,8 @@ LRESULT SXLevelEditor_EditGameConnectionsName_IN(HWND hwnd, UINT msg, WPARAM wPa int qq = found - lower_name; if (qq == 0) { - SXLevelEditor::EditGameConnectionsName->SetText(lower_name); - PostMessage(SXLevelEditor::EditGameConnectionsName->GetHWND(), EM_SETSEL, strlen(edit_text), strlen(lower_name)); + SXLevelEditor::EditGameConnectionsName->setText(lower_name); + PostMessage(SXLevelEditor::EditGameConnectionsName->getHWND(), EM_SETSEL, strlen(edit_text), strlen(lower_name)); return 0; } } @@ -514,51 +515,51 @@ LRESULT SXLevelEditor_EditGameConnectionsName_IN(HWND hwnd, UINT msg, WPARAM wPa void SXLevelEditor::GameVisibleProperties(bool bf) { - SXLevelEditor::StaticGameClass->Visible(bf); - SXLevelEditor::ComboBoxGameClass->Visible(bf); - SXLevelEditor::ListViewGameClass->Visible(bf); - //SXLevelEditor::ComboBoxGameValue->Visible(bf); - //SXLevelEditor::EditGameValue->Visible(bf); - //SXLevelEditor::ButtonGameValue->Visible(bf); - SXLevelEditor::StaticGameHelp->Visible(bf); - SXLevelEditor::MemoGameHelp->Visible(bf); - SXLevelEditor::ButtonGameCreate->Visible(bf); + SXLevelEditor::StaticGameClass->setVisible(bf); + SXLevelEditor::ComboBoxGameClass->setVisible(bf); + SXLevelEditor::ListViewGameClass->setVisible(bf); + //SXLevelEditor::ComboBoxGameValue->setVisible(bf); + //SXLevelEditor::EditGameValue->setVisible(bf); + //SXLevelEditor::ButtonGameValue->setVisible(bf); + SXLevelEditor::StaticGameHelp->setVisible(bf); + SXLevelEditor::MemoGameHelp->setVisible(bf); + SXLevelEditor::ButtonGameCreate->setVisible(bf); for (int i = 0; i < 16; ++i) { - SXLevelEditor::CheckBoxGameFlags[i]->Visible(false); + SXLevelEditor::CheckBoxGameFlags[i]->setVisible(false); } } void SXLevelEditor::GameVisibleConnections(bool bf) { - SXLevelEditor::ListViewGameConnections->Visible(bf); - SXLevelEditor::StaticGameConnectionsEvent->Visible(bf); - SXLevelEditor::ComboBoxGameConnectionsEvent->Visible(bf); - SXLevelEditor::StaticGameConnectionsName->Visible(bf); - SXLevelEditor::EditGameConnectionsName->Visible(bf); - SXLevelEditor::StaticGameConnectionsAction->Visible(bf); - SXLevelEditor::ComboBoxGameConnectionsAction->Visible(bf); - SXLevelEditor::StaticGameConnectionsDelay->Visible(bf); - SXLevelEditor::EditGameConnectionsDelay->Visible(bf); - SXLevelEditor::StaticGameConnectionsParameter->Visible(bf); - SXLevelEditor::EditGameConnectionsParameter->Visible(bf); - SXLevelEditor::ButtonGameConnectionsCreate->Visible(bf); - SXLevelEditor::ButtonGameConnectionsDelete->Visible(false); + SXLevelEditor::ListViewGameConnections->setVisible(bf); + SXLevelEditor::StaticGameConnectionsEvent->setVisible(bf); + SXLevelEditor::ComboBoxGameConnectionsEvent->setVisible(bf); + SXLevelEditor::StaticGameConnectionsName->setVisible(bf); + SXLevelEditor::EditGameConnectionsName->setVisible(bf); + SXLevelEditor::StaticGameConnectionsAction->setVisible(bf); + SXLevelEditor::ComboBoxGameConnectionsAction->setVisible(bf); + SXLevelEditor::StaticGameConnectionsDelay->setVisible(bf); + SXLevelEditor::EditGameConnectionsDelay->setVisible(bf); + SXLevelEditor::StaticGameConnectionsParameter->setVisible(bf); + SXLevelEditor::EditGameConnectionsParameter->setVisible(bf); + SXLevelEditor::ButtonGameConnectionsCreate->setVisible(bf); + SXLevelEditor::ButtonGameConnectionsDelete->setVisible(false); } LRESULT SXLevelEditor_ButtonGameTab_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { if (SXLevelEditor::GameTabVal == 1) { - SXLevelEditor::ButtonGameTab->SetText("Connections"); + SXLevelEditor::ButtonGameTab->setText("Connections"); SXLevelEditor::GameVisibleProperties(true); SXLevelEditor::GameVisibleConnections(false); SXLevelEditor::GameTabVal = 0; } else { - SXLevelEditor::ButtonGameTab->SetText("Properties"); + SXLevelEditor::ButtonGameTab->setText("Properties"); SXLevelEditor::GameVisibleProperties(false); SXLevelEditor::GameVisibleConnections(true); SXLevelEditor::GameTabVal = 1; @@ -571,20 +572,20 @@ LRESULT SXLevelEditor_ButtonGameTab_Click(HWND hwnd, UINT msg, WPARAM wParam, LP LRESULT SXLevelEditor_ListViewGameConnections_Click() { - int iNumStr = SXLevelEditor::ListViewGameConnections->GetSelString(); + int iNumStr = SXLevelEditor::ListViewGameConnections->getSelString(); //очищаем комбобоксы - //SXLevelEditor::ComboBoxGameConnectionsEvent->Clear(); - SXLevelEditor::ComboBoxGameConnectionsAction->Clear(); + //SXLevelEditor::ComboBoxGameConnectionsEvent->clear(); + SXLevelEditor::ComboBoxGameConnectionsAction->clear(); //если нет выделенного тогда обнуляем if (iNumStr < 0) { - SXLevelEditor::ComboBoxGameConnectionsEvent->SetSel(0); - SXLevelEditor::EditGameConnectionsName->SetText(""); - SXLevelEditor::ComboBoxGameConnectionsAction->SetSel(0); - SXLevelEditor::EditGameConnectionsDelay->SetText(""); - SXLevelEditor::EditGameConnectionsParameter->SetText(""); + SXLevelEditor::ComboBoxGameConnectionsEvent->setSel(0); + SXLevelEditor::EditGameConnectionsName->setText(""); + SXLevelEditor::ComboBoxGameConnectionsAction->setSel(0); + SXLevelEditor::EditGameConnectionsDelay->setText(""); + SXLevelEditor::EditGameConnectionsParameter->setText(""); return 0; } @@ -592,22 +593,22 @@ LRESULT SXLevelEditor_ListViewGameConnections_Click() char szStr2[256]; //выделяем используемый event в ComboBoxGameConnectionsEvent - SXLevelEditor::ListViewGameConnections->GetTextItem(szStr, 0, iNumStr, 256); + SXLevelEditor::ListViewGameConnections->getItemText(szStr, 0, iNumStr, 256); - for (int i = 0; i < SXLevelEditor::ComboBoxGameConnectionsEvent->GetCount(); ++i) + for (int i = 0; i < SXLevelEditor::ComboBoxGameConnectionsEvent->getCount(); ++i) { - SXLevelEditor::ComboBoxGameConnectionsEvent->GetItemText(i, szStr2); + SXLevelEditor::ComboBoxGameConnectionsEvent->getItemText(i, szStr2); if (strcmp(szStr, szStr2) == 0) { - SXLevelEditor::ComboBoxGameConnectionsEvent->SetSel(i); + SXLevelEditor::ComboBoxGameConnectionsEvent->setSel(i); break; } } //------- //устанавилваем имя используемого игрового объекта в EditGameConnectionsName - SXLevelEditor::ListViewGameConnections->GetTextItem(szStr, 1, iNumStr, 256); - SXLevelEditor::EditGameConnectionsName->SetText(szStr); + SXLevelEditor::ListViewGameConnections->getItemText(szStr, 1, iNumStr, 256); + SXLevelEditor::EditGameConnectionsName->setText(szStr); //------- //устанавилваем данные в ComboBoxGameConnectionsAction и выделяем используемый @@ -630,37 +631,37 @@ LRESULT SXLevelEditor_ListViewGameConnections_Click() pPropData = &pPropTable->pData[k]; if (pPropData->flags & PDFF_INPUT) { - SXLevelEditor::ComboBoxGameConnectionsAction->AddItem(pPropData->szEdName); - SXLevelEditor::ComboBoxGameConnectionsAction->SetItemData(SXLevelEditor::ComboBoxGameConnectionsAction->GetCount() - 1, (LPARAM)(pPropData->szKey)); + SXLevelEditor::ComboBoxGameConnectionsAction->addItem(pPropData->szEdName); + SXLevelEditor::ComboBoxGameConnectionsAction->setItemData(SXLevelEditor::ComboBoxGameConnectionsAction->getCount() - 1, (LPARAM)(pPropData->szKey)); } } } } - SXLevelEditor::ListViewGameConnections->GetTextItem(szStr, 2, iNumStr, 256); - for (int i = 0; i < SXLevelEditor::ComboBoxGameConnectionsAction->GetCount(); ++i) + SXLevelEditor::ListViewGameConnections->getItemText(szStr, 2, iNumStr, 256); + for (int i = 0; i < SXLevelEditor::ComboBoxGameConnectionsAction->getCount(); ++i) { - SXLevelEditor::ComboBoxGameConnectionsAction->GetItemText(i, szStr2); + SXLevelEditor::ComboBoxGameConnectionsAction->getItemText(i, szStr2); if (strcmp(szStr, szStr2) == 0) { - SXLevelEditor::ComboBoxGameConnectionsAction->SetSel(i); + SXLevelEditor::ComboBoxGameConnectionsAction->setSel(i); break; } } //------- //устанавливаем задержку в секундах в EditGameConnectionsDelay - SXLevelEditor::ListViewGameConnections->GetTextItem(szStr, 3, iNumStr, 256); - SXLevelEditor::EditGameConnectionsDelay->SetText(szStr); + SXLevelEditor::ListViewGameConnections->getItemText(szStr, 3, iNumStr, 256); + SXLevelEditor::EditGameConnectionsDelay->setText(szStr); //------- //устанавливаем параметр в EditGameConnectionsParameter - SXLevelEditor::ListViewGameConnections->GetTextItem(szStr, 4, iNumStr, 256); - SXLevelEditor::EditGameConnectionsParameter->SetText(szStr); + SXLevelEditor::ListViewGameConnections->getItemText(szStr, 4, iNumStr, 256); + SXLevelEditor::EditGameConnectionsParameter->setText(szStr); //------- - SXLevelEditor::ButtonGameConnectionsDelete->Visible(true); - SXLevelEditor::ButtonGameConnectionsCreate->SetText("Create"); + SXLevelEditor::ButtonGameConnectionsDelete->setVisible(true); + SXLevelEditor::ButtonGameConnectionsCreate->setText("Create"); SXLevelEditor::isAddGameConections = false; return 0; @@ -668,8 +669,8 @@ LRESULT SXLevelEditor_ListViewGameConnections_Click() LRESULT SXLevelEditor_EditGameConnectionsName_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - ID idSelListBoxList = SXLevelEditor::ListBoxList->GetSel(); - ID idSelStrTable = SXLevelEditor::ListViewGameConnections->GetSelString(); + ID idSelListBoxList = SXLevelEditor::ListBoxList->getSel(); + ID idSelStrTable = SXLevelEditor::ListViewGameConnections->getSelString(); if (idSelListBoxList < 0) return 0; @@ -679,20 +680,20 @@ LRESULT SXLevelEditor_EditGameConnectionsName_Enter(HWND hwnd, UINT msg, WPARAM char szBuffer256[256]; szBuffer256[0] = 0; - SXLevelEditor::EditGameConnectionsName->GetText(szBuffer256, 256); + SXLevelEditor::EditGameConnectionsName->getText(szBuffer256, 256); CBaseEntity *pEnt2 = SXGame_EntGetByName(szBuffer256, 0); //записываем в szBuffer256 текущее имя action szBuffer256[0] = 0; - SXLevelEditor::ComboBoxGameConnectionsAction->GetItemText(SXLevelEditor::ComboBoxGameConnectionsAction->GetSel(), szBuffer256); + SXLevelEditor::ComboBoxGameConnectionsAction->getItemText(SXLevelEditor::ComboBoxGameConnectionsAction->getSel(), szBuffer256); // если энтить с введенным именем существует if (pEnt2) { proptable_t *pPropTable2 = SXGame_EntGetProptable(pEnt2->getClassName()); propdata_t *pPropData2 = 0; - SXLevelEditor::ComboBoxGameConnectionsAction->Clear(); + SXLevelEditor::ComboBoxGameConnectionsAction->clear(); //проходимся по всем данным таблицы свойств for (int j = 0; j < pPropTable2->numFields; ++j) @@ -703,14 +704,14 @@ LRESULT SXLevelEditor_EditGameConnectionsName_Enter(HWND hwnd, UINT msg, WPARAM if (pPropData2->flags & PDFF_INPUT) { //добавляем в комбобокс action - SXLevelEditor::ComboBoxGameConnectionsAction->AddItem(pPropData2->szEdName); - SXLevelEditor::ComboBoxGameConnectionsAction->SetItemData(SXLevelEditor::ComboBoxGameConnectionsEvent->GetCount() - 1, (LPARAM)(pPropData2->szKey)); + SXLevelEditor::ComboBoxGameConnectionsAction->addItem(pPropData2->szEdName); + SXLevelEditor::ComboBoxGameConnectionsAction->setItemData(SXLevelEditor::ComboBoxGameConnectionsEvent->getCount() - 1, (LPARAM)(pPropData2->szKey)); //если предыдущее имя action равно последнему вставленному if (strcmp(pPropData2->szEdName, szBuffer256) == 0) { //активируем эту строку в комбобоксе - SXLevelEditor::ComboBoxGameConnectionsAction->SetSel(SXLevelEditor::ComboBoxGameConnectionsAction->GetCount() - 1); + SXLevelEditor::ComboBoxGameConnectionsAction->setSel(SXLevelEditor::ComboBoxGameConnectionsAction->getCount() - 1); } } } @@ -724,8 +725,8 @@ LRESULT SXLevelEditor_EditGameConnectionsName_Enter(HWND hwnd, UINT msg, WPARAM return 0; szBuffer256[0] = 0; - SXLevelEditor::ListViewGameConnections->GetTextItem(szBuffer256, 1, idSelStrTable, 256); - SXLevelEditor::EditGameConnectionsName->SetText(szBuffer256); + SXLevelEditor::ListViewGameConnections->getItemText(szBuffer256, 1, idSelStrTable, 256); + SXLevelEditor::EditGameConnectionsName->setText(szBuffer256); } return SXLevelEditor_EditGameConnections_Enter(hwnd, msg, wParam, lParam); @@ -736,16 +737,16 @@ LRESULT SXLevelEditor_EditGameConnections_Enter(HWND hwnd, UINT msg, WPARAM wPar if (SXLevelEditor::isAddGameConections) return 0; - ID idSelListBoxList = SXLevelEditor::ListBoxList->GetSel(); - ID idSelStrTable = SXLevelEditor::ListViewGameConnections->GetSelString(); + ID idSelListBoxList = SXLevelEditor::ListBoxList->getSel(); + ID idSelStrTable = SXLevelEditor::ListViewGameConnections->getSelString(); if (idSelListBoxList < 0 || idSelStrTable < 0) return 0; - ID idSelEnt = SXLevelEditor::ListBoxList->GetItemData(idSelListBoxList); + ID idSelEnt = SXLevelEditor::ListBoxList->getItemData(idSelListBoxList); CBaseEntity *pEnt = SXGame_EntGet(idSelEnt); proptable_t *pPropTable = SXGame_EntGetProptable(pEnt->getClassName()); - propdata_t *pPropData = (propdata_t*)(SXLevelEditor::ListViewGameConnections->GetDataItem(idSelStrTable)); + propdata_t *pPropData = (propdata_t*)(SXLevelEditor::ListViewGameConnections->getItemData(idSelStrTable)); //получаем скленные в единую строку данные char szBuffer4096[4096]; @@ -757,24 +758,24 @@ LRESULT SXLevelEditor_EditGameConnections_Enter(HWND hwnd, UINT msg, WPARAM wPar char szBuffer256[256]; szBuffer256[0] = 0; - SXLevelEditor::ComboBoxGameConnectionsEvent->GetItemText(SXLevelEditor::ComboBoxGameConnectionsEvent->GetSel(), szBuffer256); - SXLevelEditor::ListViewGameConnections->SetTextItem(szBuffer256, 0, idSelStrTable); + SXLevelEditor::ComboBoxGameConnectionsEvent->getItemText(SXLevelEditor::ComboBoxGameConnectionsEvent->getSel(), szBuffer256); + SXLevelEditor::ListViewGameConnections->setItemText(szBuffer256, 0, idSelStrTable); szBuffer256[0] = 0; - SXLevelEditor::EditGameConnectionsName->GetText(szBuffer256, 256); - SXLevelEditor::ListViewGameConnections->SetTextItem(szBuffer256, 1, idSelStrTable); + SXLevelEditor::EditGameConnectionsName->getText(szBuffer256, 256); + SXLevelEditor::ListViewGameConnections->setItemText(szBuffer256, 1, idSelStrTable); szBuffer256[0] = 0; - SXLevelEditor::ComboBoxGameConnectionsAction->GetItemText(SXLevelEditor::ComboBoxGameConnectionsAction->GetSel(), szBuffer256); - SXLevelEditor::ListViewGameConnections->SetTextItem(szBuffer256, 2, idSelStrTable); + SXLevelEditor::ComboBoxGameConnectionsAction->getItemText(SXLevelEditor::ComboBoxGameConnectionsAction->getSel(), szBuffer256); + SXLevelEditor::ListViewGameConnections->setItemText(szBuffer256, 2, idSelStrTable); szBuffer256[0] = 0; - SXLevelEditor::EditGameConnectionsDelay->GetText(szBuffer256, 256); - SXLevelEditor::ListViewGameConnections->SetTextItem(szBuffer256, 3, idSelStrTable); + SXLevelEditor::EditGameConnectionsDelay->getText(szBuffer256, 256); + SXLevelEditor::ListViewGameConnections->setItemText(szBuffer256, 3, idSelStrTable); szBuffer256[0] = 0; - SXLevelEditor::EditGameConnectionsParameter->GetText(szBuffer256, 256); - SXLevelEditor::ListViewGameConnections->SetTextItem(szBuffer256, 4, idSelStrTable); + SXLevelEditor::EditGameConnectionsParameter->getText(szBuffer256, 256); + SXLevelEditor::ListViewGameConnections->setItemText(szBuffer256, 4, idSelStrTable); pEnt->setKV(pPropData->szKey, szBuffer4096); @@ -787,13 +788,13 @@ void SXLevelEditor_VeldStringGameConnections(proptable_t *pPropTable, propdata_t szBuffer256[0] = 0; //проходимся по всем строкам таблицы - for (int i = 0, il = SXLevelEditor::ListViewGameConnections->GetCountString(); i < il; ++i) + for (int i = 0, il = SXLevelEditor::ListViewGameConnections->getStringCount(); i < il; ++i) { //если строку с этим номером надо исключить if (iNumExclude == i) continue; - propdata_t *pPropData2 = (propdata_t*)SXLevelEditor::ListViewGameConnections->GetDataItem(i); + propdata_t *pPropData2 = (propdata_t*)SXLevelEditor::ListViewGameConnections->getItemData(i); //если юзердата то что нам надо if (pPropData == pPropData2) @@ -802,7 +803,7 @@ void SXLevelEditor_VeldStringGameConnections(proptable_t *pPropTable, propdata_t sprintf(szStrOut + strlen(szStrOut), ","); szBuffer256[0] = 0; - SXLevelEditor::ListViewGameConnections->GetTextItem(szBuffer256, 1, i, 256); + SXLevelEditor::ListViewGameConnections->getItemText(szBuffer256, 1, i, 256); sprintf(szStrOut + strlen(szStrOut), "%s:", szBuffer256); //ищем энтить с которым будет соединение @@ -813,7 +814,7 @@ void SXLevelEditor_VeldStringGameConnections(proptable_t *pPropTable, propdata_t pPropTable2 = SXGame_EntGetProptable(pEnt2->getClassName()); szBuffer256[0] = 0; - SXLevelEditor::ListViewGameConnections->GetTextItem(szBuffer256, 2, i, 256); + SXLevelEditor::ListViewGameConnections->getItemText(szBuffer256, 2, i, 256); //если энтить для соединения существует if (pEnt2) @@ -838,11 +839,11 @@ void SXLevelEditor_VeldStringGameConnections(proptable_t *pPropTable, propdata_t } szBuffer256[0] = 0; - SXLevelEditor::ListViewGameConnections->GetTextItem(szBuffer256, 3, i, 256); + SXLevelEditor::ListViewGameConnections->getItemText(szBuffer256, 3, i, 256); sprintf(szStrOut + strlen(szStrOut), "%s:", szBuffer256); szBuffer256[0] = 0; - SXLevelEditor::ListViewGameConnections->GetTextItem(szBuffer256, 4, i, 256); + SXLevelEditor::ListViewGameConnections->getItemText(szBuffer256, 4, i, 256); sprintf(szStrOut + strlen(szStrOut), "%s", szBuffer256); } } @@ -850,13 +851,13 @@ void SXLevelEditor_VeldStringGameConnections(proptable_t *pPropTable, propdata_t LRESULT SXLevelEditor_ButtonGameConnectionsCreate_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - ID idSelListBoxList = SXLevelEditor::ListBoxList->GetSel(); - ID idSelStrTable = SXLevelEditor::ListViewGameConnections->GetSelString(); + ID idSelListBoxList = SXLevelEditor::ListBoxList->getSel(); + ID idSelStrTable = SXLevelEditor::ListViewGameConnections->getSelString(); if (idSelListBoxList < 0) return 0; - ID idSelEnt = SXLevelEditor::ListBoxList->GetItemData(idSelListBoxList); + ID idSelEnt = SXLevelEditor::ListBoxList->getItemData(idSelListBoxList); CBaseEntity *pEnt = SXGame_EntGet(idSelEnt); proptable_t *pPropTable = SXGame_EntGetProptable(pEnt->getClassName()); @@ -869,10 +870,10 @@ LRESULT SXLevelEditor_ButtonGameConnectionsCreate_Click(HWND hwnd, UINT msg, WPA if (idSelStrTable < 0) return 0; - propdata_t *pPropData = (propdata_t*)(SXLevelEditor::ListViewGameConnections->GetDataItem(idSelStrTable)); + propdata_t *pPropData = (propdata_t*)(SXLevelEditor::ListViewGameConnections->getItemData(idSelStrTable)); - SXLevelEditor::ButtonGameConnectionsDelete->Visible(true); - SXLevelEditor::ButtonGameConnectionsCreate->SetText("Create"); + SXLevelEditor::ButtonGameConnectionsDelete->setVisible(true); + SXLevelEditor::ButtonGameConnectionsCreate->setText("Create"); SXLevelEditor::isAddGameConections = false; char szBuffer4096[4096]; @@ -886,19 +887,19 @@ LRESULT SXLevelEditor_ButtonGameConnectionsCreate_Click(HWND hwnd, UINT msg, WPA char szBuffer256[256]; szBuffer256[0] = 0; - SXLevelEditor::EditGameConnectionsName->GetText(szBuffer256, 256); + SXLevelEditor::EditGameConnectionsName->getText(szBuffer256, 256); sprintf(szBuffer4096 + strlen(szBuffer4096), "%s:", szBuffer256); szBuffer256[0] = 0; - long lItemData = SXLevelEditor::ComboBoxGameConnectionsAction->GetItemData(SXLevelEditor::ComboBoxGameConnectionsAction->GetSel()); + long lItemData = SXLevelEditor::ComboBoxGameConnectionsAction->getItemData(SXLevelEditor::ComboBoxGameConnectionsAction->getSel()); sprintf(szBuffer4096 + strlen(szBuffer4096), "%s:", (char*)lItemData); szBuffer256[0] = 0; - SXLevelEditor::EditGameConnectionsDelay->GetText(szBuffer256, 256); + SXLevelEditor::EditGameConnectionsDelay->getText(szBuffer256, 256); sprintf(szBuffer4096 + strlen(szBuffer4096), "%s:", szBuffer256); szBuffer256[0] = 0; - SXLevelEditor::EditGameConnectionsParameter->GetText(szBuffer256, 256); + SXLevelEditor::EditGameConnectionsParameter->getText(szBuffer256, 256); sprintf(szBuffer4096 + strlen(szBuffer4096), "%s", szBuffer256); pEnt->setKV(pPropData->szKey, szBuffer4096); @@ -908,8 +909,8 @@ LRESULT SXLevelEditor_ButtonGameConnectionsCreate_Click(HWND hwnd, UINT msg, WPA //иначе создание нового соединения else { - SXLevelEditor::ButtonGameConnectionsDelete->Visible(false); - SXLevelEditor::ButtonGameConnectionsCreate->SetText("Add"); + SXLevelEditor::ButtonGameConnectionsDelete->setVisible(false); + SXLevelEditor::ButtonGameConnectionsCreate->setText("Add"); SXLevelEditor::isAddGameConections = true; } return 0; @@ -917,16 +918,16 @@ LRESULT SXLevelEditor_ButtonGameConnectionsCreate_Click(HWND hwnd, UINT msg, WPA LRESULT SXLevelEditor_ButtonGameConnectionsDelete_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - ID idSelListBoxList = SXLevelEditor::ListBoxList->GetSel(); - ID idSelStrTable = SXLevelEditor::ListViewGameConnections->GetSelString(); + ID idSelListBoxList = SXLevelEditor::ListBoxList->getSel(); + ID idSelStrTable = SXLevelEditor::ListViewGameConnections->getSelString(); if (idSelListBoxList < 0 || idSelStrTable < 0) return 0; - ID idSelEnt = SXLevelEditor::ListBoxList->GetItemData(idSelListBoxList); + ID idSelEnt = SXLevelEditor::ListBoxList->getItemData(idSelListBoxList); CBaseEntity *pEnt = SXGame_EntGet(idSelEnt); proptable_t *pPropTable = SXGame_EntGetProptable(pEnt->getClassName()); - propdata_t *pPropData = (propdata_t*)(SXLevelEditor::ListViewGameConnections->GetDataItem(idSelStrTable)); + propdata_t *pPropData = (propdata_t*)(SXLevelEditor::ListViewGameConnections->getItemData(idSelStrTable)); if (!pEnt) return 0; diff --git a/source/sxleveleditor/game_callback.h b/source/sxleveleditor/game_callback.h index 11cf729973046c8c83bffe7e0ebee7f26e83d25b..58faa428f11033d5863607d74d648465e2df34a9 100644 --- a/source/sxleveleditor/game_callback.h +++ b/source/sxleveleditor/game_callback.h @@ -2,6 +2,7 @@ #ifndef __GAME_CALLBACK_H #define __GAME_CALLBACK_H +#include "skyxengine.h" #include "level_editor.h" //! ������������� ����� ���������� � ������������ �������� ������� diff --git a/source/sxleveleditor/green_callback.cpp b/source/sxleveleditor/green_callback.cpp index 3293f48eec2333f9357e0bb322c500ffa7fd9d0f..7ed03c3c401bd7446473b3a8d9427871c177d6cb 100644 --- a/source/sxleveleditor/green_callback.cpp +++ b/source/sxleveleditor/green_callback.cpp @@ -10,76 +10,76 @@ void SXLevelEditor::GreenActivateAll(bool bf) void SXLevelEditor::GreenActivateMain(bool bf) { - SXLevelEditor::StaticGreenName->Visible(bf); - SXLevelEditor::EditGreenName->Visible(bf); - SXLevelEditor::EditGreenName->SetText(""); - - SXLevelEditor::StaticGreenModel->Visible(bf); - SXLevelEditor::EditGreenModel->Visible(bf); - SXLevelEditor::EditGreenModel->SetText(""); - SXLevelEditor::ButtonGreenModel->Visible(bf); - - SXLevelEditor::StaticGreenLod1->Visible(bf); - SXLevelEditor::EditGreenLod1->Visible(bf); - SXLevelEditor::EditGreenLod1->SetText(""); - SXLevelEditor::ButtonGreenLod1->Visible(bf); + SXLevelEditor::StaticGreenName->setVisible(bf); + SXLevelEditor::EditGreenName->setVisible(bf); + SXLevelEditor::EditGreenName->setText(""); + + SXLevelEditor::StaticGreenModel->setVisible(bf); + SXLevelEditor::EditGreenModel->setVisible(bf); + SXLevelEditor::EditGreenModel->setText(""); + SXLevelEditor::ButtonGreenModel->setVisible(bf); + + SXLevelEditor::StaticGreenLod1->setVisible(bf); + SXLevelEditor::EditGreenLod1->setVisible(bf); + SXLevelEditor::EditGreenLod1->setText(""); + SXLevelEditor::ButtonGreenLod1->setVisible(bf); - SXLevelEditor::StaticGreenLod2->Visible(bf); - SXLevelEditor::EditGreenLod2->Visible(bf); - SXLevelEditor::EditGreenLod2->SetText(""); - SXLevelEditor::ButtonGreenLod2->Visible(bf); - - SXLevelEditor::StaticGreenMask->Visible(bf); - SXLevelEditor::EditGreenMask->Visible(bf); - SXLevelEditor::EditGreenMask->SetText(""); - SXLevelEditor::ButtonGreenMask->Visible(bf); - - SXLevelEditor::StaticGreenNav->Visible(bf); - SXLevelEditor::EditGreenNav->Visible(bf); - SXLevelEditor::EditGreenNav->SetText(""); - SXLevelEditor::ButtonGreenNav->Visible(bf); + SXLevelEditor::StaticGreenLod2->setVisible(bf); + SXLevelEditor::EditGreenLod2->setVisible(bf); + SXLevelEditor::EditGreenLod2->setText(""); + SXLevelEditor::ButtonGreenLod2->setVisible(bf); + + SXLevelEditor::StaticGreenMask->setVisible(bf); + SXLevelEditor::EditGreenMask->setVisible(bf); + SXLevelEditor::EditGreenMask->setText(""); + SXLevelEditor::ButtonGreenMask->setVisible(bf); + + SXLevelEditor::StaticGreenNav->setVisible(bf); + SXLevelEditor::EditGreenNav->setVisible(bf); + SXLevelEditor::EditGreenNav->setText(""); + SXLevelEditor::ButtonGreenNav->setVisible(bf); } void SXLevelEditor::GreenActivateCreate(bool bf) { - SXLevelEditor::StaticGreenMask->Enable(bf); - SXLevelEditor::EditGreenMask->Enable(bf); - SXLevelEditor::ButtonGreenMask->Enable(bf); + SXLevelEditor::StaticGreenMask->setEnable(bf); + SXLevelEditor::EditGreenMask->setEnable(bf); + SXLevelEditor::ButtonGreenMask->setEnable(bf); - SXLevelEditor::ButtonGreenGenerate->Visible(bf); + SXLevelEditor::ButtonGreenGenerate->setVisible(bf); - SXLevelEditor::TrackBarGreenDensity->Visible(bf); - SXLevelEditor::TrackBarGreenDensity->SetPos(0); + SXLevelEditor::TrackBarGreenDensity->setVisible(bf); + SXLevelEditor::TrackBarGreenDensity->setPos(0); - SXLevelEditor::StaticGreenDensityVal->Visible(bf); - SXLevelEditor::StaticGreenDensityText->Visible(bf); + SXLevelEditor::StaticGreenDensityVal->setVisible(bf); + SXLevelEditor::StaticGreenDensityText->setVisible(bf); } void SXLevelEditor::GreenActivateEdit(bool bf) { - SXLevelEditor::ButtonGreenGenerate->Visible(bf); - - SXLevelEditor::TrackBarGreenDensity->Visible(bf); - SXLevelEditor::TrackBarGreenDensity->SetPos(0); - - SXLevelEditor::StaticGreenDensityVal->Visible(bf); - SXLevelEditor::StaticGreenDensityText->Visible(bf); - - //SXLevelEditor::CheckBoxSingleSel->Visible(bf); - //SXLevelEditor::StaticSingleSelPos->Visible(bf); - SXLevelEditor::EditGreenSelX->Visible(bf); - SXLevelEditor::EditGreenSelX->SetText(""); - SXLevelEditor::EditGreenSelY->Visible(bf); - SXLevelEditor::EditGreenSelY->SetText(""); - SXLevelEditor::EditGreenSelZ->Visible(bf); - SXLevelEditor::EditGreenSelZ->SetText(""); - SXLevelEditor::RadioButtonGreenSelX->Visible(bf); - SXLevelEditor::RadioButtonGreenSelY->Visible(bf); - SXLevelEditor::RadioButtonGreenSelZ->Visible(bf); - SXLevelEditor::ComboBoxGreenSel->Visible(bf); - SXLevelEditor::StaticGreenSelX->Visible(bf); - SXLevelEditor::StaticGreenSelY->Visible(bf); - SXLevelEditor::StaticGreenSelZ->Visible(bf); + SXLevelEditor::ButtonGreenGenerate->setVisible(bf); + + SXLevelEditor::TrackBarGreenDensity->setVisible(bf); + SXLevelEditor::TrackBarGreenDensity->setPos(0); + + SXLevelEditor::StaticGreenDensityVal->setVisible(bf); + SXLevelEditor::StaticGreenDensityText->setVisible(bf); + + //SXLevelEditor::CheckBoxSingleSel->setVisible(bf); + //SXLevelEditor::StaticSingleSelPos->setVisible(bf); + SXLevelEditor::EditGreenSelX->setVisible(bf); + SXLevelEditor::EditGreenSelX->setText(""); + SXLevelEditor::EditGreenSelY->setVisible(bf); + SXLevelEditor::EditGreenSelY->setText(""); + SXLevelEditor::EditGreenSelZ->setVisible(bf); + SXLevelEditor::EditGreenSelZ->setText(""); + SXLevelEditor::RadioButtonGreenSelX->setVisible(bf); + SXLevelEditor::RadioButtonGreenSelY->setVisible(bf); + SXLevelEditor::RadioButtonGreenSelZ->setVisible(bf); + SXLevelEditor::ComboBoxGreenSel->setVisible(bf); + SXLevelEditor::StaticGreenSelX->setVisible(bf); + SXLevelEditor::StaticGreenSelY->setVisible(bf); + SXLevelEditor::StaticGreenSelZ->setVisible(bf); } void SXLevelEditor::GreenSel(int sel) @@ -91,23 +91,23 @@ void SXLevelEditor::GreenSel(int sel) SXLevelEditor::GreenActivateCreate(false); SXLevelEditor::GreenActivateEdit(true); - SXLevelEditor::ButtonGreenGenerate->Visible(false); - - SXLevelEditor::EditGreenModel->SetText(SGeom_GreenMGetModel(sel)); - SXLevelEditor::EditGreenLod1->SetText((SGeom_GreenMGetLod1(sel) ? SGeom_GreenMGetLod1(sel) : "")); - SXLevelEditor::EditGreenLod2->SetText((SGeom_GreenMGetLod2(sel) ? SGeom_GreenMGetLod2(sel) : "")); - SXLevelEditor::EditGreenMask->SetText(SGeom_GreenMGetMask(sel)); - SXLevelEditor::EditGreenName->SetText(SGeom_GreenMGetName(sel)); - SXLevelEditor::EditGreenNav->SetText(SGeom_GreenMGetNav(sel)); + SXLevelEditor::ButtonGreenGenerate->setVisible(false); + + SXLevelEditor::EditGreenModel->setText(SGeom_GreenMGetModel(sel)); + SXLevelEditor::EditGreenLod1->setText((SGeom_GreenMGetLod1(sel) ? SGeom_GreenMGetLod1(sel) : "")); + SXLevelEditor::EditGreenLod2->setText((SGeom_GreenMGetLod2(sel) ? SGeom_GreenMGetLod2(sel) : "")); + SXLevelEditor::EditGreenMask->setText(SGeom_GreenMGetMask(sel)); + SXLevelEditor::EditGreenName->setText(SGeom_GreenMGetName(sel)); + SXLevelEditor::EditGreenNav->setText(SGeom_GreenMGetNav(sel)); } } LRESULT SXLevelEditor_EditGreenName_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GREEN) { - SXLevelEditor::EditGreenName->GetText(SGeom_GreenMGetName(sel), 64); + SXLevelEditor::EditGreenName->getText(SGeom_GreenMGetName(sel), 64); } return 0; @@ -118,12 +118,13 @@ LRESULT SXLevelEditor_ButtonGreenModel_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), "dse", "Select model", true, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), SXLevelEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetDSEinfo)) { StrCutMesh(tmppath, tmpname); - SXLevelEditor::EditGreenModel->SetText(tmpname); - int sel = SXLevelEditor::ListBoxList->GetSel(); + SXLevelEditor::EditGreenModel->setText(tmpname); + int sel = SXLevelEditor::ListBoxList->getSel(); if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GREEN) { if (sel >= 0 && sel < SGeom_GreenGetCount()) @@ -138,12 +139,13 @@ LRESULT SXLevelEditor_ButtonGreenLod1_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), "dse", "Select model", true, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), SXLevelEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetDSEinfo)) { StrCutMesh(tmppath, tmpname); - SXLevelEditor::EditGreenLod1->SetText(tmpname); - int sel = SXLevelEditor::ListBoxList->GetSel(); + SXLevelEditor::EditGreenLod1->setText(tmpname); + int sel = SXLevelEditor::ListBoxList->getSel(); if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GREEN) { if (sel >= 0 && sel < SGeom_GreenGetCount()) @@ -158,12 +160,13 @@ LRESULT SXLevelEditor_ButtonGreenLod2_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), "dse", "Select model", true, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), SXLevelEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetDSEinfo)) { StrCutMesh(tmppath, tmpname); - SXLevelEditor::EditGreenLod2->SetText(tmpname); - int sel = SXLevelEditor::ListBoxList->GetSel(); + SXLevelEditor::EditGreenLod2->setText(tmpname); + int sel = SXLevelEditor::ListBoxList->getSel(); if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GREEN) { if (sel >= 0 && sel < SGeom_GreenGetCount()) @@ -176,9 +179,9 @@ LRESULT SXLevelEditor_ButtonGreenLod2_Click(HWND hwnd, UINT msg, WPARAM wParam, LRESULT SXLevelEditor_TrackBarGreenDensity_MouseMove(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { char freqstr[64]; - int pos = SXLevelEditor::TrackBarGreenDensity->GetPos(); + int pos = SXLevelEditor::TrackBarGreenDensity->getPos(); sprintf(freqstr, "%d%", pos); - SXLevelEditor::StaticGreenDensityVal->SetText(freqstr); + SXLevelEditor::StaticGreenDensityVal->setText(freqstr); return 0; } @@ -187,11 +190,12 @@ LRESULT SXLevelEditor_ButtonGreenMask_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_TEXTURE); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture mask", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXLevelEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { StrCutName(tmppath, tmpname); - SXLevelEditor::EditGreenMask->SetText(tmpname); + SXLevelEditor::EditGreenMask->setText(tmpname); } return 0; } @@ -201,12 +205,13 @@ LRESULT SXLevelEditor_ButtonGreenNav_Click(HWND hwnd, UINT msg, WPARAM wParam, L char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), "dse", "Select model", true, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), SXLevelEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetDSEinfo)) { StrCutMesh(tmppath, tmpname); - SXLevelEditor::EditGreenNav->SetText(tmpname); - int sel = SXLevelEditor::ListBoxList->GetSel(); + SXLevelEditor::EditGreenNav->setText(tmpname); + int sel = SXLevelEditor::ListBoxList->getSel(); if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GREEN) { if (sel >= 0 && sel < SGeom_GreenGetCount()) @@ -251,12 +256,12 @@ LRESULT SXLevelEditor_ButtonGreenGenerate_Click(HWND hwnd, UINT msg, WPARAM wPar int greentype = GREEN_TYPE_TREE; - SXLevelEditor::EditGreenName->GetText(tmp_name, 1024); - SXLevelEditor::EditGreenMask->GetText(tmp_tex, 1024); - SXLevelEditor::EditGreenModel->GetText(tmp_model, 1024); - SXLevelEditor::EditGreenLod1->GetText(tmp_lod1, 1024); - SXLevelEditor::EditGreenLod2->GetText(tmp_lod2, 1024); - SXLevelEditor::EditGreenNav->GetText(tmp_navmesh, 1024); + SXLevelEditor::EditGreenName->getText(tmp_name, 1024); + SXLevelEditor::EditGreenMask->getText(tmp_tex, 1024); + SXLevelEditor::EditGreenModel->getText(tmp_model, 1024); + SXLevelEditor::EditGreenLod1->getText(tmp_lod1, 1024); + SXLevelEditor::EditGreenLod2->getText(tmp_lod2, 1024); + SXLevelEditor::EditGreenNav->getText(tmp_navmesh, 1024); if (tmp_lod1[0] == 0 && tmp_lod2[0] == 0) greentype = GREEN_TYPE_GRASS; @@ -284,7 +289,7 @@ LRESULT SXLevelEditor_ButtonGreenGenerate_Click(HWND hwnd, UINT msg, WPARAM wPar return 0; }*/ - if (!Core_0FileExists(path_model)) + if (!FileExistsFile(path_model)) { char tmpstr[2048]; sprintf(tmpstr, "%s%s%s", "Model [", path_model, "] not found"); @@ -292,7 +297,7 @@ LRESULT SXLevelEditor_ButtonGreenGenerate_Click(HWND hwnd, UINT msg, WPARAM wPar return 0; } - if (def_str_validate(tmp_navmesh) && !Core_0FileExists(path_navmesh)) + if (def_str_validate(tmp_navmesh) && !FileExistsFile(path_navmesh)) { char tmpstr[2048]; sprintf(tmpstr, "%s%s%s", "Model [", path_navmesh, "] not found"); @@ -302,7 +307,7 @@ LRESULT SXLevelEditor_ButtonGreenGenerate_Click(HWND hwnd, UINT msg, WPARAM wPar if (greentype == GREEN_TYPE_TREE) { - if (!Core_0FileExists(path_lod1)) + if (!FileExistsFile(path_lod1)) { char tmpstr[2048]; sprintf(tmpstr, "%s%s%s", "Model [", path_lod1, "] not found"); @@ -310,7 +315,7 @@ LRESULT SXLevelEditor_ButtonGreenGenerate_Click(HWND hwnd, UINT msg, WPARAM wPar return 0; } - if (!Core_0FileExists(path_lod2)) + if (!FileExistsFile(path_lod2)) { char tmpstr[2048]; sprintf(tmpstr, "%s%s%s", "Model [", path_lod2, "] not found"); @@ -336,7 +341,7 @@ LRESULT SXLevelEditor_ButtonGreenGenerate_Click(HWND hwnd, UINT msg, WPARAM wPar return 0; } - float pos = SXLevelEditor::TrackBarGreenDensity->GetPos(); + float pos = SXLevelEditor::TrackBarGreenDensity->getPos(); SGeom_GreenAddGreen(tmp_name, tmp_tex, @@ -351,15 +356,15 @@ LRESULT SXLevelEditor_ButtonGreenGenerate_Click(HWND hwnd, UINT msg, WPARAM wPar SGeom_GreenMGetName(SGeom_GreenGetCount() - 1), (SGeom_GreenMGetTypeCountGen(SGeom_GreenGetCount() - 1) == GREEN_TYPE_GRASS ? "grass" : "tree/shrub"), SGeom_GreenMGetCountGen(SGeom_GreenGetCount() - 1)); - SXLevelEditor::ListBoxList->AddItem(tmpnamecountpoly); + SXLevelEditor::ListBoxList->addItem(tmpnamecountpoly); SXLevelEditor::GreenActivateCreate(false); - SXLevelEditor::ListBoxList->SetSel(SXLevelEditor::ListBoxList->GetCountItem() - 1); + SXLevelEditor::ListBoxList->setSel(SXLevelEditor::ListBoxList->getItemCount() - 1); - SXLevelEditor::GreenSel(SXLevelEditor::ListBoxList->GetCountItem() - 1); + SXLevelEditor::GreenSel(SXLevelEditor::ListBoxList->getItemCount() - 1); SXLevelEditor::ActiveGroupType = EDITORS_LEVEL_GROUPTYPE_GREEN; - SXLevelEditor::ActiveElement = SXLevelEditor::ListBoxList->GetSel(); + SXLevelEditor::ActiveElement = SXLevelEditor::ListBoxList->getSel(); return 0; } \ No newline at end of file diff --git a/source/sxleveleditor/level_editor.cpp b/source/sxleveleditor/level_editor.cpp index 29b45fd39e834e0621b885b1fadad926ae18e38e..c687cb701ab2e62a775bd95b055ba3409fa101a7 100644 --- a/source/sxleveleditor/level_editor.cpp +++ b/source/sxleveleditor/level_editor.cpp @@ -4,7 +4,7 @@ namespace SXLevelEditor { ISXGUIBaseWnd* JobWindow; - ISXGUIMenu* MainMenu; + ISXGUIMenuWindow* MainMenu; ISXGUIBaseWnd* RenderWindow; ISXGUIToolBar* ToolBar1; @@ -290,1526 +290,1551 @@ void SXLevelEditor::InitAllElements() int cx = (wrect.right - MAINWIN_SIZE_X) / 2; int cy = (wrect.bottom - MAINWIN_SIZE_Y) / 2; - SXLevelEditor::JobWindow = SXGUICrBaseWnd("JobWindow", "SX Level editor", 0, 0, cx, cy, MAINWIN_SIZE_X, MAINWIN_SIZE_Y, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); - SXLevelEditor::JobWindow->Visible(false); - SXGUIBaseHandlers::InitHandlerMsg(SXLevelEditor::JobWindow); - - SXLevelEditor::JobWindow->AddHandler(ComMenuId, WM_COMMAND); - SXLevelEditor::JobWindow->AddHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true); - SXLevelEditor::JobWindow->AddHandler(MsgEditSize, WM_SIZE); - SXLevelEditor::JobWindow->MinSizeX = MAINWIN_SIZE_X; - SXLevelEditor::JobWindow->MinSizeY = MAINWIN_SIZE_Y; - SXLevelEditor::MainMenu = SXGUICrMenuEx(IDR_MENU1); - SXLevelEditor::MainMenu->SetToWindow(SXLevelEditor::JobWindow->GetHWND()); - - - SXLevelEditor::RenderWindow = SXGUICrBaseWnd("RenderWindow", "RenderWindow", 0, 0, 0, 27, 600, 400, 0, LoadCursor(NULL, IDC_ARROW), CreateSolidBrush(RGB(200, 200, 200)), 0, CS_HREDRAW | CS_VREDRAW, WS_CHILD | WS_VISIBLE | WS_BORDER, SXLevelEditor::JobWindow->GetHWND(), WndProcAllDefault); - SXLevelEditor::RenderWindow->GAlign.left = true; - SXLevelEditor::RenderWindow->GAlign.right = true; - SXLevelEditor::RenderWindow->GAlign.top = true; - SXLevelEditor::RenderWindow->GAlign.bottom = true; - SXLevelEditor::RenderWindow->AddHandler(SXLevelEditor_RenderWindow_MouseMove, WM_MOUSEMOVE); - SXLevelEditor::RenderWindow->AddHandler(SXLevelEditor_RenderWindow_LDown, WM_LBUTTONDOWN); - SXLevelEditor::RenderWindow->AddHandler(SXLevelEditor_RenderWindow_LClick, WM_LBUTTONUP); - SXLevelEditor::RenderWindow->AddHandler(SXLevelEditor_RenderWindow_RClick, WM_RBUTTONUP); - SXLevelEditor::RenderWindow->AddHandler(SXLevelEditor_RenderWindow_MBUp, WM_MBUTTONUP); - SXLevelEditor::RenderWindow->AddHandler(SXLevelEditor_RenderWindow_Delete, WM_KEYDOWN, VK_DELETE, 1, 0, 0, 0); - - SXLevelEditor::ToolBar1 = SXGUICrToolBar(0, 1, 810, 26, SXLevelEditor::JobWindow->GetHWND(), WndProcAllDefault, 0); - SXLevelEditor::ToolBar1->GAlign.left = true; - SXLevelEditor::ToolBar1->GAlign.right = true; - SXLevelEditor::ToolBar1->GAlign.top = true; - SXLevelEditor::ToolBar1->GAlign.bottom = false; - SXLevelEditor::ToolBar1->AddHandler(SXLevelEditor_ToolBar1_CallWmCommand, WM_COMMAND); - - SXLevelEditor::ButtonTBNew = SXGUICrButtonEx("", 2, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::ButtonTBNew->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonTBNew->GAlign.left = true; - SXLevelEditor::ButtonTBNew->GAlign.top = true; - SXLevelEditor::ButtonTBNew->SetBmpInResourse(IDB_BITMAP1); - - SXLevelEditor::ButtonTBOpen = SXGUICrButtonEx("", 26, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::ButtonTBOpen->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonTBOpen->GAlign.left = true; - SXLevelEditor::ButtonTBOpen->GAlign.top = true; - SXLevelEditor::ButtonTBOpen->SetBmpInResourse(IDB_BITMAP2); - - SXLevelEditor::ButtonTBSave = SXGUICrButtonEx("", 50, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::ButtonTBSave->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonTBSave->GAlign.left = true; - SXLevelEditor::ButtonTBSave->GAlign.top = true; - SXLevelEditor::ButtonTBSave->SetBmpInResourse(IDB_BITMAP4); - - SXLevelEditor::ButtonTBSaveAs = SXGUICrButtonEx("", 74, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::ButtonTBSaveAs->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonTBSaveAs->GAlign.left = true; - SXLevelEditor::ButtonTBSaveAs->GAlign.top = true; - SXLevelEditor::ButtonTBSaveAs->SetBmpInResourse(IDB_BITMAP3); - - SXLevelEditor::CheckBoxTBArrow = SXGUICrCheckBoxEx("", 104, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBArrow->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBArrow->GAlign.left = true; - SXLevelEditor::CheckBoxTBArrow->GAlign.top = true; - SXLevelEditor::CheckBoxTBArrow->SetBmpInResourse(IDB_BITMAP5); - - SXLevelEditor::CheckBoxTBPos = SXGUICrCheckBoxEx("", 128, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBPos->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBPos->GAlign.left = true; - SXLevelEditor::CheckBoxTBPos->GAlign.top = true; - SXLevelEditor::CheckBoxTBPos->SetBmpInResourse(IDB_BITMAP6); - - SXLevelEditor::CheckBoxTBRot = SXGUICrCheckBoxEx("", 152, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBRot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBRot->GAlign.left = true; - SXLevelEditor::CheckBoxTBRot->GAlign.top = true; - SXLevelEditor::CheckBoxTBRot->SetBmpInResourse(IDB_BITMAP7); - - SXLevelEditor::CheckBoxTBScale = SXGUICrCheckBoxEx("", 176, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBScale->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBScale->GAlign.left = true; - SXLevelEditor::CheckBoxTBScale->GAlign.top = true; - SXLevelEditor::CheckBoxTBScale->SetBmpInResourse(IDB_BITMAP8); - - - SXLevelEditor::CheckBoxTBGrid = SXGUICrCheckBoxEx("", 206, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBGrid->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBGrid->GAlign.left = true; - SXLevelEditor::CheckBoxTBGrid->GAlign.top = true; - SXLevelEditor::CheckBoxTBGrid->SetBmpInResourse(IDB_BITMAP9); - - SXLevelEditor::CheckBoxTBAxes = SXGUICrCheckBoxEx("", 230, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBAxes->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBAxes->GAlign.left = true; - SXLevelEditor::CheckBoxTBAxes->GAlign.top = true; - SXLevelEditor::CheckBoxTBAxes->SetBmpInResourse(IDB_BITMAP10); - - - SXLevelEditor::CheckBoxTBRColor = SXGUICrCheckBoxEx("", 260, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBRColor->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBRColor->GAlign.left = true; - SXLevelEditor::CheckBoxTBRColor->GAlign.top = true; - SXLevelEditor::CheckBoxTBRColor->SetBmpInResourse(IDB_BITMAP11); - - SXLevelEditor::CheckBoxTBRNormal = SXGUICrCheckBoxEx("", 284, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBRNormal->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBRNormal->GAlign.left = true; - SXLevelEditor::CheckBoxTBRNormal->GAlign.top = true; - SXLevelEditor::CheckBoxTBRNormal->SetBmpInResourse(IDB_BITMAP12); - - SXLevelEditor::CheckBoxTBRParam = SXGUICrCheckBoxEx("", 308, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBRParam->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBRParam->GAlign.left = true; - SXLevelEditor::CheckBoxTBRParam->GAlign.top = true; - SXLevelEditor::CheckBoxTBRParam->SetBmpInResourse(IDB_BITMAP13); - - SXLevelEditor::CheckBoxTBRAmDiff = SXGUICrCheckBoxEx("", 332, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBRAmDiff->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBRAmDiff->GAlign.left = true; - SXLevelEditor::CheckBoxTBRAmDiff->GAlign.top = true; - SXLevelEditor::CheckBoxTBRAmDiff->SetBmpInResourse(IDB_BITMAP14); - - SXLevelEditor::CheckBoxTBRSpecular = SXGUICrCheckBoxEx("", 356, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBRSpecular->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBRSpecular->GAlign.left = true; - SXLevelEditor::CheckBoxTBRSpecular->GAlign.top = true; - SXLevelEditor::CheckBoxTBRSpecular->SetBmpInResourse(IDB_BITMAP15); - - SXLevelEditor::CheckBoxTBRLighting = SXGUICrCheckBoxEx("", 380, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBRLighting->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBRLighting->GAlign.left = true; - SXLevelEditor::CheckBoxTBRLighting->GAlign.top = true; - SXLevelEditor::CheckBoxTBRLighting->SetBmpInResourse(IDB_BITMAP16); + SXLevelEditor::JobWindow = SXGUICrBaseWndEx("LevelEditor", "LevelEditor", cx, cy, MAINWIN_SIZE_X, MAINWIN_SIZE_Y, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); + //SXLevelEditor::JobWindow->setVisible(false); + gui_func::base_handlers::InitHandlerMsg(SXLevelEditor::JobWindow); + + SXLevelEditor::JobWindow->addHandler(ComMenuId, WM_COMMAND); + SXLevelEditor::JobWindow->addHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true); + SXLevelEditor::JobWindow->addHandler(MsgEditSize, WM_SIZE); + SXLevelEditor::JobWindow->setMixSize(MAINWIN_SIZE_X, MAINWIN_SIZE_Y); + SXLevelEditor::MainMenu = SXGUICrMenuWindowEx(IDR_MENU1); + SXLevelEditor::MainMenu->setToWindow(SXLevelEditor::JobWindow->getHWND()); + + SXLevelEditor::RenderWindow = SXGUICrBaseWndEx("RenderWindow", "RenderWindow", 0, 27, 600, 400, 0, LoadCursor(NULL, IDC_ARROW), CreateSolidBrush(RGB(200, 200, 200)), 0, CS_HREDRAW | CS_VREDRAW, WS_VISIBLE | WS_BORDER, SXLevelEditor::JobWindow->getHWND(), WndProcAllDefault); + SXLevelEditor::RenderWindow->setFollowParentSides(true, true, true, true); + /*SXLevelEditor::RenderWindow->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RenderWindow->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXLevelEditor::RenderWindow->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RenderWindow->setFollowParentSide(SXGUI_SIDE_BOTTOM, true);*/ + SXLevelEditor::RenderWindow->addHandler(SXLevelEditor_RenderWindow_MouseMove, WM_MOUSEMOVE); + SXLevelEditor::RenderWindow->addHandler(SXLevelEditor_RenderWindow_LDown, WM_LBUTTONDOWN); + SXLevelEditor::RenderWindow->addHandler(SXLevelEditor_RenderWindow_LClick, WM_LBUTTONUP); + SXLevelEditor::RenderWindow->addHandler(SXLevelEditor_RenderWindow_RClick, WM_RBUTTONUP); + SXLevelEditor::RenderWindow->addHandler(SXLevelEditor_RenderWindow_MBUp, WM_MBUTTONUP); + SXLevelEditor::RenderWindow->addHandler(SXLevelEditor_RenderWindow_Delete, WM_KEYDOWN, VK_DELETE, 1, 0, 0, 0); + + SXLevelEditor::ToolBar1 = SXGUICrToolBar(0, 1, 810, 26, SXLevelEditor::JobWindow->getHWND(), WndProcAllDefault, 0); + //SXLevelEditor::ToolBar1->setFollowParentSides(true, true, true, false); + SXLevelEditor::ToolBar1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ToolBar1->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXLevelEditor::ToolBar1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ToolBar1->setFollowParentSide(SXGUI_SIDE_BOTTOM, false); + SXLevelEditor::ToolBar1->addHandler(SXLevelEditor_ToolBar1_CallWmCommand, WM_COMMAND); + + SXLevelEditor::ButtonTBNew = SXGUICrButtonEx("", 2, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::ButtonTBNew->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonTBNew->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::ButtonTBNew->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonTBNew->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::ButtonTBNew->setBmpFromResourse(IDB_BITMAP1); + + SXLevelEditor::ButtonTBOpen = SXGUICrButtonEx("", 26, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::ButtonTBOpen->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonTBOpen->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::ButtonTBOpen->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonTBOpen->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::ButtonTBOpen->setBmpFromResourse(IDB_BITMAP2); + + SXLevelEditor::ButtonTBSave = SXGUICrButtonEx("", 50, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::ButtonTBSave->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonTBSave->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::ButtonTBSave->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonTBSave->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::ButtonTBSave->setBmpFromResourse(IDB_BITMAP4); + + SXLevelEditor::ButtonTBSaveAs = SXGUICrButtonEx("", 74, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::ButtonTBSaveAs->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonTBSaveAs->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::ButtonTBSaveAs->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonTBSaveAs->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::ButtonTBSaveAs->setBmpFromResourse(IDB_BITMAP3); + + SXLevelEditor::CheckBoxTBArrow = SXGUICrCheckBoxEx("", 104, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBArrow->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBArrow->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBArrow->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBArrow->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBArrow->setBmpFromResourse(IDB_BITMAP5); + + SXLevelEditor::CheckBoxTBPos = SXGUICrCheckBoxEx("", 128, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBPos->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBPos->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBPos->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBPos->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBPos->setBmpFromResourse(IDB_BITMAP6); + + SXLevelEditor::CheckBoxTBRot = SXGUICrCheckBoxEx("", 152, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBRot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBRot->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBRot->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBRot->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBRot->setBmpFromResourse(IDB_BITMAP7); + + SXLevelEditor::CheckBoxTBScale = SXGUICrCheckBoxEx("", 176, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBScale->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBScale->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBScale->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBScale->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBScale->setBmpFromResourse(IDB_BITMAP8); + + + SXLevelEditor::CheckBoxTBGrid = SXGUICrCheckBoxEx("", 206, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBGrid->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBGrid->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBGrid->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBGrid->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBGrid->setBmpFromResourse(IDB_BITMAP9); + + SXLevelEditor::CheckBoxTBAxes = SXGUICrCheckBoxEx("", 230, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBAxes->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBAxes->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBAxes->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBAxes->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBAxes->setBmpFromResourse(IDB_BITMAP10); + + + SXLevelEditor::CheckBoxTBRColor = SXGUICrCheckBoxEx("", 260, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBRColor->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBRColor->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBRColor->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBRColor->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBRColor->setBmpFromResourse(IDB_BITMAP11); + + SXLevelEditor::CheckBoxTBRNormal = SXGUICrCheckBoxEx("", 284, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBRNormal->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBRNormal->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBRNormal->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBRNormal->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBRNormal->setBmpFromResourse(IDB_BITMAP12); + + SXLevelEditor::CheckBoxTBRParam = SXGUICrCheckBoxEx("", 308, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBRParam->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBRParam->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBRParam->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBRParam->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBRParam->setBmpFromResourse(IDB_BITMAP13); + + SXLevelEditor::CheckBoxTBRAmDiff = SXGUICrCheckBoxEx("", 332, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBRAmDiff->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBRAmDiff->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBRAmDiff->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBRAmDiff->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBRAmDiff->setBmpFromResourse(IDB_BITMAP14); + + SXLevelEditor::CheckBoxTBRSpecular = SXGUICrCheckBoxEx("", 356, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBRSpecular->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBRSpecular->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBRSpecular->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBRSpecular->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBRSpecular->setBmpFromResourse(IDB_BITMAP15); + + SXLevelEditor::CheckBoxTBRLighting = SXGUICrCheckBoxEx("", 380, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBRLighting->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBRLighting->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBRLighting->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBRLighting->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBRLighting->setBmpFromResourse(IDB_BITMAP16); - SXLevelEditor::CheckBoxTBSelS = SXGUICrCheckBoxEx("", 410, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBSelS->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBSelS->GAlign.left = true; - SXLevelEditor::CheckBoxTBSelS->GAlign.top = true; - SXLevelEditor::CheckBoxTBSelS->SetBmpInResourse(IDB_BITMAP17); - - SXLevelEditor::CheckBoxTBSelZTest = SXGUICrCheckBoxEx("", 434, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBSelZTest->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBSelZTest->GAlign.left = true; - SXLevelEditor::CheckBoxTBSelZTest->GAlign.top = true; - SXLevelEditor::CheckBoxTBSelZTest->SetBmpInResourse(IDB_BITMAP18); - - SXLevelEditor::CheckBoxTBSelMesh = SXGUICrCheckBoxEx("", 458, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBSelMesh->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBSelMesh->GAlign.left = true; - SXLevelEditor::CheckBoxTBSelMesh->GAlign.top = true; - SXLevelEditor::CheckBoxTBSelMesh->SetBmpInResourse(IDB_BITMAP19); - - SXLevelEditor::CheckBoxTBSelCullBack = SXGUICrCheckBoxEx("", 482, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBSelCullBack->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBSelCullBack->GAlign.left = true; - SXLevelEditor::CheckBoxTBSelCullBack->GAlign.top = true; - SXLevelEditor::CheckBoxTBSelCullBack->SetBmpInResourse(IDB_BITMAP20); - - - SXLevelEditor::CheckBoxTBAIGBound = SXGUICrCheckBoxEx("", 512, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBAIGBound->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBAIGBound->GAlign.left = true; - SXLevelEditor::CheckBoxTBAIGBound->GAlign.top = true; - SXLevelEditor::CheckBoxTBAIGBound->SetBmpInResourse(IDB_BITMAP22); - - SXLevelEditor::CheckBoxTBAIGQuad = SXGUICrCheckBoxEx("", 536, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBAIGQuad->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBAIGQuad->GAlign.left = true; - SXLevelEditor::CheckBoxTBAIGQuad->GAlign.top = true; - SXLevelEditor::CheckBoxTBAIGQuad->SetBmpInResourse(IDB_BITMAP23); - - SXLevelEditor::CheckBoxTBAIGGraphPoint = SXGUICrCheckBoxEx("", 560, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBAIGGraphPoint->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBAIGGraphPoint->GAlign.left = true; - SXLevelEditor::CheckBoxTBAIGGraphPoint->GAlign.top = true; - SXLevelEditor::CheckBoxTBAIGGraphPoint->SetBmpInResourse(IDB_BITMAP24); - - SXLevelEditor::CheckBoxTBLevelType = SXGUICrCheckBoxEx("", 588, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBLevelType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBLevelType->GAlign.left = true; - SXLevelEditor::CheckBoxTBLevelType->GAlign.top = true; - SXLevelEditor::CheckBoxTBLevelType->SetBmpInResourse(IDB_BITMAP25); - - SXLevelEditor::CheckBoxTBGLightEnable = SXGUICrCheckBoxEx("", 612, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->GetHWND(), 0, 0); - SXLevelEditor::CheckBoxTBGLightEnable->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxTBGLightEnable->GAlign.left = true; - SXLevelEditor::CheckBoxTBGLightEnable->GAlign.top = true; - SXLevelEditor::CheckBoxTBGLightEnable->SetBmpInResourse(IDB_BITMAP27); + SXLevelEditor::CheckBoxTBSelS = SXGUICrCheckBoxEx("", 410, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBSelS->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBSelS->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBSelS->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBSelS->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBSelS->setBmpFromResourse(IDB_BITMAP17); + + SXLevelEditor::CheckBoxTBSelZTest = SXGUICrCheckBoxEx("", 434, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBSelZTest->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBSelZTest->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBSelZTest->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBSelZTest->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBSelZTest->setBmpFromResourse(IDB_BITMAP18); + + SXLevelEditor::CheckBoxTBSelMesh = SXGUICrCheckBoxEx("", 458, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBSelMesh->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBSelMesh->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBSelMesh->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBSelMesh->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBSelMesh->setBmpFromResourse(IDB_BITMAP19); + + SXLevelEditor::CheckBoxTBSelCullBack = SXGUICrCheckBoxEx("", 482, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBSelCullBack->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBSelCullBack->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBSelCullBack->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBSelCullBack->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBSelCullBack->setBmpFromResourse(IDB_BITMAP20); + + + SXLevelEditor::CheckBoxTBAIGBound = SXGUICrCheckBoxEx("", 512, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBAIGBound->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBAIGBound->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBAIGBound->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBAIGBound->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBAIGBound->setBmpFromResourse(IDB_BITMAP22); + + SXLevelEditor::CheckBoxTBAIGQuad = SXGUICrCheckBoxEx("", 536, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBAIGQuad->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBAIGQuad->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBAIGQuad->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBAIGQuad->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBAIGQuad->setBmpFromResourse(IDB_BITMAP23); + + SXLevelEditor::CheckBoxTBAIGGraphPoint = SXGUICrCheckBoxEx("", 560, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBAIGGraphPoint->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBAIGGraphPoint->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBAIGGraphPoint->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBAIGGraphPoint->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBAIGGraphPoint->setBmpFromResourse(IDB_BITMAP24); + + SXLevelEditor::CheckBoxTBLevelType = SXGUICrCheckBoxEx("", 588, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBLevelType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBLevelType->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBLevelType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBLevelType->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBLevelType->setBmpFromResourse(IDB_BITMAP25); + + SXLevelEditor::CheckBoxTBGLightEnable = SXGUICrCheckBoxEx("", 612, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXLevelEditor::ToolBar1->getHWND(), 0, 0); + SXLevelEditor::CheckBoxTBGLightEnable->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxTBGLightEnable->setFollowParentSides(true, false, false, true); + /*SXLevelEditor::CheckBoxTBGLightEnable->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxTBGLightEnable->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXLevelEditor::CheckBoxTBGLightEnable->setBmpFromResourse(IDB_BITMAP27); - SXLevelEditor::GroupBoxList = SXGUICrGroupBox("GroupBoxList", 601, 28, 200, 400, SXLevelEditor::JobWindow->GetHWND(), WndProcAllDefault, 0); - SXGUIBaseHandlers::InitHandlerMsg(SXLevelEditor::GroupBoxList); - SXLevelEditor::GroupBoxList->AddHandler(SXLevelEditor_GroupBoxList_CallWmCommand, WM_COMMAND); - SXLevelEditor::GroupBoxList->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXLevelEditor::GroupBoxList->SetColorText(0,0,0); - SXLevelEditor::GroupBoxList->SetColorTextBk(220,220,220); - SXLevelEditor::GroupBoxList->SetTransparentTextBk(true); - SXLevelEditor::GroupBoxList->SetColorBrush(220,220,220); - - SXLevelEditor::GroupBoxList->GAlign.left = false; - SXLevelEditor::GroupBoxList->GAlign.right = true; - SXLevelEditor::GroupBoxList->GAlign.top = true; - SXLevelEditor::GroupBoxList->GAlign.bottom = true; - - SXLevelEditor::GroupBoxData = SXGUICrGroupBox("", 0, 425, 800, 190, SXLevelEditor::JobWindow->GetHWND(), WndProcAllDefault, 0); - SXGUIBaseHandlers::InitHandlerMsg(SXLevelEditor::GroupBoxData); - SXLevelEditor::GroupBoxData->AddHandler(SXLevelEditor_GroupBox_CallWmCommand, WM_COMMAND); - SXLevelEditor::GroupBoxData->AddHandler(SXLevelEditor_GroupBox_Notify, WM_NOTIFY); - SXLevelEditor::GroupBoxData->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXLevelEditor::GroupBoxData->SetColorText(0,0,0); - SXLevelEditor::GroupBoxData->SetColorTextBk(220,220,220); - SXLevelEditor::GroupBoxData->SetTransparentTextBk(true); - SXLevelEditor::GroupBoxData->SetColorBrush(220,220,220); - - SXLevelEditor::GroupBoxData->GAlign.left = true; - SXLevelEditor::GroupBoxData->GAlign.right = true; - SXLevelEditor::GroupBoxData->GAlign.top = false; - SXLevelEditor::GroupBoxData->GAlign.bottom = true; - - SXLevelEditor::ListBoxList = SXGUICrListBox("", 4, 30, 193, 290, SXLevelEditor::GroupBoxList->GetHWND(), 0, 0, false); - SXLevelEditor::ListBoxList->GAlign.left = true; - SXLevelEditor::ListBoxList->GAlign.top = true; - SXLevelEditor::ListBoxList->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXLevelEditor::ListBoxList->SetColorText(0,0,0); - SXLevelEditor::ListBoxList->SetColorTextBk(255,255,255); - SXLevelEditor::ListBoxList->SetTransparentTextBk(true); - SXLevelEditor::ListBoxList->SetColorBrush(255,255,255); - //SXLevelEditor::ListBoxList->AddHandler(SXLevelEditor_ListBoxList_Click, WM_LBUTTONUP); - - SXLevelEditor::StaticListTextCount = SXGUICrStatic("Count:", 65, 15, 30, 15, SXLevelEditor::GroupBoxList->GetHWND(), 0, 0); - SXLevelEditor::StaticListTextCount->GAlign.left = true; - SXLevelEditor::StaticListTextCount->GAlign.top = true; - SXLevelEditor::StaticListTextCount->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXLevelEditor::StaticListTextCount->SetColorText(0,0,0); - SXLevelEditor::StaticListTextCount->SetColorTextBk(255,255,255); - SXLevelEditor::StaticListTextCount->SetTransparentTextBk(true); - SXLevelEditor::StaticListTextCount->SetColorBrush(220,220,220); - - SXLevelEditor::StaticListValCount = SXGUICrStatic("0", 100, 15, 50, 15, SXLevelEditor::GroupBoxList->GetHWND(), 0, 0); - SXLevelEditor::StaticListValCount->GAlign.left = true; - SXLevelEditor::StaticListValCount->GAlign.top = true; - SXLevelEditor::StaticListValCount->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXLevelEditor::StaticListValCount->SetColorText(0,0,0); - SXLevelEditor::StaticListValCount->SetColorTextBk(255,255,255); - SXLevelEditor::StaticListValCount->SetTransparentTextBk(true); - SXLevelEditor::StaticListValCount->SetColorBrush(220,220,220); - - SXLevelEditor::ButtonDelete = SXGUICrButton("Delete", 135, 325, 60, 20, 0, SXLevelEditor::GroupBoxList->GetHWND(), 0, 0); - SXLevelEditor::ButtonDelete->GAlign.left = true; - SXLevelEditor::ButtonDelete->GAlign.top = true; - SXLevelEditor::ButtonDelete->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonDelete->AddHandler(SXLevelEditor_ButtonDelete_Click, WM_LBUTTONUP); - - SXLevelEditor::ButtonGeometryOpen = SXGUICrButton("Geometry", 5, 350, 60, 20, 0, SXLevelEditor::GroupBoxList->GetHWND(), 0, 0); - SXLevelEditor::ButtonGeometryOpen->GAlign.left = true; - SXLevelEditor::ButtonGeometryOpen->GAlign.top = true; - SXLevelEditor::ButtonGeometryOpen->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXLevelEditor::ButtonGeometryOpen->AddHandler(SXLevelEditor_ButtonGeometryOpen_Click, WM_LBUTTONUP); - - SXLevelEditor::ButtonGreenOpen = SXGUICrButton("Green", 70, 350, 60, 20, 0, SXLevelEditor::GroupBoxList->GetHWND(), 0, 0); - SXLevelEditor::ButtonGreenOpen->GAlign.left = true; - SXLevelEditor::ButtonGreenOpen->GAlign.top = true; - SXLevelEditor::ButtonGreenOpen->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXLevelEditor::ButtonGreenOpen->AddHandler(SXLevelEditor_ButtonGreenOpen_Click, WM_LBUTTONUP); - - SXLevelEditor::ButtonGameObjectOpen = SXGUICrButton("Game", 135, 350, 60, 20, 0, SXLevelEditor::GroupBoxList->GetHWND(), 0, 0); - SXLevelEditor::ButtonGameObjectOpen->GAlign.left = true; - SXLevelEditor::ButtonGameObjectOpen->GAlign.top = true; - SXLevelEditor::ButtonGameObjectOpen->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGameObjectOpen->AddHandler(SXLevelEditor_ButtonGameObjectOpen_Click, WM_LBUTTONUP); - - SXLevelEditor::ButtonAIGridOpen = SXGUICrButton("AI Grid", 5, 375, 60, 20, 0, SXLevelEditor::GroupBoxList->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIGridOpen->GAlign.left = true; - SXLevelEditor::ButtonAIGridOpen->GAlign.top = true; - SXLevelEditor::ButtonAIGridOpen->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIGridOpen->AddHandler(SXLevelEditor_ButtonAIGridOpen_Click, WM_LBUTTONUP); - - SXLevelEditor::StatusBar1 = SXGUICrStatusBar("StatusBar1", SXLevelEditor::JobWindow->GetHWND(), 0, 0); - SXLevelEditor::StatusBar1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::GroupBoxList = SXGUICrGroupBox("GroupBoxList", 601, 28, 200, 400, SXLevelEditor::JobWindow->getHWND(), WndProcAllDefault, 0); + gui_func::base_handlers::InitHandlerMsg(SXLevelEditor::GroupBoxList); + SXLevelEditor::GroupBoxList->addHandler(SXLevelEditor_GroupBoxList_CallWmCommand, WM_COMMAND); + SXLevelEditor::GroupBoxList->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXLevelEditor::GroupBoxList->setColorText(RGB(0,0,0)); + SXLevelEditor::GroupBoxList->setColorTextBk(RGB(220,220,220)); + SXLevelEditor::GroupBoxList->setTransparentTextBk(true); + SXLevelEditor::GroupBoxList->setColorBrush(RGB(220, 220, 220)); + + SXLevelEditor::GroupBoxList->setFollowParentSide(SXGUI_SIDE_LEFT, false); + SXLevelEditor::GroupBoxList->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXLevelEditor::GroupBoxList->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::GroupBoxList->setFollowParentSide(SXGUI_SIDE_BOTTOM, true); + + SXLevelEditor::GroupBoxData = SXGUICrGroupBox("", 0, 425, 800, 190, SXLevelEditor::JobWindow->getHWND(), WndProcAllDefault, 0); + gui_func::base_handlers::InitHandlerMsg(SXLevelEditor::GroupBoxData); + SXLevelEditor::GroupBoxData->addHandler(SXLevelEditor_GroupBox_CallWmCommand, WM_COMMAND); + SXLevelEditor::GroupBoxData->addHandler(SXLevelEditor_GroupBox_Notify, WM_NOTIFY); + SXLevelEditor::GroupBoxData->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXLevelEditor::GroupBoxData->setColorText(RGB(0,0,0)); + SXLevelEditor::GroupBoxData->setColorTextBk(RGB(220, 220, 220)); + SXLevelEditor::GroupBoxData->setTransparentTextBk(true); + SXLevelEditor::GroupBoxData->setColorBrush(RGB(220, 220, 220)); + + SXLevelEditor::GroupBoxData->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::GroupBoxData->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXLevelEditor::GroupBoxData->setFollowParentSide(SXGUI_SIDE_TOP, false); + SXLevelEditor::GroupBoxData->setFollowParentSide(SXGUI_SIDE_BOTTOM, true); + + SXLevelEditor::ListBoxList = SXGUICrListBox(4, 30, 193, 290, SXLevelEditor::GroupBoxList->getHWND(), 0, 0, false); + SXLevelEditor::ListBoxList->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ListBoxList->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ListBoxList->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXLevelEditor::ListBoxList->setColorText(RGB(0,0,0)); + SXLevelEditor::ListBoxList->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::ListBoxList->setTransparentTextBk(true); + SXLevelEditor::ListBoxList->setColorBrush(RGB(255, 255, 255)); + //SXLevelEditor::ListBoxList->addHandler(SXLevelEditor_ListBoxList_Click, WM_LBUTTONUP); + + SXLevelEditor::StaticListTextCount = SXGUICrStatic("Count:", 65, 15, 30, 15, SXLevelEditor::GroupBoxList->getHWND(), 0); + SXLevelEditor::StaticListTextCount->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticListTextCount->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticListTextCount->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXLevelEditor::StaticListTextCount->setColorText(RGB(0,0,0)); + SXLevelEditor::StaticListTextCount->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticListTextCount->setTransparentTextBk(true); + SXLevelEditor::StaticListTextCount->setColorBrush(RGB(220, 220, 220)); + + SXLevelEditor::StaticListValCount = SXGUICrStatic("0", 100, 15, 50, 15, SXLevelEditor::GroupBoxList->getHWND(), 0); + SXLevelEditor::StaticListValCount->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticListValCount->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticListValCount->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXLevelEditor::StaticListValCount->setColorText(RGB(0,0,0)); + SXLevelEditor::StaticListValCount->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticListValCount->setTransparentTextBk(true); + SXLevelEditor::StaticListValCount->setColorBrush(RGB(220, 220, 220)); + + SXLevelEditor::ButtonDelete = SXGUICrButton("Delete", 135, 325, 60, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxList->getHWND(), 0, 0); + SXLevelEditor::ButtonDelete->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonDelete->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonDelete->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonDelete->addHandler(SXLevelEditor_ButtonDelete_Click, WM_LBUTTONUP); + + SXLevelEditor::ButtonGeometryOpen = SXGUICrButton("Geometry", 5, 350, 60, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxList->getHWND(), 0, 0); + SXLevelEditor::ButtonGeometryOpen->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGeometryOpen->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGeometryOpen->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXLevelEditor::ButtonGeometryOpen->addHandler(SXLevelEditor_ButtonGeometryOpen_Click, WM_LBUTTONUP); + + SXLevelEditor::ButtonGreenOpen = SXGUICrButton("Green", 70, 350, 60, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxList->getHWND(), 0, 0); + SXLevelEditor::ButtonGreenOpen->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGreenOpen->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGreenOpen->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXLevelEditor::ButtonGreenOpen->addHandler(SXLevelEditor_ButtonGreenOpen_Click, WM_LBUTTONUP); + + SXLevelEditor::ButtonGameObjectOpen = SXGUICrButton("Game", 135, 350, 60, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxList->getHWND(), 0, 0); + SXLevelEditor::ButtonGameObjectOpen->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGameObjectOpen->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGameObjectOpen->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGameObjectOpen->addHandler(SXLevelEditor_ButtonGameObjectOpen_Click, WM_LBUTTONUP); + + SXLevelEditor::ButtonAIGridOpen = SXGUICrButton("AI Grid", 5, 375, 60, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxList->getHWND(), 0, 0); + SXLevelEditor::ButtonAIGridOpen->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIGridOpen->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIGridOpen->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIGridOpen->addHandler(SXLevelEditor_ButtonAIGridOpen_Click, WM_LBUTTONUP); + + SXLevelEditor::StatusBar1 = SXGUICrStatusBar("StatusBar1", SXLevelEditor::JobWindow->getHWND(), 0, 0); + SXLevelEditor::StatusBar1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); int arrpart[5]; arrpart[0] = 150; arrpart[1] = 300; arrpart[2] = 450; arrpart[3] = 600; arrpart[4] = -1; - SXLevelEditor::StatusBar1->SetCountParts(5, arrpart); - SXLevelEditor::StatusBar1->SetTextParts(0, "Level poly: "); - SXLevelEditor::StatusBar1->SetTextParts(1, "Geom poly: "); - SXLevelEditor::StatusBar1->SetTextParts(2, "Green poly: "); - SXLevelEditor::StatusBar1->SetTextParts(3, ""); - SXLevelEditor::StatusBar1->SetTextParts(4, ""); + SXLevelEditor::StatusBar1->setPartsCount(5, arrpart); + SXLevelEditor::StatusBar1->setPartText(0, "Level poly: "); + SXLevelEditor::StatusBar1->setPartText(1, "Geom poly: "); + SXLevelEditor::StatusBar1->setPartText(2, "Green poly: "); + SXLevelEditor::StatusBar1->setPartText(3, ""); + SXLevelEditor::StatusBar1->setPartText(4, ""); //Geom //{ - SXLevelEditor::StaticGeomName = SXGUICrStatic("Name", 5, 20, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGeomName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGeomName->SetColorText(0, 0, 0); - SXLevelEditor::StaticGeomName->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGeomName->SetTransparentTextBk(true); - SXLevelEditor::StaticGeomName->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGeomName->GAlign.left = true; - SXLevelEditor::StaticGeomName->GAlign.top = true; - SXLevelEditor::StaticGeomName->Visible(false); - - SXLevelEditor::EditGeomName = SXGUICrEdit("0", 80, 20, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomName->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomName->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomName->SetTransparentTextBk(true); - SXLevelEditor::EditGeomName->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomName->GAlign.left = true; - SXLevelEditor::EditGeomName->GAlign.top = true; - SXLevelEditor::EditGeomName->Visible(false); - SXLevelEditor::EditGeomName->AddHandler(SXLevelEditor_EditGeomName_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomName->AddHandler(SXLevelEditor_EditGeomName_Enter, WM_KILLFOCUS); - - SXLevelEditor::StaticGeomModel = SXGUICrStatic("Model", 5, 40, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGeomModel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGeomModel->SetColorText(0, 0, 0); - SXLevelEditor::StaticGeomModel->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGeomModel->SetTransparentTextBk(true); - SXLevelEditor::StaticGeomModel->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGeomModel->GAlign.left = true; - SXLevelEditor::StaticGeomModel->GAlign.top = true; - SXLevelEditor::StaticGeomModel->Visible(false); - - SXLevelEditor::EditGeomModel = SXGUICrEdit("0", 80, 40, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomModel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomModel->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomModel->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomModel->SetTransparentTextBk(true); - SXLevelEditor::EditGeomModel->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomModel->GAlign.left = true; - SXLevelEditor::EditGeomModel->GAlign.top = true; - SXLevelEditor::EditGeomModel->Visible(false); - - SXLevelEditor::ButtonGeomModel = SXGUICrButton("...", 285, 40, 25, 15, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGeomModel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGeomModel->GAlign.left = true; - SXLevelEditor::ButtonGeomModel->GAlign.top = true; - SXLevelEditor::ButtonGeomModel->Visible(false); - SXLevelEditor::ButtonGeomModel->AddHandler(SXLevelEditor_ButtonGeomModel_Click, WM_LBUTTONUP); - - SXLevelEditor::StaticGeomLod1 = SXGUICrStatic("Lod1", 5, 60, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGeomLod1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGeomLod1->SetColorText(0, 0, 0); - SXLevelEditor::StaticGeomLod1->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGeomLod1->SetTransparentTextBk(true); - SXLevelEditor::StaticGeomLod1->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGeomLod1->GAlign.left = true; - SXLevelEditor::StaticGeomLod1->GAlign.top = true; - SXLevelEditor::StaticGeomLod1->Visible(false); - - SXLevelEditor::EditGeomLod1 = SXGUICrEdit("0", 80, 60, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomLod1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomLod1->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomLod1->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomLod1->SetTransparentTextBk(true); - SXLevelEditor::EditGeomLod1->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomLod1->GAlign.left = true; - SXLevelEditor::EditGeomLod1->GAlign.top = true; - SXLevelEditor::EditGeomLod1->Visible(false); - - SXLevelEditor::ButtonGeomLod1 = SXGUICrButton("...", 285, 60, 25, 15, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGeomLod1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGeomLod1->GAlign.left = true; - SXLevelEditor::ButtonGeomLod1->GAlign.top = true; - SXLevelEditor::ButtonGeomLod1->Visible(false); - SXLevelEditor::ButtonGeomLod1->AddHandler(SXLevelEditor_ButtonGeomLod1_Click, WM_LBUTTONUP); + SXLevelEditor::StaticGeomName = SXGUICrStatic("Name", 5, 20, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGeomName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGeomName->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGeomName->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGeomName->setTransparentTextBk(true); + SXLevelEditor::StaticGeomName->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGeomName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGeomName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGeomName->setVisible(false); + + SXLevelEditor::EditGeomName = SXGUICrEdit("0", 80, 20, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomName->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomName->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomName->setTransparentTextBk(true); + SXLevelEditor::EditGeomName->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomName->setVisible(false); + SXLevelEditor::EditGeomName->addHandler(SXLevelEditor_EditGeomName_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomName->addHandler(SXLevelEditor_EditGeomName_Enter, WM_KILLFOCUS); + + SXLevelEditor::StaticGeomModel = SXGUICrStatic("Model", 5, 40, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGeomModel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGeomModel->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGeomModel->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGeomModel->setTransparentTextBk(true); + SXLevelEditor::StaticGeomModel->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGeomModel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGeomModel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGeomModel->setVisible(false); + + SXLevelEditor::EditGeomModel = SXGUICrEdit("0", 80, 40, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomModel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomModel->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomModel->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomModel->setTransparentTextBk(true); + SXLevelEditor::EditGeomModel->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomModel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomModel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomModel->setVisible(false); + + SXLevelEditor::ButtonGeomModel = SXGUICrButton("...", 285, 40, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGeomModel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGeomModel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGeomModel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGeomModel->setVisible(false); + SXLevelEditor::ButtonGeomModel->addHandler(SXLevelEditor_ButtonGeomModel_Click, WM_LBUTTONUP); + + SXLevelEditor::StaticGeomLod1 = SXGUICrStatic("Lod1", 5, 60, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGeomLod1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGeomLod1->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGeomLod1->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGeomLod1->setTransparentTextBk(true); + SXLevelEditor::StaticGeomLod1->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGeomLod1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGeomLod1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGeomLod1->setVisible(false); + + SXLevelEditor::EditGeomLod1 = SXGUICrEdit("0", 80, 60, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomLod1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomLod1->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomLod1->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomLod1->setTransparentTextBk(true); + SXLevelEditor::EditGeomLod1->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomLod1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomLod1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomLod1->setVisible(false); + + SXLevelEditor::ButtonGeomLod1 = SXGUICrButton("...", 285, 60, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGeomLod1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGeomLod1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGeomLod1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGeomLod1->setVisible(false); + SXLevelEditor::ButtonGeomLod1->addHandler(SXLevelEditor_ButtonGeomLod1_Click, WM_LBUTTONUP); - SXLevelEditor::StaticGeomPos = SXGUICrStatic("Position:", 320, 35, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGeomPos->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGeomPos->SetColorText(0, 0, 0); - SXLevelEditor::StaticGeomPos->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGeomPos->SetTransparentTextBk(true); - SXLevelEditor::StaticGeomPos->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGeomPos->GAlign.left = true; - SXLevelEditor::StaticGeomPos->GAlign.top = true; - SXLevelEditor::StaticGeomPos->Visible(false); - - SXLevelEditor::EditGeomPosX = SXGUICrEdit("0", 370, 15, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomPosX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomPosX->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomPosX->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomPosX->SetTransparentTextBk(true); - SXLevelEditor::EditGeomPosX->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomPosX->GAlign.left = true; - SXLevelEditor::EditGeomPosX->GAlign.top = true; - SXLevelEditor::EditGeomPosX->Visible(false); - SXLevelEditor::EditGeomPosX->AddHandler(SXLevelEditor_EditTransformPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomPosX->AddHandler(SXLevelEditor_EditTransformPos_Enter, WM_KILLFOCUS); - - SXLevelEditor::EditGeomPosY = SXGUICrEdit("0", 370, 35, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomPosY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomPosY->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomPosY->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomPosY->SetTransparentTextBk(true); - SXLevelEditor::EditGeomPosY->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomPosY->GAlign.left = true; - SXLevelEditor::EditGeomPosY->GAlign.top = true; - SXLevelEditor::EditGeomPosY->Visible(false); - SXLevelEditor::EditGeomPosY->AddHandler(SXLevelEditor_EditTransformPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomPosY->AddHandler(SXLevelEditor_EditTransformPos_Enter, WM_KILLFOCUS); - - SXLevelEditor::EditGeomPosZ = SXGUICrEdit("0", 370, 55, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomPosZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomPosZ->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomPosZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomPosZ->SetTransparentTextBk(true); - SXLevelEditor::EditGeomPosZ->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomPosZ->GAlign.left = true; - SXLevelEditor::EditGeomPosZ->GAlign.top = true; - SXLevelEditor::EditGeomPosZ->Visible(false); - SXLevelEditor::EditGeomPosZ->AddHandler(SXLevelEditor_EditTransformPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomPosZ->AddHandler(SXLevelEditor_EditTransformPos_Enter, WM_KILLFOCUS); - - SXLevelEditor::RadioButtonGeomPosX = SXGUICrRadioButton("x", 440, 15, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomPosX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomPosX->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomPosX->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomPosX->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomPosX->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomPosX->GAlign.left = true; - SXLevelEditor::RadioButtonGeomPosX->GAlign.top = true; - SXLevelEditor::RadioButtonGeomPosX->Visible(false); - - SXLevelEditor::RadioButtonGeomPosY = SXGUICrRadioButton("y", 440, 35, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomPosY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomPosY->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomPosY->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomPosY->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomPosY->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomPosY->GAlign.left = true; - SXLevelEditor::RadioButtonGeomPosY->GAlign.top = true; - SXLevelEditor::RadioButtonGeomPosY->Visible(false); - - SXLevelEditor::RadioButtonGeomPosZ = SXGUICrRadioButton("z", 440, 55, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomPosZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomPosZ->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomPosZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomPosZ->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomPosZ->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomPosZ->GAlign.left = true; - SXLevelEditor::RadioButtonGeomPosZ->GAlign.top = true; - SXLevelEditor::RadioButtonGeomPosZ->Visible(false); - - SXLevelEditor::StaticGeomRot = SXGUICrStatic("Rotation:", 470, 35, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGeomRot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGeomRot->SetColorText(0, 0, 0); - SXLevelEditor::StaticGeomRot->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGeomRot->SetTransparentTextBk(true); - SXLevelEditor::StaticGeomRot->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGeomRot->GAlign.left = true; - SXLevelEditor::StaticGeomRot->GAlign.top = true; - SXLevelEditor::StaticGeomRot->Visible(false); - - SXLevelEditor::EditGeomRotX = SXGUICrEdit("0", 525, 15, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomRotX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomRotX->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomRotX->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomRotX->SetTransparentTextBk(true); - SXLevelEditor::EditGeomRotX->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomRotX->GAlign.left = true; - SXLevelEditor::EditGeomRotX->GAlign.top = true; - SXLevelEditor::EditGeomRotX->Visible(false); - SXLevelEditor::EditGeomRotX->AddHandler(SXLevelEditor_EditTransformRot_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomRotX->AddHandler(SXLevelEditor_EditTransformRot_Enter, WM_KILLFOCUS); - - SXLevelEditor::EditGeomRotY = SXGUICrEdit("0", 525, 35, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomRotY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomRotY->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomRotY->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomRotY->SetTransparentTextBk(true); - SXLevelEditor::EditGeomRotY->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomRotY->GAlign.left = true; - SXLevelEditor::EditGeomRotY->GAlign.top = true; - SXLevelEditor::EditGeomRotY->Visible(false); - SXLevelEditor::EditGeomRotY->AddHandler(SXLevelEditor_EditTransformRot_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomRotY->AddHandler(SXLevelEditor_EditTransformRot_Enter, WM_KILLFOCUS); - - SXLevelEditor::EditGeomRotZ = SXGUICrEdit("0", 525, 55, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomRotZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomRotZ->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomRotZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomRotZ->SetTransparentTextBk(true); - SXLevelEditor::EditGeomRotZ->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomRotZ->GAlign.left = true; - SXLevelEditor::EditGeomRotZ->GAlign.top = true; - SXLevelEditor::EditGeomRotZ->Visible(false); - SXLevelEditor::EditGeomRotZ->AddHandler(SXLevelEditor_EditTransformRot_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomRotZ->AddHandler(SXLevelEditor_EditTransformRot_Enter, WM_KILLFOCUS); - - SXLevelEditor::RadioButtonGeomRotX = SXGUICrRadioButton("x", 595, 15, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomRotX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomRotX->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomRotX->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomRotX->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomRotX->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomRotX->GAlign.left = true; - SXLevelEditor::RadioButtonGeomRotX->GAlign.top = true; - SXLevelEditor::RadioButtonGeomRotX->Visible(false); - - SXLevelEditor::RadioButtonGeomRotY = SXGUICrRadioButton("y", 595, 35, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomRotY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomRotY->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomRotY->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomRotY->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomRotY->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomRotY->GAlign.left = true; - SXLevelEditor::RadioButtonGeomRotY->GAlign.top = true; - SXLevelEditor::RadioButtonGeomRotY->Visible(false); - - SXLevelEditor::RadioButtonGeomRotZ = SXGUICrRadioButton("z", 595, 55, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomRotZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomRotZ->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomRotZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomRotZ->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomRotZ->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomRotZ->GAlign.left = true; - SXLevelEditor::RadioButtonGeomRotZ->GAlign.top = true; - SXLevelEditor::RadioButtonGeomRotZ->Visible(false); - - SXLevelEditor::StaticGeomScale = SXGUICrStatic("Scale:", 625, 35, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGeomScale->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGeomScale->SetColorText(0, 0, 0); - SXLevelEditor::StaticGeomScale->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGeomScale->SetTransparentTextBk(true); - SXLevelEditor::StaticGeomScale->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGeomScale->GAlign.left = true; - SXLevelEditor::StaticGeomScale->GAlign.top = true; - SXLevelEditor::StaticGeomScale->Visible(false); - - SXLevelEditor::EditGeomScaleX = SXGUICrEdit("0", 675, 15, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomScaleX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomScaleX->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomScaleX->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomScaleX->SetTransparentTextBk(true); - SXLevelEditor::EditGeomScaleX->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomScaleX->GAlign.left = true; - SXLevelEditor::EditGeomScaleX->GAlign.top = true; - SXLevelEditor::EditGeomScaleX->Visible(false); - SXLevelEditor::EditGeomScaleX->AddHandler(SXLevelEditor_EditTransformScale_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomScaleX->AddHandler(SXLevelEditor_EditTransformScale_Enter, WM_KILLFOCUS); - - SXLevelEditor::EditGeomScaleY = SXGUICrEdit("0", 675, 35, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomScaleY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomScaleY->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomScaleY->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomScaleY->SetTransparentTextBk(true); - SXLevelEditor::EditGeomScaleY->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomScaleY->GAlign.left = true; - SXLevelEditor::EditGeomScaleY->GAlign.top = true; - SXLevelEditor::EditGeomScaleY->Visible(false); - SXLevelEditor::EditGeomScaleY->AddHandler(SXLevelEditor_EditTransformScale_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomScaleY->AddHandler(SXLevelEditor_EditTransformScale_Enter, WM_KILLFOCUS); - - SXLevelEditor::EditGeomScaleZ = SXGUICrEdit("0", 675, 55, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGeomScaleZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGeomScaleZ->SetColorText(0, 0, 0); - SXLevelEditor::EditGeomScaleZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGeomScaleZ->SetTransparentTextBk(true); - SXLevelEditor::EditGeomScaleZ->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGeomScaleZ->GAlign.left = true; - SXLevelEditor::EditGeomScaleZ->GAlign.top = true; - SXLevelEditor::EditGeomScaleZ->Visible(false); - SXLevelEditor::EditGeomScaleZ->AddHandler(SXLevelEditor_EditTransformScale_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGeomScaleZ->AddHandler(SXLevelEditor_EditTransformScale_Enter, WM_KILLFOCUS); - - SXLevelEditor::RadioButtonGeomScaleX = SXGUICrRadioButton("x", 745, 15, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomScaleX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomScaleX->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomScaleX->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomScaleX->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomScaleX->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomScaleX->GAlign.left = true; - SXLevelEditor::RadioButtonGeomScaleX->GAlign.top = true; - SXLevelEditor::RadioButtonGeomScaleX->Visible(false); - - SXLevelEditor::RadioButtonGeomScaleY = SXGUICrRadioButton("y", 745, 35, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomScaleY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomScaleY->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomScaleY->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomScaleY->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomScaleY->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomScaleY->GAlign.left = true; - SXLevelEditor::RadioButtonGeomScaleY->GAlign.top = true; - SXLevelEditor::RadioButtonGeomScaleY->Visible(false); - - SXLevelEditor::RadioButtonGeomScaleZ = SXGUICrRadioButton("z", 745, 55, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGeomScaleZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGeomScaleZ->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGeomScaleZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGeomScaleZ->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGeomScaleZ->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGeomScaleZ->GAlign.left = true; - SXLevelEditor::RadioButtonGeomScaleZ->GAlign.top = true; - SXLevelEditor::RadioButtonGeomScaleZ->Visible(false); - - SXLevelEditor::ButtonGeomFinish = SXGUICrButton("Finish", 100, 95, 100, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGeomFinish->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGeomFinish->GAlign.left = true; - SXLevelEditor::ButtonGeomFinish->GAlign.top = true; - SXLevelEditor::ButtonGeomFinish->Visible(false); - SXLevelEditor::ButtonGeomFinish->AddHandler(SXLevelEditor_ButtonGeomFinish_Click, WM_LBUTTONUP); + SXLevelEditor::StaticGeomPos = SXGUICrStatic("Position:", 320, 35, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGeomPos->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGeomPos->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGeomPos->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGeomPos->setTransparentTextBk(true); + SXLevelEditor::StaticGeomPos->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGeomPos->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGeomPos->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGeomPos->setVisible(false); + + SXLevelEditor::EditGeomPosX = SXGUICrEdit("0", 370, 15, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomPosX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomPosX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomPosX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomPosX->setTransparentTextBk(true); + SXLevelEditor::EditGeomPosX->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomPosX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomPosX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomPosX->setVisible(false); + SXLevelEditor::EditGeomPosX->addHandler(SXLevelEditor_EditTransformPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomPosX->addHandler(SXLevelEditor_EditTransformPos_Enter, WM_KILLFOCUS); + + SXLevelEditor::EditGeomPosY = SXGUICrEdit("0", 370, 35, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomPosY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomPosY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomPosY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomPosY->setTransparentTextBk(true); + SXLevelEditor::EditGeomPosY->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomPosY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomPosY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomPosY->setVisible(false); + SXLevelEditor::EditGeomPosY->addHandler(SXLevelEditor_EditTransformPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomPosY->addHandler(SXLevelEditor_EditTransformPos_Enter, WM_KILLFOCUS); + + SXLevelEditor::EditGeomPosZ = SXGUICrEdit("0", 370, 55, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomPosZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomPosZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomPosZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomPosZ->setTransparentTextBk(true); + SXLevelEditor::EditGeomPosZ->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomPosZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomPosZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomPosZ->setVisible(false); + SXLevelEditor::EditGeomPosZ->addHandler(SXLevelEditor_EditTransformPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomPosZ->addHandler(SXLevelEditor_EditTransformPos_Enter, WM_KILLFOCUS); + + SXLevelEditor::RadioButtonGeomPosX = SXGUICrRadioButton("x", 440, 15, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomPosX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomPosX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomPosX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomPosX->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomPosX->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomPosX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomPosX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomPosX->setVisible(false); + + SXLevelEditor::RadioButtonGeomPosY = SXGUICrRadioButton("y", 440, 35, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomPosY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomPosY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomPosY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomPosY->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomPosY->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomPosY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomPosY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomPosY->setVisible(false); + + SXLevelEditor::RadioButtonGeomPosZ = SXGUICrRadioButton("z", 440, 55, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomPosZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomPosZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomPosZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomPosZ->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomPosZ->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomPosZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomPosZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomPosZ->setVisible(false); + + SXLevelEditor::StaticGeomRot = SXGUICrStatic("Rotation:", 470, 35, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGeomRot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGeomRot->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGeomRot->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGeomRot->setTransparentTextBk(true); + SXLevelEditor::StaticGeomRot->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGeomRot->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGeomRot->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGeomRot->setVisible(false); + + SXLevelEditor::EditGeomRotX = SXGUICrEdit("0", 525, 15, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomRotX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomRotX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomRotX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomRotX->setTransparentTextBk(true); + SXLevelEditor::EditGeomRotX->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomRotX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomRotX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomRotX->setVisible(false); + SXLevelEditor::EditGeomRotX->addHandler(SXLevelEditor_EditTransformRot_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomRotX->addHandler(SXLevelEditor_EditTransformRot_Enter, WM_KILLFOCUS); + + SXLevelEditor::EditGeomRotY = SXGUICrEdit("0", 525, 35, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomRotY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomRotY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomRotY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomRotY->setTransparentTextBk(true); + SXLevelEditor::EditGeomRotY->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomRotY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomRotY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomRotY->setVisible(false); + SXLevelEditor::EditGeomRotY->addHandler(SXLevelEditor_EditTransformRot_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomRotY->addHandler(SXLevelEditor_EditTransformRot_Enter, WM_KILLFOCUS); + + SXLevelEditor::EditGeomRotZ = SXGUICrEdit("0", 525, 55, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomRotZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomRotZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomRotZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomRotZ->setTransparentTextBk(true); + SXLevelEditor::EditGeomRotZ->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomRotZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomRotZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomRotZ->setVisible(false); + SXLevelEditor::EditGeomRotZ->addHandler(SXLevelEditor_EditTransformRot_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomRotZ->addHandler(SXLevelEditor_EditTransformRot_Enter, WM_KILLFOCUS); + + SXLevelEditor::RadioButtonGeomRotX = SXGUICrRadioButton("x", 595, 15, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomRotX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomRotX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomRotX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomRotX->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomRotX->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomRotX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomRotX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomRotX->setVisible(false); + + SXLevelEditor::RadioButtonGeomRotY = SXGUICrRadioButton("y", 595, 35, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomRotY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomRotY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomRotY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomRotY->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomRotY->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomRotY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomRotY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomRotY->setVisible(false); + + SXLevelEditor::RadioButtonGeomRotZ = SXGUICrRadioButton("z", 595, 55, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomRotZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomRotZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomRotZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomRotZ->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomRotZ->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomRotZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomRotZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomRotZ->setVisible(false); + + SXLevelEditor::StaticGeomScale = SXGUICrStatic("Scale:", 625, 35, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGeomScale->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGeomScale->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGeomScale->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGeomScale->setTransparentTextBk(true); + SXLevelEditor::StaticGeomScale->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGeomScale->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGeomScale->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGeomScale->setVisible(false); + + SXLevelEditor::EditGeomScaleX = SXGUICrEdit("0", 675, 15, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomScaleX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomScaleX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomScaleX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomScaleX->setTransparentTextBk(true); + SXLevelEditor::EditGeomScaleX->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomScaleX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomScaleX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomScaleX->setVisible(false); + SXLevelEditor::EditGeomScaleX->addHandler(SXLevelEditor_EditTransformScale_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomScaleX->addHandler(SXLevelEditor_EditTransformScale_Enter, WM_KILLFOCUS); + + SXLevelEditor::EditGeomScaleY = SXGUICrEdit("0", 675, 35, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomScaleY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomScaleY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomScaleY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomScaleY->setTransparentTextBk(true); + SXLevelEditor::EditGeomScaleY->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomScaleY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomScaleY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomScaleY->setVisible(false); + SXLevelEditor::EditGeomScaleY->addHandler(SXLevelEditor_EditTransformScale_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomScaleY->addHandler(SXLevelEditor_EditTransformScale_Enter, WM_KILLFOCUS); + + SXLevelEditor::EditGeomScaleZ = SXGUICrEdit("0", 675, 55, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGeomScaleZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGeomScaleZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGeomScaleZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGeomScaleZ->setTransparentTextBk(true); + SXLevelEditor::EditGeomScaleZ->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGeomScaleZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGeomScaleZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGeomScaleZ->setVisible(false); + SXLevelEditor::EditGeomScaleZ->addHandler(SXLevelEditor_EditTransformScale_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGeomScaleZ->addHandler(SXLevelEditor_EditTransformScale_Enter, WM_KILLFOCUS); + + SXLevelEditor::RadioButtonGeomScaleX = SXGUICrRadioButton("x", 745, 15, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomScaleX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomScaleX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomScaleX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomScaleX->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomScaleX->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomScaleX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomScaleX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomScaleX->setVisible(false); + + SXLevelEditor::RadioButtonGeomScaleY = SXGUICrRadioButton("y", 745, 35, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomScaleY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomScaleY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomScaleY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomScaleY->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomScaleY->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomScaleY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomScaleY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomScaleY->setVisible(false); + + SXLevelEditor::RadioButtonGeomScaleZ = SXGUICrRadioButton("z", 745, 55, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGeomScaleZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGeomScaleZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGeomScaleZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGeomScaleZ->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGeomScaleZ->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGeomScaleZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGeomScaleZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGeomScaleZ->setVisible(false); + + SXLevelEditor::ButtonGeomFinish = SXGUICrButton("Finish", 100, 95, 100, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGeomFinish->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGeomFinish->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGeomFinish->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGeomFinish->setVisible(false); + SXLevelEditor::ButtonGeomFinish->addHandler(SXLevelEditor_ButtonGeomFinish_Click, WM_LBUTTONUP); //} //Green //{ - SXLevelEditor::StaticGreenName = SXGUICrStatic("Name", 5, 20, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenName->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenName->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenName->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenName->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenName->GAlign.left = true; - SXLevelEditor::StaticGreenName->GAlign.top = true; - SXLevelEditor::StaticGreenName->Visible(false); - - SXLevelEditor::EditGreenName = SXGUICrEdit("0", 80, 20, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenName->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenName->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenName->SetTransparentTextBk(true); - SXLevelEditor::EditGreenName->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenName->GAlign.left = true; - SXLevelEditor::EditGreenName->GAlign.top = true; - SXLevelEditor::EditGreenName->Visible(false); - SXLevelEditor::EditGreenName->AddHandler(SXLevelEditor_EditGreenName_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGreenName->AddHandler(SXLevelEditor_EditGreenName_Enter, WM_KILLFOCUS); - - SXLevelEditor::StaticGreenModel = SXGUICrStatic("Model", 5, 40, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenModel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenModel->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenModel->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenModel->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenModel->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenModel->GAlign.left = true; - SXLevelEditor::StaticGreenModel->GAlign.top = true; - SXLevelEditor::StaticGreenModel->Visible(false); - - SXLevelEditor::EditGreenModel = SXGUICrEdit("0", 80, 40, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenModel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenModel->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenModel->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenModel->SetTransparentTextBk(true); - SXLevelEditor::EditGreenModel->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenModel->GAlign.left = true; - SXLevelEditor::EditGreenModel->GAlign.top = true; - SXLevelEditor::EditGreenModel->Visible(false); - - SXLevelEditor::ButtonGreenModel = SXGUICrButton("...", 285, 40, 25, 15, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGreenModel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGreenModel->GAlign.left = true; - SXLevelEditor::ButtonGreenModel->GAlign.top = true; - SXLevelEditor::ButtonGreenModel->Visible(false); - SXLevelEditor::ButtonGreenModel->AddHandler(SXLevelEditor_ButtonGreenModel_Click, WM_LBUTTONUP); - - SXLevelEditor::StaticGreenLod1 = SXGUICrStatic("Lod1", 5, 60, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenLod1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenLod1->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenLod1->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenLod1->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenLod1->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenLod1->GAlign.left = true; - SXLevelEditor::StaticGreenLod1->GAlign.top = true; - SXLevelEditor::StaticGreenLod1->Visible(false); - - SXLevelEditor::EditGreenLod1 = SXGUICrEdit("0", 80, 60, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenLod1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenLod1->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenLod1->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenLod1->SetTransparentTextBk(true); - SXLevelEditor::EditGreenLod1->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenLod1->GAlign.left = true; - SXLevelEditor::EditGreenLod1->GAlign.top = true; - SXLevelEditor::EditGreenLod1->Visible(false); - - SXLevelEditor::ButtonGreenLod1 = SXGUICrButton("...", 285, 60, 25, 15, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGreenLod1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGreenLod1->GAlign.left = true; - SXLevelEditor::ButtonGreenLod1->GAlign.top = true; - SXLevelEditor::ButtonGreenLod1->Visible(false); - SXLevelEditor::ButtonGreenLod1->AddHandler(SXLevelEditor_ButtonGreenLod1_Click, WM_LBUTTONUP); - - SXLevelEditor::StaticGreenLod2 = SXGUICrStatic("Lod2", 5, 80, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenLod2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenLod2->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenLod2->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenLod2->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenLod2->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenLod2->GAlign.left = true; - SXLevelEditor::StaticGreenLod2->GAlign.top = true; - SXLevelEditor::StaticGreenLod2->Visible(false); - - SXLevelEditor::EditGreenLod2 = SXGUICrEdit("0", 80, 80, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenLod2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenLod2->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenLod2->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenLod2->SetTransparentTextBk(true); - SXLevelEditor::EditGreenLod2->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenLod2->GAlign.left = true; - SXLevelEditor::EditGreenLod2->GAlign.top = true; - SXLevelEditor::EditGreenLod2->Visible(false); - - SXLevelEditor::ButtonGreenLod2 = SXGUICrButton("...", 285, 80, 25, 15, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGreenLod2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGreenLod2->GAlign.left = true; - SXLevelEditor::ButtonGreenLod2->GAlign.top = true; - SXLevelEditor::ButtonGreenLod2->Visible(false); - SXLevelEditor::ButtonGreenLod2->AddHandler(SXLevelEditor_ButtonGreenLod2_Click, WM_LBUTTONUP); - - SXLevelEditor::ButtonGreenMask = SXGUICrButton("...", 285, 100, 25, 15, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGreenMask->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGreenMask->GAlign.left = true; - SXLevelEditor::ButtonGreenMask->GAlign.top = true; - SXLevelEditor::ButtonGreenMask->Visible(false); - SXLevelEditor::ButtonGreenMask->AddHandler(SXLevelEditor_ButtonGreenMask_Click, WM_LBUTTONUP); - - SXLevelEditor::StaticGreenMask = SXGUICrStatic("Mask texture", 5, 100, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenMask->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenMask->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenMask->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenMask->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenMask->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenMask->GAlign.left = true; - SXLevelEditor::StaticGreenMask->GAlign.top = true; - SXLevelEditor::StaticGreenMask->Visible(false); - - SXLevelEditor::EditGreenMask = SXGUICrEdit("0", 80, 100, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenMask->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenMask->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenMask->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenMask->SetTransparentTextBk(true); - SXLevelEditor::EditGreenMask->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenMask->GAlign.left = true; - SXLevelEditor::EditGreenMask->GAlign.top = true; - SXLevelEditor::EditGreenMask->Visible(false); - - SXLevelEditor::StaticGreenNav = SXGUICrStatic("NavMesh:", 330, 20, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenNav->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenNav->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenNav->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenNav->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenNav->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenNav->GAlign.left = true; - SXLevelEditor::StaticGreenNav->GAlign.top = true; - SXLevelEditor::StaticGreenNav->Visible(false); - - SXLevelEditor::EditGreenNav = SXGUICrEdit("", 380, 20, 200, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenNav->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenNav->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenNav->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenNav->SetTransparentTextBk(true); - SXLevelEditor::EditGreenNav->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenNav->GAlign.left = true; - SXLevelEditor::EditGreenNav->GAlign.top = true; - SXLevelEditor::EditGreenNav->Visible(false); - - SXLevelEditor::ButtonGreenNav = SXGUICrButton("...", 585, 20, 25, 15, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGreenNav->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGreenNav->GAlign.left = true; - SXLevelEditor::ButtonGreenNav->GAlign.top = true; - SXLevelEditor::ButtonGreenNav->Visible(false); - SXLevelEditor::ButtonGreenNav->AddHandler(SXLevelEditor_ButtonGreenNav_Click, WM_LBUTTONUP); - - SXLevelEditor::TrackBarGreenDensity = SXGUICrTrackBar("", 330, 65, 280, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::TrackBarGreenDensity->SetMinMax(1, 100); - SXLevelEditor::TrackBarGreenDensity->SetTickFrequency(10); - SXLevelEditor::TrackBarGreenDensity->AddHandler(SXLevelEditor_TrackBarGreenDensity_MouseMove, WM_MOUSEMOVE); - SXLevelEditor::TrackBarGreenDensity->GAlign.left = true; - SXLevelEditor::TrackBarGreenDensity->GAlign.top = true; - SXLevelEditor::TrackBarGreenDensity->Visible(false); - - SXLevelEditor::ButtonGreenGenerate = SXGUICrButton("Generate", 420, 87, 100, 30, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGreenGenerate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGreenGenerate->GAlign.left = true; - SXLevelEditor::ButtonGreenGenerate->GAlign.top = true; - SXLevelEditor::ButtonGreenGenerate->Visible(false); - SXLevelEditor::ButtonGreenGenerate->AddHandler(SXLevelEditor_ButtonGreenGenerate_Click, WM_LBUTTONUP); - - SXLevelEditor::StaticGreenDensityText = SXGUICrStatic("Density:", 380, 45, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenDensityText->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenDensityText->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenDensityText->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenDensityText->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenDensityText->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenDensityText->GAlign.left = true; - SXLevelEditor::StaticGreenDensityText->GAlign.top = true; - SXLevelEditor::StaticGreenDensityText->Visible(false); - - SXLevelEditor::StaticGreenDensityVal = SXGUICrStatic("0", 430, 45, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenDensityVal->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenDensityVal->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenDensityVal->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenDensityVal->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenDensityVal->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenDensityVal->GAlign.left = true; - SXLevelEditor::StaticGreenDensityVal->GAlign.top = true; - SXLevelEditor::StaticGreenDensityVal->Visible(false); - - SXLevelEditor::RadioButtonGreenSelX = SXGUICrRadioButton("x", 765, 40, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGreenSelX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGreenSelX->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGreenSelX->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGreenSelX->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGreenSelX->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGreenSelX->GAlign.left = true; - SXLevelEditor::RadioButtonGreenSelX->GAlign.top = true; - SXLevelEditor::RadioButtonGreenSelX->Visible(false); - - SXLevelEditor::RadioButtonGreenSelY = SXGUICrRadioButton("y", 765, 60, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGreenSelY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGreenSelY->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGreenSelY->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGreenSelY->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGreenSelY->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGreenSelY->GAlign.left = true; - SXLevelEditor::RadioButtonGreenSelY->GAlign.top = true; - SXLevelEditor::RadioButtonGreenSelY->Visible(false); - - SXLevelEditor::RadioButtonGreenSelZ = SXGUICrRadioButton("z", 765, 80, 25, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonGreenSelZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonGreenSelZ->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonGreenSelZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonGreenSelZ->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonGreenSelZ->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonGreenSelZ->GAlign.left = true; - SXLevelEditor::RadioButtonGreenSelZ->GAlign.top = true; - SXLevelEditor::RadioButtonGreenSelZ->Visible(false); + SXLevelEditor::StaticGreenName = SXGUICrStatic("Name", 5, 20, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenName->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenName->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenName->setTransparentTextBk(true); + SXLevelEditor::StaticGreenName->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenName->setVisible(false); + + SXLevelEditor::EditGreenName = SXGUICrEdit("0", 80, 20, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenName->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenName->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenName->setTransparentTextBk(true); + SXLevelEditor::EditGreenName->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenName->setVisible(false); + SXLevelEditor::EditGreenName->addHandler(SXLevelEditor_EditGreenName_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGreenName->addHandler(SXLevelEditor_EditGreenName_Enter, WM_KILLFOCUS); + + SXLevelEditor::StaticGreenModel = SXGUICrStatic("Model", 5, 40, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenModel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenModel->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenModel->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenModel->setTransparentTextBk(true); + SXLevelEditor::StaticGreenModel->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenModel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenModel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenModel->setVisible(false); + + SXLevelEditor::EditGreenModel = SXGUICrEdit("0", 80, 40, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenModel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenModel->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenModel->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenModel->setTransparentTextBk(true); + SXLevelEditor::EditGreenModel->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenModel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenModel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenModel->setVisible(false); + + SXLevelEditor::ButtonGreenModel = SXGUICrButton("...", 285, 40, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGreenModel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGreenModel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGreenModel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGreenModel->setVisible(false); + SXLevelEditor::ButtonGreenModel->addHandler(SXLevelEditor_ButtonGreenModel_Click, WM_LBUTTONUP); + + SXLevelEditor::StaticGreenLod1 = SXGUICrStatic("Lod1", 5, 60, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenLod1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenLod1->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenLod1->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenLod1->setTransparentTextBk(true); + SXLevelEditor::StaticGreenLod1->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenLod1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenLod1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenLod1->setVisible(false); + + SXLevelEditor::EditGreenLod1 = SXGUICrEdit("0", 80, 60, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenLod1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenLod1->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenLod1->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenLod1->setTransparentTextBk(true); + SXLevelEditor::EditGreenLod1->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenLod1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenLod1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenLod1->setVisible(false); + + SXLevelEditor::ButtonGreenLod1 = SXGUICrButton("...", 285, 60, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGreenLod1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGreenLod1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGreenLod1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGreenLod1->setVisible(false); + SXLevelEditor::ButtonGreenLod1->addHandler(SXLevelEditor_ButtonGreenLod1_Click, WM_LBUTTONUP); + + SXLevelEditor::StaticGreenLod2 = SXGUICrStatic("Lod2", 5, 80, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenLod2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenLod2->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenLod2->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenLod2->setTransparentTextBk(true); + SXLevelEditor::StaticGreenLod2->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenLod2->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenLod2->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenLod2->setVisible(false); + + SXLevelEditor::EditGreenLod2 = SXGUICrEdit("0", 80, 80, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenLod2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenLod2->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenLod2->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenLod2->setTransparentTextBk(true); + SXLevelEditor::EditGreenLod2->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenLod2->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenLod2->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenLod2->setVisible(false); + + SXLevelEditor::ButtonGreenLod2 = SXGUICrButton("...", 285, 80, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGreenLod2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGreenLod2->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGreenLod2->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGreenLod2->setVisible(false); + SXLevelEditor::ButtonGreenLod2->addHandler(SXLevelEditor_ButtonGreenLod2_Click, WM_LBUTTONUP); + + SXLevelEditor::ButtonGreenMask = SXGUICrButton("...", 285, 100, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGreenMask->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGreenMask->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGreenMask->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGreenMask->setVisible(false); + SXLevelEditor::ButtonGreenMask->addHandler(SXLevelEditor_ButtonGreenMask_Click, WM_LBUTTONUP); + + SXLevelEditor::StaticGreenMask = SXGUICrStatic("Mask texture", 5, 100, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenMask->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenMask->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenMask->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenMask->setTransparentTextBk(true); + SXLevelEditor::StaticGreenMask->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenMask->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenMask->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenMask->setVisible(false); + + SXLevelEditor::EditGreenMask = SXGUICrEdit("0", 80, 100, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenMask->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenMask->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenMask->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenMask->setTransparentTextBk(true); + SXLevelEditor::EditGreenMask->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenMask->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenMask->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenMask->setVisible(false); + + SXLevelEditor::StaticGreenNav = SXGUICrStatic("NavMesh:", 330, 20, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenNav->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenNav->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenNav->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenNav->setTransparentTextBk(true); + SXLevelEditor::StaticGreenNav->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenNav->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenNav->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenNav->setVisible(false); + + SXLevelEditor::EditGreenNav = SXGUICrEdit("", 380, 20, 200, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenNav->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenNav->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenNav->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenNav->setTransparentTextBk(true); + SXLevelEditor::EditGreenNav->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenNav->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenNav->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenNav->setVisible(false); + + SXLevelEditor::ButtonGreenNav = SXGUICrButton("...", 585, 20, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGreenNav->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGreenNav->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGreenNav->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGreenNav->setVisible(false); + SXLevelEditor::ButtonGreenNav->addHandler(SXLevelEditor_ButtonGreenNav_Click, WM_LBUTTONUP); + + SXLevelEditor::TrackBarGreenDensity = SXGUICrTrackBar("", 330, 65, 280, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::TrackBarGreenDensity->setMinMax(1, 100); + SXLevelEditor::TrackBarGreenDensity->setTickFrequency(10); + SXLevelEditor::TrackBarGreenDensity->addHandler(SXLevelEditor_TrackBarGreenDensity_MouseMove, WM_MOUSEMOVE); + SXLevelEditor::TrackBarGreenDensity->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::TrackBarGreenDensity->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::TrackBarGreenDensity->setVisible(false); + + SXLevelEditor::ButtonGreenGenerate = SXGUICrButton("Generate", 420, 87, 100, 30, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGreenGenerate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGreenGenerate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGreenGenerate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGreenGenerate->setVisible(false); + SXLevelEditor::ButtonGreenGenerate->addHandler(SXLevelEditor_ButtonGreenGenerate_Click, WM_LBUTTONUP); + + SXLevelEditor::StaticGreenDensityText = SXGUICrStatic("Density:", 380, 45, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenDensityText->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenDensityText->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenDensityText->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenDensityText->setTransparentTextBk(true); + SXLevelEditor::StaticGreenDensityText->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenDensityText->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenDensityText->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenDensityText->setVisible(false); + + SXLevelEditor::StaticGreenDensityVal = SXGUICrStatic("0", 430, 45, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenDensityVal->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenDensityVal->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenDensityVal->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenDensityVal->setTransparentTextBk(true); + SXLevelEditor::StaticGreenDensityVal->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenDensityVal->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenDensityVal->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenDensityVal->setVisible(false); + + SXLevelEditor::RadioButtonGreenSelX = SXGUICrRadioButton("x", 765, 40, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGreenSelX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGreenSelX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGreenSelX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGreenSelX->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGreenSelX->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGreenSelX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGreenSelX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGreenSelX->setVisible(false); + + SXLevelEditor::RadioButtonGreenSelY = SXGUICrRadioButton("y", 765, 60, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGreenSelY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGreenSelY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGreenSelY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGreenSelY->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGreenSelY->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGreenSelY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGreenSelY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGreenSelY->setVisible(false); + + SXLevelEditor::RadioButtonGreenSelZ = SXGUICrRadioButton("z", 765, 80, 25, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonGreenSelZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonGreenSelZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonGreenSelZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonGreenSelZ->setTransparentTextBk(true); + SXLevelEditor::RadioButtonGreenSelZ->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonGreenSelZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonGreenSelZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonGreenSelZ->setVisible(false); - SXLevelEditor::ComboBoxGreenSel = SXGUICrComboBox("", 620, 20, 150, 100, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ComboBoxGreenSel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ComboBoxGreenSel->SetColorText(0, 0, 0); - SXLevelEditor::ComboBoxGreenSel->SetColorTextBk(255, 255, 255); - SXLevelEditor::ComboBoxGreenSel->SetTransparentTextBk(true); - SXLevelEditor::ComboBoxGreenSel->SetColorBrush(220, 220, 220); - SXLevelEditor::ComboBoxGreenSel->AddItem("single select"); - SXLevelEditor::ComboBoxGreenSel->AddItem("single create"); - SXLevelEditor::ComboBoxGreenSel->AddItem("multiple create"); - SXLevelEditor::ComboBoxGreenSel->AddItem("single delete"); + SXLevelEditor::ComboBoxGreenSel = SXGUICrComboBox(620, 20, 150, 100, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ComboBoxGreenSel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ComboBoxGreenSel->setColorText(RGB(0, 0, 0)); + SXLevelEditor::ComboBoxGreenSel->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGreenSel->setTransparentTextBk(true); + SXLevelEditor::ComboBoxGreenSel->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::ComboBoxGreenSel->addItem("single select"); + SXLevelEditor::ComboBoxGreenSel->addItem("single create"); + SXLevelEditor::ComboBoxGreenSel->addItem("multiple create"); + SXLevelEditor::ComboBoxGreenSel->addItem("single delete"); //SXLevelEditor::ComboBoxGreenSel->AddItem("multiple delete"); - SXLevelEditor::ComboBoxGreenSel->SetSel(0); - SXLevelEditor::ComboBoxGreenSel->GAlign.left = true; - SXLevelEditor::ComboBoxGreenSel->GAlign.top = true; - SXLevelEditor::ComboBoxGreenSel->Visible(false); + SXLevelEditor::ComboBoxGreenSel->setSel(0); + SXLevelEditor::ComboBoxGreenSel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ComboBoxGreenSel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ComboBoxGreenSel->setVisible(false); - SXLevelEditor::StaticGreenSelX = SXGUICrStatic("Width volume:", 620, 40, 75, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenSelX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenSelX->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenSelX->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenSelX->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenSelX->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenSelX->GAlign.left = true; - SXLevelEditor::StaticGreenSelX->GAlign.top = true; - SXLevelEditor::StaticGreenSelX->Visible(false); - - SXLevelEditor::StaticGreenSelY = SXGUICrStatic("Height volume:", 620, 60, 75, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenSelY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenSelY->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenSelY->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenSelY->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenSelY->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenSelY->GAlign.left = true; - SXLevelEditor::StaticGreenSelY->GAlign.top = true; - SXLevelEditor::StaticGreenSelY->Visible(false); - - SXLevelEditor::StaticGreenSelZ = SXGUICrStatic("Depth volume:", 620, 80, 75, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGreenSelZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGreenSelZ->SetColorText(0, 0, 0); - SXLevelEditor::StaticGreenSelZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGreenSelZ->SetTransparentTextBk(true); - SXLevelEditor::StaticGreenSelZ->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGreenSelZ->GAlign.left = true; - SXLevelEditor::StaticGreenSelZ->GAlign.top = true; - SXLevelEditor::StaticGreenSelZ->Visible(false); - - SXLevelEditor::EditGreenSelX = SXGUICrEdit("0", 695, 40, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenSelX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenSelX->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenSelX->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenSelX->SetTransparentTextBk(true); - SXLevelEditor::EditGreenSelX->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenSelX->GAlign.left = true; - SXLevelEditor::EditGreenSelX->GAlign.top = true; - SXLevelEditor::EditGreenSelX->Visible(false); - - SXLevelEditor::EditGreenSelY = SXGUICrEdit("0", 695, 60, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenSelY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenSelY->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenSelY->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenSelY->SetTransparentTextBk(true); - SXLevelEditor::EditGreenSelY->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenSelY->GAlign.left = true; - SXLevelEditor::EditGreenSelY->GAlign.top = true; - SXLevelEditor::EditGreenSelY->Visible(false); - - SXLevelEditor::EditGreenSelZ = SXGUICrEdit("0", 695, 80, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGreenSelZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGreenSelZ->SetColorText(0, 0, 0); - SXLevelEditor::EditGreenSelZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGreenSelZ->SetTransparentTextBk(true); - SXLevelEditor::EditGreenSelZ->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGreenSelZ->GAlign.left = true; - SXLevelEditor::EditGreenSelZ->GAlign.top = true; - SXLevelEditor::EditGreenSelZ->Visible(false); + SXLevelEditor::StaticGreenSelX = SXGUICrStatic("Width volume:", 620, 40, 75, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenSelX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenSelX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenSelX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenSelX->setTransparentTextBk(true); + SXLevelEditor::StaticGreenSelX->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenSelX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenSelX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenSelX->setVisible(false); + + SXLevelEditor::StaticGreenSelY = SXGUICrStatic("Height volume:", 620, 60, 75, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenSelY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenSelY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenSelY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenSelY->setTransparentTextBk(true); + SXLevelEditor::StaticGreenSelY->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenSelY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenSelY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenSelY->setVisible(false); + + SXLevelEditor::StaticGreenSelZ = SXGUICrStatic("Depth volume:", 620, 80, 75, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGreenSelZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGreenSelZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGreenSelZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGreenSelZ->setTransparentTextBk(true); + SXLevelEditor::StaticGreenSelZ->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGreenSelZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGreenSelZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGreenSelZ->setVisible(false); + + SXLevelEditor::EditGreenSelX = SXGUICrEdit("0", 695, 40, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenSelX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenSelX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenSelX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenSelX->setTransparentTextBk(true); + SXLevelEditor::EditGreenSelX->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenSelX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenSelX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenSelX->setVisible(false); + + SXLevelEditor::EditGreenSelY = SXGUICrEdit("0", 695, 60, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenSelY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenSelY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenSelY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenSelY->setTransparentTextBk(true); + SXLevelEditor::EditGreenSelY->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenSelY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenSelY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenSelY->setVisible(false); + + SXLevelEditor::EditGreenSelZ = SXGUICrEdit("0", 695, 80, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGreenSelZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGreenSelZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGreenSelZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGreenSelZ->setTransparentTextBk(true); + SXLevelEditor::EditGreenSelZ->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGreenSelZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGreenSelZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGreenSelZ->setVisible(false); //} //Game //{ - SXLevelEditor::StaticGameClass = SXGUICrStatic("Class:", 415, 15, 35, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGameClass->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGameClass->SetColorText(0, 0, 0); - SXLevelEditor::StaticGameClass->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGameClass->SetTransparentTextBk(true); - SXLevelEditor::StaticGameClass->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGameClass->GAlign.left = true; - SXLevelEditor::StaticGameClass->GAlign.top = true; - SXLevelEditor::StaticGameClass->Visible(false); - - SXLevelEditor::ComboBoxGameClass = SXGUICrComboBoxEx("", 455, 15, 230, 180, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ComboBoxGameClass->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ComboBoxGameClass->SetColorText(0, 0, 0); - SXLevelEditor::ComboBoxGameClass->SetColorTextBk(255, 255, 255); - SXLevelEditor::ComboBoxGameClass->SetTransparentTextBk(true); - SXLevelEditor::ComboBoxGameClass->SetColorBrush(255, 255, 255); - SXLevelEditor::ComboBoxGameClass->GAlign.left = true; - SXLevelEditor::ComboBoxGameClass->GAlign.top = true; - SXLevelEditor::ComboBoxGameClass->Visible(false); - SXLevelEditor::ComboBoxGameClass->AddItem(""); - - SXLevelEditor::ButtonGameTab = SXGUICrButton("Connections", 695, 15, 100, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGameTab->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGameTab->GAlign.left = true; - SXLevelEditor::ButtonGameTab->GAlign.top = true; - SXLevelEditor::ButtonGameTab->Visible(false); - SXLevelEditor::ButtonGameTab->AddHandler(SXLevelEditor_ButtonGameTab_Click, WM_LBUTTONUP); + SXLevelEditor::StaticGameClass = SXGUICrStatic("Class:", 415, 15, 35, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGameClass->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGameClass->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGameClass->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGameClass->setTransparentTextBk(true); + SXLevelEditor::StaticGameClass->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGameClass->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGameClass->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGameClass->setVisible(false); + + SXLevelEditor::ComboBoxGameClass = SXGUICrComboBoxEx(455, 15, 230, 180, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ComboBoxGameClass->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ComboBoxGameClass->setColorText(RGB(0, 0, 0)); + SXLevelEditor::ComboBoxGameClass->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGameClass->setTransparentTextBk(true); + SXLevelEditor::ComboBoxGameClass->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGameClass->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ComboBoxGameClass->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ComboBoxGameClass->setVisible(false); + SXLevelEditor::ComboBoxGameClass->addItem(""); + + SXLevelEditor::ButtonGameTab = SXGUICrButton("Connections", 695, 15, 100, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGameTab->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGameTab->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGameTab->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGameTab->setVisible(false); + SXLevelEditor::ButtonGameTab->addHandler(SXLevelEditor_ButtonGameTab_Click, WM_LBUTTONUP); SXLevelEditor::GameTabVal = 0; - SXLevelEditor::ListViewGameClass = SXGUICrListView("", 5, 5, 400, 180, SXLevelEditor::GroupBoxData->GetHWND(), WndProcAllDefault, 0); - SXLevelEditor::ListViewGameClass->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ListViewGameClass->SetColorText(0, 0, 0); - SXLevelEditor::ListViewGameClass->SetColorTextBk(255, 255, 255); - SXLevelEditor::ListViewGameClass->SetTransparentTextBk(true); - SXLevelEditor::ListViewGameClass->SetColorBrush(255, 255, 255); - SXLevelEditor::ListViewGameClass->AddColumn("Property Name",199); - SXLevelEditor::ListViewGameClass->AddColumn("Value", 199); - SXLevelEditor::ListViewGameClass->GAlign.left = true; - SXLevelEditor::ListViewGameClass->GAlign.top = true; - SXLevelEditor::ListViewGameClass->Visible(false); - - SXLevelEditor::ComboBoxGameValue = SXGUICrComboBox("", 415, 45, 270,180, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ComboBoxGameValue->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ComboBoxGameValue->SetColorText(0, 0, 0); - SXLevelEditor::ComboBoxGameValue->SetColorTextBk(255, 255, 255); - SXLevelEditor::ComboBoxGameValue->SetTransparentTextBk(true); - SXLevelEditor::ComboBoxGameValue->SetColorBrush(255, 255, 255); - SXLevelEditor::ComboBoxGameValue->GAlign.left = true; - SXLevelEditor::ComboBoxGameValue->GAlign.top = true; - SXLevelEditor::ComboBoxGameValue->Visible(false); - - SXLevelEditor::EditGameValue = SXGUICrEdit("", 415, 45, 240, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGameValue->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGameValue->SetColorText(0, 0, 0); - SXLevelEditor::EditGameValue->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGameValue->SetTransparentTextBk(true); - SXLevelEditor::EditGameValue->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGameValue->GAlign.left = true; - SXLevelEditor::EditGameValue->GAlign.top = true; - SXLevelEditor::EditGameValue->Visible(false); - SXLevelEditor::EditGameValue->AddHandler(SXLevelEditor_EditGameValue_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGameValue->AddHandler(SXLevelEditor_EditGameValue_Enter, WM_KILLFOCUS); - - SXLevelEditor::ButtonGameValue = SXGUICrButton("...", 660, 45, 25, 15, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGameValue->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGameValue->GAlign.left = true; - SXLevelEditor::ButtonGameValue->GAlign.top = true; - SXLevelEditor::ButtonGameValue->Visible(false); - SXLevelEditor::ButtonGameValue->AddHandler(SXLevelEditor_ButtonGameValue_Click, WM_LBUTTONUP); - - SXLevelEditor::StaticGameHelp = SXGUICrStatic("Help:", 415, 65, 35, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGameHelp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGameHelp->SetColorText(0, 0, 0); - SXLevelEditor::StaticGameHelp->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGameHelp->SetTransparentTextBk(true); - SXLevelEditor::StaticGameHelp->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGameHelp->GAlign.left = true; - SXLevelEditor::StaticGameHelp->GAlign.top = true; - SXLevelEditor::StaticGameHelp->Visible(false); - - SXLevelEditor::MemoGameHelp = SXGUICrMemo("Help", 415, 85, 270, 95, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::MemoGameHelp->ReadOnly(true); - SXLevelEditor::MemoGameHelp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::MemoGameHelp->SetColorText(0, 0, 0); - SXLevelEditor::MemoGameHelp->SetColorTextBk(255, 255, 255); - SXLevelEditor::MemoGameHelp->SetTransparentTextBk(true); - SXLevelEditor::MemoGameHelp->SetColorBrush(220, 220, 220); - SXLevelEditor::MemoGameHelp->GAlign.left = true; - SXLevelEditor::MemoGameHelp->GAlign.top = true; - SXLevelEditor::MemoGameHelp->Visible(false); - - SXLevelEditor::ButtonGameCreate = SXGUICrButton("Create", 695, 165, 100, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGameCreate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGameCreate->GAlign.left = true; - SXLevelEditor::ButtonGameCreate->GAlign.top = true; - SXLevelEditor::ButtonGameCreate->Visible(false); - SXLevelEditor::ButtonGameCreate->AddHandler(SXLevelEditor_ButtonGameCreate_Click, WM_LBUTTONUP); + SXLevelEditor::ListViewGameClass = SXGUICrListView(5, 5, 400, 180, SXLevelEditor::GroupBoxData->getHWND(), WndProcAllDefault, 0); + SXLevelEditor::ListViewGameClass->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ListViewGameClass->setColorText(RGB(0, 0, 0)); + SXLevelEditor::ListViewGameClass->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::ListViewGameClass->setTransparentTextBk(true); + SXLevelEditor::ListViewGameClass->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::ListViewGameClass->addColumn("Property Name",199); + SXLevelEditor::ListViewGameClass->addColumn("Value", 199); + SXLevelEditor::ListViewGameClass->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ListViewGameClass->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ListViewGameClass->setVisible(false); + + SXLevelEditor::ComboBoxGameValue = SXGUICrComboBox(415, 45, 270, 180, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ComboBoxGameValue->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ComboBoxGameValue->setColorText(RGB(0, 0, 0)); + SXLevelEditor::ComboBoxGameValue->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGameValue->setTransparentTextBk(true); + SXLevelEditor::ComboBoxGameValue->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGameValue->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ComboBoxGameValue->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ComboBoxGameValue->setVisible(false); + + SXLevelEditor::EditGameValue = SXGUICrEdit("", 415, 45, 240, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGameValue->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGameValue->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGameValue->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGameValue->setTransparentTextBk(true); + SXLevelEditor::EditGameValue->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGameValue->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGameValue->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGameValue->setVisible(false); + SXLevelEditor::EditGameValue->addHandler(SXLevelEditor_EditGameValue_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGameValue->addHandler(SXLevelEditor_EditGameValue_Enter, WM_KILLFOCUS); + + SXLevelEditor::ButtonGameValue = SXGUICrButton("...", 660, 45, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGameValue->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGameValue->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGameValue->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGameValue->setVisible(false); + SXLevelEditor::ButtonGameValue->addHandler(SXLevelEditor_ButtonGameValue_Click, WM_LBUTTONUP); + + SXLevelEditor::StaticGameHelp = SXGUICrStatic("Help:", 415, 65, 35, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGameHelp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGameHelp->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGameHelp->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGameHelp->setTransparentTextBk(true); + SXLevelEditor::StaticGameHelp->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGameHelp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGameHelp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGameHelp->setVisible(false); + + SXLevelEditor::MemoGameHelp = SXGUICrMemo("Help", 415, 85, 270, 95, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::MemoGameHelp->setReadOnly(true); + SXLevelEditor::MemoGameHelp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::MemoGameHelp->setColorText(RGB(0, 0, 0)); + SXLevelEditor::MemoGameHelp->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::MemoGameHelp->setTransparentTextBk(true); + SXLevelEditor::MemoGameHelp->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::MemoGameHelp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::MemoGameHelp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::MemoGameHelp->setVisible(false); + + SXLevelEditor::ButtonGameCreate = SXGUICrButton("Create", 695, 165, 100, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGameCreate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGameCreate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGameCreate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGameCreate->setVisible(false); + SXLevelEditor::ButtonGameCreate->addHandler(SXLevelEditor_ButtonGameCreate_Click, WM_LBUTTONUP); for (int i = 0; i < 8; ++i) { - SXLevelEditor::CheckBoxGameFlags[i] = SXGUICrCheckBox("", 415, 45 + (15*i), 180, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0, false); - SXLevelEditor::CheckBoxGameFlags[i]->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxGameFlags[i]->SetColorText(0, 0, 0); - SXLevelEditor::CheckBoxGameFlags[i]->SetColorTextBk(255, 255, 255); - SXLevelEditor::CheckBoxGameFlags[i]->SetTransparentTextBk(true); - SXLevelEditor::CheckBoxGameFlags[i]->SetColorBrush(220, 220, 220); - SXLevelEditor::CheckBoxGameFlags[i]->GAlign.left = true; - SXLevelEditor::CheckBoxGameFlags[i]->GAlign.top = true; - SXLevelEditor::CheckBoxGameFlags[i]->Visible(false); + SXLevelEditor::CheckBoxGameFlags[i] = SXGUICrCheckBox("", 415, 45 + (15*i), 180, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0, false); + SXLevelEditor::CheckBoxGameFlags[i]->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxGameFlags[i]->setColorText(RGB(0, 0, 0)); + SXLevelEditor::CheckBoxGameFlags[i]->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::CheckBoxGameFlags[i]->setTransparentTextBk(true); + SXLevelEditor::CheckBoxGameFlags[i]->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::CheckBoxGameFlags[i]->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxGameFlags[i]->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::CheckBoxGameFlags[i]->setVisible(false); } for (int i = 0; i < 8; ++i) { - SXLevelEditor::CheckBoxGameFlags[i + 8] = SXGUICrCheckBox("", 600, 45 + (15 * i), 180, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0, false); - SXLevelEditor::CheckBoxGameFlags[i + 8]->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxGameFlags[i + 8]->SetColorText(0, 0, 0); - SXLevelEditor::CheckBoxGameFlags[i + 8]->SetColorTextBk(255, 255, 255); - SXLevelEditor::CheckBoxGameFlags[i + 8]->SetTransparentTextBk(true); - SXLevelEditor::CheckBoxGameFlags[i + 8]->SetColorBrush(220, 220, 220); - SXLevelEditor::CheckBoxGameFlags[i + 8]->GAlign.left = true; - SXLevelEditor::CheckBoxGameFlags[i + 8]->GAlign.top = true; - SXLevelEditor::CheckBoxGameFlags[i + 8]->Visible(false); + SXLevelEditor::CheckBoxGameFlags[i + 8] = SXGUICrCheckBox("", 600, 45 + (15 * i), 180, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0, false); + SXLevelEditor::CheckBoxGameFlags[i + 8]->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxGameFlags[i + 8]->setColorText(RGB(0, 0, 0)); + SXLevelEditor::CheckBoxGameFlags[i + 8]->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::CheckBoxGameFlags[i + 8]->setTransparentTextBk(true); + SXLevelEditor::CheckBoxGameFlags[i + 8]->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::CheckBoxGameFlags[i + 8]->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxGameFlags[i + 8]->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::CheckBoxGameFlags[i + 8]->setVisible(false); } - SXLevelEditor::ListViewGameConnections = SXGUICrListView("", 5, 5, 550, 180, SXLevelEditor::GroupBoxData->GetHWND(), WndProcAllDefault, 0); - SXLevelEditor::ListViewGameConnections->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ListViewGameConnections->SetColorText(0, 0, 0); - SXLevelEditor::ListViewGameConnections->SetColorTextBk(255, 255, 255); - SXLevelEditor::ListViewGameConnections->SetTransparentTextBk(true); - SXLevelEditor::ListViewGameConnections->SetColorBrush(255, 255, 255); - SXLevelEditor::ListViewGameConnections->AddColumn("Event", 110); - SXLevelEditor::ListViewGameConnections->AddColumn("Name", 110); - SXLevelEditor::ListViewGameConnections->AddColumn("Action", 110); - SXLevelEditor::ListViewGameConnections->AddColumn("Delay", 110); - SXLevelEditor::ListViewGameConnections->AddColumn("Parameter", 110); - SXLevelEditor::ListViewGameConnections->GAlign.left = true; - SXLevelEditor::ListViewGameConnections->GAlign.top = true; - SXLevelEditor::ListViewGameConnections->Visible(false); - - SXLevelEditor::StaticGameConnectionsEvent = SXGUICrStatic("Event:", 560, 50, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGameConnectionsEvent->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGameConnectionsEvent->SetColorText(0, 0, 0); - SXLevelEditor::StaticGameConnectionsEvent->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGameConnectionsEvent->SetTransparentTextBk(true); - SXLevelEditor::StaticGameConnectionsEvent->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGameConnectionsEvent->GAlign.left = true; - SXLevelEditor::StaticGameConnectionsEvent->GAlign.top = true; - SXLevelEditor::StaticGameConnectionsEvent->Visible(false); - - SXLevelEditor::ComboBoxGameConnectionsEvent = SXGUICrComboBox("", 610, 50, 185, 180, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ComboBoxGameConnectionsEvent->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ComboBoxGameConnectionsEvent->SetColorText(0, 0, 0); - SXLevelEditor::ComboBoxGameConnectionsEvent->SetColorTextBk(255, 255, 255); - SXLevelEditor::ComboBoxGameConnectionsEvent->SetTransparentTextBk(true); - SXLevelEditor::ComboBoxGameConnectionsEvent->SetColorBrush(255, 255, 255); - SXLevelEditor::ComboBoxGameConnectionsEvent->GAlign.left = true; - SXLevelEditor::ComboBoxGameConnectionsEvent->GAlign.top = true; - SXLevelEditor::ComboBoxGameConnectionsEvent->Visible(false); - - SXLevelEditor::StaticGameConnectionsName = SXGUICrStatic("Name:", 560, 75, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGameConnectionsName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGameConnectionsName->SetColorText(0, 0, 0); - SXLevelEditor::StaticGameConnectionsName->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGameConnectionsName->SetTransparentTextBk(true); - SXLevelEditor::StaticGameConnectionsName->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGameConnectionsName->GAlign.left = true; - SXLevelEditor::StaticGameConnectionsName->GAlign.top = true; - SXLevelEditor::StaticGameConnectionsName->Visible(false); - - SXLevelEditor::EditGameConnectionsName = SXGUICrEdit("", 610, 75, 185, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGameConnectionsName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGameConnectionsName->SetColorText(0, 0, 0); - SXLevelEditor::EditGameConnectionsName->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGameConnectionsName->SetTransparentTextBk(true); - SXLevelEditor::EditGameConnectionsName->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGameConnectionsName->GAlign.left = true; - SXLevelEditor::EditGameConnectionsName->GAlign.top = true; - SXLevelEditor::EditGameConnectionsName->Visible(false); - SXLevelEditor::EditGameConnectionsName->AddHandler(SXLevelEditor_EditGameConnectionsName_IN, WM_KEYUP); - SXLevelEditor::EditGameConnectionsName->AddHandler(SXLevelEditor_EditGameConnectionsName_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGameConnectionsName->AddHandler(SXLevelEditor_EditGameConnectionsName_Enter, WM_KILLFOCUS); - - SXLevelEditor::StaticGameConnectionsAction = SXGUICrStatic("Action:", 560, 95, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGameConnectionsAction->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGameConnectionsAction->SetColorText(0, 0, 0); - SXLevelEditor::StaticGameConnectionsAction->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGameConnectionsAction->SetTransparentTextBk(true); - SXLevelEditor::StaticGameConnectionsAction->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGameConnectionsAction->GAlign.left = true; - SXLevelEditor::StaticGameConnectionsAction->GAlign.top = true; - SXLevelEditor::StaticGameConnectionsAction->Visible(false); - - SXLevelEditor::ComboBoxGameConnectionsAction = SXGUICrComboBox("", 610, 95, 185, 135, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ComboBoxGameConnectionsAction->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ComboBoxGameConnectionsAction->SetColorText(0, 0, 0); - SXLevelEditor::ComboBoxGameConnectionsAction->SetColorTextBk(255, 255, 255); - SXLevelEditor::ComboBoxGameConnectionsAction->SetTransparentTextBk(true); - SXLevelEditor::ComboBoxGameConnectionsAction->SetColorBrush(255, 255, 255); - SXLevelEditor::ComboBoxGameConnectionsAction->GAlign.left = true; - SXLevelEditor::ComboBoxGameConnectionsAction->GAlign.top = true; - SXLevelEditor::ComboBoxGameConnectionsAction->Visible(false); - - SXLevelEditor::StaticGameConnectionsDelay = SXGUICrStatic("Delay:", 560, 120, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGameConnectionsDelay->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGameConnectionsDelay->SetColorText(0, 0, 0); - SXLevelEditor::StaticGameConnectionsDelay->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGameConnectionsDelay->SetTransparentTextBk(true); - SXLevelEditor::StaticGameConnectionsDelay->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGameConnectionsDelay->GAlign.left = true; - SXLevelEditor::StaticGameConnectionsDelay->GAlign.top = true; - SXLevelEditor::StaticGameConnectionsDelay->Visible(false); - - SXLevelEditor::EditGameConnectionsDelay = SXGUICrEdit("", 610, 120, 185, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGameConnectionsDelay->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGameConnectionsDelay->SetColorText(0, 0, 0); - SXLevelEditor::EditGameConnectionsDelay->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGameConnectionsDelay->SetTransparentTextBk(true); - SXLevelEditor::EditGameConnectionsDelay->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGameConnectionsDelay->GAlign.left = true; - SXLevelEditor::EditGameConnectionsDelay->GAlign.top = true; - SXLevelEditor::EditGameConnectionsDelay->Visible(false); - SXLevelEditor::EditGameConnectionsDelay->AddHandler(SXLevelEditor_EditGameConnections_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGameConnectionsDelay->AddHandler(SXLevelEditor_EditGameConnections_Enter, WM_KILLFOCUS); - - SXLevelEditor::StaticGameConnectionsParameter = SXGUICrStatic("Parameter:", 560, 140, 50, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticGameConnectionsParameter->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticGameConnectionsParameter->SetColorText(0, 0, 0); - SXLevelEditor::StaticGameConnectionsParameter->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticGameConnectionsParameter->SetTransparentTextBk(true); - SXLevelEditor::StaticGameConnectionsParameter->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticGameConnectionsParameter->GAlign.left = true; - SXLevelEditor::StaticGameConnectionsParameter->GAlign.top = true; - SXLevelEditor::StaticGameConnectionsParameter->Visible(false); - - SXLevelEditor::EditGameConnectionsParameter = SXGUICrEdit("", 610, 140, 185, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditGameConnectionsParameter->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditGameConnectionsParameter->SetColorText(0, 0, 0); - SXLevelEditor::EditGameConnectionsParameter->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditGameConnectionsParameter->SetTransparentTextBk(true); - SXLevelEditor::EditGameConnectionsParameter->SetColorBrush(255, 255, 255); - SXLevelEditor::EditGameConnectionsParameter->GAlign.left = true; - SXLevelEditor::EditGameConnectionsParameter->GAlign.top = true; - SXLevelEditor::EditGameConnectionsParameter->Visible(false); - SXLevelEditor::EditGameConnectionsParameter->AddHandler(SXLevelEditor_EditGameConnections_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditGameConnectionsParameter->AddHandler(SXLevelEditor_EditGameConnections_Enter, WM_KILLFOCUS); + SXLevelEditor::ListViewGameConnections = SXGUICrListView(5, 5, 550, 180, SXLevelEditor::GroupBoxData->getHWND(), WndProcAllDefault, 0); + SXLevelEditor::ListViewGameConnections->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ListViewGameConnections->setColorText(RGB(0, 0, 0)); + SXLevelEditor::ListViewGameConnections->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::ListViewGameConnections->setTransparentTextBk(true); + SXLevelEditor::ListViewGameConnections->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::ListViewGameConnections->addColumn("Event", 110); + SXLevelEditor::ListViewGameConnections->addColumn("Name", 110); + SXLevelEditor::ListViewGameConnections->addColumn("Action", 110); + SXLevelEditor::ListViewGameConnections->addColumn("Delay", 110); + SXLevelEditor::ListViewGameConnections->addColumn("Parameter", 110); + SXLevelEditor::ListViewGameConnections->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ListViewGameConnections->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ListViewGameConnections->setVisible(false); + + SXLevelEditor::StaticGameConnectionsEvent = SXGUICrStatic("Event:", 560, 50, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGameConnectionsEvent->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGameConnectionsEvent->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGameConnectionsEvent->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGameConnectionsEvent->setTransparentTextBk(true); + SXLevelEditor::StaticGameConnectionsEvent->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGameConnectionsEvent->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGameConnectionsEvent->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGameConnectionsEvent->setVisible(false); + + SXLevelEditor::ComboBoxGameConnectionsEvent = SXGUICrComboBox(610, 50, 185, 180, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ComboBoxGameConnectionsEvent->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ComboBoxGameConnectionsEvent->setColorText(RGB(0, 0, 0)); + SXLevelEditor::ComboBoxGameConnectionsEvent->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGameConnectionsEvent->setTransparentTextBk(true); + SXLevelEditor::ComboBoxGameConnectionsEvent->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGameConnectionsEvent->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ComboBoxGameConnectionsEvent->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ComboBoxGameConnectionsEvent->setVisible(false); + + SXLevelEditor::StaticGameConnectionsName = SXGUICrStatic("Name:", 560, 75, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGameConnectionsName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGameConnectionsName->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGameConnectionsName->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGameConnectionsName->setTransparentTextBk(true); + SXLevelEditor::StaticGameConnectionsName->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGameConnectionsName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGameConnectionsName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGameConnectionsName->setVisible(false); + + SXLevelEditor::EditGameConnectionsName = SXGUICrEdit("", 610, 75, 185, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGameConnectionsName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGameConnectionsName->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGameConnectionsName->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGameConnectionsName->setTransparentTextBk(true); + SXLevelEditor::EditGameConnectionsName->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGameConnectionsName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGameConnectionsName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGameConnectionsName->setVisible(false); + SXLevelEditor::EditGameConnectionsName->addHandler(SXLevelEditor_EditGameConnectionsName_IN, WM_KEYUP); + SXLevelEditor::EditGameConnectionsName->addHandler(SXLevelEditor_EditGameConnectionsName_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGameConnectionsName->addHandler(SXLevelEditor_EditGameConnectionsName_Enter, WM_KILLFOCUS); + + SXLevelEditor::StaticGameConnectionsAction = SXGUICrStatic("Action:", 560, 95, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGameConnectionsAction->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGameConnectionsAction->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGameConnectionsAction->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGameConnectionsAction->setTransparentTextBk(true); + SXLevelEditor::StaticGameConnectionsAction->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGameConnectionsAction->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGameConnectionsAction->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGameConnectionsAction->setVisible(false); + + SXLevelEditor::ComboBoxGameConnectionsAction = SXGUICrComboBox(610, 95, 185, 135, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ComboBoxGameConnectionsAction->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ComboBoxGameConnectionsAction->setColorText(RGB(0, 0, 0)); + SXLevelEditor::ComboBoxGameConnectionsAction->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGameConnectionsAction->setTransparentTextBk(true); + SXLevelEditor::ComboBoxGameConnectionsAction->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::ComboBoxGameConnectionsAction->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ComboBoxGameConnectionsAction->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ComboBoxGameConnectionsAction->setVisible(false); + + SXLevelEditor::StaticGameConnectionsDelay = SXGUICrStatic("Delay:", 560, 120, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGameConnectionsDelay->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGameConnectionsDelay->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGameConnectionsDelay->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGameConnectionsDelay->setTransparentTextBk(true); + SXLevelEditor::StaticGameConnectionsDelay->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGameConnectionsDelay->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGameConnectionsDelay->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGameConnectionsDelay->setVisible(false); + + SXLevelEditor::EditGameConnectionsDelay = SXGUICrEdit("", 610, 120, 185, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGameConnectionsDelay->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGameConnectionsDelay->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGameConnectionsDelay->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGameConnectionsDelay->setTransparentTextBk(true); + SXLevelEditor::EditGameConnectionsDelay->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGameConnectionsDelay->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGameConnectionsDelay->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGameConnectionsDelay->setVisible(false); + SXLevelEditor::EditGameConnectionsDelay->addHandler(SXLevelEditor_EditGameConnections_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGameConnectionsDelay->addHandler(SXLevelEditor_EditGameConnections_Enter, WM_KILLFOCUS); + + SXLevelEditor::StaticGameConnectionsParameter = SXGUICrStatic("Parameter:", 560, 140, 50, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticGameConnectionsParameter->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticGameConnectionsParameter->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticGameConnectionsParameter->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticGameConnectionsParameter->setTransparentTextBk(true); + SXLevelEditor::StaticGameConnectionsParameter->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticGameConnectionsParameter->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticGameConnectionsParameter->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticGameConnectionsParameter->setVisible(false); + + SXLevelEditor::EditGameConnectionsParameter = SXGUICrEdit("", 610, 140, 185, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditGameConnectionsParameter->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditGameConnectionsParameter->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditGameConnectionsParameter->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditGameConnectionsParameter->setTransparentTextBk(true); + SXLevelEditor::EditGameConnectionsParameter->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditGameConnectionsParameter->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditGameConnectionsParameter->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditGameConnectionsParameter->setVisible(false); + SXLevelEditor::EditGameConnectionsParameter->addHandler(SXLevelEditor_EditGameConnections_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditGameConnectionsParameter->addHandler(SXLevelEditor_EditGameConnections_Enter, WM_KILLFOCUS); - SXLevelEditor::ButtonGameConnectionsCreate = SXGUICrButton("Create", 565, 160, 100, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGameConnectionsCreate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGameConnectionsCreate->GAlign.left = true; - SXLevelEditor::ButtonGameConnectionsCreate->GAlign.top = true; - SXLevelEditor::ButtonGameConnectionsCreate->Visible(false); - SXLevelEditor::ButtonGameConnectionsCreate->AddHandler(SXLevelEditor_ButtonGameConnectionsCreate_Click, WM_LBUTTONUP); + SXLevelEditor::ButtonGameConnectionsCreate = SXGUICrButton("Create", 565, 160, 100, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGameConnectionsCreate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGameConnectionsCreate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGameConnectionsCreate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGameConnectionsCreate->setVisible(false); + SXLevelEditor::ButtonGameConnectionsCreate->addHandler(SXLevelEditor_ButtonGameConnectionsCreate_Click, WM_LBUTTONUP); SXLevelEditor::isAddGameConections = false; - SXLevelEditor::ButtonGameConnectionsDelete = SXGUICrButton("Delete", 690, 160, 100, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonGameConnectionsDelete->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonGameConnectionsDelete->GAlign.left = true; - SXLevelEditor::ButtonGameConnectionsDelete->GAlign.top = true; - SXLevelEditor::ButtonGameConnectionsDelete->Visible(false); - SXLevelEditor::ButtonGameConnectionsDelete->AddHandler(SXLevelEditor_ButtonGameConnectionsDelete_Click, WM_LBUTTONUP); + SXLevelEditor::ButtonGameConnectionsDelete = SXGUICrButton("Delete", 690, 160, 100, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonGameConnectionsDelete->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonGameConnectionsDelete->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonGameConnectionsDelete->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonGameConnectionsDelete->setVisible(false); + SXLevelEditor::ButtonGameConnectionsDelete->addHandler(SXLevelEditor_ButtonGameConnectionsDelete_Click, WM_LBUTTONUP); //} //aigrid //{ - SXLevelEditor::StatiAIBBDimensions = SXGUICrStatic("Bound box dimensions:", 5, 10, 120, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StatiAIBBDimensions->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StatiAIBBDimensions->SetColorText(0, 0, 0); - SXLevelEditor::StatiAIBBDimensions->SetColorTextBk(255, 255, 255); - SXLevelEditor::StatiAIBBDimensions->SetTransparentTextBk(true); - SXLevelEditor::StatiAIBBDimensions->SetColorBrush(220, 220, 220); - SXLevelEditor::StatiAIBBDimensions->GAlign.left = true; - SXLevelEditor::StatiAIBBDimensions->GAlign.top = true; - SXLevelEditor::StatiAIBBDimensions->Visible(false); - - SXLevelEditor::StaticAIBBDimensionsWidth = SXGUICrStatic("Width:", 5, 30, 40, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIBBDimensionsWidth->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIBBDimensionsWidth->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIBBDimensionsWidth->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIBBDimensionsWidth->SetTransparentTextBk(true); - SXLevelEditor::StaticAIBBDimensionsWidth->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIBBDimensionsWidth->GAlign.left = true; - SXLevelEditor::StaticAIBBDimensionsWidth->GAlign.top = true; - SXLevelEditor::StaticAIBBDimensionsWidth->Visible(false); - - SXLevelEditor::EditAIBBDimensionsWidth = SXGUICrEdit("0", 50, 30, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIBBDimensionsWidth->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIBBDimensionsWidth->SetColorText(0, 0, 0); - SXLevelEditor::EditAIBBDimensionsWidth->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIBBDimensionsWidth->SetTransparentTextBk(true); - SXLevelEditor::EditAIBBDimensionsWidth->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIBBDimensionsWidth->GAlign.left = true; - SXLevelEditor::EditAIBBDimensionsWidth->GAlign.top = true; - SXLevelEditor::EditAIBBDimensionsWidth->Visible(false); - SXLevelEditor::EditAIBBDimensionsWidth->AddHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditAIBBDimensionsWidth->AddHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KILLFOCUS); - - SXLevelEditor::StaticAIBBDimensionsHeight = SXGUICrStatic("Height:", 5, 50, 40, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIBBDimensionsHeight->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIBBDimensionsHeight->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIBBDimensionsHeight->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIBBDimensionsHeight->SetTransparentTextBk(true); - SXLevelEditor::StaticAIBBDimensionsHeight->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIBBDimensionsHeight->GAlign.left = true; - SXLevelEditor::StaticAIBBDimensionsHeight->GAlign.top = true; - SXLevelEditor::StaticAIBBDimensionsHeight->Visible(false); - - SXLevelEditor::EditAIBBDimensionsHeight = SXGUICrEdit("0", 50, 50, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIBBDimensionsHeight->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIBBDimensionsHeight->SetColorText(0, 0, 0); - SXLevelEditor::EditAIBBDimensionsHeight->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIBBDimensionsHeight->SetTransparentTextBk(true); - SXLevelEditor::EditAIBBDimensionsHeight->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIBBDimensionsHeight->GAlign.left = true; - SXLevelEditor::EditAIBBDimensionsHeight->GAlign.top = true; - SXLevelEditor::EditAIBBDimensionsHeight->Visible(false); - SXLevelEditor::EditAIBBDimensionsHeight->AddHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditAIBBDimensionsHeight->AddHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KILLFOCUS); - - SXLevelEditor::StaticAIBBDimensionsDepth = SXGUICrStatic("Depth:", 5, 70, 40, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIBBDimensionsDepth->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIBBDimensionsDepth->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIBBDimensionsDepth->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIBBDimensionsDepth->SetTransparentTextBk(true); - SXLevelEditor::StaticAIBBDimensionsDepth->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIBBDimensionsDepth->GAlign.left = true; - SXLevelEditor::StaticAIBBDimensionsDepth->GAlign.top = true; - SXLevelEditor::StaticAIBBDimensionsDepth->Visible(false); - - SXLevelEditor::EditAIBBDimensionsDepth = SXGUICrEdit("0", 50, 70, 70, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIBBDimensionsDepth->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIBBDimensionsDepth->SetColorText(0, 0, 0); - SXLevelEditor::EditAIBBDimensionsDepth->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIBBDimensionsDepth->SetTransparentTextBk(true); - SXLevelEditor::EditAIBBDimensionsDepth->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIBBDimensionsDepth->GAlign.left = true; - SXLevelEditor::EditAIBBDimensionsDepth->GAlign.top = true; - SXLevelEditor::EditAIBBDimensionsDepth->Visible(false); - SXLevelEditor::EditAIBBDimensionsDepth->AddHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditAIBBDimensionsDepth->AddHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KILLFOCUS); - - - SXLevelEditor::StaticAIBBPos = SXGUICrStatic("Bound box position:", 5, 95, 100, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIBBPos->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIBBPos->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIBBPos->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIBBPos->SetTransparentTextBk(true); - SXLevelEditor::StaticAIBBPos->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIBBPos->GAlign.left = true; - SXLevelEditor::StaticAIBBPos->GAlign.top = true; - SXLevelEditor::StaticAIBBPos->Visible(false); - - SXLevelEditor::StaticAIBBPosX = SXGUICrStatic("x:", 5, 115, 10, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIBBPosX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIBBPosX->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIBBPosX->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIBBPosX->SetTransparentTextBk(true); - SXLevelEditor::StaticAIBBPosX->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIBBPosX->GAlign.left = true; - SXLevelEditor::StaticAIBBPosX->GAlign.top = true; - SXLevelEditor::StaticAIBBPosX->Visible(false); - - SXLevelEditor::EditAIBBPosX = SXGUICrEdit("0", 15, 115, 65, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIBBPosX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIBBPosX->SetColorText(0, 0, 0); - SXLevelEditor::EditAIBBPosX->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIBBPosX->SetTransparentTextBk(true); - SXLevelEditor::EditAIBBPosX->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIBBPosX->GAlign.left = true; - SXLevelEditor::EditAIBBPosX->GAlign.top = true; - SXLevelEditor::EditAIBBPosX->Visible(false); - SXLevelEditor::EditAIBBPosX->AddHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditAIBBPosX->AddHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KILLFOCUS); - - SXLevelEditor::StaticAIBBPosY = SXGUICrStatic("y:", 85, 115, 10, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIBBPosY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIBBPosY->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIBBPosY->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIBBPosY->SetTransparentTextBk(true); - SXLevelEditor::StaticAIBBPosY->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIBBPosY->GAlign.left = true; - SXLevelEditor::StaticAIBBPosY->GAlign.top = true; - SXLevelEditor::StaticAIBBPosY->Visible(false); - - SXLevelEditor::EditAIBBPosY = SXGUICrEdit("0", 95, 115, 65, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIBBPosY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIBBPosY->SetColorText(0, 0, 0); - SXLevelEditor::EditAIBBPosY->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIBBPosY->SetTransparentTextBk(true); - SXLevelEditor::EditAIBBPosY->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIBBPosY->GAlign.left = true; - SXLevelEditor::EditAIBBPosY->GAlign.top = true; - SXLevelEditor::EditAIBBPosY->Visible(false); - SXLevelEditor::EditAIBBPosY->AddHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditAIBBPosY->AddHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KILLFOCUS); - - SXLevelEditor::StaticAIBBPosZ = SXGUICrStatic("z:", 165, 115, 10, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIBBPosZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIBBPosZ->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIBBPosZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIBBPosZ->SetTransparentTextBk(true); - SXLevelEditor::StaticAIBBPosZ->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIBBPosZ->GAlign.left = true; - SXLevelEditor::StaticAIBBPosZ->GAlign.top = true; - SXLevelEditor::StaticAIBBPosZ->Visible(false); - - SXLevelEditor::EditAIBBPosZ = SXGUICrEdit("0", 175, 115, 65, 15, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIBBPosZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIBBPosZ->SetColorText(0, 0, 0); - SXLevelEditor::EditAIBBPosZ->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIBBPosZ->SetTransparentTextBk(true); - SXLevelEditor::EditAIBBPosZ->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIBBPosZ->GAlign.left = true; - SXLevelEditor::EditAIBBPosZ->GAlign.top = true; - SXLevelEditor::EditAIBBPosZ->Visible(false); - SXLevelEditor::EditAIBBPosZ->AddHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXLevelEditor::EditAIBBPosZ->AddHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KILLFOCUS); - - SXLevelEditor::ButtonAIBBFinish = SXGUICrButton("Create bound box", 15, 140, 100, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIBBFinish->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIBBFinish->GAlign.left = true; - SXLevelEditor::ButtonAIBBFinish->GAlign.top = true; - SXLevelEditor::ButtonAIBBFinish->Visible(false); - SXLevelEditor::ButtonAIBBFinish->AddHandler(SXLevelEditor_ButtonAIBBFinish_Click, WM_LBUTTONUP); + SXLevelEditor::StatiAIBBDimensions = SXGUICrStatic("Bound box dimensions:", 5, 10, 120, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StatiAIBBDimensions->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StatiAIBBDimensions->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StatiAIBBDimensions->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StatiAIBBDimensions->setTransparentTextBk(true); + SXLevelEditor::StatiAIBBDimensions->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StatiAIBBDimensions->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StatiAIBBDimensions->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StatiAIBBDimensions->setVisible(false); + + SXLevelEditor::StaticAIBBDimensionsWidth = SXGUICrStatic("Width:", 5, 30, 40, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIBBDimensionsWidth->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIBBDimensionsWidth->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIBBDimensionsWidth->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIBBDimensionsWidth->setTransparentTextBk(true); + SXLevelEditor::StaticAIBBDimensionsWidth->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIBBDimensionsWidth->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIBBDimensionsWidth->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIBBDimensionsWidth->setVisible(false); + + SXLevelEditor::EditAIBBDimensionsWidth = SXGUICrEdit("0", 50, 30, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIBBDimensionsWidth->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIBBDimensionsWidth->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIBBDimensionsWidth->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBDimensionsWidth->setTransparentTextBk(true); + SXLevelEditor::EditAIBBDimensionsWidth->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBDimensionsWidth->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIBBDimensionsWidth->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIBBDimensionsWidth->setVisible(false); + SXLevelEditor::EditAIBBDimensionsWidth->addHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditAIBBDimensionsWidth->addHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KILLFOCUS); + + SXLevelEditor::StaticAIBBDimensionsHeight = SXGUICrStatic("Height:", 5, 50, 40, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIBBDimensionsHeight->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIBBDimensionsHeight->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIBBDimensionsHeight->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIBBDimensionsHeight->setTransparentTextBk(true); + SXLevelEditor::StaticAIBBDimensionsHeight->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIBBDimensionsHeight->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIBBDimensionsHeight->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIBBDimensionsHeight->setVisible(false); + + SXLevelEditor::EditAIBBDimensionsHeight = SXGUICrEdit("0", 50, 50, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIBBDimensionsHeight->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIBBDimensionsHeight->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIBBDimensionsHeight->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBDimensionsHeight->setTransparentTextBk(true); + SXLevelEditor::EditAIBBDimensionsHeight->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBDimensionsHeight->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIBBDimensionsHeight->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIBBDimensionsHeight->setVisible(false); + SXLevelEditor::EditAIBBDimensionsHeight->addHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditAIBBDimensionsHeight->addHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KILLFOCUS); + + SXLevelEditor::StaticAIBBDimensionsDepth = SXGUICrStatic("Depth:", 5, 70, 40, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIBBDimensionsDepth->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIBBDimensionsDepth->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIBBDimensionsDepth->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIBBDimensionsDepth->setTransparentTextBk(true); + SXLevelEditor::StaticAIBBDimensionsDepth->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIBBDimensionsDepth->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIBBDimensionsDepth->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIBBDimensionsDepth->setVisible(false); + + SXLevelEditor::EditAIBBDimensionsDepth = SXGUICrEdit("0", 50, 70, 70, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIBBDimensionsDepth->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIBBDimensionsDepth->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIBBDimensionsDepth->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBDimensionsDepth->setTransparentTextBk(true); + SXLevelEditor::EditAIBBDimensionsDepth->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBDimensionsDepth->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIBBDimensionsDepth->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIBBDimensionsDepth->setVisible(false); + SXLevelEditor::EditAIBBDimensionsDepth->addHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditAIBBDimensionsDepth->addHandler(SXLevelEditor_EditAIBBDimensions_Enter, WM_KILLFOCUS); + + + SXLevelEditor::StaticAIBBPos = SXGUICrStatic("Bound box position:", 5, 95, 100, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIBBPos->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIBBPos->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIBBPos->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIBBPos->setTransparentTextBk(true); + SXLevelEditor::StaticAIBBPos->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIBBPos->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIBBPos->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIBBPos->setVisible(false); + + SXLevelEditor::StaticAIBBPosX = SXGUICrStatic("x:", 5, 115, 10, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIBBPosX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIBBPosX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIBBPosX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIBBPosX->setTransparentTextBk(true); + SXLevelEditor::StaticAIBBPosX->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIBBPosX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIBBPosX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIBBPosX->setVisible(false); + + SXLevelEditor::EditAIBBPosX = SXGUICrEdit("0", 15, 115, 65, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIBBPosX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIBBPosX->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIBBPosX->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBPosX->setTransparentTextBk(true); + SXLevelEditor::EditAIBBPosX->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBPosX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIBBPosX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIBBPosX->setVisible(false); + SXLevelEditor::EditAIBBPosX->addHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditAIBBPosX->addHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KILLFOCUS); + + SXLevelEditor::StaticAIBBPosY = SXGUICrStatic("y:", 85, 115, 10, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIBBPosY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIBBPosY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIBBPosY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIBBPosY->setTransparentTextBk(true); + SXLevelEditor::StaticAIBBPosY->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIBBPosY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIBBPosY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIBBPosY->setVisible(false); + + SXLevelEditor::EditAIBBPosY = SXGUICrEdit("0", 95, 115, 65, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIBBPosY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIBBPosY->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIBBPosY->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBPosY->setTransparentTextBk(true); + SXLevelEditor::EditAIBBPosY->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBPosY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIBBPosY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIBBPosY->setVisible(false); + SXLevelEditor::EditAIBBPosY->addHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditAIBBPosY->addHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KILLFOCUS); + + SXLevelEditor::StaticAIBBPosZ = SXGUICrStatic("z:", 165, 115, 10, 15, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIBBPosZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIBBPosZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIBBPosZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIBBPosZ->setTransparentTextBk(true); + SXLevelEditor::StaticAIBBPosZ->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIBBPosZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIBBPosZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIBBPosZ->setVisible(false); + + SXLevelEditor::EditAIBBPosZ = SXGUICrEdit("0", 175, 115, 65, 15, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIBBPosZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIBBPosZ->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIBBPosZ->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBPosZ->setTransparentTextBk(true); + SXLevelEditor::EditAIBBPosZ->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIBBPosZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIBBPosZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIBBPosZ->setVisible(false); + SXLevelEditor::EditAIBBPosZ->addHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXLevelEditor::EditAIBBPosZ->addHandler(SXLevelEditor_EditAIBBPos_Enter, WM_KILLFOCUS); + + SXLevelEditor::ButtonAIBBFinish = SXGUICrButton("Create bound box", 15, 140, 100, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonAIBBFinish->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIBBFinish->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIBBFinish->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIBBFinish->setVisible(false); + SXLevelEditor::ButtonAIBBFinish->addHandler(SXLevelEditor_ButtonAIBBFinish_Click, WM_LBUTTONUP); - SXLevelEditor::RadioButtonAIQuadAdd = SXGUICrRadioButton("AI quad add", 250, 10, 130, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonAIQuadAdd->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonAIQuadAdd->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonAIQuadAdd->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonAIQuadAdd->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonAIQuadAdd->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonAIQuadAdd->GAlign.left = true; - SXLevelEditor::RadioButtonAIQuadAdd->GAlign.top = true; - SXLevelEditor::RadioButtonAIQuadAdd->Visible(false); - - SXLevelEditor::RadioButtonAIQuadsMSel = SXGUICrRadioButton("AI quads multi select", 250, 40, 130, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonAIQuadsMSel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonAIQuadsMSel->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonAIQuadsMSel->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonAIQuadsMSel->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonAIQuadsMSel->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonAIQuadsMSel->GAlign.left = true; - SXLevelEditor::RadioButtonAIQuadsMSel->GAlign.top = true; - SXLevelEditor::RadioButtonAIQuadsMSel->Visible(false); - - SXLevelEditor::RadioButtonAIQuadsSelDel = SXGUICrRadioButton("AI quads select->delete", 250, 70, 130, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonAIQuadsSelDel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonAIQuadsSelDel->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonAIQuadsSelDel->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonAIQuadsSelDel->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonAIQuadsSelDel->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonAIQuadsSelDel->GAlign.left = true; - SXLevelEditor::RadioButtonAIQuadsSelDel->GAlign.top = true; - SXLevelEditor::RadioButtonAIQuadsSelDel->Visible(false); - - SXLevelEditor::ButtonAIQuadsDelSel = SXGUICrButton("AI quads delete selected", 250, 100, 130, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIQuadsDelSel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIQuadsDelSel->GAlign.left = true; - SXLevelEditor::ButtonAIQuadsDelSel->GAlign.top = true; - SXLevelEditor::ButtonAIQuadsDelSel->Visible(false); - SXLevelEditor::ButtonAIQuadsDelSel->AddHandler(SXLevelEditor_ButtonAIQuadsDelSel_Click, WM_LBUTTONUP); - - SXLevelEditor::ButtonAIGridGen = SXGUICrButton("AI grid generation", 250, 130, 130, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIGridGen->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIGridGen->GAlign.left = true; - SXLevelEditor::ButtonAIGridGen->GAlign.top = true; - SXLevelEditor::ButtonAIGridGen->Visible(false); - SXLevelEditor::ButtonAIGridGen->AddHandler(SXLevelEditor_ButtonAIGridGen_Click, WM_LBUTTONUP); - - SXLevelEditor::ButtonAIGridClear = SXGUICrButton("AI grid clear", 250, 160, 130, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIGridClear->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIGridClear->GAlign.left = true; - SXLevelEditor::ButtonAIGridClear->GAlign.top = true; - SXLevelEditor::ButtonAIGridClear->Visible(false); - SXLevelEditor::ButtonAIGridClear->AddHandler(SXLevelEditor_ButtonAIGridClear_Click, WM_LBUTTONUP); + SXLevelEditor::RadioButtonAIQuadAdd = SXGUICrRadioButton("AI quad add", 250, 10, 130, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonAIQuadAdd->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonAIQuadAdd->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonAIQuadAdd->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonAIQuadAdd->setTransparentTextBk(true); + SXLevelEditor::RadioButtonAIQuadAdd->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonAIQuadAdd->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonAIQuadAdd->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonAIQuadAdd->setVisible(false); + + SXLevelEditor::RadioButtonAIQuadsMSel = SXGUICrRadioButton("AI quads multi select", 250, 40, 130, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonAIQuadsMSel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonAIQuadsMSel->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonAIQuadsMSel->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonAIQuadsMSel->setTransparentTextBk(true); + SXLevelEditor::RadioButtonAIQuadsMSel->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonAIQuadsMSel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonAIQuadsMSel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonAIQuadsMSel->setVisible(false); + + SXLevelEditor::RadioButtonAIQuadsSelDel = SXGUICrRadioButton("AI quads select->delete", 250, 70, 130, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonAIQuadsSelDel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonAIQuadsSelDel->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonAIQuadsSelDel->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonAIQuadsSelDel->setTransparentTextBk(true); + SXLevelEditor::RadioButtonAIQuadsSelDel->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonAIQuadsSelDel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonAIQuadsSelDel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonAIQuadsSelDel->setVisible(false); + + SXLevelEditor::ButtonAIQuadsDelSel = SXGUICrButton("AI quads delete selected", 250, 100, 130, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonAIQuadsDelSel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIQuadsDelSel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIQuadsDelSel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIQuadsDelSel->setVisible(false); + SXLevelEditor::ButtonAIQuadsDelSel->addHandler(SXLevelEditor_ButtonAIQuadsDelSel_Click, WM_LBUTTONUP); + + SXLevelEditor::ButtonAIGridGen = SXGUICrButton("AI grid generation", 250, 130, 130, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonAIGridGen->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIGridGen->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIGridGen->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIGridGen->setVisible(false); + SXLevelEditor::ButtonAIGridGen->addHandler(SXLevelEditor_ButtonAIGridGen_Click, WM_LBUTTONUP); + + SXLevelEditor::ButtonAIGridClear = SXGUICrButton("AI grid clear", 250, 160, 130, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonAIGridClear->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIGridClear->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIGridClear->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIGridClear->setVisible(false); + SXLevelEditor::ButtonAIGridClear->addHandler(SXLevelEditor_ButtonAIGridClear_Click, WM_LBUTTONUP); - SXLevelEditor::RadioButtonAIGPAdd = SXGUICrRadioButton("Graph point add", 390, 10, 110, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonAIGPAdd->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonAIGPAdd->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonAIGPAdd->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonAIGPAdd->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonAIGPAdd->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonAIGPAdd->GAlign.left = true; - SXLevelEditor::RadioButtonAIGPAdd->GAlign.top = true; - SXLevelEditor::RadioButtonAIGPAdd->Visible(false); - - SXLevelEditor::RadioButtonAIGPDel = SXGUICrRadioButton("Graph point delete", 390, 40, 110, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::RadioButtonAIGPDel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::RadioButtonAIGPDel->SetColorText(0, 0, 0); - SXLevelEditor::RadioButtonAIGPDel->SetColorTextBk(255, 255, 255); - SXLevelEditor::RadioButtonAIGPDel->SetTransparentTextBk(true); - SXLevelEditor::RadioButtonAIGPDel->SetColorBrush(220, 220, 220); - SXLevelEditor::RadioButtonAIGPDel->GAlign.left = true; - SXLevelEditor::RadioButtonAIGPDel->GAlign.top = true; - SXLevelEditor::RadioButtonAIGPDel->Visible(false); - - SXLevelEditor::ButtonAIGPGen = SXGUICrButton("Graph points generate", 390, 70, 110, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIGPGen->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIGPGen->GAlign.left = true; - SXLevelEditor::ButtonAIGPGen->GAlign.top = true; - SXLevelEditor::ButtonAIGPGen->Visible(false); - SXLevelEditor::ButtonAIGPGen->AddHandler(SXLevelEditor_ButtonAIGPGen_Click, WM_LBUTTONUP); - - SXLevelEditor::ButtonAIGPClear = SXGUICrButton("Graph points clear", 390, 100, 110, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIGPClear->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIGPClear->GAlign.left = true; - SXLevelEditor::ButtonAIGPClear->GAlign.top = true; - SXLevelEditor::ButtonAIGPClear->Visible(false); - SXLevelEditor::ButtonAIGPClear->AddHandler(SXLevelEditor_ButtonAIGPClear_Click, WM_LBUTTONUP); - - - SXLevelEditor::ButtonAIGridValidation = SXGUICrButton("AI grid validation", 510, 10, 100, 20, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIGridValidation->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIGridValidation->GAlign.left = true; - SXLevelEditor::ButtonAIGridValidation->GAlign.top = true; - SXLevelEditor::ButtonAIGridValidation->Visible(false); - SXLevelEditor::ButtonAIGridValidation->AddHandler(SXLevelEditor_ButtonAIGridValidation_Click, WM_LBUTTONUP); - - SXLevelEditor::CheckBoxAIGridMarkedSplits = SXGUICrCheckBox("Marked splits", 510, 40, 100, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0, false); - SXLevelEditor::CheckBoxAIGridMarkedSplits->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::CheckBoxAIGridMarkedSplits->SetColorText(0, 0, 0); - SXLevelEditor::CheckBoxAIGridMarkedSplits->SetColorTextBk(255, 255, 255); - SXLevelEditor::CheckBoxAIGridMarkedSplits->SetTransparentTextBk(true); - SXLevelEditor::CheckBoxAIGridMarkedSplits->SetColorBrush(220, 220, 220); - SXLevelEditor::CheckBoxAIGridMarkedSplits->GAlign.left = true; - SXLevelEditor::CheckBoxAIGridMarkedSplits->GAlign.top = true; - SXLevelEditor::CheckBoxAIGridMarkedSplits->Visible(false); - - SXLevelEditor::StaticAIStatistics = SXGUICrStatic("Statistics:", 620, 10, 100, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIStatistics->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIStatistics->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIStatistics->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIStatistics->SetTransparentTextBk(true); - SXLevelEditor::StaticAIStatistics->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIStatistics->GAlign.left = true; - SXLevelEditor::StaticAIStatistics->GAlign.top = true; - SXLevelEditor::StaticAIStatistics->Visible(false); - - SXLevelEditor::StaticAIStatsCountQuads = SXGUICrStatic("Count quads:", 620, 40, 100, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIStatsCountQuads->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIStatsCountQuads->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIStatsCountQuads->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIStatsCountQuads->SetTransparentTextBk(true); - SXLevelEditor::StaticAIStatsCountQuads->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIStatsCountQuads->GAlign.left = true; - SXLevelEditor::StaticAIStatsCountQuads->GAlign.top = true; - SXLevelEditor::StaticAIStatsCountQuads->Visible(false); - - SXLevelEditor::StaticAIStatsCountGP = SXGUICrStatic("Count graph points:", 620, 70, 100, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIStatsCountGP->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIStatsCountGP->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIStatsCountGP->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIStatsCountGP->SetTransparentTextBk(true); - SXLevelEditor::StaticAIStatsCountGP->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIStatsCountGP->GAlign.left = true; - SXLevelEditor::StaticAIStatsCountGP->GAlign.top = true; - SXLevelEditor::StaticAIStatsCountGP->Visible(false); - - SXLevelEditor::StaticAIStatsCountSplits = SXGUICrStatic("Count splits:", 620, 100, 100, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::StaticAIStatsCountSplits->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::StaticAIStatsCountSplits->SetColorText(0, 0, 0); - SXLevelEditor::StaticAIStatsCountSplits->SetColorTextBk(255, 255, 255); - SXLevelEditor::StaticAIStatsCountSplits->SetTransparentTextBk(true); - SXLevelEditor::StaticAIStatsCountSplits->SetColorBrush(220, 220, 220); - SXLevelEditor::StaticAIStatsCountSplits->GAlign.left = true; - SXLevelEditor::StaticAIStatsCountSplits->GAlign.top = true; - SXLevelEditor::StaticAIStatsCountSplits->Visible(false); - - SXLevelEditor::EditAIStatsCountQuads = SXGUICrEdit("0", 720, 40, 70, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIStatsCountQuads->ReadOnly(true); - SXLevelEditor::EditAIStatsCountQuads->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIStatsCountQuads->SetColorText(0, 0, 0); - SXLevelEditor::EditAIStatsCountQuads->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIStatsCountQuads->SetTransparentTextBk(true); - SXLevelEditor::EditAIStatsCountQuads->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIStatsCountQuads->GAlign.left = true; - SXLevelEditor::EditAIStatsCountQuads->GAlign.top = true; - SXLevelEditor::EditAIStatsCountQuads->Visible(false); - - SXLevelEditor::EditAIStatsCountGP = SXGUICrEdit("0", 720, 70, 70, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIStatsCountGP->ReadOnly(true); - SXLevelEditor::EditAIStatsCountGP->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIStatsCountGP->SetColorText(0, 0, 0); - SXLevelEditor::EditAIStatsCountGP->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIStatsCountGP->SetTransparentTextBk(true); - SXLevelEditor::EditAIStatsCountGP->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIStatsCountGP->GAlign.left = true; - SXLevelEditor::EditAIStatsCountGP->GAlign.top = true; - SXLevelEditor::EditAIStatsCountGP->Visible(false); - - SXLevelEditor::EditAIStatsCountSplits = SXGUICrEdit("0", 720, 100, 70, 20, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::EditAIStatsCountSplits->ReadOnly(true); - SXLevelEditor::EditAIStatsCountSplits->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::EditAIStatsCountSplits->SetColorText(0, 0, 0); - SXLevelEditor::EditAIStatsCountSplits->SetColorTextBk(255, 255, 255); - SXLevelEditor::EditAIStatsCountSplits->SetTransparentTextBk(true); - SXLevelEditor::EditAIStatsCountSplits->SetColorBrush(255, 255, 255); - SXLevelEditor::EditAIStatsCountSplits->GAlign.left = true; - SXLevelEditor::EditAIStatsCountSplits->GAlign.top = true; - SXLevelEditor::EditAIStatsCountSplits->Visible(false); - - SXLevelEditor::ButtonAIClearAll = SXGUICrButton("Clear all", 660, 130, 130, 30, 0, SXLevelEditor::GroupBoxData->GetHWND(), 0, 0); - SXLevelEditor::ButtonAIClearAll->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXLevelEditor::ButtonAIClearAll->GAlign.left = true; - SXLevelEditor::ButtonAIClearAll->GAlign.top = true; - SXLevelEditor::ButtonAIClearAll->Visible(false); - SXLevelEditor::ButtonAIClearAll->AddHandler(SXLevelEditor_ButtonAIClearAll_Click, WM_LBUTTONUP); + SXLevelEditor::RadioButtonAIGPAdd = SXGUICrRadioButton("Graph point add", 390, 10, 110, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonAIGPAdd->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonAIGPAdd->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonAIGPAdd->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonAIGPAdd->setTransparentTextBk(true); + SXLevelEditor::RadioButtonAIGPAdd->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonAIGPAdd->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonAIGPAdd->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonAIGPAdd->setVisible(false); + + SXLevelEditor::RadioButtonAIGPDel = SXGUICrRadioButton("Graph point delete", 390, 40, 110, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::RadioButtonAIGPDel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::RadioButtonAIGPDel->setColorText(RGB(0, 0, 0)); + SXLevelEditor::RadioButtonAIGPDel->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::RadioButtonAIGPDel->setTransparentTextBk(true); + SXLevelEditor::RadioButtonAIGPDel->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::RadioButtonAIGPDel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::RadioButtonAIGPDel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::RadioButtonAIGPDel->setVisible(false); + + SXLevelEditor::ButtonAIGPGen = SXGUICrButton("Graph points generate", 390, 70, 110, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonAIGPGen->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIGPGen->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIGPGen->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIGPGen->setVisible(false); + SXLevelEditor::ButtonAIGPGen->addHandler(SXLevelEditor_ButtonAIGPGen_Click, WM_LBUTTONUP); + + SXLevelEditor::ButtonAIGPClear = SXGUICrButton("Graph points clear", 390, 100, 110, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonAIGPClear->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIGPClear->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIGPClear->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIGPClear->setVisible(false); + SXLevelEditor::ButtonAIGPClear->addHandler(SXLevelEditor_ButtonAIGPClear_Click, WM_LBUTTONUP); + + + SXLevelEditor::ButtonAIGridValidation = SXGUICrButton("AI grid validation", 510, 10, 100, 20, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonAIGridValidation->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIGridValidation->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIGridValidation->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIGridValidation->setVisible(false); + SXLevelEditor::ButtonAIGridValidation->addHandler(SXLevelEditor_ButtonAIGridValidation_Click, WM_LBUTTONUP); + + SXLevelEditor::CheckBoxAIGridMarkedSplits = SXGUICrCheckBox("Marked splits", 510, 40, 100, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0, false); + SXLevelEditor::CheckBoxAIGridMarkedSplits->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::CheckBoxAIGridMarkedSplits->setColorText(RGB(0, 0, 0)); + SXLevelEditor::CheckBoxAIGridMarkedSplits->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::CheckBoxAIGridMarkedSplits->setTransparentTextBk(true); + SXLevelEditor::CheckBoxAIGridMarkedSplits->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::CheckBoxAIGridMarkedSplits->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::CheckBoxAIGridMarkedSplits->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::CheckBoxAIGridMarkedSplits->setVisible(false); + + SXLevelEditor::StaticAIStatistics = SXGUICrStatic("Statistics:", 620, 10, 100, 20, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIStatistics->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIStatistics->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIStatistics->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIStatistics->setTransparentTextBk(true); + SXLevelEditor::StaticAIStatistics->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIStatistics->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIStatistics->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIStatistics->setVisible(false); + + SXLevelEditor::StaticAIStatsCountQuads = SXGUICrStatic("Count quads:", 620, 40, 100, 20, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIStatsCountQuads->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIStatsCountQuads->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIStatsCountQuads->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIStatsCountQuads->setTransparentTextBk(true); + SXLevelEditor::StaticAIStatsCountQuads->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIStatsCountQuads->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIStatsCountQuads->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIStatsCountQuads->setVisible(false); + + SXLevelEditor::StaticAIStatsCountGP = SXGUICrStatic("Count graph points:", 620, 70, 100, 20, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIStatsCountGP->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIStatsCountGP->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIStatsCountGP->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIStatsCountGP->setTransparentTextBk(true); + SXLevelEditor::StaticAIStatsCountGP->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIStatsCountGP->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIStatsCountGP->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIStatsCountGP->setVisible(false); + + SXLevelEditor::StaticAIStatsCountSplits = SXGUICrStatic("Count splits:", 620, 100, 100, 20, SXLevelEditor::GroupBoxData->getHWND(), 0); + SXLevelEditor::StaticAIStatsCountSplits->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::StaticAIStatsCountSplits->setColorText(RGB(0, 0, 0)); + SXLevelEditor::StaticAIStatsCountSplits->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::StaticAIStatsCountSplits->setTransparentTextBk(true); + SXLevelEditor::StaticAIStatsCountSplits->setColorBrush(RGB(220, 220, 220)); + SXLevelEditor::StaticAIStatsCountSplits->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::StaticAIStatsCountSplits->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::StaticAIStatsCountSplits->setVisible(false); + + SXLevelEditor::EditAIStatsCountQuads = SXGUICrEdit("0", 720, 40, 70, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIStatsCountQuads->setReadOnly(true); + SXLevelEditor::EditAIStatsCountQuads->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIStatsCountQuads->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIStatsCountQuads->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIStatsCountQuads->setTransparentTextBk(true); + SXLevelEditor::EditAIStatsCountQuads->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIStatsCountQuads->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIStatsCountQuads->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIStatsCountQuads->setVisible(false); + + SXLevelEditor::EditAIStatsCountGP = SXGUICrEdit("0", 720, 70, 70, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIStatsCountGP->setReadOnly(true); + SXLevelEditor::EditAIStatsCountGP->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIStatsCountGP->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIStatsCountGP->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIStatsCountGP->setTransparentTextBk(true); + SXLevelEditor::EditAIStatsCountGP->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIStatsCountGP->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIStatsCountGP->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIStatsCountGP->setVisible(false); + + SXLevelEditor::EditAIStatsCountSplits = SXGUICrEdit("0", 720, 100, 70, 20, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::EditAIStatsCountSplits->setReadOnly(true); + SXLevelEditor::EditAIStatsCountSplits->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::EditAIStatsCountSplits->setColorText(RGB(0, 0, 0)); + SXLevelEditor::EditAIStatsCountSplits->setColorTextBk(RGB(255, 255, 255)); + SXLevelEditor::EditAIStatsCountSplits->setTransparentTextBk(true); + SXLevelEditor::EditAIStatsCountSplits->setColorBrush(RGB(255, 255, 255)); + SXLevelEditor::EditAIStatsCountSplits->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::EditAIStatsCountSplits->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::EditAIStatsCountSplits->setVisible(false); + + SXLevelEditor::ButtonAIClearAll = SXGUICrButton("Clear all", 660, 130, 130, 30, SXGUI_BUTTON_IMAGE_NONE, SXLevelEditor::GroupBoxData->getHWND(), 0, 0); + SXLevelEditor::ButtonAIClearAll->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXLevelEditor::ButtonAIClearAll->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXLevelEditor::ButtonAIClearAll->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXLevelEditor::ButtonAIClearAll->setVisible(false); + SXLevelEditor::ButtonAIClearAll->addHandler(SXLevelEditor_ButtonAIClearAll_Click, WM_LBUTTONUP); //} } @@ -2006,22 +2031,22 @@ void SXLevelEditor::LevelEditorUpdate(DWORD timeDelta) char text[256]; sprintf(text, "%s%d", "Level poly: ", count_poly_geom + count_poly_green); - SXLevelEditor::StatusBar1->SetTextParts(0, text); + SXLevelEditor::StatusBar1->setPartText(0, text); sprintf(text, "%s%d", "Geom poly: ", count_poly_geom); - SXLevelEditor::StatusBar1->SetTextParts(1, text); + SXLevelEditor::StatusBar1->setPartText(1, text); sprintf(text, "%s%d", "Green poly: ", count_poly_green); - SXLevelEditor::StatusBar1->SetTextParts(2, text); + SXLevelEditor::StatusBar1->setPartText(2, text); sprintf(text, "%s%d", "Count game object: ", SXGame_EntGetCount()); - SXLevelEditor::StatusBar1->SetTextParts(3, text); + SXLevelEditor::StatusBar1->setPartText(3, text); if (SXLevelEditor::IdMtl >= 0) { //sprintf(text, "%s", EDITORS_LEVEL_STATUSBAR_GAME_COUNT, SXGame_EntGetCount()); SML_MtlGetTexture(SXLevelEditor::IdMtl, text); - SXLevelEditor::StatusBar1->SetTextParts(4, text); + SXLevelEditor::StatusBar1->setPartText(4, text); } @@ -2112,7 +2137,7 @@ void SXLevelEditor::LevelEditorUpdate(DWORD timeDelta) SGCore_GetDXDevice()->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); if (SXLevelEditor::AIGQuad) - SAIG_RenderQuads(SRender_GetCamera()->ObjFrustum, &vCamPos, *r_far); + SAIG_RenderQuads(SRender_GetCamera()->getFrustum(), &vCamPos, *r_far); if (SXLevelEditor::AIGGraphPoint) SAIG_RenderGraphPoints(&vCamPos, *r_far); diff --git a/source/sxleveleditor/level_editor.h b/source/sxleveleditor/level_editor.h index 43d27775075ad1485149ace9ff782164cc54914c..05682de07deffa7a27b2279fe5d024a38cb58fbb 100644 --- a/source/sxleveleditor/level_editor.h +++ b/source/sxleveleditor/level_editor.h @@ -30,7 +30,7 @@ namespace SXLevelEditor { extern ISXGUIBaseWnd* JobWindow; - extern ISXGUIMenu* MainMenu; + extern ISXGUIMenuWindow* MainMenu; extern ISXGUIBaseWnd* RenderWindow; extern ISXGUIToolBar* ToolBar1; diff --git a/source/sxleveleditor/model_callback.cpp b/source/sxleveleditor/model_callback.cpp index d366d1db04990adecfb1130ba46b8e892cff068e..b1077a5eed113df7834eed23e6bdef8ecc3aead2 100644 --- a/source/sxleveleditor/model_callback.cpp +++ b/source/sxleveleditor/model_callback.cpp @@ -9,47 +9,47 @@ void SXLevelEditor::GeomActivateAll(bool bf) void SXLevelEditor::GeomActivateCreate(bool bf) { - SXLevelEditor::StaticGeomName->Visible(bf); - SXLevelEditor::StaticGeomModel->Visible(bf); - SXLevelEditor::StaticGeomLod1->Visible(bf); - SXLevelEditor::EditGeomName->Visible(bf); - SXLevelEditor::EditGeomName->SetText(""); - SXLevelEditor::EditGeomModel->Visible(bf); - SXLevelEditor::EditGeomModel->SetText(""); - SXLevelEditor::EditGeomLod1->Visible(bf); - SXLevelEditor::EditGeomLod1->SetText(""); - SXLevelEditor::ButtonGeomLod1->Visible(bf); - SXLevelEditor::ButtonGeomModel->Visible(bf); - SXLevelEditor::ButtonGeomFinish->Visible(bf); + SXLevelEditor::StaticGeomName->setVisible(bf); + SXLevelEditor::StaticGeomModel->setVisible(bf); + SXLevelEditor::StaticGeomLod1->setVisible(bf); + SXLevelEditor::EditGeomName->setVisible(bf); + SXLevelEditor::EditGeomName->setText(""); + SXLevelEditor::EditGeomModel->setVisible(bf); + SXLevelEditor::EditGeomModel->setText(""); + SXLevelEditor::EditGeomLod1->setVisible(bf); + SXLevelEditor::EditGeomLod1->setText(""); + SXLevelEditor::ButtonGeomLod1->setVisible(bf); + SXLevelEditor::ButtonGeomModel->setVisible(bf); + SXLevelEditor::ButtonGeomFinish->setVisible(bf); } void SXLevelEditor::GeomActivateTrans(bool bf) { - SXLevelEditor::StaticGeomPos->Visible(bf); - SXLevelEditor::EditGeomPosX->Visible(bf); - SXLevelEditor::EditGeomPosY->Visible(bf); - SXLevelEditor::EditGeomPosZ->Visible(bf); - SXLevelEditor::RadioButtonGeomPosX->Visible(bf); - SXLevelEditor::RadioButtonGeomPosY->Visible(bf); - SXLevelEditor::RadioButtonGeomPosZ->Visible(bf); - SXLevelEditor::StaticGeomRot->Visible(bf); - SXLevelEditor::EditGeomRotX->Visible(bf); - SXLevelEditor::EditGeomRotY->Visible(bf); - SXLevelEditor::EditGeomRotZ->Visible(bf); - SXLevelEditor::RadioButtonGeomRotX->Visible(bf); - SXLevelEditor::RadioButtonGeomRotY->Visible(bf); - SXLevelEditor::RadioButtonGeomRotZ->Visible(bf); - SXLevelEditor::StaticGeomScale->Visible(bf); - SXLevelEditor::EditGeomScaleX->Visible(bf); - SXLevelEditor::EditGeomScaleY->Visible(bf); - SXLevelEditor::EditGeomScaleZ->Visible(bf); - SXLevelEditor::RadioButtonGeomScaleX->Visible(bf); - SXLevelEditor::RadioButtonGeomScaleY->Visible(bf); - SXLevelEditor::RadioButtonGeomScaleZ->Visible(bf); - - SXLevelEditor::EditGeomModel->Enable(true); - SXLevelEditor::ButtonGeomModel->Enable(true); + SXLevelEditor::StaticGeomPos->setVisible(bf); + SXLevelEditor::EditGeomPosX->setVisible(bf); + SXLevelEditor::EditGeomPosY->setVisible(bf); + SXLevelEditor::EditGeomPosZ->setVisible(bf); + SXLevelEditor::RadioButtonGeomPosX->setVisible(bf); + SXLevelEditor::RadioButtonGeomPosY->setVisible(bf); + SXLevelEditor::RadioButtonGeomPosZ->setVisible(bf); + SXLevelEditor::StaticGeomRot->setVisible(bf); + SXLevelEditor::EditGeomRotX->setVisible(bf); + SXLevelEditor::EditGeomRotY->setVisible(bf); + SXLevelEditor::EditGeomRotZ->setVisible(bf); + SXLevelEditor::RadioButtonGeomRotX->setVisible(bf); + SXLevelEditor::RadioButtonGeomRotY->setVisible(bf); + SXLevelEditor::RadioButtonGeomRotZ->setVisible(bf); + SXLevelEditor::StaticGeomScale->setVisible(bf); + SXLevelEditor::EditGeomScaleX->setVisible(bf); + SXLevelEditor::EditGeomScaleY->setVisible(bf); + SXLevelEditor::EditGeomScaleZ->setVisible(bf); + SXLevelEditor::RadioButtonGeomScaleX->setVisible(bf); + SXLevelEditor::RadioButtonGeomScaleY->setVisible(bf); + SXLevelEditor::RadioButtonGeomScaleZ->setVisible(bf); + + SXLevelEditor::EditGeomModel->setEnable(true); + SXLevelEditor::ButtonGeomModel->setEnable(true); } void SXLevelEditor::GeomSel(int sel) @@ -61,8 +61,8 @@ void SXLevelEditor::GeomSel(int sel) SXLevelEditor::GeomActivateTrans(true); - SXLevelEditor::EditGeomModel->SetText(SGeom_ModelsMGetPathName(sel)); - SXLevelEditor::EditGeomLod1->SetText(SGeom_ModelsMGetLodPath(sel)); + SXLevelEditor::EditGeomModel->setText(SGeom_ModelsMGetPathName(sel)); + SXLevelEditor::EditGeomLod1->setText(SGeom_ModelsMGetLodPath(sel)); char* tmpname = SGeom_ModelsMGetName(sel); float3* pos = SGeom_ModelsMGetPosition(sel); float3* rot = SGeom_ModelsMGetRotation(sel); @@ -78,51 +78,51 @@ void SXLevelEditor::GeomSel(int sel) SXLevelEditor::ObjAxesHelper->SetRotation(*rot); SXLevelEditor::ObjAxesHelper->SetScale(float3(1,1,1)); - SXLevelEditor::EditGeomName->SetText(tmpname); + SXLevelEditor::EditGeomName->setText(tmpname); char tmpval[64]; sprintf(tmpval, "%f", pos->x); - SXLevelEditor::EditGeomPosX->SetText(tmpval); + SXLevelEditor::EditGeomPosX->setText(tmpval); sprintf(tmpval, "%f", pos->y); - SXLevelEditor::EditGeomPosY->SetText(tmpval); + SXLevelEditor::EditGeomPosY->setText(tmpval); sprintf(tmpval, "%f", pos->z); - SXLevelEditor::EditGeomPosZ->SetText(tmpval); + SXLevelEditor::EditGeomPosZ->setText(tmpval); sprintf(tmpval, "%f", rot->x); - SXLevelEditor::EditGeomRotX->SetText(tmpval); + SXLevelEditor::EditGeomRotX->setText(tmpval); sprintf(tmpval, "%f", rot->y); - SXLevelEditor::EditGeomRotY->SetText(tmpval); + SXLevelEditor::EditGeomRotY->setText(tmpval); sprintf(tmpval, "%f", rot->z); - SXLevelEditor::EditGeomRotZ->SetText(tmpval); + SXLevelEditor::EditGeomRotZ->setText(tmpval); sprintf(tmpval, "%f", scale->x); - SXLevelEditor::EditGeomScaleX->SetText(tmpval); + SXLevelEditor::EditGeomScaleX->setText(tmpval); sprintf(tmpval, "%f", scale->y); - SXLevelEditor::EditGeomScaleY->SetText(tmpval); + SXLevelEditor::EditGeomScaleY->setText(tmpval); sprintf(tmpval, "%f", scale->z); - SXLevelEditor::EditGeomScaleZ->SetText(tmpval); + SXLevelEditor::EditGeomScaleZ->setText(tmpval); - SXLevelEditor::EditGeomModel->Enable(false); - SXLevelEditor::ButtonGeomModel->Enable(false); - SXLevelEditor::ButtonGeomFinish->Visible(false); + SXLevelEditor::EditGeomModel->setEnable(false); + SXLevelEditor::ButtonGeomModel->setEnable(false); + SXLevelEditor::ButtonGeomFinish->setVisible(false); } } LRESULT SXLevelEditor_EditGeomName_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GEOM) { - SXLevelEditor::EditGeomName->GetText(SGeom_ModelsMGetName(sel), 64); + SXLevelEditor::EditGeomName->getText(SGeom_ModelsMGetName(sel), 64); } return 0; @@ -133,11 +133,12 @@ LRESULT SXLevelEditor_ButtonGeomModel_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), "dse", "Select model", true, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), SXLevelEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetDSEinfo)) { StrCutMesh(tmppath, tmpname); - SXLevelEditor::EditGeomModel->SetText(tmpname); + SXLevelEditor::EditGeomModel->setText(tmpname); } return 0; } @@ -147,12 +148,13 @@ LRESULT SXLevelEditor_ButtonGeomLod1_Click(HWND hwnd, UINT msg, WPARAM wParam, L char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFileStd(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), FILE_FILTER_MODEL); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), "dse", "Select model", true, Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), SXLevelEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetDSEinfo)) { StrCutMesh(tmppath, tmpname); - SXLevelEditor::EditGeomLod1->SetText(tmpname); - int sel = SXLevelEditor::ListBoxList->GetSel(); + SXLevelEditor::EditGeomLod1->setText(tmpname); + int sel = SXLevelEditor::ListBoxList->getSel(); if (SXLevelEditor::ActiveGroupType == EDITORS_LEVEL_GROUPTYPE_GEOM) { if (sel >= 0 && sel < SGeom_ModelsGetCount()) @@ -172,9 +174,9 @@ LRESULT SXLevelEditor_ButtonGeomFinish_Click(HWND hwnd, UINT msg, WPARAM wParam, char model_name[256]; model_name[0] = 0; - SXLevelEditor::EditGeomName->GetText(model_name, 256); - SXLevelEditor::EditGeomModel->GetText(path_model, 1024); - SXLevelEditor::EditGeomLod1->GetText(path_model_lod, 1024); + SXLevelEditor::EditGeomName->getText(model_name, 256); + SXLevelEditor::EditGeomModel->getText(path_model, 1024); + SXLevelEditor::EditGeomLod1->getText(path_model_lod, 1024); if (!def_str_validate(path_model)) { @@ -183,7 +185,7 @@ LRESULT SXLevelEditor_ButtonGeomFinish_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmppath[1024]; sprintf(tmppath, "%s%s", Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), path_model); - if (!Core_0FileExists(tmppath)) + if (!FileExistsFile(tmppath)) { char tmpstr[2048]; sprintf(tmpstr, "%s%s%s", "Model [", tmppath, "] not found"); @@ -192,7 +194,7 @@ LRESULT SXLevelEditor_ButtonGeomFinish_Click(HWND hwnd, UINT msg, WPARAM wParam, } sprintf(tmppath, "%s%s", Core_RStringGet(G_RI_STRING_PATH_GS_MESHES), path_model_lod); - if (def_str_validate(path_model_lod) && !Core_0FileExists(tmppath)) + if (def_str_validate(path_model_lod) && !FileExistsFile(tmppath)) { char tmpstr[2048]; sprintf(tmpstr, "%s%s%s", "Model/lod [", path_model_lod, "] not found"); @@ -222,14 +224,14 @@ LRESULT SXLevelEditor_ButtonGeomFinish_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmpnamecountpoly[1024]; sprintf(tmpnamecountpoly, "%s | %d", SGeom_ModelsMGetName(SGeom_ModelsGetCount() - 1), SGeom_ModelsMGetCountPoly(SGeom_ModelsGetCount() - 1)); - SXLevelEditor::ListBoxList->AddItem(tmpnamecountpoly); + SXLevelEditor::ListBoxList->addItem(tmpnamecountpoly); SXLevelEditor::GeomActivateTrans(true); - SXLevelEditor::ListBoxList->SetSel(SXLevelEditor::ListBoxList->GetCountItem() - 1); - SXLevelEditor::GeomSel(SXLevelEditor::ListBoxList->GetSel()); + SXLevelEditor::ListBoxList->setSel(SXLevelEditor::ListBoxList->getItemCount() - 1); + SXLevelEditor::GeomSel(SXLevelEditor::ListBoxList->getSel()); SXLevelEditor::ActiveGroupType = EDITORS_LEVEL_GROUPTYPE_GEOM; - SXLevelEditor::ActiveElement = SXLevelEditor::ListBoxList->GetSel(); + SXLevelEditor::ActiveElement = SXLevelEditor::ListBoxList->getSel(); return 0; } @@ -238,22 +240,22 @@ LRESULT SXLevelEditor_EditTransformPos_Enter(HWND hwnd, UINT msg, WPARAM wParam, { if (SXLevelEditor::ActiveGroupType != EDITORS_LEVEL_GROUPTYPE_GEOM) return 0; - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); float3* pos = SGeom_ModelsMGetPosition(sel); char tmpstr[64]; - if (hwnd == SXLevelEditor::EditGeomPosX->GetHWND()) + if (hwnd == SXLevelEditor::EditGeomPosX->getHWND()) { - SXLevelEditor::EditGeomPosX->GetText(tmpstr, 64); + SXLevelEditor::EditGeomPosX->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(pos->x)); } - else if (hwnd == SXLevelEditor::EditGeomPosY->GetHWND()) + else if (hwnd == SXLevelEditor::EditGeomPosY->getHWND()) { - SXLevelEditor::EditGeomPosY->GetText(tmpstr, 64); + SXLevelEditor::EditGeomPosY->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(pos->y)); } - else if (hwnd == SXLevelEditor::EditGeomPosZ->GetHWND()) + else if (hwnd == SXLevelEditor::EditGeomPosZ->getHWND()) { - SXLevelEditor::EditGeomPosZ->GetText(tmpstr, 64); + SXLevelEditor::EditGeomPosZ->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(pos->z)); } @@ -266,22 +268,22 @@ LRESULT SXLevelEditor_EditTransformRot_Enter(HWND hwnd, UINT msg, WPARAM wParam, { if (SXLevelEditor::ActiveGroupType != EDITORS_LEVEL_GROUPTYPE_GEOM) return 0; - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); float3* rot = SGeom_ModelsMGetRotation(sel); char tmpstr[64]; - if (hwnd == SXLevelEditor::EditGeomRotX->GetHWND()) + if (hwnd == SXLevelEditor::EditGeomRotX->getHWND()) { - SXLevelEditor::EditGeomRotX->GetText(tmpstr, 64); + SXLevelEditor::EditGeomRotX->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(rot->x)); } - else if (hwnd == SXLevelEditor::EditGeomRotY->GetHWND()) + else if (hwnd == SXLevelEditor::EditGeomRotY->getHWND()) { - SXLevelEditor::EditGeomRotY->GetText(tmpstr, 64); + SXLevelEditor::EditGeomRotY->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(rot->y)); } - else if (hwnd == SXLevelEditor::EditGeomRotZ->GetHWND()) + else if (hwnd == SXLevelEditor::EditGeomRotZ->getHWND()) { - SXLevelEditor::EditGeomRotZ->GetText(tmpstr, 64); + SXLevelEditor::EditGeomRotZ->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(rot->z)); } @@ -294,22 +296,22 @@ LRESULT SXLevelEditor_EditTransformScale_Enter(HWND hwnd, UINT msg, WPARAM wPara { if (SXLevelEditor::ActiveGroupType != EDITORS_LEVEL_GROUPTYPE_GEOM) return 0; - int sel = SXLevelEditor::ListBoxList->GetSel(); + int sel = SXLevelEditor::ListBoxList->getSel(); float3* scale = SGeom_ModelsMGetScale(sel); char tmpstr[64]; - if (hwnd == SXLevelEditor::EditGeomScaleX->GetHWND()) + if (hwnd == SXLevelEditor::EditGeomScaleX->getHWND()) { - SXLevelEditor::EditGeomScaleX->GetText(tmpstr, 64); + SXLevelEditor::EditGeomScaleX->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(scale->x)); } - else if (hwnd == SXLevelEditor::EditGeomScaleY->GetHWND()) + else if (hwnd == SXLevelEditor::EditGeomScaleY->getHWND()) { - SXLevelEditor::EditGeomScaleY->GetText(tmpstr, 64); + SXLevelEditor::EditGeomScaleY->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(scale->y)); } - else if (hwnd == SXLevelEditor::EditGeomScaleZ->GetHWND()) + else if (hwnd == SXLevelEditor::EditGeomScaleZ->getHWND()) { - SXLevelEditor::EditGeomScaleZ->GetText(tmpstr, 64); + SXLevelEditor::EditGeomScaleZ->getText(tmpstr, 64); sscanf(tmpstr, "%f", &(scale->z)); } diff --git a/source/sxleveleditor/sxleveleditor.cpp b/source/sxleveleditor/sxleveleditor.cpp index a9d6d0f372a054b07a4da09770c32887fa258757..8b5dc29a832ec0d07359aa7fe22a1b9f4ae4be90 100644 --- a/source/sxleveleditor/sxleveleditor.cpp +++ b/source/sxleveleditor/sxleveleditor.cpp @@ -200,47 +200,53 @@ CTRL + ЛКМ – вращение \n //#include <vld.h> #include <skyxengine.h> #include "level_editor.h" +#include <io.h> + int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { SkyXEngine_PreviewCreate(); - SXGUIRegClass::RegGroupBox(); + SXGUIinit(); + SXLevelEditor::InitAllElements(); - SkyXEngine_Init(SXLevelEditor::RenderWindow->GetHWND(), SXLevelEditor::JobWindow->GetHWND()); - SRender_GetCamera()->SetPosition(&float3(0, 0.5, -2)); - SXLevelEditor::MainMenu->InsertPopupItem(4, "Weather", 4, 0); - SXLevelEditor::MainMenu->InsertItem(4, "none", SX_LE_MMENU_WEATHER_BEGIN_ID, 4); - SXLevelEditor::MainMenu->CheckItem(SX_LE_MMENU_WEATHER_BEGIN_ID, true); + SkyXEngine_Init(SXLevelEditor::RenderWindow->getHWND(), SXLevelEditor::JobWindow->getHWND()); + + SkyXEngine_RunGenPreview(); - SXLevelEditor::CheckBoxTBAIGBound->SetCheck(false); + SRender_GetCamera()->setPosition(&float3(0, 0.5, -2)); + SXLevelEditor::MainMenu->insertPopupItem(4, "Weather", 4, 0); + SXLevelEditor::MainMenu->insertItem(4, "none", SX_LE_MMENU_WEATHER_BEGIN_ID, 4); + SXLevelEditor::MainMenu->setCheckItem(SX_LE_MMENU_WEATHER_BEGIN_ID, true); + + SXLevelEditor::CheckBoxTBAIGBound->setCheck(false); SXLevelEditor::AIGBound = false; - SXLevelEditor::CheckBoxTBAIGQuad->SetCheck(true); + SXLevelEditor::CheckBoxTBAIGQuad->setCheck(true); SXLevelEditor::AIGQuad = true; - SXLevelEditor::CheckBoxTBAIGGraphPoint->SetCheck(true); + SXLevelEditor::CheckBoxTBAIGGraphPoint->setCheck(true); SXLevelEditor::AIGGraphPoint = true; - SXLevelEditor::CheckBoxTBGrid->SetCheck(true); - SXLevelEditor::CheckBoxTBAxes->SetCheck(true); - SXLevelEditor::MainMenu->CheckItem(ID_VIEW_GRID, true); - SXLevelEditor::MainMenu->CheckItem(ID_VIEW_AXES, true); + SXLevelEditor::CheckBoxTBGrid->setCheck(true); + SXLevelEditor::CheckBoxTBAxes->setCheck(true); + SXLevelEditor::MainMenu->setCheckItem(ID_VIEW_GRID, true); + SXLevelEditor::MainMenu->setCheckItem(ID_VIEW_AXES, true); - SXLevelEditor::CheckBoxTBRColor->SetCheck(true); - SXLevelEditor::MainMenu->CheckItem(ID_FINALIMAGE_COLOR, true); + SXLevelEditor::CheckBoxTBRColor->setCheck(true); + SXLevelEditor::MainMenu->setCheckItem(ID_FINALIMAGE_COLOR, true); Core_0SetCVarInt("r_final_image", DS_RT_COLOR); - SXLevelEditor::CheckBoxTBSelS->SetCheck(true); + SXLevelEditor::CheckBoxTBSelS->setCheck(true); SXLevelEditor::SelSelection = true; - SXLevelEditor::MainMenu->CheckItem(ID_SELECTIONSETTINGS_SELECTION, true); + SXLevelEditor::MainMenu->setCheckItem(ID_SELECTIONSETTINGS_SELECTION, true); - SXLevelEditor::CheckBoxTBSelCullBack->SetCheck(true); + SXLevelEditor::CheckBoxTBSelCullBack->setCheck(true); SXLevelEditor::SelBackFacesCull = true; - SXLevelEditor::MainMenu->CheckItem(ID_SELECTIONSETTINGS_BACKFACESCULL, true); + SXLevelEditor::MainMenu->setCheckItem(ID_SELECTIONSETTINGS_BACKFACESCULL, true); SXLevelEditor::SelZTest = false; - SXLevelEditor::CheckBoxTBSelMesh->SetCheck(true); + SXLevelEditor::CheckBoxTBSelMesh->setCheck(true); SXLevelEditor::SelMesh = true; - SXLevelEditor::MainMenu->CheckItem(ID_SELECTIONSETTINGS_MESH, true); + SXLevelEditor::MainMenu->setCheckItem(ID_SELECTIONSETTINGS_MESH, true); SRender_EditorSetRenderGrid(true); SRender_EditorSetRenderAxesStatic(true); @@ -257,7 +263,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin hf = FindFirstFile(tpath, &FindFileData); if (hf != INVALID_HANDLE_VALUE){ do{ - SXLevelEditor::MainMenu->InsertItem(4, FindFileData.cFileName, SX_LE_MMENU_WEATHER_BEGIN_ID + SXLevelEditor::MenuWeatherCount, 4); + SXLevelEditor::MainMenu->insertItem(4, FindFileData.cFileName, SX_LE_MMENU_WEATHER_BEGIN_ID + SXLevelEditor::MenuWeatherCount, 4); ++SXLevelEditor::MenuWeatherCount; SXLevelEditor::MenuWeatherArr.push_back(FindFileData.cFileName); } while (FindNextFile(hf, &FindFileData) != 0); @@ -272,13 +278,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin SXGame_EntGetClassList(listgc, countgc); for (int i = 0; i < countgc; ++i) { - SXLevelEditor::ComboBoxGameClass->AddItem(listgc[i]); + SXLevelEditor::ComboBoxGameClass->addItem(listgc[i]); } mem_delete_a(listgc); SkyXEngine_PreviewKill(); - SXLevelEditor::JobWindow->Visible(true); + SXLevelEditor::JobWindow->setVisible(true); + int result = SkyXEngine_CycleMain(); SXLevelEditor::LEdeleteData(); diff --git a/source/sxmaterialeditor/buttons_callback.cpp b/source/sxmaterialeditor/buttons_callback.cpp index 71b23e30947cc4624b1e8de9263b9642052a0bd3..c4fdd8fa0a7e5a2ba0a88adad4763f2ebad68406 100644 --- a/source/sxmaterialeditor/buttons_callback.cpp +++ b/source/sxmaterialeditor/buttons_callback.cpp @@ -6,11 +6,12 @@ LRESULT SXMaterialEditor_ButtonSkyBox_Click(HWND hwnd, UINT msg, WPARAM wParam, char tmppath[1024]; tmppath[0] = 0; char* tmpname = 0; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { tmpname = tmppath + strlen(Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES)); - SXMaterialEditor::EditSkyBox->SetText(tmpname); + SXMaterialEditor::EditSkyBox->setText(tmpname); SGCore_SkyBoxLoadTex(tmpname); } @@ -28,11 +29,12 @@ LRESULT SXMaterialEditor_ButtonTex_Click(HWND hwnd, UINT msg, WPARAM wParam, LPA char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditTex->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditTex->setText(tmpname); SML_MtlSetTexture(SXMaterialEditor::IDMat, tmpname); } @@ -44,11 +46,12 @@ LRESULT SXMaterialEditor_ButtonVS_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), FILE_FILTER_VS); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), FILE_FILTER_VS); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), "vs", "Select vertex shader", true, Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), SXMaterialEditor::JobWindow->getHWND())) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditVS->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditVS->setText(tmpname); SML_MtlSetVS(SXMaterialEditor::IDMat, tmpname); } @@ -60,11 +63,12 @@ LRESULT SXMaterialEditor_ButtonPS_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), FILE_FILTER_PS); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), FILE_FILTER_PS); + + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), "ps", "Select pixel shader", true, Core_RStringGet(G_RI_STRING_PATH_GS_SHADERS), SXMaterialEditor::JobWindow->getHWND())) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditPS->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditPS->setText(tmpname); SML_MtlSetPS(SXMaterialEditor::IDMat, tmpname); } @@ -76,11 +80,11 @@ LRESULT SXMaterialEditor_ButtonTexLighting_Click(HWND hwnd, UINT msg, WPARAM wPa char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditTexLighting->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditTexLighting->setText(tmpname); SML_MtlSetTextureLighting(SXMaterialEditor::IDMat, tmpname); } @@ -92,11 +96,11 @@ LRESULT SXMaterialEditor_ButtonMask_Click(HWND hwnd, UINT msg, WPARAM wParam, LP char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditMask->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditMask->setText(tmpname); SML_MtlSetMaskTex(SXMaterialEditor::IDMat, tmpname); } @@ -108,11 +112,11 @@ LRESULT SXMaterialEditor_ButtonMR_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditMR->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditMR->setText(tmpname); SML_MtlSetMRTex(SXMaterialEditor::IDMat, 0, tmpname); } @@ -124,11 +128,11 @@ LRESULT SXMaterialEditor_ButtonMG_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditMG->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditMG->setText(tmpname); SML_MtlSetMRTex(SXMaterialEditor::IDMat, 1, tmpname); } @@ -140,11 +144,11 @@ LRESULT SXMaterialEditor_ButtonMB_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditMB->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditMB->setText(tmpname); SML_MtlSetMRTex(SXMaterialEditor::IDMat, 2, tmpname); } @@ -156,11 +160,11 @@ LRESULT SXMaterialEditor_ButtonMA_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditMA->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditMA->setText(tmpname); SML_MtlSetMRTex(SXMaterialEditor::IDMat, 3, tmpname); } @@ -173,11 +177,11 @@ LRESULT SXMaterialEditor_ButtonDR_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditDR->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditDR->setText(tmpname); SML_MtlSetDTex(SXMaterialEditor::IDMat, 0, tmpname); } @@ -189,11 +193,11 @@ LRESULT SXMaterialEditor_ButtonDG_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditDG->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditDG->setText(tmpname); SML_MtlSetDTex(SXMaterialEditor::IDMat, 1, tmpname); } @@ -205,11 +209,11 @@ LRESULT SXMaterialEditor_ButtonDB_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditDB->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditDB->setText(tmpname); SML_MtlSetDTex(SXMaterialEditor::IDMat, 2, tmpname); } @@ -221,11 +225,11 @@ LRESULT SXMaterialEditor_ButtonDA_Click(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXMaterialEditor::EditDA->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXMaterialEditor::EditDA->setText(tmpname); SML_MtlSetDTex(SXMaterialEditor::IDMat, 3, tmpname); } diff --git a/source/sxmaterialeditor/common_callback.cpp b/source/sxmaterialeditor/common_callback.cpp index f40d5bfd5586e4d22d8bf6953a169fc90f5ffd08..1caae079c1355ed3bf2c320b6f13243b72239db3 100644 --- a/source/sxmaterialeditor/common_callback.cpp +++ b/source/sxmaterialeditor/common_callback.cpp @@ -14,16 +14,17 @@ void SXMaterialEditor::MtlOpen() char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select textures", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXMaterialEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo); if (def_str_validate(tmppath)) { StrCutName(tmppath, tmpname); SML_MtlReloadMaterial(SRender_SimModelGetIDMtl(), tmpname); - SGCore_LoadTexLoadTextures(); + SGCore_LoadTexAllLoad(); char headertest[1024]; sprintf(headertest, "SXMaterialEditor - %s", tmpname); - SXMaterialEditor::JobWindow->SetText(headertest); + SXMaterialEditor::JobWindow->setText(headertest); SXMaterialEditor::InitMtl(SRender_SimModelGetIDMtl()); } } @@ -60,42 +61,42 @@ LRESULT ComMenuId(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { Core_0SetCVarInt("r_final_image", DS_RT_COLOR); SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(id, !SXMaterialEditor::MainMenu->GetCheckedItem(id)); + SXMaterialEditor::MainMenu->setCheckItem(id, !SXMaterialEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_NORMALS) { Core_0SetCVarInt("r_final_image", DS_RT_NORMAL); SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(id, !SXMaterialEditor::MainMenu->GetCheckedItem(id)); + SXMaterialEditor::MainMenu->setCheckItem(id, !SXMaterialEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_PARAMETERS) { Core_0SetCVarInt("r_final_image", DS_RT_PARAM); SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(id, !SXMaterialEditor::MainMenu->GetCheckedItem(id)); + SXMaterialEditor::MainMenu->setCheckItem(id, !SXMaterialEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_AMBIENTDIFFUSE) { Core_0SetCVarInt("r_final_image", DS_RT_AMBIENTDIFF); SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(id, !SXMaterialEditor::MainMenu->GetCheckedItem(id)); + SXMaterialEditor::MainMenu->setCheckItem(id, !SXMaterialEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_SPECULAR) { Core_0SetCVarInt("r_final_image", DS_RT_SPECULAR); SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(id, !SXMaterialEditor::MainMenu->GetCheckedItem(id)); + SXMaterialEditor::MainMenu->setCheckItem(id, !SXMaterialEditor::MainMenu->getCheckedItem(id)); } // else if (id == ID_FINALIMAGE_LIGHTINGSCENE) { Core_0SetCVarInt("r_final_image", DS_RT_SCENELIGHT); SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(id, !SXMaterialEditor::MainMenu->GetCheckedItem(id)); + SXMaterialEditor::MainMenu->setCheckItem(id, !SXMaterialEditor::MainMenu->getCheckedItem(id)); } @@ -108,65 +109,65 @@ LRESULT SXMaterialEditor_ToolBar_CallWmCommand(HWND hwnd, UINT msg, WPARAM wPara HWND handle_elem = (HWND)(lParam); if (Notification == BN_CLICKED) { - if (SXMaterialEditor::ButtonTBOpen->GetHWND() == handle_elem) + if (SXMaterialEditor::ButtonTBOpen->getHWND() == handle_elem) { SXMaterialEditor::MtlOpen(); } - else if (SXMaterialEditor::ButtonTBSave->GetHWND() == handle_elem) + else if (SXMaterialEditor::ButtonTBSave->getHWND() == handle_elem) { SXMaterialEditor::MtlSave(); } - else if (SXMaterialEditor::CheckBoxTBCam->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxTBCam->getHWND() == handle_elem) { - SRender_EditorCameraSetMove(SXMaterialEditor::CheckBoxTBCam->GetCheck()); + SRender_EditorCameraSetMove(SXMaterialEditor::CheckBoxTBCam->getCheck()); } - else if (SXMaterialEditor::ButtonTBView->GetHWND() == handle_elem) + else if (SXMaterialEditor::ButtonTBView->getHWND() == handle_elem) { - SRender_GetCamera()->SetPosition(&float3(0, 0, -1.2 * 100)); - SRender_GetCamera()->SetOrientation(SMQuaternion(float3(0, 0, 1), 0)); + SRender_GetCamera()->setPosition(&float3(0, 0, -1.2 * 100)); + SRender_GetCamera()->setOrientation(&SMQuaternion(float3(0, 0, 1), 0)); } - else if (SXMaterialEditor::CheckBoxTBRColor->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxTBRColor->getHWND() == handle_elem) { SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_COLOR, true); - SXMaterialEditor::CheckBoxTBRColor->SetCheck(true); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_COLOR, true); + SXMaterialEditor::CheckBoxTBRColor->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_COLOR); } - else if (SXMaterialEditor::CheckBoxTBRNormal->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxTBRNormal->getHWND() == handle_elem) { SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_NORMALS, true); - SXMaterialEditor::CheckBoxTBRNormal->SetCheck(true); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_NORMALS, true); + SXMaterialEditor::CheckBoxTBRNormal->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_NORMAL); } - else if (SXMaterialEditor::CheckBoxTBRParam->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxTBRParam->getHWND() == handle_elem) { SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_PARAMETERS, true); - SXMaterialEditor::CheckBoxTBRParam->SetCheck(true); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_PARAMETERS, true); + SXMaterialEditor::CheckBoxTBRParam->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_PARAM); } - else if (SXMaterialEditor::CheckBoxTBRAmDiff->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxTBRAmDiff->getHWND() == handle_elem) { SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_AMBIENTDIFFUSE, true); - SXMaterialEditor::CheckBoxTBRAmDiff->SetCheck(true); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_AMBIENTDIFFUSE, true); + SXMaterialEditor::CheckBoxTBRAmDiff->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_AMBIENTDIFF); } - else if (SXMaterialEditor::CheckBoxTBRSpecular->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxTBRSpecular->getHWND() == handle_elem) { SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_SPECULAR, true); - SXMaterialEditor::CheckBoxTBRSpecular->SetCheck(true); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_SPECULAR, true); + SXMaterialEditor::CheckBoxTBRSpecular->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_SPECULAR); } - else if (SXMaterialEditor::CheckBoxTBRLighting->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxTBRLighting->getHWND() == handle_elem) { SXMaterialEditor::FinalImageUncheckedMenu(); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_LIGHTINGSCENE, true); - SXMaterialEditor::CheckBoxTBRLighting->SetCheck(true); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_LIGHTINGSCENE, true); + SXMaterialEditor::CheckBoxTBRLighting->setCheck(true); Core_0SetCVarInt("r_final_image", DS_RT_SCENELIGHT); } } @@ -190,161 +191,161 @@ LRESULT SXMaterialEditor_JobWindow_CallWmCommand(HWND hwnd, UINT msg, WPARAM wPa if (Notification == BN_CLICKED) { HWND handle_elem = (HWND)(lParam); - if (SXMaterialEditor::CheckBoxLighting->GetHWND() == handle_elem) + if (SXMaterialEditor::CheckBoxLighting->getHWND() == handle_elem) { - SML_MtlSetLighting(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxLighting->GetCheck()); + SML_MtlSetLighting(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxLighting->getCheck()); } - else if (SXMaterialEditor::CheckBoxTexLighting->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxTexLighting->getHWND() == handle_elem) { - SML_MtlSetIsTextureLighting(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxTexLighting->GetCheck()); + SML_MtlSetIsTextureLighting(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxTexLighting->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSVVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSVVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_VIEW, SXMaterialEditor::CheckBoxDoSVVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_VIEW, SXMaterialEditor::CheckBoxDoSVVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSWVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSWVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLD, SXMaterialEditor::CheckBoxDoSWVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLD, SXMaterialEditor::CheckBoxDoSWVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSWPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSWPS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLD, SXMaterialEditor::CheckBoxDoSWPS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLD, SXMaterialEditor::CheckBoxDoSWPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSVPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSVPS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_VIEW, SXMaterialEditor::CheckBoxDoSVPS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_VIEW, SXMaterialEditor::CheckBoxDoSVPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSPVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSPVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_PROJECTION, SXMaterialEditor::CheckBoxDoSPVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_PROJECTION, SXMaterialEditor::CheckBoxDoSPVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSPPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSPPS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_PROJECTION, SXMaterialEditor::CheckBoxDoSPPS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_PROJECTION, SXMaterialEditor::CheckBoxDoSPPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSWVVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSWVVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLDVIEW, SXMaterialEditor::CheckBoxDoSWVVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLDVIEW, SXMaterialEditor::CheckBoxDoSWVVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSWVPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSWVPS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLDVIEW, SXMaterialEditor::CheckBoxDoSWVPS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLDVIEW, SXMaterialEditor::CheckBoxDoSWVPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSCamposVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSCamposVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_CAMPOS, SXMaterialEditor::CheckBoxDoSCamposVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_CAMPOS, SXMaterialEditor::CheckBoxDoSCamposVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSWVPVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSWVPVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLDVIEWPROJ, SXMaterialEditor::CheckBoxDoSWVPVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLDVIEWPROJ, SXMaterialEditor::CheckBoxDoSWVPVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSWVPPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSWVPPS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLDVIEWPROJ, SXMaterialEditor::CheckBoxDoSWVPPS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_MATRIX_WORLDVIEWPROJ, SXMaterialEditor::CheckBoxDoSWVPPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSCamposPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSCamposPS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_CAMPOS, SXMaterialEditor::CheckBoxDoSCamposPS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_CAMPOS, SXMaterialEditor::CheckBoxDoSCamposPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxUDVSInPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxUDVSInPS->getHWND() == handle_elem) { - SML_MtlSetUDVS_InPS(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxUDVSInPS->GetCheck()); + SML_MtlSetUDVS_InPS(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxUDVSInPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSTimeDeltaVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSTimeDeltaVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_TIMEDELTA, SXMaterialEditor::CheckBoxDoSTimeDeltaVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_TIMEDELTA, SXMaterialEditor::CheckBoxDoSTimeDeltaVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSTimeDeltaPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSTimeDeltaPS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_TIMEDELTA, SXMaterialEditor::CheckBoxDoSTimeDeltaPS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_TIMEDELTA, SXMaterialEditor::CheckBoxDoSTimeDeltaPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSWinSizeVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSWinSizeVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_WINSIZE, SXMaterialEditor::CheckBoxDoSWinSizeVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_WINSIZE, SXMaterialEditor::CheckBoxDoSWinSizeVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxDoSWinSizePS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxDoSWinSizePS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_WINSIZE, SXMaterialEditor::CheckBoxDoSWinSizePS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_WINSIZE, SXMaterialEditor::CheckBoxDoSWinSizePS->getCheck()); } - else if (SXMaterialEditor::CheckBoxUDPSInVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxUDPSInVS->getHWND() == handle_elem) { - SML_MtlSetUDPS_InVS(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxUDPSInVS->GetCheck()); + SML_MtlSetUDPS_InVS(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxUDPSInVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxUDVS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxUDVS->getHWND() == handle_elem) { - SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_USERDATA, SXMaterialEditor::CheckBoxUDVS->GetCheck()); + SML_MtlSetSTDVS(SXMaterialEditor::IDMat, MTL_SHADERSTD_USERDATA, SXMaterialEditor::CheckBoxUDVS->getCheck()); } - else if (SXMaterialEditor::CheckBoxUDPS->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxUDPS->getHWND() == handle_elem) { - SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_USERDATA, SXMaterialEditor::CheckBoxUDPS->GetCheck()); + SML_MtlSetSTDPS(SXMaterialEditor::IDMat, MTL_SHADERSTD_USERDATA, SXMaterialEditor::CheckBoxUDPS->getCheck()); } - else if (SXMaterialEditor::CheckBoxAlphaTest->GetHWND() == handle_elem) + else if (SXMaterialEditor::CheckBoxAlphaTest->getHWND() == handle_elem) { - SML_MtlSetUsingAlphaTest(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxAlphaTest->GetCheck()); + SML_MtlSetUsingAlphaTest(SXMaterialEditor::IDMat, SXMaterialEditor::CheckBoxAlphaTest->getCheck()); } } else if (Notification == CBN_SELCHANGE) { HWND handle_elem = (HWND)(lParam); - if (SXMaterialEditor::ComboBoxTypeModel->GetHWND() == handle_elem) + if (SXMaterialEditor::ComboBoxTypeModel->getHWND() == handle_elem) { - SRender_SimModelSetType((MTLTYPE_MODEL)SXMaterialEditor::ComboBoxTypeModel->GetSel()); - SML_MtlSetTypeModel(SRender_SimModelGetIDMtl(), (MTLTYPE_MODEL)SXMaterialEditor::ComboBoxTypeModel->GetSel()); + SRender_SimModelSetType((MTLTYPE_MODEL)SXMaterialEditor::ComboBoxTypeModel->getSel()); + SML_MtlSetTypeModel(SRender_SimModelGetIDMtl(), (MTLTYPE_MODEL)SXMaterialEditor::ComboBoxTypeModel->getSel()); } - else if (SXMaterialEditor::ComboBoxTestModel->GetHWND() == handle_elem) + else if (SXMaterialEditor::ComboBoxTestModel->getHWND() == handle_elem) { - SRender_SimModelSetNumCurrModel(SXMaterialEditor::ComboBoxTestModel->GetSel()); + SRender_SimModelSetNumCurrModel(SXMaterialEditor::ComboBoxTestModel->getSel()); } - else if (SXMaterialEditor::ComboBoxTypeRefract->GetHWND() == handle_elem) + else if (SXMaterialEditor::ComboBoxTypeRefract->getHWND() == handle_elem) { - SML_MtlSetTypeTransparency(SXMaterialEditor::IDMat, (MTLTYPE_TRANSPARENCY)SXMaterialEditor::ComboBoxTypeRefract->GetSel()); + SML_MtlSetTypeTransparency(SXMaterialEditor::IDMat, (MTLTYPE_TRANSPARENCY)SXMaterialEditor::ComboBoxTypeRefract->getSel()); } - else if (SXMaterialEditor::ComboBoxTypeReflect->GetHWND() == handle_elem) + else if (SXMaterialEditor::ComboBoxTypeReflect->getHWND() == handle_elem) { - SML_MtlSetTypeReflection(SXMaterialEditor::IDMat, (MTLTYPE_REFLECT)SXMaterialEditor::ComboBoxTypeReflect->GetSel()); + SML_MtlSetTypeReflection(SXMaterialEditor::IDMat, (MTLTYPE_REFLECT)SXMaterialEditor::ComboBoxTypeReflect->getSel()); } - else if (SXMaterialEditor::ComboBoxPhysic->GetHWND() == handle_elem) + else if (SXMaterialEditor::ComboBoxPhysic->getHWND() == handle_elem) { - SML_MtlSetPhysicMaterial(SXMaterialEditor::IDMat, (MTLTYPE_PHYSIC)SXMaterialEditor::ComboBoxPhysic->GetSel()); + SML_MtlSetPhysicMaterial(SXMaterialEditor::IDMat, (MTLTYPE_PHYSIC)SXMaterialEditor::ComboBoxPhysic->getSel()); } - else if (SXMaterialEditor::ComboBoxShaders->GetHWND() == handle_elem) + else if (SXMaterialEditor::ComboBoxShaders->getHWND() == handle_elem) { - int sel = SXMaterialEditor::ComboBoxShaders->GetSel(); + int sel = SXMaterialEditor::ComboBoxShaders->getSel(); if (sel > 0) { sel -= 1; SML_MtlSetVS(SXMaterialEditor::IDMat, SXMaterialEditor::Shaders->GetVS(sel)); - SXMaterialEditor::EditVS->SetText(SXMaterialEditor::Shaders->GetVS(sel)); + SXMaterialEditor::EditVS->setText(SXMaterialEditor::Shaders->GetVS(sel)); SML_MtlSetPS(SXMaterialEditor::IDMat, SXMaterialEditor::Shaders->GetPS(sel)); - SXMaterialEditor::EditPS->SetText(SXMaterialEditor::Shaders->GetPS(sel)); + SXMaterialEditor::EditPS->setText(SXMaterialEditor::Shaders->GetPS(sel)); } } - else if (SXMaterialEditor::ComboBoxParamL->GetHWND() == handle_elem) + else if (SXMaterialEditor::ComboBoxParamL->getHWND() == handle_elem) { - int sel = SXMaterialEditor::ComboBoxParamL->GetSel(); + int sel = SXMaterialEditor::ComboBoxParamL->getSel(); if (sel > 0) { sel -= 1; SML_MtlSetThickness(SXMaterialEditor::IDMat, SXMaterialEditor::ParamL->GetThickness(sel)); - SXMaterialEditor::EditThickness->SetText(String(SXMaterialEditor::ParamL->GetThickness(sel)).c_str()); - SXMaterialEditor::TrackBarThickness->SetPos(SXMaterialEditor::ParamL->GetThickness(sel)*100); + SXMaterialEditor::EditThickness->setText(String(SXMaterialEditor::ParamL->GetThickness(sel)).c_str()); + SXMaterialEditor::TrackBarThickness->setPos(SXMaterialEditor::ParamL->GetThickness(sel)*100); SML_MtlSetRoughness(SXMaterialEditor::IDMat, SXMaterialEditor::ParamL->GetRoughness(sel)); - SXMaterialEditor::EditRoughness->SetText(String(SXMaterialEditor::ParamL->GetRoughness(sel)).c_str()); - SXMaterialEditor::TrackBarRoughness->SetPos(SXMaterialEditor::ParamL->GetRoughness(sel) * 100); + SXMaterialEditor::EditRoughness->setText(String(SXMaterialEditor::ParamL->GetRoughness(sel)).c_str()); + SXMaterialEditor::TrackBarRoughness->setPos(SXMaterialEditor::ParamL->GetRoughness(sel) * 100); SML_MtlSetF0(SXMaterialEditor::IDMat, SXMaterialEditor::ParamL->GetF0(sel)); - SXMaterialEditor::EditF0->SetText(String(SXMaterialEditor::ParamL->GetF0(sel)).c_str()); - SXMaterialEditor::TrackBarF0->SetPos(SXMaterialEditor::ParamL->GetF0(sel) * 100); + SXMaterialEditor::EditF0->setText(String(SXMaterialEditor::ParamL->GetF0(sel)).c_str()); + SXMaterialEditor::TrackBarF0->setPos(SXMaterialEditor::ParamL->GetF0(sel) * 100); } } } @@ -358,225 +359,225 @@ void SXMaterialEditor::Nulling() SXMaterialEditor::ComboBoxTypeModel; SXMaterialEditor::ComboBoxTestModel; - SXMaterialEditor::ComboBoxPhysic->SetSel(0); + SXMaterialEditor::ComboBoxPhysic->setSel(0); - SXMaterialEditor::EditTex->SetText(""); - SXMaterialEditor::EditVS->SetText(""); - SXMaterialEditor::EditPS->SetText(""); + SXMaterialEditor::EditTex->setText(""); + SXMaterialEditor::EditVS->setText(""); + SXMaterialEditor::EditPS->setText(""); - SXMaterialEditor::CheckBoxAlphaTest->SetCheck(false); - SXMaterialEditor::EditRoughness->SetText("0"); - SXMaterialEditor::EditThickness->SetText("1"); - SXMaterialEditor::EditF0->SetText("0"); - SXMaterialEditor::EditMR->SetText(""); - SXMaterialEditor::CheckBoxLighting->SetCheck(true); - SXMaterialEditor::TrackBarRoughness->SetPos(0); - SXMaterialEditor::TrackBarThickness->SetPos(100); - SXMaterialEditor::TrackBarF0->SetPos(0); - SXMaterialEditor::TrackBarUDVSX->SetPos(0); - SXMaterialEditor::EditTexLighting->SetText(""); - SXMaterialEditor::CheckBoxTexLighting->SetCheck(false); - SXMaterialEditor::ComboBoxTypeRefract->SetSel(0); - SXMaterialEditor::CheckBoxDoSVVS->SetCheck(false); - SXMaterialEditor::ComboBoxTypeReflect->SetSel(0); - SXMaterialEditor::ComboBoxPhysic->SetSel(0); - SXMaterialEditor::EditMask->SetText(""); - SXMaterialEditor::EditMG->SetText(""); - SXMaterialEditor::EditMB->SetText(""); - SXMaterialEditor::EditMA->SetText(""); - SXMaterialEditor::EditDR->SetText(""); - SXMaterialEditor::EditDG->SetText(""); - SXMaterialEditor::EditDB->SetText(""); - SXMaterialEditor::EditDA->SetText(""); - - SXMaterialEditor::CheckBoxDoSWVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSWPS->SetCheck(false); - - SXMaterialEditor::CheckBoxDoSVVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSVPS->SetCheck(false); - - SXMaterialEditor::CheckBoxDoSPVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSPPS->SetCheck(false); - - SXMaterialEditor::CheckBoxDoSWVVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSWVPS->SetCheck(false); - - SXMaterialEditor::CheckBoxDoSCamposVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSCamposPS->SetCheck(false); - - SXMaterialEditor::CheckBoxDoSTimeDeltaVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSTimeDeltaPS->SetCheck(false); - - SXMaterialEditor::CheckBoxDoSWVPVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSWVPPS->SetCheck(false); - - SXMaterialEditor::CheckBoxDoSWinSizeVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSWinSizePS->SetCheck(false); - - - SXMaterialEditor::CheckBoxUDVS->SetCheck(false); - SXMaterialEditor::CheckBoxUDPS->SetCheck(false); - - SXMaterialEditor::CheckBoxUDVSInPS->SetCheck(false); - - SXMaterialEditor::EditUDVSX->SetText("0"); - SXMaterialEditor::EditUDVSY->SetText("0"); - SXMaterialEditor::TrackBarUDVSY->SetPos(0); - SXMaterialEditor::EditUDVSZ->SetText("0"); - SXMaterialEditor::TrackBarUDVSZ->SetPos(0); - SXMaterialEditor::EditUDVSW->SetText("0"); - SXMaterialEditor::TrackBarUDVSW->SetPos(0); - SXMaterialEditor::CheckBoxDoSTimeDeltaVS->SetCheck(false); - SXMaterialEditor::CheckBoxDoSTimeDeltaPS->SetCheck(false); - SXMaterialEditor::CheckBoxUDPSInVS->SetCheck(false); - SXMaterialEditor::EditUDPSX->SetText("0"); - SXMaterialEditor::EditUDPSY->SetText("0"); - SXMaterialEditor::TrackBarUDPSX->SetPos(0); - SXMaterialEditor::TrackBarUDPSY->SetPos(0); - SXMaterialEditor::EditUDPSZ->SetText("0"); - SXMaterialEditor::TrackBarUDPSZ->SetPos(0); - SXMaterialEditor::EditUDPSW->SetText("0"); - SXMaterialEditor::TrackBarUDPSW->SetPos(0); - - SXMaterialEditor::CheckBoxUDPSInVS->SetCheck(false); - SXMaterialEditor::CheckBoxUDVSInPS->SetCheck(false); + SXMaterialEditor::CheckBoxAlphaTest->setCheck(false); + SXMaterialEditor::EditRoughness->setText("0"); + SXMaterialEditor::EditThickness->setText("1"); + SXMaterialEditor::EditF0->setText("0"); + SXMaterialEditor::EditMR->setText(""); + SXMaterialEditor::CheckBoxLighting->setCheck(true); + SXMaterialEditor::TrackBarRoughness->setPos(0); + SXMaterialEditor::TrackBarThickness->setPos(100); + SXMaterialEditor::TrackBarF0->setPos(0); + SXMaterialEditor::TrackBarUDVSX->setPos(0); + SXMaterialEditor::EditTexLighting->setText(""); + SXMaterialEditor::CheckBoxTexLighting->setCheck(false); + SXMaterialEditor::ComboBoxTypeRefract->setSel(0); + SXMaterialEditor::CheckBoxDoSVVS->setCheck(false); + SXMaterialEditor::ComboBoxTypeReflect->setSel(0); + SXMaterialEditor::ComboBoxPhysic->setSel(0); + SXMaterialEditor::EditMask->setText(""); + SXMaterialEditor::EditMG->setText(""); + SXMaterialEditor::EditMB->setText(""); + SXMaterialEditor::EditMA->setText(""); + SXMaterialEditor::EditDR->setText(""); + SXMaterialEditor::EditDG->setText(""); + SXMaterialEditor::EditDB->setText(""); + SXMaterialEditor::EditDA->setText(""); + + SXMaterialEditor::CheckBoxDoSWVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSWPS->setCheck(false); + + SXMaterialEditor::CheckBoxDoSVVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSVPS->setCheck(false); + + SXMaterialEditor::CheckBoxDoSPVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSPPS->setCheck(false); + + SXMaterialEditor::CheckBoxDoSWVVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSWVPS->setCheck(false); + + SXMaterialEditor::CheckBoxDoSCamposVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSCamposPS->setCheck(false); + + SXMaterialEditor::CheckBoxDoSTimeDeltaVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSTimeDeltaPS->setCheck(false); + + SXMaterialEditor::CheckBoxDoSWVPVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSWVPPS->setCheck(false); + + SXMaterialEditor::CheckBoxDoSWinSizeVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSWinSizePS->setCheck(false); + + + SXMaterialEditor::CheckBoxUDVS->setCheck(false); + SXMaterialEditor::CheckBoxUDPS->setCheck(false); + + SXMaterialEditor::CheckBoxUDVSInPS->setCheck(false); + + SXMaterialEditor::EditUDVSX->setText("0"); + SXMaterialEditor::EditUDVSY->setText("0"); + SXMaterialEditor::TrackBarUDVSY->setPos(0); + SXMaterialEditor::EditUDVSZ->setText("0"); + SXMaterialEditor::TrackBarUDVSZ->setPos(0); + SXMaterialEditor::EditUDVSW->setText("0"); + SXMaterialEditor::TrackBarUDVSW->setPos(0); + SXMaterialEditor::CheckBoxDoSTimeDeltaVS->setCheck(false); + SXMaterialEditor::CheckBoxDoSTimeDeltaPS->setCheck(false); + SXMaterialEditor::CheckBoxUDPSInVS->setCheck(false); + SXMaterialEditor::EditUDPSX->setText("0"); + SXMaterialEditor::EditUDPSY->setText("0"); + SXMaterialEditor::TrackBarUDPSX->setPos(0); + SXMaterialEditor::TrackBarUDPSY->setPos(0); + SXMaterialEditor::EditUDPSZ->setText("0"); + SXMaterialEditor::TrackBarUDPSZ->setPos(0); + SXMaterialEditor::EditUDPSW->setText("0"); + SXMaterialEditor::TrackBarUDPSW->setPos(0); + + SXMaterialEditor::CheckBoxUDPSInVS->setCheck(false); + SXMaterialEditor::CheckBoxUDVSInPS->setCheck(false); } void SXMaterialEditor::InitMtl(ID id) { SRender_SimModelSetType(SML_MtlGetTypeModel(id)); - SXMaterialEditor::ComboBoxTypeModel->SetSel(SML_MtlGetTypeModel(id)); + SXMaterialEditor::ComboBoxTypeModel->setSel(SML_MtlGetTypeModel(id)); SXMaterialEditor::ComboBoxTestModel; - SXMaterialEditor::ComboBoxPhysic->SetSel(SML_MtlGetPhysicMaterial(SRender_SimModelGetIDMtl())); + SXMaterialEditor::ComboBoxPhysic->setSel(SML_MtlGetPhysicMaterial(SRender_SimModelGetIDMtl())); char tmppath[1024]; SML_MtlGetTexture(SRender_SimModelGetIDMtl(), tmppath); - SXMaterialEditor::EditTex->SetText(tmppath); + SXMaterialEditor::EditTex->setText(tmppath); SML_MtlGetVS(SRender_SimModelGetIDMtl(), tmppath); - SXMaterialEditor::EditVS->SetText(tmppath); + SXMaterialEditor::EditVS->setText(tmppath); SML_MtlGetPS(SRender_SimModelGetIDMtl(), tmppath); - SXMaterialEditor::EditPS->SetText(tmppath); + SXMaterialEditor::EditPS->setText(tmppath); - SXMaterialEditor::CheckBoxAlphaTest->SetCheck(SML_MtlGetUsingAlphaTest(SRender_SimModelGetIDMtl())); + SXMaterialEditor::CheckBoxAlphaTest->setCheck(SML_MtlGetUsingAlphaTest(SRender_SimModelGetIDMtl())); - SXMaterialEditor::EditRoughness->SetText(String(SML_MtlGetRoughness(SRender_SimModelGetIDMtl())).c_str()); - SXMaterialEditor::EditThickness->SetText(String(SML_MtlGetThickness(SRender_SimModelGetIDMtl())).c_str()); - SXMaterialEditor::EditF0->SetText(String(SML_MtlGetF0(SRender_SimModelGetIDMtl())).c_str()); - SXMaterialEditor::EditPenetration->SetText(String(SML_MtlGetPenetration(SRender_SimModelGetIDMtl())).c_str()); + SXMaterialEditor::EditRoughness->setText(String(SML_MtlGetRoughness(SRender_SimModelGetIDMtl())).c_str()); + SXMaterialEditor::EditThickness->setText(String(SML_MtlGetThickness(SRender_SimModelGetIDMtl())).c_str()); + SXMaterialEditor::EditF0->setText(String(SML_MtlGetF0(SRender_SimModelGetIDMtl())).c_str()); + SXMaterialEditor::EditPenetration->setText(String(SML_MtlGetPenetration(SRender_SimModelGetIDMtl())).c_str()); - SXMaterialEditor::CheckBoxLighting->SetCheck(SML_MtlGetLighting(SRender_SimModelGetIDMtl())); + SXMaterialEditor::CheckBoxLighting->setCheck(SML_MtlGetLighting(SRender_SimModelGetIDMtl())); - SXMaterialEditor::TrackBarRoughness->SetPos(SML_MtlGetRoughness(SRender_SimModelGetIDMtl())*100.f); - SXMaterialEditor::TrackBarThickness->SetPos(SML_MtlGetThickness(SRender_SimModelGetIDMtl())*100.f); - SXMaterialEditor::TrackBarF0->SetPos(SML_MtlGetF0(SRender_SimModelGetIDMtl()) * 100.f); - SXMaterialEditor::TrackBarPenetration->SetPos(SML_MtlGetPenetration(SRender_SimModelGetIDMtl()) * 100.f); + SXMaterialEditor::TrackBarRoughness->setPos(SML_MtlGetRoughness(SRender_SimModelGetIDMtl())*100.f); + SXMaterialEditor::TrackBarThickness->setPos(SML_MtlGetThickness(SRender_SimModelGetIDMtl())*100.f); + SXMaterialEditor::TrackBarF0->setPos(SML_MtlGetF0(SRender_SimModelGetIDMtl()) * 100.f); + SXMaterialEditor::TrackBarPenetration->setPos(SML_MtlGetPenetration(SRender_SimModelGetIDMtl()) * 100.f); SML_MtlGetTextureLighting(SRender_SimModelGetIDMtl(), tmppath); - SXMaterialEditor::EditTexLighting->SetText(tmppath); - SXMaterialEditor::CheckBoxTexLighting->SetCheck(SML_MtlGetIsTextureLighting(SRender_SimModelGetIDMtl())); + SXMaterialEditor::EditTexLighting->setText(tmppath); + SXMaterialEditor::CheckBoxTexLighting->setCheck(SML_MtlGetIsTextureLighting(SRender_SimModelGetIDMtl())); - SXMaterialEditor::ComboBoxTypeRefract->SetSel(SML_MtlGetTypeTransparency(SRender_SimModelGetIDMtl())); - SXMaterialEditor::ComboBoxTypeReflect->SetSel(SML_MtlGetTypeReflection(SRender_SimModelGetIDMtl())); + SXMaterialEditor::ComboBoxTypeRefract->setSel(SML_MtlGetTypeTransparency(SRender_SimModelGetIDMtl())); + SXMaterialEditor::ComboBoxTypeReflect->setSel(SML_MtlGetTypeReflection(SRender_SimModelGetIDMtl())); - SXMaterialEditor::ComboBoxPhysic->SetSel(0); + SXMaterialEditor::ComboBoxPhysic->setSel(0); SML_MtlGetMaskTex(SRender_SimModelGetIDMtl(), tmppath); - SXMaterialEditor::EditMask->SetText(tmppath); + SXMaterialEditor::EditMask->setText(tmppath); SML_MtlGetMRTex(SRender_SimModelGetIDMtl(), 0, tmppath); - SXMaterialEditor::EditMR->SetText(tmppath); + SXMaterialEditor::EditMR->setText(tmppath); SML_MtlGetMRTex(SRender_SimModelGetIDMtl(), 1, tmppath); - SXMaterialEditor::EditMG->SetText(tmppath); + SXMaterialEditor::EditMG->setText(tmppath); SML_MtlGetMRTex(SRender_SimModelGetIDMtl(), 2, tmppath); - SXMaterialEditor::EditMB->SetText(tmppath); + SXMaterialEditor::EditMB->setText(tmppath); SML_MtlGetMRTex(SRender_SimModelGetIDMtl(), 3, tmppath); - SXMaterialEditor::EditMA->SetText(tmppath); + SXMaterialEditor::EditMA->setText(tmppath); SML_MtlGetDTex(SRender_SimModelGetIDMtl(), 0, tmppath); - SXMaterialEditor::EditDR->SetText(tmppath); + SXMaterialEditor::EditDR->setText(tmppath); SML_MtlGetDTex(SRender_SimModelGetIDMtl(), 1, tmppath); - SXMaterialEditor::EditDG->SetText(tmppath); + SXMaterialEditor::EditDG->setText(tmppath); SML_MtlGetDTex(SRender_SimModelGetIDMtl(), 2, tmppath); - SXMaterialEditor::EditDB->SetText(tmppath); + SXMaterialEditor::EditDB->setText(tmppath); SML_MtlGetDTex(SRender_SimModelGetIDMtl(), 3, tmppath); - SXMaterialEditor::EditDA->SetText(tmppath); + SXMaterialEditor::EditDA->setText(tmppath); - SXMaterialEditor::CheckBoxDoSWVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLD)); - SXMaterialEditor::CheckBoxDoSWPS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLD)); + SXMaterialEditor::CheckBoxDoSWVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLD)); + SXMaterialEditor::CheckBoxDoSWPS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLD)); - SXMaterialEditor::CheckBoxDoSVVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_VIEW)); - SXMaterialEditor::CheckBoxDoSVPS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_VIEW)); + SXMaterialEditor::CheckBoxDoSVVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_VIEW)); + SXMaterialEditor::CheckBoxDoSVPS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_VIEW)); - SXMaterialEditor::CheckBoxDoSPVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_PROJECTION)); - SXMaterialEditor::CheckBoxDoSPPS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_PROJECTION)); + SXMaterialEditor::CheckBoxDoSPVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_PROJECTION)); + SXMaterialEditor::CheckBoxDoSPPS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_PROJECTION)); - SXMaterialEditor::CheckBoxDoSWVVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLDVIEW)); - SXMaterialEditor::CheckBoxDoSWVPS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLDVIEW)); + SXMaterialEditor::CheckBoxDoSWVVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLDVIEW)); + SXMaterialEditor::CheckBoxDoSWVPS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLDVIEW)); - SXMaterialEditor::CheckBoxDoSCamposVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_CAMPOS)); - SXMaterialEditor::CheckBoxDoSCamposPS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_CAMPOS)); + SXMaterialEditor::CheckBoxDoSCamposVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_CAMPOS)); + SXMaterialEditor::CheckBoxDoSCamposPS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_CAMPOS)); - SXMaterialEditor::CheckBoxDoSTimeDeltaVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_TIMEDELTA)); - SXMaterialEditor::CheckBoxDoSTimeDeltaPS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_TIMEDELTA)); + SXMaterialEditor::CheckBoxDoSTimeDeltaVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_TIMEDELTA)); + SXMaterialEditor::CheckBoxDoSTimeDeltaPS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_TIMEDELTA)); - SXMaterialEditor::CheckBoxDoSWVPVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLDVIEWPROJ)); - SXMaterialEditor::CheckBoxDoSWVPPS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLDVIEWPROJ)); + SXMaterialEditor::CheckBoxDoSWVPVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLDVIEWPROJ)); + SXMaterialEditor::CheckBoxDoSWVPPS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_MATRIX_WORLDVIEWPROJ)); - SXMaterialEditor::CheckBoxDoSWinSizeVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_WINSIZE)); - SXMaterialEditor::CheckBoxDoSWinSizePS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_WINSIZE)); + SXMaterialEditor::CheckBoxDoSWinSizeVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_WINSIZE)); + SXMaterialEditor::CheckBoxDoSWinSizePS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_WINSIZE)); - SXMaterialEditor::CheckBoxUDVS->SetCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_USERDATA)); - SXMaterialEditor::CheckBoxUDPS->SetCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_USERDATA)); + SXMaterialEditor::CheckBoxUDVS->setCheck(SML_MtlGetSTDVS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_USERDATA)); + SXMaterialEditor::CheckBoxUDPS->setCheck(SML_MtlGetSTDPS(SRender_SimModelGetIDMtl(), MTL_SHADERSTD_USERDATA)); // // - SXMaterialEditor::CheckBoxUDVSInPS->SetCheck(false); + SXMaterialEditor::CheckBoxUDVSInPS->setCheck(false); - SXMaterialEditor::TrackBarUDVSX->SetPos(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 0) * 100.f); - SXMaterialEditor::EditUDVSX->SetText(String(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 0)).c_str()); + SXMaterialEditor::TrackBarUDVSX->setPos(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 0) * 100.f); + SXMaterialEditor::EditUDVSX->setText(String(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 0)).c_str()); - SXMaterialEditor::TrackBarUDVSY->SetPos(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 1) * 100.f); - SXMaterialEditor::EditUDVSY->SetText(String(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 1)).c_str()); + SXMaterialEditor::TrackBarUDVSY->setPos(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 1) * 100.f); + SXMaterialEditor::EditUDVSY->setText(String(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 1)).c_str()); - SXMaterialEditor::TrackBarUDVSZ->SetPos(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 2) * 100.f); - SXMaterialEditor::EditUDVSZ->SetText(String(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 2)).c_str()); + SXMaterialEditor::TrackBarUDVSZ->setPos(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 2) * 100.f); + SXMaterialEditor::EditUDVSZ->setText(String(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 2)).c_str()); - SXMaterialEditor::TrackBarUDVSW->SetPos(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 3) * 100.f); - SXMaterialEditor::EditUDVSW->SetText(String(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 3)).c_str()); + SXMaterialEditor::TrackBarUDVSW->setPos(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 3) * 100.f); + SXMaterialEditor::EditUDVSW->setText(String(SML_MtlGetUDVS(SRender_SimModelGetIDMtl(), 3)).c_str()); - SXMaterialEditor::CheckBoxUDPSInVS->SetCheck(false); + SXMaterialEditor::CheckBoxUDPSInVS->setCheck(false); - SXMaterialEditor::TrackBarUDPSX->SetPos(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 0) * 100.f); - SXMaterialEditor::EditUDPSX->SetText(String(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 0)).c_str()); + SXMaterialEditor::TrackBarUDPSX->setPos(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 0) * 100.f); + SXMaterialEditor::EditUDPSX->setText(String(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 0)).c_str()); - SXMaterialEditor::TrackBarUDPSY->SetPos(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 1) * 100.f); - SXMaterialEditor::EditUDPSY->SetText(String(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 1)).c_str()); + SXMaterialEditor::TrackBarUDPSY->setPos(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 1) * 100.f); + SXMaterialEditor::EditUDPSY->setText(String(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 1)).c_str()); - SXMaterialEditor::TrackBarUDPSZ->SetPos(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 2) * 100.f); - SXMaterialEditor::EditUDPSZ->SetText(String(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 2)).c_str()); + SXMaterialEditor::TrackBarUDPSZ->setPos(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 2) * 100.f); + SXMaterialEditor::EditUDPSZ->setText(String(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 2)).c_str()); - SXMaterialEditor::TrackBarUDPSW->SetPos(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 3) * 100.f); - SXMaterialEditor::EditUDPSW->SetText(String(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 3)).c_str()); + SXMaterialEditor::TrackBarUDPSW->setPos(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 3) * 100.f); + SXMaterialEditor::EditUDPSW->setText(String(SML_MtlGetUDPS(SRender_SimModelGetIDMtl(), 3)).c_str()); - SXMaterialEditor::CheckBoxUDPSInVS->SetCheck(SML_MtlGetUDPS_InVS(SRender_SimModelGetIDMtl())); - SXMaterialEditor::CheckBoxUDVSInPS->SetCheck(SML_MtlGetUDVS_InPS(SRender_SimModelGetIDMtl())); + SXMaterialEditor::CheckBoxUDPSInVS->setCheck(SML_MtlGetUDPS_InVS(SRender_SimModelGetIDMtl())); + SXMaterialEditor::CheckBoxUDVSInPS->setCheck(SML_MtlGetUDVS_InPS(SRender_SimModelGetIDMtl())); } void SXMaterialEditor::FinalImageUncheckedMenu() { - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_COLOR, false); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_NORMALS, false); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_PARAMETERS, false); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_AMBIENTDIFFUSE, false); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_SPECULAR, false); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_LIGHTINGSCENE, false); - - SXMaterialEditor::CheckBoxTBRColor->SetCheck(false); - SXMaterialEditor::CheckBoxTBRNormal->SetCheck(false); - SXMaterialEditor::CheckBoxTBRParam->SetCheck(false); - SXMaterialEditor::CheckBoxTBRAmDiff->SetCheck(false); - SXMaterialEditor::CheckBoxTBRSpecular->SetCheck(false); - SXMaterialEditor::CheckBoxTBRLighting->SetCheck(false); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_COLOR, false); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_NORMALS, false); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_PARAMETERS, false); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_AMBIENTDIFFUSE, false); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_SPECULAR, false); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_LIGHTINGSCENE, false); + + SXMaterialEditor::CheckBoxTBRColor->setCheck(false); + SXMaterialEditor::CheckBoxTBRNormal->setCheck(false); + SXMaterialEditor::CheckBoxTBRParam->setCheck(false); + SXMaterialEditor::CheckBoxTBRAmDiff->setCheck(false); + SXMaterialEditor::CheckBoxTBRSpecular->setCheck(false); + SXMaterialEditor::CheckBoxTBRLighting->setCheck(false); } \ No newline at end of file diff --git a/source/sxmaterialeditor/common_callback.h b/source/sxmaterialeditor/common_callback.h index c385201ebcad0c42bb58b623e3b59a4b6664753f..4e4e976500c90fef6b276732ee4d806d3d09921b 100644 --- a/source/sxmaterialeditor/common_callback.h +++ b/source/sxmaterialeditor/common_callback.h @@ -9,6 +9,8 @@ #include <render/sxrender.h> #include <sxmaterialeditor/resource.h> +#include <skyxengine.h> + #include "material_editor.h" LRESULT TrueExit(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); diff --git a/source/sxmaterialeditor/edits_callback.cpp b/source/sxmaterialeditor/edits_callback.cpp index 2fac7ac3156b0f448391b19bd3d8a9ae1b0cbb5c..bfadb9bb574daba3b608ed28cf1e1c5a075b2245 100644 --- a/source/sxmaterialeditor/edits_callback.cpp +++ b/source/sxmaterialeditor/edits_callback.cpp @@ -6,14 +6,14 @@ LRESULT SXMaterialEditor_EditSkyBox_Enter(HWND hwnd, UINT msg, WPARAM wParam, LP char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditSkyBox->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditSkyBox->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SGCore_SkyBoxLoadTex(tmptextval); else { SGCore_SkyBoxGetActiveTex(tmptextval); - SXMaterialEditor::EditSkyBox->SetText(tmptextval); + SXMaterialEditor::EditSkyBox->setText(tmptextval); MessageBox(0,"texture not found",0,0); } @@ -26,13 +26,13 @@ LRESULT SXMaterialEditor_EditTex_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARA char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditTex->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditTex->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetTexture(SXMaterialEditor::IDMat, tmptextval); else { SML_MtlGetTexture(SXMaterialEditor::IDMat, tmptextval); - SXMaterialEditor::EditTex->SetText(tmptextval); + SXMaterialEditor::EditTex->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -45,14 +45,14 @@ LRESULT SXMaterialEditor_EditVS_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_SHADER_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditVS->GetText(tmptextval, SXGC_SHADER_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditVS->getText(tmptextval, SXGC_SHADER_MAX_SIZE_DIRNAME); if (SGCore_ShaderFileExists(tmptextval)) SML_MtlSetVS(SXMaterialEditor::IDMat, tmptextval); else { SML_MtlGetVS(SXMaterialEditor::IDMat, tmptextval); - SXMaterialEditor::EditVS->SetText(tmptextval); + SXMaterialEditor::EditVS->setText(tmptextval); MessageBox(0, "shader not found", 0, 0); } @@ -65,14 +65,14 @@ LRESULT SXMaterialEditor_EditPS_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_SHADER_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditPS->GetText(tmptextval, SXGC_SHADER_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditPS->getText(tmptextval, SXGC_SHADER_MAX_SIZE_DIRNAME); if (SGCore_ShaderFileExists(tmptextval)) SML_MtlSetPS(SXMaterialEditor::IDMat, tmptextval); else { SML_MtlGetPS(SXMaterialEditor::IDMat, tmptextval); - SXMaterialEditor::EditPS->SetText(tmptextval); + SXMaterialEditor::EditPS->setText(tmptextval); MessageBox(0, "shader not found", 0, 0); } @@ -86,11 +86,11 @@ LRESULT SXMaterialEditor_EditPenetration_Enter(HWND hwnd, UINT msg, WPARAM wPara tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditPenetration->GetText(tmptextval, 256); + SXMaterialEditor::EditPenetration->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarPenetration->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarPenetration->setPos(tmpval * 100); SML_MtlSetPenetration(SXMaterialEditor::IDMat, tmpval*0.01f); return 0; @@ -102,14 +102,14 @@ LRESULT SXMaterialEditor_EditTexLighting_Enter(HWND hwnd, UINT msg, WPARAM wPara char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditTexLighting->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditTexLighting->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetTextureLighting(SXMaterialEditor::IDMat, tmptextval); else { SML_MtlGetTextureLighting(SXMaterialEditor::IDMat, tmptextval); - SXMaterialEditor::EditTexLighting->SetText(tmptextval); + SXMaterialEditor::EditTexLighting->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -123,14 +123,14 @@ LRESULT SXMaterialEditor_EditMask_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPAR char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditMask->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditMask->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetMaskTex(SXMaterialEditor::IDMat, tmptextval); else { SML_MtlGetMaskTex(SXMaterialEditor::IDMat, tmptextval); - SXMaterialEditor::EditMask->SetText(tmptextval); + SXMaterialEditor::EditMask->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -143,14 +143,14 @@ LRESULT SXMaterialEditor_EditMR_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditMR->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditMR->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetMRTex(SXMaterialEditor::IDMat, 0, tmptextval); else { SML_MtlGetMRTex(SXMaterialEditor::IDMat, 0, tmptextval); - SXMaterialEditor::EditMR->SetText(tmptextval); + SXMaterialEditor::EditMR->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -163,14 +163,14 @@ LRESULT SXMaterialEditor_EditMG_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditMG->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditMG->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetMRTex(SXMaterialEditor::IDMat, 1, tmptextval); else { SML_MtlGetMRTex(SXMaterialEditor::IDMat, 1, tmptextval); - SXMaterialEditor::EditMG->SetText(tmptextval); + SXMaterialEditor::EditMG->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -183,14 +183,14 @@ LRESULT SXMaterialEditor_EditMB_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditMB->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditMB->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetMRTex(SXMaterialEditor::IDMat, 2, tmptextval); else { SML_MtlGetMRTex(SXMaterialEditor::IDMat, 2, tmptextval); - SXMaterialEditor::EditMB->SetText(tmptextval); + SXMaterialEditor::EditMB->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -203,14 +203,14 @@ LRESULT SXMaterialEditor_EditMA_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditMA->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditMA->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetMRTex(SXMaterialEditor::IDMat, 3, tmptextval); else { SML_MtlGetMRTex(SXMaterialEditor::IDMat, 3, tmptextval); - SXMaterialEditor::EditMA->SetText(tmptextval); + SXMaterialEditor::EditMA->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -224,14 +224,14 @@ LRESULT SXMaterialEditor_EditDR_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditDR->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditDR->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetDTex(SXMaterialEditor::IDMat, 0, tmptextval); else { SML_MtlGetDTex(SXMaterialEditor::IDMat, 0, tmptextval); - SXMaterialEditor::EditDR->SetText(tmptextval); + SXMaterialEditor::EditDR->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -244,14 +244,14 @@ LRESULT SXMaterialEditor_EditDG_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditDG->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditDG->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetDTex(SXMaterialEditor::IDMat, 1, tmptextval); else { SML_MtlGetDTex(SXMaterialEditor::IDMat, 1, tmptextval); - SXMaterialEditor::EditDR->SetText(tmptextval); + SXMaterialEditor::EditDR->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -264,14 +264,14 @@ LRESULT SXMaterialEditor_EditDB_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditDB->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditDB->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetDTex(SXMaterialEditor::IDMat, 2, tmptextval); else { SML_MtlGetDTex(SXMaterialEditor::IDMat, 2, tmptextval); - SXMaterialEditor::EditDR->SetText(tmptextval); + SXMaterialEditor::EditDR->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -284,14 +284,14 @@ LRESULT SXMaterialEditor_EditDA_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char tmptextval[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; tmptextval[0] = 0; - SXMaterialEditor::EditDA->GetText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXMaterialEditor::EditDA->getText(tmptextval, SXGC_LOADTEX_MAX_SIZE_DIRNAME); if (SGCore_LoadTexFileExists(tmptextval)) SML_MtlSetDTex(SXMaterialEditor::IDMat, 3, tmptextval); else { SML_MtlGetDTex(SXMaterialEditor::IDMat, 3, tmptextval); - SXMaterialEditor::EditDR->SetText(tmptextval); + SXMaterialEditor::EditDR->setText(tmptextval); MessageBox(0, "texture not found", 0, 0); } @@ -307,11 +307,11 @@ LRESULT SXMaterialEditor_EditRoughness_Enter(HWND hwnd, UINT msg, WPARAM wParam, tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditRoughness->GetText(tmptextval, 256); + SXMaterialEditor::EditRoughness->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarRoughness->SetPos(tmpval*100); + SXMaterialEditor::TrackBarRoughness->setPos(tmpval*100); SML_MtlSetRoughness(SXMaterialEditor::IDMat, tmpval); return 0; @@ -323,11 +323,11 @@ LRESULT SXMaterialEditor_EditF0_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditF0->GetText(tmptextval, 256); + SXMaterialEditor::EditF0->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarF0->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarF0->setPos(tmpval * 100); SML_MtlSetF0(SXMaterialEditor::IDMat, tmpval); return 0; } @@ -338,11 +338,11 @@ LRESULT SXMaterialEditor_EditThickness_Enter(HWND hwnd, UINT msg, WPARAM wParam, tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditThickness->GetText(tmptextval, 256); + SXMaterialEditor::EditThickness->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarThickness->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarThickness->setPos(tmpval * 100); SML_MtlSetThickness(SXMaterialEditor::IDMat, tmpval); return 0; } @@ -355,11 +355,11 @@ LRESULT SXMaterialEditor_EditUDVSX_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPA tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditUDVSX->GetText(tmptextval, 256); + SXMaterialEditor::EditUDVSX->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarUDVSX->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarUDVSX->setPos(tmpval * 100); SML_MtlSetUDVS(SXMaterialEditor::IDMat, 0, tmpval); return 0; } @@ -370,11 +370,11 @@ LRESULT SXMaterialEditor_EditUDVSY_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPA tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditUDVSY->GetText(tmptextval, 256); + SXMaterialEditor::EditUDVSY->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarUDVSY->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarUDVSY->setPos(tmpval * 100); SML_MtlSetUDVS(SXMaterialEditor::IDMat, 1, tmpval); return 0; } @@ -385,11 +385,11 @@ LRESULT SXMaterialEditor_EditUDVSZ_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPA tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditUDVSZ->GetText(tmptextval, 256); + SXMaterialEditor::EditUDVSZ->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarUDVSZ->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarUDVSZ->setPos(tmpval * 100); SML_MtlSetUDVS(SXMaterialEditor::IDMat, 2, tmpval); return 0; } @@ -400,11 +400,11 @@ LRESULT SXMaterialEditor_EditUDVSW_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPA tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditUDVSW->GetText(tmptextval, 256); + SXMaterialEditor::EditUDVSW->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarUDVSW->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarUDVSW->setPos(tmpval * 100); SML_MtlSetUDVS(SXMaterialEditor::IDMat, 3, tmpval); return 0; } @@ -416,11 +416,11 @@ LRESULT SXMaterialEditor_EditUDPSX_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPA tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditUDPSX->GetText(tmptextval, 256); + SXMaterialEditor::EditUDPSX->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarUDPSX->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarUDPSX->setPos(tmpval * 100); SML_MtlSetUDPS(SXMaterialEditor::IDMat, 0, tmpval); return 0; } @@ -431,11 +431,11 @@ LRESULT SXMaterialEditor_EditUDPSY_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPA tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditUDPSY->GetText(tmptextval, 256); + SXMaterialEditor::EditUDPSY->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarUDPSY->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarUDPSY->setPos(tmpval * 100); SML_MtlSetUDPS(SXMaterialEditor::IDMat, 1, tmpval); return 0; } @@ -446,11 +446,11 @@ LRESULT SXMaterialEditor_EditUDPSZ_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPA tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditUDPSZ->GetText(tmptextval, 256); + SXMaterialEditor::EditUDPSZ->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarUDPSZ->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarUDPSZ->setPos(tmpval * 100); SML_MtlSetUDPS(SXMaterialEditor::IDMat, 2, tmpval); return 0; } @@ -461,11 +461,11 @@ LRESULT SXMaterialEditor_EditUDPSW_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPA tmptextval[0] = 0; float tmpval = 0; - SXMaterialEditor::EditUDPSW->GetText(tmptextval, 256); + SXMaterialEditor::EditUDPSW->getText(tmptextval, 256); sscanf(tmptextval, "%f", &tmpval); - SXMaterialEditor::TrackBarUDPSW->SetPos(tmpval * 100); + SXMaterialEditor::TrackBarUDPSW->setPos(tmpval * 100); SML_MtlSetUDPS(SXMaterialEditor::IDMat, 3, tmpval); return 0; } \ No newline at end of file diff --git a/source/sxmaterialeditor/material_editor.cpp b/source/sxmaterialeditor/material_editor.cpp index 8a438eb02e37d3a9dee1d5879f8c88b5dd84c33d..44ee9742faf491ceff2667aa454fc9a184e2d3ba 100644 --- a/source/sxmaterialeditor/material_editor.cpp +++ b/source/sxmaterialeditor/material_editor.cpp @@ -4,7 +4,7 @@ namespace SXMaterialEditor { ISXGUIBaseWnd* JobWindow; - ISXGUIMenu* MainMenu; + ISXGUIMenuWindow* MainMenu; ISXGUIBaseWnd* WindowRender; ISXGUIToolBar* ToolBar; @@ -185,971 +185,985 @@ void SXMaterialEditor::InitAllElements() int cx = (wrect.right - MAINWIN_SIZE_X) / 2; int cy = (wrect.bottom - MAINWIN_SIZE_Y) / 2; - SXMaterialEditor::JobWindow = SXGUICrBaseWnd("SXMaterialEditor", "SXMaterialEditor", 0, 0, cx, cy, MAINWIN_SIZE_X, MAINWIN_SIZE_Y, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_DLGFRAME | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); - SXMaterialEditor::JobWindow->Visible(false); - SXGUIBaseHandlers::InitHandlerMsg(SXMaterialEditor::JobWindow); - SXMaterialEditor::JobWindow->AddHandler(SXMaterialEditor_JobWindow_CallWmCommand, WM_COMMAND); + SXMaterialEditor::JobWindow = SXGUICrBaseWndEx("SXMaterialEditor", "SXMaterialEditor", cx, cy, MAINWIN_SIZE_X, MAINWIN_SIZE_Y, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_DLGFRAME | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); + SXMaterialEditor::JobWindow->setVisible(false); + gui_func::base_handlers::InitHandlerMsg(SXMaterialEditor::JobWindow); + SXMaterialEditor::JobWindow->addHandler(SXMaterialEditor_JobWindow_CallWmCommand, WM_COMMAND); - SXMaterialEditor::JobWindow->AddHandler(ComMenuId, WM_COMMAND); - SXMaterialEditor::JobWindow->AddHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true); - SXMaterialEditor::JobWindow->AddHandler(MsgEditSize, WM_SIZE); - SXMaterialEditor::MainMenu = SXGUICrMenuEx(IDR_MENU1); - SXMaterialEditor::MainMenu->SetToWindow(SXMaterialEditor::JobWindow->GetHWND()); + SXMaterialEditor::JobWindow->addHandler(ComMenuId, WM_COMMAND); + SXMaterialEditor::JobWindow->addHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true); + SXMaterialEditor::JobWindow->addHandler(MsgEditSize, WM_SIZE); + SXMaterialEditor::MainMenu = SXGUICrMenuWindowEx(IDR_MENU1); + SXMaterialEditor::MainMenu->setToWindow(SXMaterialEditor::JobWindow->getHWND()); - SXMaterialEditor::WindowRender = SXGUICrBaseWnd("WindowRender","WindowRender",0,0,0,26,300,300,0,0,CreateSolidBrush(RGB(200,200,200)),0,CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER,SXMaterialEditor::JobWindow->GetHWND(),0); - SXMaterialEditor::WindowRender->GAlign.left = false; + SXMaterialEditor::WindowRender = SXGUICrBaseWndEx("WindowRender", "WindowRender",0,26,300,300,0,0,CreateSolidBrush(RGB(200,200,200)),0,CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER,SXMaterialEditor::JobWindow->getHWND(),0); + SXMaterialEditor::WindowRender->setStretchSides(false, false, false, false); + + /*SXMaterialEditor::WindowRender->GAlign.left = false; SXMaterialEditor::WindowRender->GAlign.right = false; SXMaterialEditor::WindowRender->GAlign.top = false; - SXMaterialEditor::WindowRender->GAlign.bottom = false; + SXMaterialEditor::WindowRender->GAlign.bottom = false;*/ + + SXMaterialEditor::ToolBar = SXGUICrToolBar(0, 0, 645, 26, SXMaterialEditor::JobWindow->getHWND(), WndProcAllDefault, 0); + SXMaterialEditor::ToolBar->setStretchSides(false, false, false, false); - SXMaterialEditor::ToolBar = SXGUICrToolBar(0, 0, 645, 26, SXMaterialEditor::JobWindow->GetHWND(), WndProcAllDefault, 0); - SXMaterialEditor::ToolBar->GAlign.left = false; + /*SXMaterialEditor::ToolBar->GAlign.left = false; SXMaterialEditor::ToolBar->GAlign.right = false; SXMaterialEditor::ToolBar->GAlign.top = false; - SXMaterialEditor::ToolBar->GAlign.bottom = false; - SXMaterialEditor::ToolBar->AddHandler(SXMaterialEditor_ToolBar_CallWmCommand, WM_COMMAND); - - SXMaterialEditor::ButtonTBOpen = SXGUICrButtonEx("", 2, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::ButtonTBOpen->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ButtonTBOpen->GAlign.left = true; - SXMaterialEditor::ButtonTBOpen->GAlign.top = true; - SXMaterialEditor::ButtonTBOpen->SetBmpInResourse(IDB_BITMAP1); - - SXMaterialEditor::ButtonTBSave = SXGUICrButtonEx("", 26, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::ButtonTBSave->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ButtonTBSave->GAlign.left = true; - SXMaterialEditor::ButtonTBSave->GAlign.top = true; - SXMaterialEditor::ButtonTBSave->SetBmpInResourse(IDB_BITMAP2); - - SXMaterialEditor::CheckBoxTBCam = SXGUICrCheckBoxEx("", 54, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::CheckBoxTBCam->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxTBCam->GAlign.left = true; - SXMaterialEditor::CheckBoxTBCam->GAlign.top = true; - SXMaterialEditor::CheckBoxTBCam->SetBmpInResourse(IDB_BITMAP3); - - SXMaterialEditor::ButtonTBView = SXGUICrButtonEx("", 78, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::ButtonTBView->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ButtonTBView->GAlign.left = true; - SXMaterialEditor::ButtonTBView->GAlign.top = true; - SXMaterialEditor::ButtonTBView->SetBmpInResourse(IDB_BITMAP4); - - SXMaterialEditor::CheckBoxTBRColor = SXGUICrCheckBoxEx("", 106, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::CheckBoxTBRColor->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxTBRColor->GAlign.left = true; - SXMaterialEditor::CheckBoxTBRColor->GAlign.top = true; - SXMaterialEditor::CheckBoxTBRColor->SetBmpInResourse(IDB_BITMAP5); - - SXMaterialEditor::CheckBoxTBRNormal = SXGUICrCheckBoxEx("", 130, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::CheckBoxTBRNormal->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxTBRNormal->GAlign.left = true; - SXMaterialEditor::CheckBoxTBRNormal->GAlign.top = true; - SXMaterialEditor::CheckBoxTBRNormal->SetBmpInResourse(IDB_BITMAP6); - - SXMaterialEditor::CheckBoxTBRParam = SXGUICrCheckBoxEx("", 154, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::CheckBoxTBRParam->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxTBRParam->GAlign.left = true; - SXMaterialEditor::CheckBoxTBRParam->GAlign.top = true; - SXMaterialEditor::CheckBoxTBRParam->SetBmpInResourse(IDB_BITMAP7); - - SXMaterialEditor::CheckBoxTBRAmDiff = SXGUICrCheckBoxEx("", 178, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::CheckBoxTBRAmDiff->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxTBRAmDiff->GAlign.left = true; - SXMaterialEditor::CheckBoxTBRAmDiff->GAlign.top = true; - SXMaterialEditor::CheckBoxTBRAmDiff->SetBmpInResourse(IDB_BITMAP8); - - SXMaterialEditor::CheckBoxTBRSpecular = SXGUICrCheckBoxEx("", 202, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::CheckBoxTBRSpecular->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxTBRSpecular->GAlign.left = true; - SXMaterialEditor::CheckBoxTBRSpecular->GAlign.top = true; - SXMaterialEditor::CheckBoxTBRSpecular->SetBmpInResourse(IDB_BITMAP9); - - SXMaterialEditor::CheckBoxTBRLighting = SXGUICrCheckBoxEx("", 226, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->GetHWND(), 0, 0); - SXMaterialEditor::CheckBoxTBRLighting->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxTBRLighting->GAlign.left = true; - SXMaterialEditor::CheckBoxTBRLighting->GAlign.top = true; - SXMaterialEditor::CheckBoxTBRLighting->SetBmpInResourse(IDB_BITMAP10); + SXMaterialEditor::ToolBar->GAlign.bottom = false;*/ + SXMaterialEditor::ToolBar->addHandler(SXMaterialEditor_ToolBar_CallWmCommand, WM_COMMAND); + + SXMaterialEditor::ButtonTBOpen = SXGUICrButtonEx("", 2, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::ButtonTBOpen->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ButtonTBOpen->setStretchSides(true, false, false, true); + /*SXMaterialEditor::ButtonTBOpen->GAlign.left = true; + SXMaterialEditor::ButtonTBOpen->GAlign.top = true;*/ + SXMaterialEditor::ButtonTBOpen->setBmpFromResourse(IDB_BITMAP1); + + SXMaterialEditor::ButtonTBSave = SXGUICrButtonEx("", 26, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::ButtonTBSave->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ButtonTBSave->setStretchSides(true, false, false, true); + /*SXMaterialEditor::ButtonTBSave->GAlign.left = true; + SXMaterialEditor::ButtonTBSave->GAlign.top = true;*/ + SXMaterialEditor::ButtonTBSave->setBmpFromResourse(IDB_BITMAP2); + + SXMaterialEditor::CheckBoxTBCam = SXGUICrCheckBoxEx("", 54, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::CheckBoxTBCam->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxTBCam->setStretchSides(true, false, false, true); + /*SXMaterialEditor::CheckBoxTBCam->GAlign.left = true; + SXMaterialEditor::CheckBoxTBCam->GAlign.top = true;*/ + SXMaterialEditor::CheckBoxTBCam->setBmpFromResourse(IDB_BITMAP3); + + SXMaterialEditor::ButtonTBView = SXGUICrButtonEx("", 78, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::ButtonTBView->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ButtonTBView->setStretchSides(true, false, false, true); + /*SXMaterialEditor::ButtonTBView->GAlign.left = true; + SXMaterialEditor::ButtonTBView->GAlign.top = true;*/ + SXMaterialEditor::ButtonTBView->setBmpFromResourse(IDB_BITMAP4); + + SXMaterialEditor::CheckBoxTBRColor = SXGUICrCheckBoxEx("", 106, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::CheckBoxTBRColor->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxTBRColor->setStretchSides(true, false, false, true); + /*SXMaterialEditor::CheckBoxTBRColor->GAlign.left = true; + SXMaterialEditor::CheckBoxTBRColor->GAlign.top = true;*/ + SXMaterialEditor::CheckBoxTBRColor->setBmpFromResourse(IDB_BITMAP5); + + SXMaterialEditor::CheckBoxTBRNormal = SXGUICrCheckBoxEx("", 130, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::CheckBoxTBRNormal->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxTBRNormal->setStretchSides(true, false, false, true); + /*SXMaterialEditor::CheckBoxTBRNormal->GAlign.left = true; + SXMaterialEditor::CheckBoxTBRNormal->GAlign.top = true;*/ + SXMaterialEditor::CheckBoxTBRNormal->setBmpFromResourse(IDB_BITMAP6); + + SXMaterialEditor::CheckBoxTBRParam = SXGUICrCheckBoxEx("", 154, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::CheckBoxTBRParam->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxTBRParam->setStretchSides(true, false, false, true); + /*SXMaterialEditor::CheckBoxTBRParam->GAlign.left = true; + SXMaterialEditor::CheckBoxTBRParam->GAlign.top = true;*/ + SXMaterialEditor::CheckBoxTBRParam->setBmpFromResourse(IDB_BITMAP7); + + SXMaterialEditor::CheckBoxTBRAmDiff = SXGUICrCheckBoxEx("", 178, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::CheckBoxTBRAmDiff->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxTBRAmDiff->setStretchSides(true, false, false, true); + /*SXMaterialEditor::CheckBoxTBRAmDiff->GAlign.left = true; + SXMaterialEditor::CheckBoxTBRAmDiff->GAlign.top = true;*/ + SXMaterialEditor::CheckBoxTBRAmDiff->setBmpFromResourse(IDB_BITMAP8); + + SXMaterialEditor::CheckBoxTBRSpecular = SXGUICrCheckBoxEx("", 202, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::CheckBoxTBRSpecular->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxTBRSpecular->setStretchSides(true, false, false, true); + /*SXMaterialEditor::CheckBoxTBRSpecular->GAlign.left = true; + SXMaterialEditor::CheckBoxTBRSpecular->GAlign.top = true;*/ + SXMaterialEditor::CheckBoxTBRSpecular->setBmpFromResourse(IDB_BITMAP9); + + SXMaterialEditor::CheckBoxTBRLighting = SXGUICrCheckBoxEx("", 226, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXMaterialEditor::ToolBar->getHWND(), 0, 0); + SXMaterialEditor::CheckBoxTBRLighting->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxTBRLighting->setStretchSides(true, false, false, true); + /*SXMaterialEditor::CheckBoxTBRLighting->GAlign.left = true; + SXMaterialEditor::CheckBoxTBRLighting->GAlign.top = true;*/ + SXMaterialEditor::CheckBoxTBRLighting->setBmpFromResourse(IDB_BITMAP10); - SXMaterialEditor::ButtonSkyBox = SXGUICrButton("...", 275, 330, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonSkyBox->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ButtonSkyBox->AddHandler(SXMaterialEditor_ButtonSkyBox_Click, WM_LBUTTONUP); - - SXMaterialEditor::EditSkyBox = SXGUICrEdit("0", 100, 330, 170, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::EditSkyBox->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::EditSkyBox->SetColorText(0, 0, 0); - SXMaterialEditor::EditSkyBox->SetColorTextBk(255, 255, 255); - SXMaterialEditor::EditSkyBox->SetTransparentTextBk(true); - SXMaterialEditor::EditSkyBox->SetColorBrush(255, 255, 255); - SXMaterialEditor::EditSkyBox->AddHandler(SXMaterialEditor_EditSkyBox_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditSkyBox->AddHandler(SXMaterialEditor_EditSkyBox_Enter, WM_KILLFOCUS); - - SXMaterialEditor::CheckBoxModelRot = SXGUICrCheckBox("rotate", 5, 330, 50, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxModelRot->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxModelRot->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxModelRot->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxModelRot->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxModelRot->SetColorBrush(220, 220, 220); - - SXMaterialEditor::ButtonRotAngle0 = SXGUICrButton("0", 60, 330, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonRotAngle0->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ButtonRotAngle0->AddHandler(SXMaterialEditor_ButtonRotAngle0_Click, WM_LBUTTONUP); + SXMaterialEditor::ButtonSkyBox = SXGUICrButton("...", 275, 330, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonSkyBox->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ButtonSkyBox->addHandler(SXMaterialEditor_ButtonSkyBox_Click, WM_LBUTTONUP); + + SXMaterialEditor::EditSkyBox = SXGUICrEdit("0", 100, 330, 170, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::EditSkyBox->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::EditSkyBox->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditSkyBox->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditSkyBox->setTransparentTextBk(true); + SXMaterialEditor::EditSkyBox->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditSkyBox->addHandler(SXMaterialEditor_EditSkyBox_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditSkyBox->addHandler(SXMaterialEditor_EditSkyBox_Enter, WM_KILLFOCUS); + + SXMaterialEditor::CheckBoxModelRot = SXGUICrCheckBox("rotate", 5, 330, 50, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxModelRot->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxModelRot->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxModelRot->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxModelRot->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxModelRot->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::ButtonRotAngle0 = SXGUICrButton("0", 60, 330, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonRotAngle0->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ButtonRotAngle0->addHandler(SXMaterialEditor_ButtonRotAngle0_Click, WM_LBUTTONUP); - SXMaterialEditor::StaticTypeModel = SXGUICrStatic("Type model:",5,350,70,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticTypeModel->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticTypeModel->SetColorText(0,0,0); - SXMaterialEditor::StaticTypeModel->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticTypeModel->SetTransparentTextBk(true); - SXMaterialEditor::StaticTypeModel->SetColorBrush(220,220,220); - - SXMaterialEditor::ComboBoxTypeModel = SXGUICrComboBox("",100,347,200,100,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::ComboBoxTypeModel->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ComboBoxTypeModel->SetColorText(0,0,0); - SXMaterialEditor::ComboBoxTypeModel->SetColorTextBk(255,255,255); - SXMaterialEditor::ComboBoxTypeModel->SetTransparentTextBk(true); - SXMaterialEditor::ComboBoxTypeModel->SetColorBrush(255,255,255); - SXMaterialEditor::ComboBoxTypeModel->AddItem("geometry"); - SXMaterialEditor::ComboBoxTypeModel->AddItem("grass"); - SXMaterialEditor::ComboBoxTypeModel->AddItem("tree"); - SXMaterialEditor::ComboBoxTypeModel->AddItem("skin"); - SXMaterialEditor::ComboBoxTypeModel->SetSel(0); - - SXMaterialEditor::StaticTestModel = SXGUICrStatic("Test model:",5,372,70,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticTestModel->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticTestModel->SetColorText(0,0,0); - SXMaterialEditor::StaticTestModel->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticTestModel->SetTransparentTextBk(true); - SXMaterialEditor::StaticTestModel->SetColorBrush(220,220,220); - SXMaterialEditor::ComboBoxTestModel = SXGUICrComboBox("",100,370,200,70,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::ComboBoxTestModel->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ComboBoxTestModel->SetColorText(0,0,0); - SXMaterialEditor::ComboBoxTestModel->SetColorTextBk(255,255,255); - SXMaterialEditor::ComboBoxTestModel->SetTransparentTextBk(true); - SXMaterialEditor::ComboBoxTestModel->SetColorBrush(255,255,255); - SXMaterialEditor::ComboBoxTestModel->AddItem("sphere"); - SXMaterialEditor::ComboBoxTestModel->AddItem("cube"); - SXMaterialEditor::ComboBoxTestModel->AddItem("plane"); - SXMaterialEditor::ComboBoxTestModel->SetSel(0); - - SXMaterialEditor::StaticTex = SXGUICrStatic("Tex:",5,400,30,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticTex->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticTex->SetColorText(0,0,0); - SXMaterialEditor::StaticTex->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticTex->SetTransparentTextBk(true); - SXMaterialEditor::StaticTex->SetColorBrush(220,220,220); - SXMaterialEditor::EditTex = SXGUICrEdit("0",40,400,230,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditTex->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditTex->SetColorText(0,0,0); - SXMaterialEditor::EditTex->SetColorTextBk(255,255,255); - SXMaterialEditor::EditTex->SetTransparentTextBk(true); - SXMaterialEditor::EditTex->SetColorBrush(255,255,255); - SXMaterialEditor::EditTex->AddHandler(SXMaterialEditor_EditTex_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditTex->AddHandler(SXMaterialEditor_EditTex_Enter, WM_KILLFOCUS); - - SXMaterialEditor::ButtonTex = SXGUICrButton("...", 275, 400, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonTex->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ButtonTex->AddHandler(SXMaterialEditor_ButtonTex_Click, WM_LBUTTONUP); - - - SXMaterialEditor::StaticShaders = SXGUICrStatic("Shaders^", 5, 420, 40, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticShaders->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticShaders->SetColorText(0, 0, 0); - SXMaterialEditor::StaticShaders->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticShaders->SetTransparentTextBk(true); - SXMaterialEditor::StaticShaders->SetColorBrush(220, 220, 220); - - SXMaterialEditor::ComboBoxShaders = SXGUICrComboBoxEx("", 60, 418, 240, 150, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ComboBoxShaders->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ComboBoxShaders->SetColorText(0, 0, 0); - SXMaterialEditor::ComboBoxShaders->SetColorTextBk(255, 255, 255); - SXMaterialEditor::ComboBoxShaders->SetTransparentTextBk(true); - SXMaterialEditor::ComboBoxShaders->SetColorBrush(255, 255, 255); - SXMaterialEditor::ComboBoxShaders->AddItem(""); - - - SXMaterialEditor::StaticVS = SXGUICrStatic("VS:",5,440,30,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticVS->SetColorText(0,0,0); - SXMaterialEditor::StaticVS->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticVS->SetTransparentTextBk(true); - SXMaterialEditor::StaticVS->SetColorBrush(220,220,220); - - SXMaterialEditor::EditVS = SXGUICrEdit("0",40,440,230,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditVS->SetColorText(0,0,0); - SXMaterialEditor::EditVS->SetColorTextBk(255,255,255); - SXMaterialEditor::EditVS->SetTransparentTextBk(true); - SXMaterialEditor::EditVS->SetColorBrush(255,255,255); - SXMaterialEditor::EditVS->AddHandler(SXMaterialEditor_EditVS_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditVS->AddHandler(SXMaterialEditor_EditVS_Enter, WM_KILLFOCUS); - - SXMaterialEditor::ButtonVS = SXGUICrButton("...", 275, 440, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonVS->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ButtonVS->AddHandler(SXMaterialEditor_ButtonVS_Click, WM_LBUTTONUP); - - SXMaterialEditor::StaticPS = SXGUICrStatic("PS:",5,460,30,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticPS->SetColorText(0,0,0); - SXMaterialEditor::StaticPS->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticPS->SetTransparentTextBk(true); - SXMaterialEditor::StaticPS->SetColorBrush(220,220,220); - - SXMaterialEditor::EditPS = SXGUICrEdit("0",40,460,230,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditPS->SetColorText(0,0,0); - SXMaterialEditor::EditPS->SetColorTextBk(255,255,255); - SXMaterialEditor::EditPS->SetTransparentTextBk(true); - SXMaterialEditor::EditPS->SetColorBrush(255,255,255); - SXMaterialEditor::EditPS->AddHandler(SXMaterialEditor_EditPS_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditPS->AddHandler(SXMaterialEditor_EditPS_Enter, WM_KILLFOCUS); - - SXMaterialEditor::ButtonPS = SXGUICrButton("...", 275, 460, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonPS->AddHandler(SXMaterialEditor_ButtonPS_Click, WM_LBUTTONUP); - - SXMaterialEditor::StaticPhysic = SXGUICrStatic("Physic material:", 5, 485, 80, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticPhysic->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticPhysic->SetColorText(0, 0, 0); - SXMaterialEditor::StaticPhysic->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticPhysic->SetTransparentTextBk(true); - SXMaterialEditor::StaticPhysic->SetColorBrush(220, 220, 220); - SXMaterialEditor::ComboBoxPhysic = SXGUICrComboBox("", 100, 482, 200, 120, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ComboBoxPhysic->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ComboBoxPhysic->SetColorText(0, 0, 0); - SXMaterialEditor::ComboBoxPhysic->SetColorTextBk(255, 255, 255); - SXMaterialEditor::ComboBoxPhysic->SetTransparentTextBk(true); - SXMaterialEditor::ComboBoxPhysic->SetColorBrush(255, 255, 255); - SXMaterialEditor::ComboBoxPhysic->AddItem("concrete (�����)"); - SXMaterialEditor::ComboBoxPhysic->AddItem("metal (������)"); - SXMaterialEditor::ComboBoxPhysic->AddItem("glass (������)"); - SXMaterialEditor::ComboBoxPhysic->AddItem("plastic (�������)"); - SXMaterialEditor::ComboBoxPhysic->AddItem("tree (������)"); - SXMaterialEditor::ComboBoxPhysic->AddItem("flesh (�����)"); - SXMaterialEditor::ComboBoxPhysic->AddItem("ground/sand (�����/�����)"); - SXMaterialEditor::ComboBoxPhysic->AddItem("water (����)"); - SXMaterialEditor::ComboBoxPhysic->AddItem("leaf/grass (������/�����)"); - SXMaterialEditor::ComboBoxPhysic->SetSel(0); - - SXMaterialEditor::StaticPenetration = SXGUICrStatic("Penetraion:", 5, 510, 60, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticPenetration->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticPenetration->SetColorText(0, 0, 0); - SXMaterialEditor::StaticPenetration->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticPenetration->SetTransparentTextBk(true); - SXMaterialEditor::StaticPenetration->SetColorBrush(220, 220, 220); - SXMaterialEditor::EditPenetration = SXGUICrEdit("0", 60, 510, 65, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::EditPenetration->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::EditPenetration->SetColorText(0, 0, 0); - SXMaterialEditor::EditPenetration->SetColorTextBk(255, 255, 255); - SXMaterialEditor::EditPenetration->SetTransparentTextBk(true); - SXMaterialEditor::EditPenetration->SetColorBrush(255, 255, 255); - SXMaterialEditor::EditPenetration->AddHandler(SXMaterialEditor_EditPenetration_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditPenetration->AddHandler(SXMaterialEditor_EditPenetration_Enter, WM_KILLFOCUS); - SXMaterialEditor::TrackBarPenetration = SXGUICrTrackBar("", 130, 510, 170, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarPenetration->SetMinMax(0, 100); - SXMaterialEditor::TrackBarPenetration->SetTickFrequency(10); - SXMaterialEditor::TrackBarPenetration->AddHandler(SXMaterialEditor_TrackBarPenetration_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::CheckBoxLighting = SXGUICrCheckBox("Lighting", 5, 535, 55, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxLighting->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxLighting->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxLighting->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxLighting->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxLighting->SetColorBrush(220, 220, 220); - - SXMaterialEditor::CheckBoxAlphaTest = SXGUICrCheckBox("alphatest", 65, 535, 60, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxAlphaTest->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxAlphaTest->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxAlphaTest->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxAlphaTest->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxAlphaTest->SetColorBrush(220, 220, 220); - - - SXMaterialEditor::StaticTypeRefract = SXGUICrStatic("Refraction:", 5, 560, 60, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticTypeRefract->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticTypeRefract->SetColorText(0, 0, 0); - SXMaterialEditor::StaticTypeRefract->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticTypeRefract->SetTransparentTextBk(true); - SXMaterialEditor::StaticTypeRefract->SetColorBrush(220, 220, 220); - - SXMaterialEditor::ComboBoxTypeRefract = SXGUICrComboBox("", 70, 558, 230, 115, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ComboBoxTypeRefract->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ComboBoxTypeRefract->SetColorText(0, 0, 0); - SXMaterialEditor::ComboBoxTypeRefract->SetColorTextBk(255, 255, 255); - SXMaterialEditor::ComboBoxTypeRefract->SetTransparentTextBk(true); - SXMaterialEditor::ComboBoxTypeRefract->SetColorBrush(255, 255, 255); - SXMaterialEditor::ComboBoxTypeRefract->AddItem("none"); - SXMaterialEditor::ComboBoxTypeRefract->AddItem("transparency lighting"); - SXMaterialEditor::ComboBoxTypeRefract->SetSel(0); - - SXMaterialEditor::StaticTypeReflect = SXGUICrStatic("Reflection:", 5, 580, 60, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticTypeReflect->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticTypeReflect->SetColorText(0, 0, 0); - SXMaterialEditor::StaticTypeReflect->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticTypeReflect->SetTransparentTextBk(true); - SXMaterialEditor::StaticTypeReflect->SetColorBrush(220, 220, 220); - - SXMaterialEditor::ComboBoxTypeReflect = SXGUICrComboBox("", 70, 578, 230, 115, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ComboBoxTypeReflect->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ComboBoxTypeReflect->SetColorText(0, 0, 0); - SXMaterialEditor::ComboBoxTypeReflect->SetColorTextBk(255, 255, 255); - SXMaterialEditor::ComboBoxTypeReflect->SetTransparentTextBk(true); - SXMaterialEditor::ComboBoxTypeReflect->SetColorBrush(255, 255, 255); - SXMaterialEditor::ComboBoxTypeReflect->AddItem("none"); - SXMaterialEditor::ComboBoxTypeReflect->AddItem("reflect plane"); - SXMaterialEditor::ComboBoxTypeReflect->AddItem("reflect cube dynamic"); - SXMaterialEditor::ComboBoxTypeReflect->AddItem("reflect cube static"); - SXMaterialEditor::ComboBoxTypeReflect->SetSel(0); - - - SXMaterialEditor::StaticMR = SXGUICrStatic("M R:",305,175,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticMR->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticMR->SetColorText(0,0,0); - SXMaterialEditor::StaticMR->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticMR->SetTransparentTextBk(true); - SXMaterialEditor::StaticMR->SetColorBrush(220,220,220); + SXMaterialEditor::StaticTypeModel = SXGUICrStatic("Type model:",5,350,70,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticTypeModel->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticTypeModel->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticTypeModel->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticTypeModel->setTransparentTextBk(true); + SXMaterialEditor::StaticTypeModel->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::ComboBoxTypeModel = SXGUICrComboBox(100,347,200,100,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::ComboBoxTypeModel->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ComboBoxTypeModel->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::ComboBoxTypeModel->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxTypeModel->setTransparentTextBk(true); + SXMaterialEditor::ComboBoxTypeModel->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxTypeModel->addItem("geometry"); + SXMaterialEditor::ComboBoxTypeModel->addItem("grass"); + SXMaterialEditor::ComboBoxTypeModel->addItem("tree"); + SXMaterialEditor::ComboBoxTypeModel->addItem("skin"); + SXMaterialEditor::ComboBoxTypeModel->setSel(0); + + SXMaterialEditor::StaticTestModel = SXGUICrStatic("Test model:",5,372,70,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticTestModel->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticTestModel->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticTestModel->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticTestModel->setTransparentTextBk(true); + SXMaterialEditor::StaticTestModel->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::ComboBoxTestModel = SXGUICrComboBox(100,370,200,70,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::ComboBoxTestModel->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ComboBoxTestModel->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::ComboBoxTestModel->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxTestModel->setTransparentTextBk(true); + SXMaterialEditor::ComboBoxTestModel->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxTestModel->addItem("sphere"); + SXMaterialEditor::ComboBoxTestModel->addItem("cube"); + SXMaterialEditor::ComboBoxTestModel->addItem("plane"); + SXMaterialEditor::ComboBoxTestModel->setSel(0); + + SXMaterialEditor::StaticTex = SXGUICrStatic("Tex:",5,400,30,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticTex->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticTex->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticTex->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticTex->setTransparentTextBk(true); + SXMaterialEditor::StaticTex->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::EditTex = SXGUICrEdit("0",40,400,230,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditTex->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditTex->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditTex->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditTex->setTransparentTextBk(true); + SXMaterialEditor::EditTex->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditTex->addHandler(SXMaterialEditor_EditTex_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditTex->addHandler(SXMaterialEditor_EditTex_Enter, WM_KILLFOCUS); + + SXMaterialEditor::ButtonTex = SXGUICrButton("...", 275, 400, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonTex->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ButtonTex->addHandler(SXMaterialEditor_ButtonTex_Click, WM_LBUTTONUP); + + + SXMaterialEditor::StaticShaders = SXGUICrStatic("Shaders^", 5, 420, 40, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticShaders->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticShaders->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticShaders->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticShaders->setTransparentTextBk(true); + SXMaterialEditor::StaticShaders->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::ComboBoxShaders = SXGUICrComboBoxEx(60, 418, 240, 150, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ComboBoxShaders->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ComboBoxShaders->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::ComboBoxShaders->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxShaders->setTransparentTextBk(true); + SXMaterialEditor::ComboBoxShaders->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxShaders->addItem(""); + + + SXMaterialEditor::StaticVS = SXGUICrStatic("VS:",5,440,30,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticVS->setTransparentTextBk(true); + SXMaterialEditor::StaticVS->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditVS = SXGUICrEdit("0",40,440,230,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditVS->setTransparentTextBk(true); + SXMaterialEditor::EditVS->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditVS->addHandler(SXMaterialEditor_EditVS_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditVS->addHandler(SXMaterialEditor_EditVS_Enter, WM_KILLFOCUS); + + SXMaterialEditor::ButtonVS = SXGUICrButton("...", 275, 440, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonVS->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ButtonVS->addHandler(SXMaterialEditor_ButtonVS_Click, WM_LBUTTONUP); + + SXMaterialEditor::StaticPS = SXGUICrStatic("PS:",5,460,30,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticPS->setTransparentTextBk(true); + SXMaterialEditor::StaticPS->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditPS = SXGUICrEdit("0",40,460,230,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditPS->setTransparentTextBk(true); + SXMaterialEditor::EditPS->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditPS->addHandler(SXMaterialEditor_EditPS_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditPS->addHandler(SXMaterialEditor_EditPS_Enter, WM_KILLFOCUS); + + SXMaterialEditor::ButtonPS = SXGUICrButton("...", 275, 460, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonPS->addHandler(SXMaterialEditor_ButtonPS_Click, WM_LBUTTONUP); + + SXMaterialEditor::StaticPhysic = SXGUICrStatic("Physic material:", 5, 485, 80, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticPhysic->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticPhysic->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticPhysic->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticPhysic->setTransparentTextBk(true); + SXMaterialEditor::StaticPhysic->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::ComboBoxPhysic = SXGUICrComboBox(100, 482, 200, 120, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ComboBoxPhysic->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ComboBoxPhysic->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::ComboBoxPhysic->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxPhysic->setTransparentTextBk(true); + SXMaterialEditor::ComboBoxPhysic->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxPhysic->addItem("concrete (�����)"); + SXMaterialEditor::ComboBoxPhysic->addItem("metal (������)"); + SXMaterialEditor::ComboBoxPhysic->addItem("glass (������)"); + SXMaterialEditor::ComboBoxPhysic->addItem("plastic (�������)"); + SXMaterialEditor::ComboBoxPhysic->addItem("tree (������)"); + SXMaterialEditor::ComboBoxPhysic->addItem("flesh (�����)"); + SXMaterialEditor::ComboBoxPhysic->addItem("ground/sand (�����/�����)"); + SXMaterialEditor::ComboBoxPhysic->addItem("water (����)"); + SXMaterialEditor::ComboBoxPhysic->addItem("leaf/grass (������/�����)"); + SXMaterialEditor::ComboBoxPhysic->setSel(0); + + SXMaterialEditor::StaticPenetration = SXGUICrStatic("Penetraion:", 5, 510, 60, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticPenetration->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticPenetration->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticPenetration->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticPenetration->setTransparentTextBk(true); + SXMaterialEditor::StaticPenetration->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::EditPenetration = SXGUICrEdit("0", 60, 510, 65, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::EditPenetration->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::EditPenetration->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditPenetration->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditPenetration->setTransparentTextBk(true); + SXMaterialEditor::EditPenetration->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditPenetration->addHandler(SXMaterialEditor_EditPenetration_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditPenetration->addHandler(SXMaterialEditor_EditPenetration_Enter, WM_KILLFOCUS); + SXMaterialEditor::TrackBarPenetration = SXGUICrTrackBar("", 130, 510, 170, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarPenetration->setMinMax(0, 100); + SXMaterialEditor::TrackBarPenetration->setTickFrequency(10); + SXMaterialEditor::TrackBarPenetration->addHandler(SXMaterialEditor_TrackBarPenetration_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::CheckBoxLighting = SXGUICrCheckBox("Lighting", 5, 535, 55, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxLighting->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxLighting->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxLighting->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxLighting->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxLighting->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::CheckBoxAlphaTest = SXGUICrCheckBox("alphatest", 65, 535, 60, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxAlphaTest->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxAlphaTest->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxAlphaTest->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxAlphaTest->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxAlphaTest->setColorBrush(RGB(220, 220, 220)); + + + SXMaterialEditor::StaticTypeRefract = SXGUICrStatic("Refraction:", 5, 560, 60, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticTypeRefract->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticTypeRefract->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticTypeRefract->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticTypeRefract->setTransparentTextBk(true); + SXMaterialEditor::StaticTypeRefract->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::ComboBoxTypeRefract = SXGUICrComboBox(70, 558, 230, 115, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ComboBoxTypeRefract->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ComboBoxTypeRefract->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::ComboBoxTypeRefract->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxTypeRefract->setTransparentTextBk(true); + SXMaterialEditor::ComboBoxTypeRefract->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxTypeRefract->addItem("none"); + SXMaterialEditor::ComboBoxTypeRefract->addItem("transparency lighting"); + SXMaterialEditor::ComboBoxTypeRefract->setSel(0); + + SXMaterialEditor::StaticTypeReflect = SXGUICrStatic("Reflection:", 5, 580, 60, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticTypeReflect->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticTypeReflect->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticTypeReflect->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticTypeReflect->setTransparentTextBk(true); + SXMaterialEditor::StaticTypeReflect->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::ComboBoxTypeReflect = SXGUICrComboBox(70, 578, 230, 115, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ComboBoxTypeReflect->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ComboBoxTypeReflect->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::ComboBoxTypeReflect->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxTypeReflect->setTransparentTextBk(true); + SXMaterialEditor::ComboBoxTypeReflect->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxTypeReflect->addItem("none"); + SXMaterialEditor::ComboBoxTypeReflect->addItem("reflect plane"); + SXMaterialEditor::ComboBoxTypeReflect->addItem("reflect cube dynamic"); + SXMaterialEditor::ComboBoxTypeReflect->addItem("reflect cube static"); + SXMaterialEditor::ComboBoxTypeReflect->setSel(0); + + + SXMaterialEditor::StaticMR = SXGUICrStatic("M R:",305,175,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticMR->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticMR->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticMR->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticMR->setTransparentTextBk(true); + SXMaterialEditor::StaticMR->setColorBrush(RGB(220, 220, 220)); - SXMaterialEditor::StaticMG = SXGUICrStatic("M G:",305,195,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticMG->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticMG->SetColorText(0,0,0); - SXMaterialEditor::StaticMG->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticMG->SetTransparentTextBk(true); - SXMaterialEditor::StaticMG->SetColorBrush(220,220,220); - - - SXMaterialEditor::StaticParamL = SXGUICrStatic("Parameters Lighting:", 305, 30, 100, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticParamL->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticParamL->SetColorText(0, 0, 0); - SXMaterialEditor::StaticParamL->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticParamL->SetTransparentTextBk(true); - SXMaterialEditor::StaticParamL->SetColorBrush(220, 220, 220); - - SXMaterialEditor::ComboBoxParamL = SXGUICrComboBoxEx("", 400, 28, 230, 150, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ComboBoxParamL->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ComboBoxParamL->SetColorText(0, 0, 0); - SXMaterialEditor::ComboBoxParamL->SetColorTextBk(255, 255, 255); - SXMaterialEditor::ComboBoxParamL->SetTransparentTextBk(true); - SXMaterialEditor::ComboBoxParamL->SetColorBrush(255, 255, 255); - SXMaterialEditor::ComboBoxParamL->AddItem(""); - - SXMaterialEditor::StaticThickness = SXGUICrStatic("Thickness:", 305, 50, 70, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticThickness->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticThickness->SetColorText(0, 0, 0); - SXMaterialEditor::StaticThickness->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticThickness->SetTransparentTextBk(true); - SXMaterialEditor::StaticThickness->SetColorBrush(220, 220, 220); - - SXMaterialEditor::EditThickness = SXGUICrEdit("0", 375, 50, 50, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::EditThickness->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::EditThickness->SetColorText(0, 0, 0); - SXMaterialEditor::EditThickness->SetColorTextBk(255, 255, 255); - SXMaterialEditor::EditThickness->SetTransparentTextBk(true); - SXMaterialEditor::EditThickness->SetColorBrush(255, 255, 255); - SXMaterialEditor::EditThickness->AddHandler(SXMaterialEditor_EditThickness_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditThickness->AddHandler(SXMaterialEditor_EditThickness_Enter, WM_KILLFOCUS); - - SXMaterialEditor::TrackBarThickness = SXGUICrTrackBar("", 430, 50, 200, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarThickness->SetMinMax(0, 100); - SXMaterialEditor::TrackBarThickness->SetTickFrequency(10); - SXMaterialEditor::TrackBarThickness->AddHandler(SXMaterialEditor_TrackBarThickness_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::StaticRoughness = SXGUICrStatic("Roughness:", 305, 70, 70, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticRoughness->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticRoughness->SetColorText(0, 0, 0); - SXMaterialEditor::StaticRoughness->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticRoughness->SetTransparentTextBk(true); - SXMaterialEditor::StaticRoughness->SetColorBrush(220, 220, 220); - - SXMaterialEditor::EditRoughness = SXGUICrEdit("0",375,70,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditRoughness->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditRoughness->SetColorText(0,0,0); - SXMaterialEditor::EditRoughness->SetColorTextBk(255,255,255); - SXMaterialEditor::EditRoughness->SetTransparentTextBk(true); - SXMaterialEditor::EditRoughness->SetColorBrush(255,255,255); - SXMaterialEditor::EditRoughness->AddHandler(SXMaterialEditor_EditRoughness_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditRoughness->AddHandler(SXMaterialEditor_EditRoughness_Enter, WM_KILLFOCUS); - - SXMaterialEditor::TrackBarRoughness = SXGUICrTrackBar("", 430, 70, 200, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarRoughness->SetMinMax(0, 100); - SXMaterialEditor::TrackBarRoughness->SetTickFrequency(10); - SXMaterialEditor::TrackBarRoughness->AddHandler(SXMaterialEditor_TrackBarRoughness_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::StaticF0 = SXGUICrStatic("f0:", 305, 90, 70, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticF0->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticF0->SetColorText(0, 0, 0); - SXMaterialEditor::StaticF0->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticF0->SetTransparentTextBk(true); - SXMaterialEditor::StaticF0->SetColorBrush(220, 220, 220); - - SXMaterialEditor::EditF0 = SXGUICrEdit("0",375,90,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditF0->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditF0->SetColorText(0,0,0); - SXMaterialEditor::EditF0->SetColorTextBk(255,255,255); - SXMaterialEditor::EditF0->SetTransparentTextBk(true); - SXMaterialEditor::EditF0->SetColorBrush(255,255,255); - SXMaterialEditor::EditF0->AddHandler(SXMaterialEditor_EditF0_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditF0->AddHandler(SXMaterialEditor_EditF0_Enter, WM_KILLFOCUS); - - SXMaterialEditor::TrackBarF0 = SXGUICrTrackBar("",430,90,200,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::TrackBarF0->SetMinMax(0, 100); - SXMaterialEditor::TrackBarF0->SetTickFrequency(10); - SXMaterialEditor::TrackBarF0->AddHandler(SXMaterialEditor_TrackBarF0_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::EditTexLighting = SXGUICrEdit("0",370,110,230,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditTexLighting->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditTexLighting->SetColorText(0,0,0); - SXMaterialEditor::EditTexLighting->SetColorTextBk(255,255,255); - SXMaterialEditor::EditTexLighting->SetTransparentTextBk(true); - SXMaterialEditor::EditTexLighting->SetColorBrush(255,255,255); - SXMaterialEditor::EditTexLighting->AddHandler(SXMaterialEditor_EditTexLighting_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditTexLighting->AddHandler(SXMaterialEditor_EditTexLighting_Enter, WM_KILLFOCUS); - - SXMaterialEditor::ButtonTexLighting = SXGUICrButton("...", 605, 110, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonTexLighting->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonTexLighting->AddHandler(SXMaterialEditor_ButtonTexLighting_Click, WM_LBUTTONUP); - - SXMaterialEditor::CheckBoxTexLighting = SXGUICrCheckBox("texture:", 305, 110, 60, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxTexLighting->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxTexLighting->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxTexLighting->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxTexLighting->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxTexLighting->SetColorBrush(220,220,220); + SXMaterialEditor::StaticMG = SXGUICrStatic("M G:",305,195,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticMG->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticMG->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticMG->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticMG->setTransparentTextBk(true); + SXMaterialEditor::StaticMG->setColorBrush(RGB(220, 220, 220)); + + + SXMaterialEditor::StaticParamL = SXGUICrStatic("Parameters Lighting:", 305, 30, 100, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticParamL->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticParamL->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticParamL->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticParamL->setTransparentTextBk(true); + SXMaterialEditor::StaticParamL->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::ComboBoxParamL = SXGUICrComboBoxEx(400, 28, 230, 150, 0, WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ComboBoxParamL->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ComboBoxParamL->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::ComboBoxParamL->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxParamL->setTransparentTextBk(true); + SXMaterialEditor::ComboBoxParamL->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::ComboBoxParamL->addItem(""); + + SXMaterialEditor::StaticThickness = SXGUICrStatic("Thickness:", 305, 50, 70, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticThickness->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticThickness->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticThickness->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticThickness->setTransparentTextBk(true); + SXMaterialEditor::StaticThickness->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditThickness = SXGUICrEdit("0", 375, 50, 50, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::EditThickness->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::EditThickness->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditThickness->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditThickness->setTransparentTextBk(true); + SXMaterialEditor::EditThickness->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditThickness->addHandler(SXMaterialEditor_EditThickness_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditThickness->addHandler(SXMaterialEditor_EditThickness_Enter, WM_KILLFOCUS); + + SXMaterialEditor::TrackBarThickness = SXGUICrTrackBar("", 430, 50, 200, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarThickness->setMinMax(0, 100); + SXMaterialEditor::TrackBarThickness->setTickFrequency(10); + SXMaterialEditor::TrackBarThickness->addHandler(SXMaterialEditor_TrackBarThickness_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::StaticRoughness = SXGUICrStatic("Roughness:", 305, 70, 70, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticRoughness->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticRoughness->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticRoughness->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticRoughness->setTransparentTextBk(true); + SXMaterialEditor::StaticRoughness->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditRoughness = SXGUICrEdit("0",375,70,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditRoughness->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditRoughness->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditRoughness->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditRoughness->setTransparentTextBk(true); + SXMaterialEditor::EditRoughness->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditRoughness->addHandler(SXMaterialEditor_EditRoughness_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditRoughness->addHandler(SXMaterialEditor_EditRoughness_Enter, WM_KILLFOCUS); + + SXMaterialEditor::TrackBarRoughness = SXGUICrTrackBar("", 430, 70, 200, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarRoughness->setMinMax(0, 100); + SXMaterialEditor::TrackBarRoughness->setTickFrequency(10); + SXMaterialEditor::TrackBarRoughness->addHandler(SXMaterialEditor_TrackBarRoughness_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::StaticF0 = SXGUICrStatic("f0:", 305, 90, 70, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticF0->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticF0->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticF0->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticF0->setTransparentTextBk(true); + SXMaterialEditor::StaticF0->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditF0 = SXGUICrEdit("0",375,90,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditF0->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditF0->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditF0->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditF0->setTransparentTextBk(true); + SXMaterialEditor::EditF0->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditF0->addHandler(SXMaterialEditor_EditF0_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditF0->addHandler(SXMaterialEditor_EditF0_Enter, WM_KILLFOCUS); + + SXMaterialEditor::TrackBarF0 = SXGUICrTrackBar("",430,90,200,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::TrackBarF0->setMinMax(0, 100); + SXMaterialEditor::TrackBarF0->setTickFrequency(10); + SXMaterialEditor::TrackBarF0->addHandler(SXMaterialEditor_TrackBarF0_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::EditTexLighting = SXGUICrEdit("0",370,110,230,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditTexLighting->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditTexLighting->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditTexLighting->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditTexLighting->setTransparentTextBk(true); + SXMaterialEditor::EditTexLighting->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditTexLighting->addHandler(SXMaterialEditor_EditTexLighting_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditTexLighting->addHandler(SXMaterialEditor_EditTexLighting_Enter, WM_KILLFOCUS); + + SXMaterialEditor::ButtonTexLighting = SXGUICrButton("...", 605, 110, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonTexLighting->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonTexLighting->addHandler(SXMaterialEditor_ButtonTexLighting_Click, WM_LBUTTONUP); + + SXMaterialEditor::CheckBoxTexLighting = SXGUICrCheckBox("texture:", 305, 110, 60, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxTexLighting->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxTexLighting->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxTexLighting->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxTexLighting->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxTexLighting->setColorBrush(RGB(220, 220, 220)); - SXMaterialEditor::StaticMaD = SXGUICrStatic("Microrelief and detail", 305, 135, 100, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticMaD->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticMaD->SetColorText(0, 0, 0); - SXMaterialEditor::StaticMaD->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticMaD->SetTransparentTextBk(true); - SXMaterialEditor::StaticMaD->SetColorBrush(220, 220, 220); - - SXMaterialEditor::EditMR = SXGUICrEdit("0", 360, 175, 240, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::EditMR->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::EditMR->SetColorText(0, 0, 0); - SXMaterialEditor::EditMR->SetColorTextBk(255, 255, 255); - SXMaterialEditor::EditMR->SetTransparentTextBk(true); - SXMaterialEditor::EditMR->SetColorBrush(255, 255, 255); - SXMaterialEditor::EditMR->AddHandler(SXMaterialEditor_EditMR_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditMR->AddHandler(SXMaterialEditor_EditMR_Enter, WM_KILLFOCUS); - - SXMaterialEditor::CheckBoxDoSVVS = SXGUICrCheckBox("vs", 340, 390, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSVVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSVVS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSVVS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSVVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSVVS->SetColorBrush(220,220,220); - - - SXMaterialEditor::StaticMask = SXGUICrStatic("Mask:", 305, 152, 50, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticMask->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticMask->SetColorText(0, 0, 0); - SXMaterialEditor::StaticMask->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticMask->SetTransparentTextBk(true); - SXMaterialEditor::StaticMask->SetColorBrush(220, 220, 220); - - SXMaterialEditor::EditMask = SXGUICrEdit("0", 360, 152, 240, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::EditMask->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::EditMask->SetColorText(0, 0, 0); - SXMaterialEditor::EditMask->SetColorTextBk(255, 255, 255); - SXMaterialEditor::EditMask->SetTransparentTextBk(true); - SXMaterialEditor::EditMask->SetColorBrush(255, 255, 255); - SXMaterialEditor::EditMask->AddHandler(SXMaterialEditor_EditMask_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditMask->AddHandler(SXMaterialEditor_EditMask_Enter, WM_KILLFOCUS); - - SXMaterialEditor::ButtonMask = SXGUICrButton("...", 605, 152, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonMask->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::ButtonMask->AddHandler(SXMaterialEditor_ButtonMask_Click, WM_LBUTTONUP); - - SXMaterialEditor::ButtonMR = SXGUICrButton("...", 605, 175, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonMR->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonMR->AddHandler(SXMaterialEditor_ButtonMR_Click, WM_LBUTTONUP); - - SXMaterialEditor::StaticMB = SXGUICrStatic("M B:",305,215,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticMB->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticMB->SetColorText(0,0,0); - SXMaterialEditor::StaticMB->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticMB->SetTransparentTextBk(true); - SXMaterialEditor::StaticMB->SetColorBrush(220,220,220); - SXMaterialEditor::StaticMA = SXGUICrStatic("M A:",305,235,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticMA->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticMA->SetColorText(0,0,0); - SXMaterialEditor::StaticMA->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticMA->SetTransparentTextBk(true); - SXMaterialEditor::StaticMA->SetColorBrush(220,220,220); - SXMaterialEditor::StaticDR = SXGUICrStatic("D R:",305,260,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDR->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDR->SetColorText(0,0,0); - SXMaterialEditor::StaticDR->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDR->SetTransparentTextBk(true); - SXMaterialEditor::StaticDR->SetColorBrush(220,220,220); - - SXMaterialEditor::EditMG = SXGUICrEdit("0",360,195,240,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditMG->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditMG->SetColorText(0,0,0); - SXMaterialEditor::EditMG->SetColorTextBk(255,255,255); - SXMaterialEditor::EditMG->SetTransparentTextBk(true); - SXMaterialEditor::EditMG->SetColorBrush(255,255,255); - SXMaterialEditor::EditMG->AddHandler(SXMaterialEditor_EditMG_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditMG->AddHandler(SXMaterialEditor_EditMG_Enter, WM_KILLFOCUS); - - SXMaterialEditor::EditMB = SXGUICrEdit("0",360,215,240,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditMB->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditMB->SetColorText(0,0,0); - SXMaterialEditor::EditMB->SetColorTextBk(255,255,255); - SXMaterialEditor::EditMB->SetTransparentTextBk(true); - SXMaterialEditor::EditMB->SetColorBrush(255,255,255); - SXMaterialEditor::EditMB->AddHandler(SXMaterialEditor_EditMB_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditMB->AddHandler(SXMaterialEditor_EditMB_Enter, WM_KILLFOCUS); - - SXMaterialEditor::EditMA = SXGUICrEdit("0",360,235,240,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditMA->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditMA->SetColorText(0,0,0); - SXMaterialEditor::EditMA->SetColorTextBk(255,255,255); - SXMaterialEditor::EditMA->SetTransparentTextBk(true); - SXMaterialEditor::EditMA->SetColorBrush(255,255,255); - SXMaterialEditor::EditMA->AddHandler(SXMaterialEditor_EditMA_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditMA->AddHandler(SXMaterialEditor_EditMA_Enter, WM_KILLFOCUS); - - SXMaterialEditor::EditDR = SXGUICrEdit("0",360,260,240,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditDR->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditDR->SetColorText(0,0,0); - SXMaterialEditor::EditDR->SetColorTextBk(255,255,255); - SXMaterialEditor::EditDR->SetTransparentTextBk(true); - SXMaterialEditor::EditDR->SetColorBrush(255,255,255); - SXMaterialEditor::EditDR->AddHandler(SXMaterialEditor_EditDR_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditDR->AddHandler(SXMaterialEditor_EditDR_Enter, WM_KILLFOCUS); - - SXMaterialEditor::ButtonMG = SXGUICrButton("...", 605, 195, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonMG->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonMG->AddHandler(SXMaterialEditor_ButtonMG_Click, WM_LBUTTONUP); - - SXMaterialEditor::ButtonMB = SXGUICrButton("...", 605, 215, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonMB->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonMB->AddHandler(SXMaterialEditor_ButtonMB_Click, WM_LBUTTONUP); - - SXMaterialEditor::ButtonMA = SXGUICrButton("...", 605, 235, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonMA->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonMA->AddHandler(SXMaterialEditor_ButtonMA_Click, WM_LBUTTONUP); - - SXMaterialEditor::ButtonDR = SXGUICrButton("...", 605, 260, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonDR->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonDR->AddHandler(SXMaterialEditor_ButtonDR_Click, WM_LBUTTONUP); - - SXMaterialEditor::StaticDG = SXGUICrStatic("D G:",305,280,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDG->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDG->SetColorText(0,0,0); - SXMaterialEditor::StaticDG->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDG->SetTransparentTextBk(true); - SXMaterialEditor::StaticDG->SetColorBrush(220,220,220); - SXMaterialEditor::StaticDB = SXGUICrStatic("D B:",305,300,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDB->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDB->SetColorText(0,0,0); - SXMaterialEditor::StaticDB->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDB->SetTransparentTextBk(true); - SXMaterialEditor::StaticDB->SetColorBrush(220,220,220); - SXMaterialEditor::StaticDA = SXGUICrStatic("D A:",305,320,50,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDA->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDA->SetColorText(0,0,0); - SXMaterialEditor::StaticDA->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDA->SetTransparentTextBk(true); - SXMaterialEditor::StaticDA->SetColorBrush(220,220,220); - - SXMaterialEditor::EditDG = SXGUICrEdit("0",360,280,240,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditDG->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditDG->SetColorText(0,0,0); - SXMaterialEditor::EditDG->SetColorTextBk(255,255,255); - SXMaterialEditor::EditDG->SetTransparentTextBk(true); - SXMaterialEditor::EditDG->SetColorBrush(255,255,255); - SXMaterialEditor::EditDG->AddHandler(SXMaterialEditor_EditDG_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditDG->AddHandler(SXMaterialEditor_EditDG_Enter, WM_KILLFOCUS); - - SXMaterialEditor::EditDB = SXGUICrEdit("0",360,300,240,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditDB->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditDB->SetColorText(0,0,0); - SXMaterialEditor::EditDB->SetColorTextBk(255,255,255); - SXMaterialEditor::EditDB->SetTransparentTextBk(true); - SXMaterialEditor::EditDB->SetColorBrush(255,255,255); - SXMaterialEditor::EditDB->AddHandler(SXMaterialEditor_EditDB_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditDB->AddHandler(SXMaterialEditor_EditDB_Enter, WM_KILLFOCUS); - - SXMaterialEditor::EditDA = SXGUICrEdit("0",360,320,240,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditDA->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditDA->SetColorText(0,0,0); - SXMaterialEditor::EditDA->SetColorTextBk(255,255,255); - SXMaterialEditor::EditDA->SetTransparentTextBk(true); - SXMaterialEditor::EditDA->SetColorBrush(255,255,255); - SXMaterialEditor::EditDA->AddHandler(SXMaterialEditor_EditDA_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditDA->AddHandler(SXMaterialEditor_EditDA_Enter, WM_KILLFOCUS); - - SXMaterialEditor::ButtonDG = SXGUICrButton("...", 605, 280, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonDG->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonDG->AddHandler(SXMaterialEditor_ButtonDG_Click, WM_LBUTTONUP); - - SXMaterialEditor::ButtonDB = SXGUICrButton("...", 605, 300, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonDB->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonDB->AddHandler(SXMaterialEditor_ButtonDB_Click, WM_LBUTTONUP); - - SXMaterialEditor::ButtonDA = SXGUICrButton("...", 605, 320, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::ButtonDA->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::ButtonDA->AddHandler(SXMaterialEditor_ButtonDA_Click, WM_LBUTTONUP); - - SXMaterialEditor::StaticDoS = SXGUICrStatic("Data for shaders:",305,350,100,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDoS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDoS->SetColorText(0,0,0); - SXMaterialEditor::StaticDoS->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDoS->SetTransparentTextBk(true); - SXMaterialEditor::StaticDoS->SetColorBrush(220,220,220); - SXMaterialEditor::StaticDoSW = SXGUICrStatic("W mat:",305,370,35,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDoSW->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDoSW->SetColorText(0,0,0); - SXMaterialEditor::StaticDoSW->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDoSW->SetTransparentTextBk(true); - SXMaterialEditor::StaticDoSW->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSWVS = SXGUICrCheckBox("vs", 340, 370, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSWVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSWVS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSWVS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSWVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSWVS->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSWPS = SXGUICrCheckBox("ps", 373, 370, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSWPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSWPS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSWPS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSWPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSWPS->SetColorBrush(220,220,220); - SXMaterialEditor::StaticDoSV = SXGUICrStatic("V mat:",305,390,35,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDoSV->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDoSV->SetColorText(0,0,0); - SXMaterialEditor::StaticDoSV->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDoSV->SetTransparentTextBk(true); - SXMaterialEditor::StaticDoSV->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSVPS = SXGUICrCheckBox("ps", 373, 390, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSVPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSVPS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSVPS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSVPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSVPS->SetColorBrush(220,220,220); - SXMaterialEditor::StaticDosP = SXGUICrStatic("P mat:",305,410,35,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDosP->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticDosP->SetColorText(0, 0, 0); - SXMaterialEditor::StaticDosP->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticDosP->SetTransparentTextBk(true); - SXMaterialEditor::StaticDosP->SetColorBrush(220, 220, 220); - SXMaterialEditor::CheckBoxDoSPVS = SXGUICrCheckBox("vs", 340, 410, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSPVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSPVS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSPVS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSPVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSPVS->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSPPS = SXGUICrCheckBox("ps", 373, 410, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSPPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSPPS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSPPS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSPPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSPPS->SetColorBrush(220,220,220); - SXMaterialEditor::StaticBoxDoSWV = SXGUICrStatic("WV mat:",410,370,45,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticBoxDoSWV->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticBoxDoSWV->SetColorText(0,0,0); - SXMaterialEditor::StaticBoxDoSWV->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticBoxDoSWV->SetTransparentTextBk(true); - SXMaterialEditor::StaticBoxDoSWV->SetColorBrush(220,220,220); - SXMaterialEditor::StaticDoSWVP = SXGUICrStatic("WVP:",410,390,45,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDoSWVP->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDoSWVP->SetColorText(0,0,0); - SXMaterialEditor::StaticDoSWVP->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDoSWVP->SetTransparentTextBk(true); - SXMaterialEditor::StaticDoSWVP->SetColorBrush(220,220,220); - SXMaterialEditor::StaticDoSCampos = SXGUICrStatic("Campos:",410,410,45,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticDoSCampos->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticDoSCampos->SetColorText(0,0,0); - SXMaterialEditor::StaticDoSCampos->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticDoSCampos->SetTransparentTextBk(true); - SXMaterialEditor::StaticDoSCampos->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSWVVS = SXGUICrCheckBox("vs", 455, 370, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSWVVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSWVVS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSWVVS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSWVVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSWVVS->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSWVPS = SXGUICrCheckBox("ps", 488, 370, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSWVPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSWVPS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSWVPS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSWVPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSWVPS->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSCamposVS = SXGUICrCheckBox("vs", 455, 410, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSCamposVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSCamposVS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSCamposVS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSCamposVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSCamposVS->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSWVPVS = SXGUICrCheckBox("vs", 455, 390, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSWVPVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSWVPVS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSWVPVS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSWVPVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSWVPVS->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSWVPPS = SXGUICrCheckBox("ps", 488, 390, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSWVPPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSWVPPS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSWVPPS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSWVPPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSWVPPS->SetColorBrush(220,220,220); - SXMaterialEditor::CheckBoxDoSCamposPS = SXGUICrCheckBox("ps", 488, 411, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSCamposPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxDoSCamposPS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxDoSCamposPS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxDoSCamposPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSCamposPS->SetColorBrush(220,220,220); - - SXMaterialEditor::StaticDoSTimeDelta = SXGUICrStatic("count_td:", 525, 370, 45, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticDoSTimeDelta->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticDoSTimeDelta->SetColorText(0, 0, 0); - SXMaterialEditor::StaticDoSTimeDelta->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticDoSTimeDelta->SetTransparentTextBk(true); - SXMaterialEditor::StaticDoSTimeDelta->SetColorBrush(220, 220, 220); - - SXMaterialEditor::CheckBoxDoSTimeDeltaVS = SXGUICrCheckBox("vs", 570, 370, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSTimeDeltaVS->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxDoSTimeDeltaVS->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxDoSTimeDeltaVS->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxDoSTimeDeltaVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSTimeDeltaVS->SetColorBrush(220, 220, 220); - - SXMaterialEditor::CheckBoxDoSTimeDeltaPS = SXGUICrCheckBox("ps", 603, 370, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSTimeDeltaPS->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxDoSTimeDeltaPS->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxDoSTimeDeltaPS->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxDoSTimeDeltaPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSTimeDeltaPS->SetColorBrush(220, 220, 220); - - - SXMaterialEditor::StaticDoSWinSize = SXGUICrStatic("win size:", 525, 390, 40, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::StaticDoSWinSize->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::StaticDoSWinSize->SetColorText(0, 0, 0); - SXMaterialEditor::StaticDoSWinSize->SetColorTextBk(255, 255, 255); - SXMaterialEditor::StaticDoSWinSize->SetTransparentTextBk(true); - SXMaterialEditor::StaticDoSWinSize->SetColorBrush(220, 220, 220); - - SXMaterialEditor::CheckBoxDoSWinSizeVS = SXGUICrCheckBox("vs", 570, 390, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSWinSizeVS->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxDoSWinSizeVS->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxDoSWinSizeVS->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxDoSWinSizeVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSWinSizeVS->SetColorBrush(220, 220, 220); - - SXMaterialEditor::CheckBoxDoSWinSizePS = SXGUICrCheckBox("ps", 603, 390, 30, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxDoSWinSizePS->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxDoSWinSizePS->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxDoSWinSizePS->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxDoSWinSizePS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxDoSWinSizePS->SetColorBrush(220, 220, 220); - - - SXMaterialEditor::CheckBoxUDVS = SXGUICrCheckBox("User data VS:", 305, 440, 100, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxUDVS->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxUDVS->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxUDVS->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxUDVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxUDVS->SetColorBrush(220, 220, 220); - - SXMaterialEditor::CheckBoxUDVSInPS = SXGUICrCheckBox("in PS", 445, 440, 100, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxUDVSInPS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxUDVSInPS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxUDVSInPS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxUDVSInPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxUDVSInPS->SetColorBrush(220,220,220); - - SXMaterialEditor::EditUDVSX = SXGUICrEdit("0",325,460,80,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditUDVSX->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditUDVSX->SetColorText(0,0,0); - SXMaterialEditor::EditUDVSX->SetColorTextBk(255,255,255); - SXMaterialEditor::EditUDVSX->SetTransparentTextBk(true); - SXMaterialEditor::EditUDVSX->SetColorBrush(255,255,255); - SXMaterialEditor::EditUDVSX->AddHandler(SXMaterialEditor_EditUDVSX_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditUDVSX->AddHandler(SXMaterialEditor_EditUDVSX_Enter, WM_KILLFOCUS); - - SXMaterialEditor::EditUDVSY = SXGUICrEdit("0",325,480,80,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditUDVSY->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditUDVSY->SetColorText(0,0,0); - SXMaterialEditor::EditUDVSY->SetColorTextBk(255,255,255); - SXMaterialEditor::EditUDVSY->SetTransparentTextBk(true); - SXMaterialEditor::EditUDVSY->SetColorBrush(255,255,255); - SXMaterialEditor::EditUDVSY->AddHandler(SXMaterialEditor_EditUDVSY_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditUDVSY->AddHandler(SXMaterialEditor_EditUDVSY_Enter, WM_KILLFOCUS); + SXMaterialEditor::StaticMaD = SXGUICrStatic("Microrelief and detail", 305, 135, 100, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticMaD->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticMaD->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticMaD->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticMaD->setTransparentTextBk(true); + SXMaterialEditor::StaticMaD->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditMR = SXGUICrEdit("0", 360, 175, 240, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::EditMR->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::EditMR->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditMR->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditMR->setTransparentTextBk(true); + SXMaterialEditor::EditMR->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditMR->addHandler(SXMaterialEditor_EditMR_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditMR->addHandler(SXMaterialEditor_EditMR_Enter, WM_KILLFOCUS); + + SXMaterialEditor::CheckBoxDoSVVS = SXGUICrCheckBox("vs", 340, 390, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSVVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSVVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSVVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSVVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSVVS->setColorBrush(RGB(220, 220, 220)); + + + SXMaterialEditor::StaticMask = SXGUICrStatic("Mask:", 305, 152, 50, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticMask->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticMask->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticMask->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticMask->setTransparentTextBk(true); + SXMaterialEditor::StaticMask->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditMask = SXGUICrEdit("0", 360, 152, 240, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::EditMask->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::EditMask->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditMask->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditMask->setTransparentTextBk(true); + SXMaterialEditor::EditMask->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditMask->addHandler(SXMaterialEditor_EditMask_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditMask->addHandler(SXMaterialEditor_EditMask_Enter, WM_KILLFOCUS); + + SXMaterialEditor::ButtonMask = SXGUICrButton("...", 605, 152, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonMask->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::ButtonMask->addHandler(SXMaterialEditor_ButtonMask_Click, WM_LBUTTONUP); + + SXMaterialEditor::ButtonMR = SXGUICrButton("...", 605, 175, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonMR->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonMR->addHandler(SXMaterialEditor_ButtonMR_Click, WM_LBUTTONUP); + + SXMaterialEditor::StaticMB = SXGUICrStatic("M B:",305,215,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticMB->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticMB->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticMB->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticMB->setTransparentTextBk(true); + SXMaterialEditor::StaticMB->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticMA = SXGUICrStatic("M A:",305,235,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticMA->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticMA->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticMA->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticMA->setTransparentTextBk(true); + SXMaterialEditor::StaticMA->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticDR = SXGUICrStatic("D R:",305,260,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDR->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDR->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDR->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDR->setTransparentTextBk(true); + SXMaterialEditor::StaticDR->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditMG = SXGUICrEdit("0",360,195,240,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditMG->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditMG->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditMG->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditMG->setTransparentTextBk(true); + SXMaterialEditor::EditMG->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditMG->addHandler(SXMaterialEditor_EditMG_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditMG->addHandler(SXMaterialEditor_EditMG_Enter, WM_KILLFOCUS); + + SXMaterialEditor::EditMB = SXGUICrEdit("0",360,215,240,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditMB->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditMB->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditMB->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditMB->setTransparentTextBk(true); + SXMaterialEditor::EditMB->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditMB->addHandler(SXMaterialEditor_EditMB_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditMB->addHandler(SXMaterialEditor_EditMB_Enter, WM_KILLFOCUS); + + SXMaterialEditor::EditMA = SXGUICrEdit("0",360,235,240,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditMA->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditMA->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditMA->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditMA->setTransparentTextBk(true); + SXMaterialEditor::EditMA->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditMA->addHandler(SXMaterialEditor_EditMA_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditMA->addHandler(SXMaterialEditor_EditMA_Enter, WM_KILLFOCUS); + + SXMaterialEditor::EditDR = SXGUICrEdit("0",360,260,240,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditDR->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditDR->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditDR->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditDR->setTransparentTextBk(true); + SXMaterialEditor::EditDR->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditDR->addHandler(SXMaterialEditor_EditDR_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditDR->addHandler(SXMaterialEditor_EditDR_Enter, WM_KILLFOCUS); + + SXMaterialEditor::ButtonMG = SXGUICrButton("...", 605, 195, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonMG->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonMG->addHandler(SXMaterialEditor_ButtonMG_Click, WM_LBUTTONUP); + + SXMaterialEditor::ButtonMB = SXGUICrButton("...", 605, 215, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonMB->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonMB->addHandler(SXMaterialEditor_ButtonMB_Click, WM_LBUTTONUP); + + SXMaterialEditor::ButtonMA = SXGUICrButton("...", 605, 235, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonMA->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonMA->addHandler(SXMaterialEditor_ButtonMA_Click, WM_LBUTTONUP); + + SXMaterialEditor::ButtonDR = SXGUICrButton("...", 605, 260, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonDR->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonDR->addHandler(SXMaterialEditor_ButtonDR_Click, WM_LBUTTONUP); + + SXMaterialEditor::StaticDG = SXGUICrStatic("D G:",305,280,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDG->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDG->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDG->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDG->setTransparentTextBk(true); + SXMaterialEditor::StaticDG->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticDB = SXGUICrStatic("D B:",305,300,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDB->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDB->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDB->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDB->setTransparentTextBk(true); + SXMaterialEditor::StaticDB->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticDA = SXGUICrStatic("D A:",305,320,50,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDA->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDA->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDA->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDA->setTransparentTextBk(true); + SXMaterialEditor::StaticDA->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditDG = SXGUICrEdit("0",360,280,240,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditDG->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditDG->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditDG->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditDG->setTransparentTextBk(true); + SXMaterialEditor::EditDG->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditDG->addHandler(SXMaterialEditor_EditDG_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditDG->addHandler(SXMaterialEditor_EditDG_Enter, WM_KILLFOCUS); + + SXMaterialEditor::EditDB = SXGUICrEdit("0",360,300,240,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditDB->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditDB->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditDB->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditDB->setTransparentTextBk(true); + SXMaterialEditor::EditDB->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditDB->addHandler(SXMaterialEditor_EditDB_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditDB->addHandler(SXMaterialEditor_EditDB_Enter, WM_KILLFOCUS); + + SXMaterialEditor::EditDA = SXGUICrEdit("0",360,320,240,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditDA->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditDA->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditDA->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditDA->setTransparentTextBk(true); + SXMaterialEditor::EditDA->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditDA->addHandler(SXMaterialEditor_EditDA_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditDA->addHandler(SXMaterialEditor_EditDA_Enter, WM_KILLFOCUS); + + SXMaterialEditor::ButtonDG = SXGUICrButton("...", 605, 280, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonDG->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonDG->addHandler(SXMaterialEditor_ButtonDG_Click, WM_LBUTTONUP); + + SXMaterialEditor::ButtonDB = SXGUICrButton("...", 605, 300, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonDB->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonDB->addHandler(SXMaterialEditor_ButtonDB_Click, WM_LBUTTONUP); + + SXMaterialEditor::ButtonDA = SXGUICrButton("...", 605, 320, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::ButtonDA->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::ButtonDA->addHandler(SXMaterialEditor_ButtonDA_Click, WM_LBUTTONUP); + + SXMaterialEditor::StaticDoS = SXGUICrStatic("Data for shaders:",305,350,100,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDoS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDoS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDoS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDoS->setTransparentTextBk(true); + SXMaterialEditor::StaticDoS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticDoSW = SXGUICrStatic("W mat:",305,370,35,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDoSW->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDoSW->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDoSW->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDoSW->setTransparentTextBk(true); + SXMaterialEditor::StaticDoSW->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSWVS = SXGUICrCheckBox("vs", 340, 370, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSWVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSWVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSWVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSWVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSWVS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSWPS = SXGUICrCheckBox("ps", 373, 370, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSWPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSWPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSWPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSWPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSWPS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticDoSV = SXGUICrStatic("V mat:",305,390,35,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDoSV->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDoSV->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDoSV->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDoSV->setTransparentTextBk(true); + SXMaterialEditor::StaticDoSV->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSVPS = SXGUICrCheckBox("ps", 373, 390, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSVPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSVPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSVPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSVPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSVPS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticDosP = SXGUICrStatic("P mat:",305,410,35,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDosP->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticDosP->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDosP->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDosP->setTransparentTextBk(true); + SXMaterialEditor::StaticDosP->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSPVS = SXGUICrCheckBox("vs", 340, 410, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSPVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSPVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSPVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSPVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSPVS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSPPS = SXGUICrCheckBox("ps", 373, 410, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSPPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSPPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSPPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSPPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSPPS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticBoxDoSWV = SXGUICrStatic("WV mat:",410,370,45,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticBoxDoSWV->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticBoxDoSWV->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticBoxDoSWV->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticBoxDoSWV->setTransparentTextBk(true); + SXMaterialEditor::StaticBoxDoSWV->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticDoSWVP = SXGUICrStatic("WVP:",410,390,45,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDoSWVP->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDoSWVP->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDoSWVP->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDoSWVP->setTransparentTextBk(true); + SXMaterialEditor::StaticDoSWVP->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::StaticDoSCampos = SXGUICrStatic("Campos:",410,410,45,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticDoSCampos->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticDoSCampos->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDoSCampos->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDoSCampos->setTransparentTextBk(true); + SXMaterialEditor::StaticDoSCampos->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSWVVS = SXGUICrCheckBox("vs", 455, 370, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSWVVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSWVVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSWVVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSWVVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSWVVS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSWVPS = SXGUICrCheckBox("ps", 488, 370, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSWVPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSWVPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSWVPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSWVPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSWVPS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSCamposVS = SXGUICrCheckBox("vs", 455, 410, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSCamposVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSCamposVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSCamposVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSCamposVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSCamposVS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSWVPVS = SXGUICrCheckBox("vs", 455, 390, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSWVPVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSWVPVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSWVPVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSWVPVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSWVPVS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSWVPPS = SXGUICrCheckBox("ps", 488, 390, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSWVPPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSWVPPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSWVPPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSWVPPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSWVPPS->setColorBrush(RGB(220, 220, 220)); + SXMaterialEditor::CheckBoxDoSCamposPS = SXGUICrCheckBox("ps", 488, 411, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSCamposPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxDoSCamposPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSCamposPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSCamposPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSCamposPS->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::StaticDoSTimeDelta = SXGUICrStatic("count_td:", 525, 370, 45, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticDoSTimeDelta->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticDoSTimeDelta->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDoSTimeDelta->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDoSTimeDelta->setTransparentTextBk(true); + SXMaterialEditor::StaticDoSTimeDelta->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::CheckBoxDoSTimeDeltaVS = SXGUICrCheckBox("vs", 570, 370, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSTimeDeltaVS->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxDoSTimeDeltaVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSTimeDeltaVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSTimeDeltaVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSTimeDeltaVS->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::CheckBoxDoSTimeDeltaPS = SXGUICrCheckBox("ps", 603, 370, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSTimeDeltaPS->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxDoSTimeDeltaPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSTimeDeltaPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSTimeDeltaPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSTimeDeltaPS->setColorBrush(RGB(220, 220, 220)); + + + SXMaterialEditor::StaticDoSWinSize = SXGUICrStatic("win size:", 525, 390, 40, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::StaticDoSWinSize->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::StaticDoSWinSize->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticDoSWinSize->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticDoSWinSize->setTransparentTextBk(true); + SXMaterialEditor::StaticDoSWinSize->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::CheckBoxDoSWinSizeVS = SXGUICrCheckBox("vs", 570, 390, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSWinSizeVS->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxDoSWinSizeVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSWinSizeVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSWinSizeVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSWinSizeVS->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::CheckBoxDoSWinSizePS = SXGUICrCheckBox("ps", 603, 390, 30, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxDoSWinSizePS->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxDoSWinSizePS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxDoSWinSizePS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxDoSWinSizePS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxDoSWinSizePS->setColorBrush(RGB(220, 220, 220)); + + + SXMaterialEditor::CheckBoxUDVS = SXGUICrCheckBox("User data VS:", 305, 440, 100, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxUDVS->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxUDVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxUDVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxUDVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxUDVS->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::CheckBoxUDVSInPS = SXGUICrCheckBox("in PS", 445, 440, 100, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxUDVSInPS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxUDVSInPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxUDVSInPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxUDVSInPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxUDVSInPS->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditUDVSX = SXGUICrEdit("0",325,460,80,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditUDVSX->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditUDVSX->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditUDVSX->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditUDVSX->setTransparentTextBk(true); + SXMaterialEditor::EditUDVSX->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditUDVSX->addHandler(SXMaterialEditor_EditUDVSX_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditUDVSX->addHandler(SXMaterialEditor_EditUDVSX_Enter, WM_KILLFOCUS); + + SXMaterialEditor::EditUDVSY = SXGUICrEdit("0",325,480,80,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditUDVSY->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditUDVSY->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditUDVSY->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditUDVSY->setTransparentTextBk(true); + SXMaterialEditor::EditUDVSY->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditUDVSY->addHandler(SXMaterialEditor_EditUDVSY_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditUDVSY->addHandler(SXMaterialEditor_EditUDVSY_Enter, WM_KILLFOCUS); - SXMaterialEditor::StaticUDVSX = SXGUICrStatic("x:",305,460,15,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticUDVSX->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticUDVSX->SetColorText(0,0,0); - SXMaterialEditor::StaticUDVSX->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticUDVSX->SetTransparentTextBk(true); - SXMaterialEditor::StaticUDVSX->SetColorBrush(220,220,220); - - SXMaterialEditor::StaticUDVSY = SXGUICrStatic("y:",305,480,15,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticUDVSY->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticUDVSY->SetColorText(0,0,0); - SXMaterialEditor::StaticUDVSY->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticUDVSY->SetTransparentTextBk(true); - SXMaterialEditor::StaticUDVSY->SetColorBrush(220,220,220); - - SXMaterialEditor::StaticUDVSZ = SXGUICrStatic("z:",305,500,15,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticUDVSZ->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticUDVSZ->SetColorText(0,0,0); - SXMaterialEditor::StaticUDVSZ->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticUDVSZ->SetTransparentTextBk(true); - SXMaterialEditor::StaticUDVSZ->SetColorBrush(220,220,220); - - SXMaterialEditor::EditUDVSZ = SXGUICrEdit("0",325,500,80,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditUDVSZ->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditUDVSZ->SetColorText(0,0,0); - SXMaterialEditor::EditUDVSZ->SetColorTextBk(255,255,255); - SXMaterialEditor::EditUDVSZ->SetTransparentTextBk(true); - SXMaterialEditor::EditUDVSZ->SetColorBrush(255,255,255); - SXMaterialEditor::EditUDVSZ->AddHandler(SXMaterialEditor_EditUDVSZ_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditUDVSZ->AddHandler(SXMaterialEditor_EditUDVSZ_Enter, WM_KILLFOCUS); - - - SXMaterialEditor::StaticUDVSW = SXGUICrStatic("w:",305,520,15,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticUDVSW->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticUDVSW->SetColorText(0,0,0); - SXMaterialEditor::StaticUDVSW->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticUDVSW->SetTransparentTextBk(true); - SXMaterialEditor::StaticUDVSW->SetColorBrush(220,220,220); - - SXMaterialEditor::EditUDVSW = SXGUICrEdit("0",325,520,80,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditUDVSW->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditUDVSW->SetColorText(0,0,0); - SXMaterialEditor::EditUDVSW->SetColorTextBk(255,255,255); - SXMaterialEditor::EditUDVSW->SetTransparentTextBk(true); - SXMaterialEditor::EditUDVSW->SetColorBrush(255,255,255); - SXMaterialEditor::EditUDVSW->AddHandler(SXMaterialEditor_EditUDVSW_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditUDVSW->AddHandler(SXMaterialEditor_EditUDVSW_Enter, WM_KILLFOCUS); - - SXMaterialEditor::TrackBarUDVSX = SXGUICrTrackBar("", 410, 460, 220, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarUDVSX->SetMinMax(-100, 100); - SXMaterialEditor::TrackBarUDVSX->SetTickFrequency(10); - SXMaterialEditor::TrackBarUDVSX->AddHandler(SXMaterialEditor_TrackBarUDVSX_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::TrackBarUDVSY = SXGUICrTrackBar("", 410, 480, 220, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarUDVSY->SetMinMax(-100, 100); - SXMaterialEditor::TrackBarUDVSY->SetTickFrequency(10); - SXMaterialEditor::TrackBarUDVSY->AddHandler(SXMaterialEditor_TrackBarUDVSY_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::TrackBarUDVSZ = SXGUICrTrackBar("", 410, 500, 220, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarUDVSZ->SetMinMax(-100, 100); - SXMaterialEditor::TrackBarUDVSZ->SetTickFrequency(10); - SXMaterialEditor::TrackBarUDVSZ->AddHandler(SXMaterialEditor_TrackBarUDVSZ_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::TrackBarUDVSW = SXGUICrTrackBar("",410,520,220,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::TrackBarUDVSW->SetMinMax(-100, 100); - SXMaterialEditor::TrackBarUDVSW->SetTickFrequency(10); - SXMaterialEditor::TrackBarUDVSW->AddHandler(SXMaterialEditor_TrackBarUDVSW_MouseMove, WM_MOUSEMOVE); + SXMaterialEditor::StaticUDVSX = SXGUICrStatic("x:",305,460,15,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticUDVSX->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticUDVSX->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticUDVSX->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticUDVSX->setTransparentTextBk(true); + SXMaterialEditor::StaticUDVSX->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::StaticUDVSY = SXGUICrStatic("y:",305,480,15,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticUDVSY->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticUDVSY->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticUDVSY->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticUDVSY->setTransparentTextBk(true); + SXMaterialEditor::StaticUDVSY->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::StaticUDVSZ = SXGUICrStatic("z:",305,500,15,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticUDVSZ->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticUDVSZ->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticUDVSZ->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticUDVSZ->setTransparentTextBk(true); + SXMaterialEditor::StaticUDVSZ->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditUDVSZ = SXGUICrEdit("0",325,500,80,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditUDVSZ->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditUDVSZ->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditUDVSZ->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditUDVSZ->setTransparentTextBk(true); + SXMaterialEditor::EditUDVSZ->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditUDVSZ->addHandler(SXMaterialEditor_EditUDVSZ_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditUDVSZ->addHandler(SXMaterialEditor_EditUDVSZ_Enter, WM_KILLFOCUS); + + + SXMaterialEditor::StaticUDVSW = SXGUICrStatic("w:",305,520,15,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticUDVSW->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticUDVSW->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticUDVSW->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticUDVSW->setTransparentTextBk(true); + SXMaterialEditor::StaticUDVSW->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::EditUDVSW = SXGUICrEdit("0",325,520,80,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditUDVSW->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditUDVSW->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditUDVSW->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditUDVSW->setTransparentTextBk(true); + SXMaterialEditor::EditUDVSW->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditUDVSW->addHandler(SXMaterialEditor_EditUDVSW_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditUDVSW->addHandler(SXMaterialEditor_EditUDVSW_Enter, WM_KILLFOCUS); + + SXMaterialEditor::TrackBarUDVSX = SXGUICrTrackBar("", 410, 460, 220, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarUDVSX->setMinMax(-100, 100); + SXMaterialEditor::TrackBarUDVSX->setTickFrequency(10); + SXMaterialEditor::TrackBarUDVSX->addHandler(SXMaterialEditor_TrackBarUDVSX_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::TrackBarUDVSY = SXGUICrTrackBar("", 410, 480, 220, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarUDVSY->setMinMax(-100, 100); + SXMaterialEditor::TrackBarUDVSY->setTickFrequency(10); + SXMaterialEditor::TrackBarUDVSY->addHandler(SXMaterialEditor_TrackBarUDVSY_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::TrackBarUDVSZ = SXGUICrTrackBar("", 410, 500, 220, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarUDVSZ->setMinMax(-100, 100); + SXMaterialEditor::TrackBarUDVSZ->setTickFrequency(10); + SXMaterialEditor::TrackBarUDVSZ->addHandler(SXMaterialEditor_TrackBarUDVSZ_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::TrackBarUDVSW = SXGUICrTrackBar("",410,520,220,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::TrackBarUDVSW->setMinMax(-100, 100); + SXMaterialEditor::TrackBarUDVSW->setTickFrequency(10); + SXMaterialEditor::TrackBarUDVSW->addHandler(SXMaterialEditor_TrackBarUDVSW_MouseMove, WM_MOUSEMOVE); - SXMaterialEditor::CheckBoxUDPS = SXGUICrCheckBox("User data PS:", 305, 550, 100, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxUDPS->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXMaterialEditor::CheckBoxUDPS->SetColorText(0, 0, 0); - SXMaterialEditor::CheckBoxUDPS->SetColorTextBk(255, 255, 255); - SXMaterialEditor::CheckBoxUDPS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxUDPS->SetColorBrush(220, 220, 220); - - - SXMaterialEditor::CheckBoxUDPSInVS = SXGUICrCheckBox("in VS", 445, 550, 100, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0, false); - SXMaterialEditor::CheckBoxUDPSInVS->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::CheckBoxUDPSInVS->SetColorText(0,0,0); - SXMaterialEditor::CheckBoxUDPSInVS->SetColorTextBk(255,255,255); - SXMaterialEditor::CheckBoxUDPSInVS->SetTransparentTextBk(true); - SXMaterialEditor::CheckBoxUDPSInVS->SetColorBrush(220,220,220); - - - SXMaterialEditor::StaticUDPSX = SXGUICrStatic("x:",305,570,15,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticUDPSX->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticUDPSX->SetColorText(0,0,0); - SXMaterialEditor::StaticUDPSX->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticUDPSX->SetTransparentTextBk(true); - SXMaterialEditor::StaticUDPSX->SetColorBrush(220,220,220); - - SXMaterialEditor::StaticUDPSY = SXGUICrStatic("y:",305,590,15,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticUDPSY->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticUDPSY->SetColorText(0,0,0); - SXMaterialEditor::StaticUDPSY->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticUDPSY->SetTransparentTextBk(true); - SXMaterialEditor::StaticUDPSY->SetColorBrush(220,220,220); - - SXMaterialEditor::StaticUDPSZ = SXGUICrStatic("z:",305,610,15,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticUDPSZ->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticUDPSZ->SetColorText(0,0,0); - SXMaterialEditor::StaticUDPSZ->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticUDPSZ->SetTransparentTextBk(true); - SXMaterialEditor::StaticUDPSZ->SetColorBrush(220,220,220); - - SXMaterialEditor::StaticUDPSW = SXGUICrStatic("w:",305,630,15,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::StaticUDPSW->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::StaticUDPSW->SetColorText(0,0,0); - SXMaterialEditor::StaticUDPSW->SetColorTextBk(255,255,255); - SXMaterialEditor::StaticUDPSW->SetTransparentTextBk(true); - SXMaterialEditor::StaticUDPSW->SetColorBrush(220,220,220); - - - SXMaterialEditor::EditUDPSX = SXGUICrEdit("0",325,570,80,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditUDPSX->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditUDPSX->SetColorText(0,0,0); - SXMaterialEditor::EditUDPSX->SetColorTextBk(255,255,255); - SXMaterialEditor::EditUDPSX->SetTransparentTextBk(true); - SXMaterialEditor::EditUDPSX->SetColorBrush(255,255,255); - SXMaterialEditor::EditUDPSX->AddHandler(SXMaterialEditor_EditUDPSX_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditUDPSX->AddHandler(SXMaterialEditor_EditUDPSX_Enter, WM_KILLFOCUS); - - SXMaterialEditor::EditUDPSY = SXGUICrEdit("0",325,590,80,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditUDPSY->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditUDPSY->SetColorText(0,0,0); - SXMaterialEditor::EditUDPSY->SetColorTextBk(255,255,255); - SXMaterialEditor::EditUDPSY->SetTransparentTextBk(true); - SXMaterialEditor::EditUDPSY->SetColorBrush(255,255,255); - SXMaterialEditor::EditUDPSY->AddHandler(SXMaterialEditor_EditUDPSY_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditUDPSY->AddHandler(SXMaterialEditor_EditUDPSY_Enter, WM_KILLFOCUS); - - SXMaterialEditor::EditUDPSZ = SXGUICrEdit("0",325,610,80,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditUDPSZ->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditUDPSZ->SetColorText(0,0,0); - SXMaterialEditor::EditUDPSZ->SetColorTextBk(255,255,255); - SXMaterialEditor::EditUDPSZ->SetTransparentTextBk(true); - SXMaterialEditor::EditUDPSZ->SetColorBrush(255,255,255); - SXMaterialEditor::EditUDPSZ->AddHandler(SXMaterialEditor_EditUDPSZ_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditUDPSZ->AddHandler(SXMaterialEditor_EditUDPSZ_Enter, WM_KILLFOCUS); + SXMaterialEditor::CheckBoxUDPS = SXGUICrCheckBox("User data PS:", 305, 550, 100, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxUDPS->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXMaterialEditor::CheckBoxUDPS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxUDPS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxUDPS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxUDPS->setColorBrush(RGB(220, 220, 220)); + + + SXMaterialEditor::CheckBoxUDPSInVS = SXGUICrCheckBox("in VS", 445, 550, 100, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0, false); + SXMaterialEditor::CheckBoxUDPSInVS->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::CheckBoxUDPSInVS->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::CheckBoxUDPSInVS->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::CheckBoxUDPSInVS->setTransparentTextBk(true); + SXMaterialEditor::CheckBoxUDPSInVS->setColorBrush(RGB(220, 220, 220)); + + + SXMaterialEditor::StaticUDPSX = SXGUICrStatic("x:",305,570,15,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticUDPSX->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticUDPSX->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticUDPSX->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticUDPSX->setTransparentTextBk(true); + SXMaterialEditor::StaticUDPSX->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::StaticUDPSY = SXGUICrStatic("y:",305,590,15,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticUDPSY->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticUDPSY->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticUDPSY->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticUDPSY->setTransparentTextBk(true); + SXMaterialEditor::StaticUDPSY->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::StaticUDPSZ = SXGUICrStatic("z:",305,610,15,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticUDPSZ->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticUDPSZ->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticUDPSZ->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticUDPSZ->setTransparentTextBk(true); + SXMaterialEditor::StaticUDPSZ->setColorBrush(RGB(220, 220, 220)); + + SXMaterialEditor::StaticUDPSW = SXGUICrStatic("w:",305,630,15,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::StaticUDPSW->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::StaticUDPSW->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::StaticUDPSW->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::StaticUDPSW->setTransparentTextBk(true); + SXMaterialEditor::StaticUDPSW->setColorBrush(RGB(220, 220, 220)); + + + SXMaterialEditor::EditUDPSX = SXGUICrEdit("0",325,570,80,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditUDPSX->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditUDPSX->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditUDPSX->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditUDPSX->setTransparentTextBk(true); + SXMaterialEditor::EditUDPSX->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditUDPSX->addHandler(SXMaterialEditor_EditUDPSX_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditUDPSX->addHandler(SXMaterialEditor_EditUDPSX_Enter, WM_KILLFOCUS); + + SXMaterialEditor::EditUDPSY = SXGUICrEdit("0",325,590,80,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditUDPSY->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditUDPSY->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditUDPSY->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditUDPSY->setTransparentTextBk(true); + SXMaterialEditor::EditUDPSY->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditUDPSY->addHandler(SXMaterialEditor_EditUDPSY_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditUDPSY->addHandler(SXMaterialEditor_EditUDPSY_Enter, WM_KILLFOCUS); + + SXMaterialEditor::EditUDPSZ = SXGUICrEdit("0",325,610,80,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditUDPSZ->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditUDPSZ->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditUDPSZ->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditUDPSZ->setTransparentTextBk(true); + SXMaterialEditor::EditUDPSZ->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditUDPSZ->addHandler(SXMaterialEditor_EditUDPSZ_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditUDPSZ->addHandler(SXMaterialEditor_EditUDPSZ_Enter, WM_KILLFOCUS); - SXMaterialEditor::EditUDPSW = SXGUICrEdit("0",325,630,80,15,SXMaterialEditor::JobWindow->GetHWND(),0,0); - SXMaterialEditor::EditUDPSW->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXMaterialEditor::EditUDPSW->SetColorText(0,0,0); - SXMaterialEditor::EditUDPSW->SetColorTextBk(255,255,255); - SXMaterialEditor::EditUDPSW->SetTransparentTextBk(true); - SXMaterialEditor::EditUDPSW->SetColorBrush(255,255,255); - SXMaterialEditor::EditUDPSW->AddHandler(SXMaterialEditor_EditUDPSW_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXMaterialEditor::EditUDPSW->AddHandler(SXMaterialEditor_EditUDPSW_Enter, WM_KILLFOCUS); - - - SXMaterialEditor::TrackBarUDPSX = SXGUICrTrackBar("", 410, 570, 220, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarUDPSX->SetMinMax(-100, 100); - SXMaterialEditor::TrackBarUDPSX->SetTickFrequency(10); - SXMaterialEditor::TrackBarUDPSX->AddHandler(SXMaterialEditor_TrackBarUDPSX_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::TrackBarUDPSY = SXGUICrTrackBar("", 410, 590, 220, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarUDPSY->SetMinMax(-100, 100); - SXMaterialEditor::TrackBarUDPSY->SetTickFrequency(10); - SXMaterialEditor::TrackBarUDPSY->AddHandler(SXMaterialEditor_TrackBarUDPSY_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::TrackBarUDPSZ = SXGUICrTrackBar("", 410, 610, 220, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarUDPSZ->SetMinMax(-100, 100); - SXMaterialEditor::TrackBarUDPSZ->SetTickFrequency(10); - SXMaterialEditor::TrackBarUDPSZ->AddHandler(SXMaterialEditor_TrackBarUDPSZ_MouseMove, WM_MOUSEMOVE); - - SXMaterialEditor::TrackBarUDPSW = SXGUICrTrackBar("", 410, 630, 220, 15, SXMaterialEditor::JobWindow->GetHWND(), 0, 0); - SXMaterialEditor::TrackBarUDPSW->SetMinMax(-100, 100); - SXMaterialEditor::TrackBarUDPSW->SetTickFrequency(10); - SXMaterialEditor::TrackBarUDPSW->AddHandler(SXMaterialEditor_TrackBarUDPSW_MouseMove, WM_MOUSEMOVE); + SXMaterialEditor::EditUDPSW = SXGUICrEdit("0",325,630,80,15,SXMaterialEditor::JobWindow->getHWND(),0,0); + SXMaterialEditor::EditUDPSW->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXMaterialEditor::EditUDPSW->setColorText(RGB(0, 0, 0)); + SXMaterialEditor::EditUDPSW->setColorTextBk(RGB(255, 255, 255)); + SXMaterialEditor::EditUDPSW->setTransparentTextBk(true); + SXMaterialEditor::EditUDPSW->setColorBrush(RGB(255, 255, 255)); + SXMaterialEditor::EditUDPSW->addHandler(SXMaterialEditor_EditUDPSW_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMaterialEditor::EditUDPSW->addHandler(SXMaterialEditor_EditUDPSW_Enter, WM_KILLFOCUS); + + + SXMaterialEditor::TrackBarUDPSX = SXGUICrTrackBar("", 410, 570, 220, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarUDPSX->setMinMax(-100, 100); + SXMaterialEditor::TrackBarUDPSX->setTickFrequency(10); + SXMaterialEditor::TrackBarUDPSX->addHandler(SXMaterialEditor_TrackBarUDPSX_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::TrackBarUDPSY = SXGUICrTrackBar("", 410, 590, 220, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarUDPSY->setMinMax(-100, 100); + SXMaterialEditor::TrackBarUDPSY->setTickFrequency(10); + SXMaterialEditor::TrackBarUDPSY->addHandler(SXMaterialEditor_TrackBarUDPSY_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::TrackBarUDPSZ = SXGUICrTrackBar("", 410, 610, 220, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarUDPSZ->setMinMax(-100, 100); + SXMaterialEditor::TrackBarUDPSZ->setTickFrequency(10); + SXMaterialEditor::TrackBarUDPSZ->addHandler(SXMaterialEditor_TrackBarUDPSZ_MouseMove, WM_MOUSEMOVE); + + SXMaterialEditor::TrackBarUDPSW = SXGUICrTrackBar("", 410, 630, 220, 15, SXMaterialEditor::JobWindow->getHWND(), 0, 0); + SXMaterialEditor::TrackBarUDPSW->setMinMax(-100, 100); + SXMaterialEditor::TrackBarUDPSW->setTickFrequency(10); + SXMaterialEditor::TrackBarUDPSW->addHandler(SXMaterialEditor_TrackBarUDPSW_MouseMove, WM_MOUSEMOVE); } void SXMaterialEditor::DeleteAllElements() @@ -1289,7 +1303,7 @@ void SXMaterialEditor::MaterialEditorUpdate(DWORD timeDelta) { ID skit = -1; - if (!SXMaterialEditor::ComboBoxShaders->Focus()) + if (!SXMaterialEditor::ComboBoxShaders->getFocus()) { char vs[1024]; char ps[1024]; @@ -1298,12 +1312,12 @@ void SXMaterialEditor::MaterialEditorUpdate(DWORD timeDelta) SML_MtlGetPS(SXMaterialEditor::IDMat, ps); if ((skit = SXMaterialEditor::Shaders->Find(vs, ps)) >= 0) - SXMaterialEditor::ComboBoxShaders->SetSel(skit + 1); + SXMaterialEditor::ComboBoxShaders->setSel(skit + 1); else - SXMaterialEditor::ComboBoxShaders->SetSel(0); + SXMaterialEditor::ComboBoxShaders->setSel(0); } - if (!SXMaterialEditor::ComboBoxParamL->Focus()) + if (!SXMaterialEditor::ComboBoxParamL->getFocus()) { float thikcness = SML_MtlGetThickness(SXMaterialEditor::IDMat); float roughness = SML_MtlGetRoughness(SXMaterialEditor::IDMat); @@ -1311,11 +1325,11 @@ void SXMaterialEditor::MaterialEditorUpdate(DWORD timeDelta) skit = -1; if ((skit = SXMaterialEditor::ParamL->Find(thikcness, roughness, f0)) >= 0) - SXMaterialEditor::ComboBoxParamL->SetSel(skit + 1); + SXMaterialEditor::ComboBoxParamL->setSel(skit + 1); else - SXMaterialEditor::ComboBoxParamL->SetSel(0); + SXMaterialEditor::ComboBoxParamL->setSel(0); } - if (SXMaterialEditor::CheckBoxModelRot->GetCheck()) + if (SXMaterialEditor::CheckBoxModelRot->getCheck()) SRender_SimModelSetRotationY(SRender_SimModelGetRotationY() - float(timeDelta) * 0.001f * 0.25); } \ No newline at end of file diff --git a/source/sxmaterialeditor/material_editor.h b/source/sxmaterialeditor/material_editor.h index 30c861ea55ce9167a92d3a00a2e5ffc65df86c47..c84912bc2ca7424d8a6e91014be3fd7c8f89f6fa 100644 --- a/source/sxmaterialeditor/material_editor.h +++ b/source/sxmaterialeditor/material_editor.h @@ -23,7 +23,7 @@ namespace SXMaterialEditor { extern ISXGUIBaseWnd* JobWindow; - extern ISXGUIMenu* MainMenu; + extern ISXGUIMenuWindow* MainMenu; extern ISXGUIBaseWnd* WindowRender; extern ISXGUIToolBar* ToolBar; diff --git a/source/sxmaterialeditor/sxmaterialeditor.cpp b/source/sxmaterialeditor/sxmaterialeditor.cpp index 8dd53bd838b2eabe8f352975255dd47ece6a51e3..06e19f1f8f8814e5807cc42d203152d3cc2ec709 100644 --- a/source/sxmaterialeditor/sxmaterialeditor.cpp +++ b/source/sxmaterialeditor/sxmaterialeditor.cpp @@ -4,9 +4,9 @@ Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017 See the license in LICENSE ******************************************************/ -/*! -\file -Главный файл редактора материалов SXMaterialEditor +/*! +\file +Главный файл редактора материалов SXMaterialEditor */ /*! @@ -422,21 +422,22 @@ ps - отправка в пиксельный шейдер \n int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { SkyXEngine_PreviewCreate(); - SXGUIRegClass::RegGroupBox(); + SXGUIinit(); srand((unsigned int)time(0)); SXMaterialEditor::InitAllElements(); SXMaterialEditor::Nulling(); - SkyXEngine_Init(SXMaterialEditor::WindowRender->GetHWND(), SXMaterialEditor::JobWindow->GetHWND()); + SkyXEngine_Init(SXMaterialEditor::WindowRender->getHWND(), SXMaterialEditor::JobWindow->getHWND()); + SkyXEngine_RunGenPreview(); Core_0SetCVarInt("r_final_image", DS_RT_SCENELIGHT); - SXMaterialEditor::MainMenu->CheckItem(ID_FINALIMAGE_LIGHTINGSCENE, true); - SXMaterialEditor::CheckBoxTBRLighting->SetCheck(true); + SXMaterialEditor::MainMenu->setCheckItem(ID_FINALIMAGE_LIGHTINGSCENE, true); + SXMaterialEditor::CheckBoxTBRLighting->setCheck(true); - SXMaterialEditor::CheckBoxTBCam->SetCheck(true); - SRender_EditorCameraSetMove(SXMaterialEditor::CheckBoxTBCam->GetCheck()); + SXMaterialEditor::CheckBoxTBCam->setCheck(true); + SRender_EditorCameraSetMove(SXMaterialEditor::CheckBoxTBCam->getCheck()); char shaderskitpath[1024]; sprintf(shaderskitpath, "%s%s", Core_RStringGet(G_RI_STRING_PATH_EXE), "\\shaders_kit.cfg"); @@ -445,10 +446,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin for (int i = 0; i < SXMaterialEditor::Shaders->GetCount(); ++i) { - SXMaterialEditor::ComboBoxShaders->AddItem(SXMaterialEditor::Shaders->GetName(i)); + SXMaterialEditor::ComboBoxShaders->addItem(SXMaterialEditor::Shaders->GetName(i)); } - SXMaterialEditor::ComboBoxShaders->SetSel(0); + SXMaterialEditor::ComboBoxShaders->setSel(0); char paramlpath[1024]; @@ -458,16 +459,16 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin for (int i = 0; i < SXMaterialEditor::ParamL->GetCount(); ++i) { - SXMaterialEditor::ComboBoxParamL->AddItem(SXMaterialEditor::ParamL->GetName(i)); + SXMaterialEditor::ComboBoxParamL->addItem(SXMaterialEditor::ParamL->GetName(i)); } - SXMaterialEditor::ComboBoxParamL->SetSel(0); + SXMaterialEditor::ComboBoxParamL->setSel(0); SGCore_SkyBoxLoadTex("sky/sky_2_cube.dds"); - SXMaterialEditor::EditSkyBox->SetText("sky/sky_2_cube.dds"); + SXMaterialEditor::EditSkyBox->setText("sky/sky_2_cube.dds"); - SRender_GetCamera()->SetPosition(&float3(0, 0, -100)); + SRender_GetCamera()->setPosition(&float3(0, 0, -100)); SRender_SimModelAdd("sphere.dse"); @@ -483,13 +484,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin SML_LigthsSetEnable(SML_LigthsGetCount() - 1, true); SML_LigthsSetName(SML_LigthsGetCount() - 1, "sun"); - SGCore_LoadTexLoadTextures(); + SGCore_LoadTexAllLoad(); SXMaterialEditor::InitMtl(SRender_SimModelGetIDMtl()); SXMaterialEditor::IDMat = SRender_SimModelGetIDMtl(); SkyXEngine_PreviewKill(); - SXMaterialEditor::JobWindow->Visible(true); + SXMaterialEditor::JobWindow->setVisible(true); int result = SkyXEngine_CycleMain(); SkyXEngine_Kill(); SXMaterialEditor::DeleteAllElements(); diff --git a/source/sxmaterialeditor/trackbars_callback.cpp b/source/sxmaterialeditor/trackbars_callback.cpp index 960d1e18ecec7392f985142e63b16be1244214f5..f2a85ae51cbf13170188cca892813d0db44b934a 100644 --- a/source/sxmaterialeditor/trackbars_callback.cpp +++ b/source/sxmaterialeditor/trackbars_callback.cpp @@ -6,9 +6,9 @@ LRESULT SXMaterialEditor_TrackBarPenetration_MouseMove(HWND hwnd, UINT msg, WPAR char thickness[64]; thickness[0] = '0'; - int pos = SXMaterialEditor::TrackBarPenetration->GetPos(); + int pos = SXMaterialEditor::TrackBarPenetration->getPos(); sprintf(thickness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditPenetration->SetText(thickness); + SXMaterialEditor::EditPenetration->setText(thickness); SML_MtlSetPenetration(SXMaterialEditor::IDMat, float(pos)*0.01f); @@ -20,9 +20,9 @@ LRESULT SXMaterialEditor_TrackBarRoughness_MouseMove(HWND hwnd, UINT msg, WPARAM char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarRoughness->GetPos(); + int pos = SXMaterialEditor::TrackBarRoughness->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditRoughness->SetText(roughness); + SXMaterialEditor::EditRoughness->setText(roughness); SML_MtlSetRoughness(SXMaterialEditor::IDMat, float(pos)*0.01f); @@ -34,9 +34,9 @@ LRESULT SXMaterialEditor_TrackBarThickness_MouseMove(HWND hwnd, UINT msg, WPARAM char thickness[64]; thickness[0] = '0'; - int pos = SXMaterialEditor::TrackBarThickness->GetPos(); + int pos = SXMaterialEditor::TrackBarThickness->getPos(); sprintf(thickness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditThickness->SetText(thickness); + SXMaterialEditor::EditThickness->setText(thickness); SML_MtlSetThickness(SXMaterialEditor::IDMat, float(pos)*0.01f); @@ -48,9 +48,9 @@ LRESULT SXMaterialEditor_TrackBarF0_MouseMove(HWND hwnd, UINT msg, WPARAM wParam char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarF0->GetPos(); + int pos = SXMaterialEditor::TrackBarF0->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditF0->SetText(roughness); + SXMaterialEditor::EditF0->setText(roughness); SML_MtlSetF0(SXMaterialEditor::IDMat, float(pos)*0.01f); @@ -64,9 +64,9 @@ LRESULT SXMaterialEditor_TrackBarUDVSX_MouseMove(HWND hwnd, UINT msg, WPARAM wPa char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarUDVSX->GetPos(); + int pos = SXMaterialEditor::TrackBarUDVSX->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditUDVSX->SetText(roughness); + SXMaterialEditor::EditUDVSX->setText(roughness); SML_MtlSetUDVS(SXMaterialEditor::IDMat, 0, float(pos)*0.01f); @@ -78,9 +78,9 @@ LRESULT SXMaterialEditor_TrackBarUDVSY_MouseMove(HWND hwnd, UINT msg, WPARAM wPa char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarUDVSY->GetPos(); + int pos = SXMaterialEditor::TrackBarUDVSY->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditUDVSY->SetText(roughness); + SXMaterialEditor::EditUDVSY->setText(roughness); SML_MtlSetUDVS(SXMaterialEditor::IDMat, 1, float(pos)*0.01f); @@ -92,9 +92,9 @@ LRESULT SXMaterialEditor_TrackBarUDVSZ_MouseMove(HWND hwnd, UINT msg, WPARAM wPa char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarUDVSZ->GetPos(); + int pos = SXMaterialEditor::TrackBarUDVSZ->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditUDVSZ->SetText(roughness); + SXMaterialEditor::EditUDVSZ->setText(roughness); SML_MtlSetUDVS(SXMaterialEditor::IDMat, 2, float(pos)*0.01f); @@ -106,9 +106,9 @@ LRESULT SXMaterialEditor_TrackBarUDVSW_MouseMove(HWND hwnd, UINT msg, WPARAM wPa char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarUDVSW->GetPos(); + int pos = SXMaterialEditor::TrackBarUDVSW->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditUDVSW->SetText(roughness); + SXMaterialEditor::EditUDVSW->setText(roughness); SML_MtlSetUDVS(SXMaterialEditor::IDMat, 3, float(pos)*0.01f); @@ -122,9 +122,9 @@ LRESULT SXMaterialEditor_TrackBarUDPSX_MouseMove(HWND hwnd, UINT msg, WPARAM wPa char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarUDPSX->GetPos(); + int pos = SXMaterialEditor::TrackBarUDPSX->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditUDPSX->SetText(roughness); + SXMaterialEditor::EditUDPSX->setText(roughness); SML_MtlSetUDPS(SXMaterialEditor::IDMat, 0, float(pos)*0.01f); @@ -136,9 +136,9 @@ LRESULT SXMaterialEditor_TrackBarUDPSY_MouseMove(HWND hwnd, UINT msg, WPARAM wPa char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarUDPSY->GetPos(); + int pos = SXMaterialEditor::TrackBarUDPSY->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditUDPSY->SetText(roughness); + SXMaterialEditor::EditUDPSY->setText(roughness); SML_MtlSetUDPS(SXMaterialEditor::IDMat, 1, float(pos)*0.01f); @@ -150,9 +150,9 @@ LRESULT SXMaterialEditor_TrackBarUDPSZ_MouseMove(HWND hwnd, UINT msg, WPARAM wPa char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarUDPSZ->GetPos(); + int pos = SXMaterialEditor::TrackBarUDPSZ->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditUDPSZ->SetText(roughness); + SXMaterialEditor::EditUDPSZ->setText(roughness); SML_MtlSetUDPS(SXMaterialEditor::IDMat, 2, float(pos)*0.01f); @@ -164,9 +164,9 @@ LRESULT SXMaterialEditor_TrackBarUDPSW_MouseMove(HWND hwnd, UINT msg, WPARAM wPa char roughness[64]; roughness[0] = '0'; - int pos = SXMaterialEditor::TrackBarUDPSW->GetPos(); + int pos = SXMaterialEditor::TrackBarUDPSW->getPos(); sprintf(roughness, "%.2f", float(pos)*0.01f); - SXMaterialEditor::EditUDPSW->SetText(roughness); + SXMaterialEditor::EditUDPSW->setText(roughness); SML_MtlSetUDPS(SXMaterialEditor::IDMat, 3, float(pos)*0.01f); diff --git a/source/sxparticleseditor/callback_common.cpp b/source/sxparticleseditor/callback_common.cpp index 38c29fbd68dd80973af24165aa8e9252e44e2e90..00afd317ecc18cfc20bbe8d62668c2a793b4713d 100644 --- a/source/sxparticleseditor/callback_common.cpp +++ b/source/sxparticleseditor/callback_common.cpp @@ -45,18 +45,18 @@ LRESULT ComMenuId(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) else if (id == ID_VIEW_GRID) { - SXParticlesEditor::MainMenu->CheckItem(id, !SXParticlesEditor::MainMenu->GetCheckedItem(id)); - SRender_EditorSetRenderGrid(SXParticlesEditor::MainMenu->GetCheckedItem(id)); + SXParticlesEditor::MainMenu->setCheckItem(id, !SXParticlesEditor::MainMenu->getCheckedItem(id)); + SRender_EditorSetRenderGrid(SXParticlesEditor::MainMenu->getCheckedItem(id)); } else if (id == ID_VIEW_AXES) { - SXParticlesEditor::MainMenu->CheckItem(id, !SXParticlesEditor::MainMenu->GetCheckedItem(id)); - SRender_EditorSetRenderAxesStatic(SXParticlesEditor::MainMenu->GetCheckedItem(id)); + SXParticlesEditor::MainMenu->setCheckItem(id, !SXParticlesEditor::MainMenu->getCheckedItem(id)); + SRender_EditorSetRenderAxesStatic(SXParticlesEditor::MainMenu->getCheckedItem(id)); } else if (id == ID_VIEW_BOUND) { - SXParticlesEditor::MainMenu->CheckItem(id, !SXParticlesEditor::MainMenu->GetCheckedItem(id)); - SXParticlesEditor::canRenderBound = SXParticlesEditor::MainMenu->GetCheckedItem(id); + SXParticlesEditor::MainMenu->setCheckItem(id, !SXParticlesEditor::MainMenu->getCheckedItem(id)); + SXParticlesEditor::canRenderBound = SXParticlesEditor::MainMenu->getCheckedItem(id); } return 0; @@ -68,35 +68,35 @@ LRESULT SXParticlesEditor_ToolBar1_CallWmCommand(HWND hwnd, UINT msg, WPARAM wPa HWND handle_elem = (HWND)(lParam); if (Notification == BN_CLICKED) { - if (SXParticlesEditor::ButtonTBReOpen->GetHWND() == handle_elem) + if (SXParticlesEditor::ButtonTBReOpen->getHWND() == handle_elem) { SXParticlesEditor::EffReOpen(); } - else if (SXParticlesEditor::ButtonTBSave->GetHWND() == handle_elem) + else if (SXParticlesEditor::ButtonTBSave->getHWND() == handle_elem) { SXParticlesEditor::EffSave(); } - else if (SXParticlesEditor::CheckBoxTBGrid->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxTBGrid->getHWND() == handle_elem) { - SXParticlesEditor::MainMenu->CheckItem(ID_VIEW_GRID, SXParticlesEditor::CheckBoxTBGrid->GetCheck()); - SRender_EditorSetRenderGrid(SXParticlesEditor::CheckBoxTBGrid->GetCheck()); + SXParticlesEditor::MainMenu->setCheckItem(ID_VIEW_GRID, SXParticlesEditor::CheckBoxTBGrid->getCheck()); + SRender_EditorSetRenderGrid(SXParticlesEditor::CheckBoxTBGrid->getCheck()); } - else if (SXParticlesEditor::CheckBoxTBAxes->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxTBAxes->getHWND() == handle_elem) { - SXParticlesEditor::MainMenu->CheckItem(ID_VIEW_AXES, SXParticlesEditor::CheckBoxTBAxes->GetCheck()); - SRender_EditorSetRenderAxesStatic(SXParticlesEditor::CheckBoxTBAxes->GetCheck()); + SXParticlesEditor::MainMenu->setCheckItem(ID_VIEW_AXES, SXParticlesEditor::CheckBoxTBAxes->getCheck()); + SRender_EditorSetRenderAxesStatic(SXParticlesEditor::CheckBoxTBAxes->getCheck()); } - else if (SXParticlesEditor::CheckBoxTBBound->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxTBBound->getHWND() == handle_elem) { - SXParticlesEditor::MainMenu->CheckItem(ID_VIEW_BOUND, SXParticlesEditor::CheckBoxTBBound->GetCheck()); - SXParticlesEditor::canRenderBound = SXParticlesEditor::CheckBoxTBBound->GetCheck(); + SXParticlesEditor::MainMenu->setCheckItem(ID_VIEW_BOUND, SXParticlesEditor::CheckBoxTBBound->getCheck()); + SXParticlesEditor::canRenderBound = SXParticlesEditor::CheckBoxTBBound->getCheck(); } - else if (SXParticlesEditor::CheckBoxTBPlay->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxTBPlay->getHWND() == handle_elem) { - Core_TimeWorkingSet(Core_RIntGet(G_RI_INT_TIMER_RENDER), SXParticlesEditor::CheckBoxTBPlay->GetCheck()); + Core_TimeWorkingSet(Core_RIntGet(G_RI_INT_TIMER_RENDER), SXParticlesEditor::CheckBoxTBPlay->getCheck()); if (SXParticlesEditor::SelEffID >= 0) { if (SXParticlesEditor::SelEmitterID >= 0 && !SPE_EmitterEnableGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID)) @@ -105,29 +105,29 @@ LRESULT SXParticlesEditor_ToolBar1_CallWmCommand(HWND hwnd, UINT msg, WPARAM wPa SXParticlesEditor_ListBoxEffects_Click(hwnd, msg, wParam, lParam); } else - SXParticlesEditor::CheckBoxTBPlay->SetCheck(false); + SXParticlesEditor::CheckBoxTBPlay->setCheck(false); - SXParticlesEditor::CheckBoxTBPause->SetCheck(false); - SXParticlesEditor::CheckBoxTBStop->SetCheck(false); + SXParticlesEditor::CheckBoxTBPause->setCheck(false); + SXParticlesEditor::CheckBoxTBStop->setCheck(false); } - else if (SXParticlesEditor::CheckBoxTBPause->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxTBPause->getHWND() == handle_elem) { - if (SXParticlesEditor::CheckBoxTBPlay->GetCheck()) - Core_TimeWorkingSet(Core_RIntGet(G_RI_INT_TIMER_RENDER), !SXParticlesEditor::CheckBoxTBPause->GetCheck()); + if (SXParticlesEditor::CheckBoxTBPlay->getCheck()) + Core_TimeWorkingSet(Core_RIntGet(G_RI_INT_TIMER_RENDER), !SXParticlesEditor::CheckBoxTBPause->getCheck()); else - SXParticlesEditor::CheckBoxTBPause->SetCheck(false); + SXParticlesEditor::CheckBoxTBPause->setCheck(false); - SXParticlesEditor::CheckBoxTBPlay->SetCheck(false); - SXParticlesEditor::CheckBoxTBStop->SetCheck(false); + SXParticlesEditor::CheckBoxTBPlay->setCheck(false); + SXParticlesEditor::CheckBoxTBStop->setCheck(false); } - else if (SXParticlesEditor::CheckBoxTBStop->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxTBStop->getHWND() == handle_elem) { Core_TimeWorkingSet(Core_RIntGet(G_RI_INT_TIMER_RENDER), true); if (SXParticlesEditor::SelEffID >= 0) SPE_EffectEnableSet(SXParticlesEditor::SelEffID, false); - SXParticlesEditor::CheckBoxTBPlay->SetCheck(false); - SXParticlesEditor::CheckBoxTBPause->SetCheck(false); + SXParticlesEditor::CheckBoxTBPlay->setCheck(false); + SXParticlesEditor::CheckBoxTBPause->setCheck(false); } } @@ -172,11 +172,11 @@ LRESULT SXParticlesEditor_ButtonTextureSel_Click(HWND hwnd, UINT msg, WPARAM wPa char tmppath[1024]; tmppath[0] = 0; char tmpname[1024]; - SXGUIDialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); - if (def_str_validate(tmppath)) + //gui_func::dialogs::SelectFile(SXGUI_DIALOG_FILE_OPEN, tmppath, 0, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), FILE_FILTER_TEXTURE); + if (gui_func::dialogs::SelectFileOwn(tmpname, tmppath, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), "dds", "Select texture", true, Core_RStringGet(G_RI_STRING_PATH_GS_TEXTURES), SXParticlesEditor::JobWindow->getHWND(), SkyXEngine_EditorHandlerGetPreviewData, SkyXEngine_EditorHandlerGetTextureInfo)) { - StrCutName(tmppath, tmpname); - SXParticlesEditor::EditTexture->SetText(tmpname); + //StrCutName(tmppath, tmpname); + SXParticlesEditor::EditTexture->setText(tmpname); if (SXParticlesEditor::SelEffID >= 0 && SXParticlesEditor::SelEmitterID >= 0) SPE_EmitterTextureSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, tmpname); @@ -197,169 +197,169 @@ LRESULT SXParticlesEditor_GroupBoxData2_CallWmCommand(HWND hwnd, UINT msg, WPARA { HWND handle_elem = (HWND)(lParam); - if (SXParticlesEditor::CheckBoxTrack->GetHWND() == handle_elem) + if (SXParticlesEditor::CheckBoxTrack->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Track, SXParticlesEditor::CheckBoxTrack->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Track, SXParticlesEditor::CheckBoxTrack->getCheck()); } - else if (SXParticlesEditor::CheckBoxAccelerationDispXNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxAccelerationDispXNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispXNeg, SXParticlesEditor::CheckBoxAccelerationDispXNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispXNeg, SXParticlesEditor::CheckBoxAccelerationDispXNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxAccelerationDispYNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxAccelerationDispYNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispYNeg, SXParticlesEditor::CheckBoxAccelerationDispYNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispYNeg, SXParticlesEditor::CheckBoxAccelerationDispYNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxAccelerationDispZNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxAccelerationDispZNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispZNeg, SXParticlesEditor::CheckBoxAccelerationDispZNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispZNeg, SXParticlesEditor::CheckBoxAccelerationDispZNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxVelocityDispXNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxVelocityDispXNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispXNeg, SXParticlesEditor::CheckBoxVelocityDispXNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispXNeg, SXParticlesEditor::CheckBoxVelocityDispXNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxVelocityDispYNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxVelocityDispYNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispYNeg, SXParticlesEditor::CheckBoxVelocityDispYNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispYNeg, SXParticlesEditor::CheckBoxVelocityDispYNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxVelocityDispZNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxVelocityDispZNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispZNeg, SXParticlesEditor::CheckBoxVelocityDispZNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispZNeg, SXParticlesEditor::CheckBoxVelocityDispZNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateXNeg, SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateXNeg, SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxSpawnOriginDispXPos->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxSpawnOriginDispXPos->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateXPos, SXParticlesEditor::CheckBoxSpawnOriginDispXPos->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateXPos, SXParticlesEditor::CheckBoxSpawnOriginDispXPos->getCheck()); } - else if (SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateYNeg, SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateYNeg, SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxSpawnOriginDispYPos->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxSpawnOriginDispYPos->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateYPos, SXParticlesEditor::CheckBoxSpawnOriginDispYPos->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateYPos, SXParticlesEditor::CheckBoxSpawnOriginDispYPos->getCheck()); } - else if (SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateZNeg, SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateZNeg, SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxSpawnOriginDispZPos->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxSpawnOriginDispZPos->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateZPos, SXParticlesEditor::CheckBoxSpawnOriginDispZPos->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateZPos, SXParticlesEditor::CheckBoxSpawnOriginDispZPos->getCheck()); } - else if (SXParticlesEditor::CheckBoxLighting->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxLighting->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Lighting, SXParticlesEditor::CheckBoxLighting->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Lighting, SXParticlesEditor::CheckBoxLighting->getCheck()); } - else if (SXParticlesEditor::CheckBoxFigureRotRand->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxFigureRotRand->getHWND() == handle_elem) { - SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureRotRand, SXParticlesEditor::CheckBoxFigureRotRand->GetCheck()); + SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureRotRand, SXParticlesEditor::CheckBoxFigureRotRand->getCheck()); } - else if (SXParticlesEditor::CheckBoxFigureTapX->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxFigureTapX->getHWND() == handle_elem) { - SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapX, SXParticlesEditor::CheckBoxFigureTapX->GetCheck()); + SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapX, SXParticlesEditor::CheckBoxFigureTapX->getCheck()); } - else if (SXParticlesEditor::CheckBoxFigureTapY->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxFigureTapY->getHWND() == handle_elem) { - SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapY, SXParticlesEditor::CheckBoxFigureTapY->GetCheck()); + SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapY, SXParticlesEditor::CheckBoxFigureTapY->getCheck()); } - else if (SXParticlesEditor::CheckBoxFigureTapZ->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxFigureTapZ->getHWND() == handle_elem) { - SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapZ, SXParticlesEditor::CheckBoxFigureTapZ->GetCheck()); + SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapZ, SXParticlesEditor::CheckBoxFigureTapZ->getCheck()); } - else if (SXParticlesEditor::CheckBoxCircle->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxCircle->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircle, SXParticlesEditor::CheckBoxCircle->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircle, SXParticlesEditor::CheckBoxCircle->getCheck()); } - else if (SXParticlesEditor::CheckBoxCircleAngleDispNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxCircleAngleDispNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngleDispNeg, SXParticlesEditor::CheckBoxCircleAngleDispNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngleDispNeg, SXParticlesEditor::CheckBoxCircleAngleDispNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxRotate->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxRotate->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotate, SXParticlesEditor::CheckBoxRotate->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotate, SXParticlesEditor::CheckBoxRotate->getCheck()); } - else if (SXParticlesEditor::CheckBoxRotateAngleDispNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxRotateAngleDispNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngleDispNeg, SXParticlesEditor::CheckBoxRotateAngleDispNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngleDispNeg, SXParticlesEditor::CheckBoxRotateAngleDispNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxDeviation->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxDeviation->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviation, SXParticlesEditor::CheckBoxDeviation->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviation, SXParticlesEditor::CheckBoxDeviation->getCheck()); } - else if (SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngleDispNeg, SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngleDispNeg, SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->getCheck()); } - else if (SXParticlesEditor::CheckBoxDeviationTapX->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxDeviationTapX->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapX, SXParticlesEditor::CheckBoxDeviationTapX->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapX, SXParticlesEditor::CheckBoxDeviationTapX->getCheck()); } - else if (SXParticlesEditor::CheckBoxDeviationTapY->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxDeviationTapY->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapY, SXParticlesEditor::CheckBoxDeviationTapY->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapY, SXParticlesEditor::CheckBoxDeviationTapY->getCheck()); } - else if (SXParticlesEditor::CheckBoxDeviationTapZ->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxDeviationTapZ->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapZ, SXParticlesEditor::CheckBoxDeviationTapZ->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapZ, SXParticlesEditor::CheckBoxDeviationTapZ->getCheck()); } - else if (SXParticlesEditor::CheckBoxCollisionDelete->GetHWND() == handle_elem) + else if (SXParticlesEditor::CheckBoxCollisionDelete->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CollisionDelete, SXParticlesEditor::CheckBoxCollisionDelete->GetCheck()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CollisionDelete, SXParticlesEditor::CheckBoxCollisionDelete->getCheck()); } } else if (Notification == CBN_SELCHANGE) { HWND handle_elem = (HWND)(lParam); - if (SXParticlesEditor::ComboBoxBoundType->GetHWND() == handle_elem) + if (SXParticlesEditor::ComboBoxBoundType->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundType, (PARTICLESTYPE_BOUND)SXParticlesEditor::ComboBoxBoundType->GetSel()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundType, (PARTICLESTYPE_BOUND)SXParticlesEditor::ComboBoxBoundType->getSel()); } - else if (SXParticlesEditor::ComboBoxSpawnPosType->GetHWND() == handle_elem) + else if (SXParticlesEditor::ComboBoxSpawnPosType->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnPosType, (PARTICLESTYPE_SPAWNPOS)SXParticlesEditor::ComboBoxSpawnPosType->GetSel()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnPosType, (PARTICLESTYPE_SPAWNPOS)SXParticlesEditor::ComboBoxSpawnPosType->getSel()); } - else if (SXParticlesEditor::ComboBoxFigureType->GetHWND() == handle_elem) + else if (SXParticlesEditor::ComboBoxFigureType->getHWND() == handle_elem) { - SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureType, (PARTICLESTYPE_FIGURE)SXParticlesEditor::ComboBoxFigureType->GetSel()); + SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureType, (PARTICLESTYPE_FIGURE)SXParticlesEditor::ComboBoxFigureType->getSel()); } - else if (SXParticlesEditor::ComboBoxAlphaBlendType->GetHWND() == handle_elem) + else if (SXParticlesEditor::ComboBoxAlphaBlendType->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaBlendType, (PARTICLESTYPE_ALPHABLEND)SXParticlesEditor::ComboBoxAlphaBlendType->GetSel()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaBlendType, (PARTICLESTYPE_ALPHABLEND)SXParticlesEditor::ComboBoxAlphaBlendType->getSel()); } - else if (SXParticlesEditor::ComboBoxAlphaDependAge->GetHWND() == handle_elem) + else if (SXParticlesEditor::ComboBoxAlphaDependAge->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaDependAge, (PARTICLESTYPE_DEPEND)SXParticlesEditor::ComboBoxAlphaDependAge->GetSel()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaDependAge, (PARTICLESTYPE_DEPEND)SXParticlesEditor::ComboBoxAlphaDependAge->getSel()); } - else if (SXParticlesEditor::ComboBoxSizeDependAge->GetHWND() == handle_elem) + else if (SXParticlesEditor::ComboBoxSizeDependAge->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDependAge, (PARTICLESTYPE_DEPEND)SXParticlesEditor::ComboBoxSizeDependAge->GetSel()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDependAge, (PARTICLESTYPE_DEPEND)SXParticlesEditor::ComboBoxSizeDependAge->getSel()); } - else if (SXParticlesEditor::ComboBoxCircleAxis->GetHWND() == handle_elem) + else if (SXParticlesEditor::ComboBoxCircleAxis->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAxis, (PARTICLES_AXIS)SXParticlesEditor::ComboBoxCircleAxis->GetSel()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAxis, (PARTICLES_AXIS)SXParticlesEditor::ComboBoxCircleAxis->getSel()); } - else if (SXParticlesEditor::ComboBoxDeviationType->GetHWND() == handle_elem) + else if (SXParticlesEditor::ComboBoxDeviationType->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationType, (PARTICLESTYPE_DEVIATION)SXParticlesEditor::ComboBoxDeviationType->GetSel()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationType, (PARTICLESTYPE_DEVIATION)SXParticlesEditor::ComboBoxDeviationType->getSel()); } - else if (SXParticlesEditor::ComboBoxDeviationAxis->GetHWND() == handle_elem) + else if (SXParticlesEditor::ComboBoxDeviationAxis->getHWND() == handle_elem) { - SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationAxis, (PARTICLES_AXIS)SXParticlesEditor::ComboBoxDeviationAxis->GetSel()); + SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationAxis, (PARTICLES_AXIS)SXParticlesEditor::ComboBoxDeviationAxis->getSel()); } } return 0; @@ -377,12 +377,12 @@ LRESULT SXParticlesEditor_EditEffName_Enter(HWND hwnd, UINT msg, WPARAM wParam, if (def_str_validate(ttext)) { SPE_EffectNameSet(SXParticlesEditor::SelEffID, ttext); - SXParticlesEditor::ListBoxEffects->SetTextItem(SXParticlesEditor::ListBoxEffects->GetSel(), ttext); + SXParticlesEditor::ListBoxEffects->setItemText(SXParticlesEditor::ListBoxEffects->getSel(), ttext); } else { SPE_EffectNameGet(SXParticlesEditor::SelEffID, ttext); - SXParticlesEditor::EditEffName->SetText(ttext); + SXParticlesEditor::EditEffName->setText(ttext); MessageBox(0, "unresolved name", 0, 0); } return 0; @@ -401,22 +401,22 @@ LRESULT SXParticlesEditor_Edits_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM return 0; } - if (hwnd == SXParticlesEditor::EditName->GetHWND()) + if (hwnd == SXParticlesEditor::EditName->getHWND()) { if (def_str_validate(ttext)) { SPE_EmitterNameSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, ttext); - SXParticlesEditor::ListBoxEmitters->SetTextItem(SXParticlesEditor::ListBoxEmitters->GetSel(), ttext); + SXParticlesEditor::ListBoxEmitters->setItemText(SXParticlesEditor::ListBoxEmitters->getSel(), ttext); } else { SPE_EmitterNameGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, ttext); - SXParticlesEditor::EditName->SetText(ttext); + SXParticlesEditor::EditName->setText(ttext); MessageBox(0,"unresolved name",0,0); return 0; } } - else if (hwnd == SXParticlesEditor::EditCount->GetHWND()) + else if (hwnd == SXParticlesEditor::EditCount->getHWND()) { sscanf(ttext, "%d", &tint); if (tint > 0) @@ -424,230 +424,230 @@ LRESULT SXParticlesEditor_Edits_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM else { MessageBox(0, "unresolved count particles", 0, 0); - SXParticlesEditor::EditCount->SetText(String(SPE_EmitterCountGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID)).c_str()); + SXParticlesEditor::EditCount->setText(String(SPE_EmitterCountGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID)).c_str()); return 0; } } - else if (hwnd == SXParticlesEditor::EditColorCoef->GetHWND()) + else if (hwnd == SXParticlesEditor::EditColorCoef->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, ColorCoef, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditColorR->GetHWND()) + else if (hwnd == SXParticlesEditor::EditColorR->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.x, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditColorG->GetHWND()) + else if (hwnd == SXParticlesEditor::EditColorG->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.y, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditColorB->GetHWND()) + else if (hwnd == SXParticlesEditor::EditColorB->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.z, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditColorA->GetHWND()) + else if (hwnd == SXParticlesEditor::EditColorA->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.w, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditReCreateCount->GetHWND()) + else if (hwnd == SXParticlesEditor::EditReCreateCount->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, ReCreateCount, String(ttext).ToInt()); } - else if (hwnd == SXParticlesEditor::EditSoftCoef->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSoftCoef->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SoftCoef, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditRefractionCoef->GetHWND()) + else if (hwnd == SXParticlesEditor::EditRefractionCoef->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, RefractionCoef, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditTransparencyCoef->GetHWND()) + else if (hwnd == SXParticlesEditor::EditTransparencyCoef->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TransparencyCoef, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditFigureCountQuads->GetHWND()) + else if (hwnd == SXParticlesEditor::EditFigureCountQuads->getHWND()) { sscanf(ttext, "%d", &tint); if (tint > 0) SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureCountQuads, tint) else { - SXParticlesEditor::EditFigureCountQuads->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureCountQuads)).c_str()); + SXParticlesEditor::EditFigureCountQuads->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureCountQuads)).c_str()); MessageBox(0, "unresolved count quads", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditTimeLife->GetHWND()) + else if (hwnd == SXParticlesEditor::EditTimeLife->getHWND()) { sscanf(ttext, "%d", &tlong); if (tlong >= 0) SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLife, tlong) else { - SXParticlesEditor::EditTimeLife->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLife)).c_str()); + SXParticlesEditor::EditTimeLife->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLife)).c_str()); MessageBox(0, "unresolved time", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditTimeLifeDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditTimeLifeDisp->getHWND()) { sscanf(ttext, "%d", &tlong); if (tlong >= 0) SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLifeDisp, tlong) else { - SXParticlesEditor::EditTimeLifeDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLifeDisp)).c_str()); + SXParticlesEditor::EditTimeLifeDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLifeDisp)).c_str()); MessageBox(0, "unresolved dispersion", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditSizeX->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSizeX->getHWND()) { sscanf(ttext, "%f", &tfloat); if (tfloat > 0) SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.x, tfloat) else { - SXParticlesEditor::EditSizeX->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.x)).c_str()); + SXParticlesEditor::EditSizeX->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.x)).c_str()); MessageBox(0, "unresolved size", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditSizeY->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSizeY->getHWND()) { sscanf(ttext, "%f", &tfloat); if (tfloat > 0) SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.y, tfloat) else { - SXParticlesEditor::EditSizeY->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.y)).c_str()); + SXParticlesEditor::EditSizeY->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.y)).c_str()); MessageBox(0, "unresolved size", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditSizeDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSizeDisp->getHWND()) { sscanf(ttext, "%f", &tfloat); if (tfloat >= 0) SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDisp, tfloat) else { - SXParticlesEditor::EditSizeDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDisp)).c_str()); + SXParticlesEditor::EditSizeDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDisp)).c_str()); MessageBox(0, "unresolved dispersion", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditTrackSize->GetHWND()) + else if (hwnd == SXParticlesEditor::EditTrackSize->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TrackSize, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditTrackTime->GetHWND()) + else if (hwnd == SXParticlesEditor::EditTrackTime->getHWND()) { SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TrackTime, String(ttext).ToDouble()); } - else if (hwnd == SXParticlesEditor::EditAnimTexCountCadrsX->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAnimTexCountCadrsX->getHWND()) { sscanf(ttext, "%d", &tint); if (tint >= 0) SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsX, tint) else { - SXParticlesEditor::EditAnimTexCountCadrsX->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsX)).c_str()); + SXParticlesEditor::EditAnimTexCountCadrsX->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsX)).c_str()); MessageBox(0, "unresolved count cadrs", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditAnimTexCountCadrsY->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAnimTexCountCadrsY->getHWND()) { sscanf(ttext, "%d", &tint); if (tint >= 0) SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsY, tint) else { - SXParticlesEditor::EditAnimTexCountCadrsY->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsY)).c_str()); + SXParticlesEditor::EditAnimTexCountCadrsY->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsY)).c_str()); MessageBox(0, "unresolved count cadrs", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditAnimTexRate->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAnimTexRate->getHWND()) { sscanf(ttext, "%d", &tint); if (tint >= 0) SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRate, tint) else { - SXParticlesEditor::EditAnimTexRate->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRate)).c_str()); + SXParticlesEditor::EditAnimTexRate->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRate)).c_str()); MessageBox(0, "unresolved rate", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditAnimTexRateDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAnimTexRateDisp->getHWND()) { sscanf(ttext, "%d", &tint); if (tint >= 0) SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRateDisp, tint) else { - SXParticlesEditor::EditAnimTexRateDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRateDisp)).c_str()); + SXParticlesEditor::EditAnimTexRateDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRateDisp)).c_str()); MessageBox(0, "unresolved dispersion", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditAnimTexStartCadr->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAnimTexStartCadr->getHWND()) { sscanf(ttext, "%d", &tint); if (tint >= 0) SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadr, tint) else { - SXParticlesEditor::EditAnimTexStartCadr->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadr)).c_str()); + SXParticlesEditor::EditAnimTexStartCadr->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadr)).c_str()); MessageBox(0, "unresolved start cadr", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditAnimTexStartCadrDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAnimTexStartCadrDisp->getHWND()) { sscanf(ttext, "%d", &tint); if (tint >= 0) SPE_EmitterSetR(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadrDisp, tint) else { - SXParticlesEditor::EditAnimTexStartCadrDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadrDisp)).c_str()); + SXParticlesEditor::EditAnimTexStartCadrDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadrDisp)).c_str()); MessageBox(0, "unresolved dispersion", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditSpawnOriginX->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSpawnOriginX->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.x, tfloat); } - else if (hwnd == SXParticlesEditor::EditSpawnOriginY->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSpawnOriginY->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.y, tfloat); } - else if (hwnd == SXParticlesEditor::EditSpawnOriginZ->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSpawnOriginZ->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.z, tfloat); } - else if (hwnd == SXParticlesEditor::EditSpawnOriginDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSpawnOriginDisp->getHWND()) { sscanf(ttext, "%f", &tfloat); if (tfloat >= 0.f) SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOriginDisp, tfloat) else { - SXParticlesEditor::EditSpawnOriginDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOriginDisp)).c_str()); + SXParticlesEditor::EditSpawnOriginDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOriginDisp)).c_str()); MessageBox(0, "unresolved dispersion", 0, 0); return 0; } @@ -655,147 +655,147 @@ LRESULT SXParticlesEditor_Edits_Enter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM tfloat = SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOriginDisp); int qwert = 0; } - else if (hwnd == SXParticlesEditor::EditSpawnNextTime->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSpawnNextTime->getHWND()) { sscanf(ttext, "%d", &tlong); if (tlong >= 0) SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTime, tlong) else { - SXParticlesEditor::EditSpawnNextTime->SetText(String((DWORD)SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTime)).c_str()); + SXParticlesEditor::EditSpawnNextTime->setText(String((DWORD)SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTime)).c_str()); MessageBox(0, "unresolved time", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditSpawnNextTimeDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditSpawnNextTimeDisp->getHWND()) { sscanf(ttext, "%d", &tlong); if (tlong >= 0) SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTimeDisp, tlong) else { - SXParticlesEditor::EditSpawnNextTimeDisp->SetText(String((DWORD)SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTimeDisp)).c_str()); + SXParticlesEditor::EditSpawnNextTimeDisp->setText(String((DWORD)SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTimeDisp)).c_str()); MessageBox(0, "unresolved dispersion", 0, 0); return 0; } } - else if (hwnd == SXParticlesEditor::EditBoundVec1X->GetHWND()) + else if (hwnd == SXParticlesEditor::EditBoundVec1X->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.x, tfloat); } - else if (hwnd == SXParticlesEditor::EditBoundVec1Y->GetHWND()) + else if (hwnd == SXParticlesEditor::EditBoundVec1Y->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.y, tfloat); } - else if (hwnd == SXParticlesEditor::EditBoundVec1Z->GetHWND()) + else if (hwnd == SXParticlesEditor::EditBoundVec1Z->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.z, tfloat); } - else if (hwnd == SXParticlesEditor::EditBoundVec1W->GetHWND()) + else if (hwnd == SXParticlesEditor::EditBoundVec1W->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.w, tfloat); } - else if (hwnd == SXParticlesEditor::EditBoundVec2X->GetHWND()) + else if (hwnd == SXParticlesEditor::EditBoundVec2X->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.x, tfloat); } - else if (hwnd == SXParticlesEditor::EditBoundVec2Y->GetHWND()) + else if (hwnd == SXParticlesEditor::EditBoundVec2Y->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.y, tfloat); } - else if (hwnd == SXParticlesEditor::EditBoundVec2Z->GetHWND()) + else if (hwnd == SXParticlesEditor::EditBoundVec2Z->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.z, tfloat); } - else if (hwnd == SXParticlesEditor::EditBoundVec2W->GetHWND()) + else if (hwnd == SXParticlesEditor::EditBoundVec2W->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.w, tfloat); } - else if (hwnd == SXParticlesEditor::EditVelocityX->GetHWND()) + else if (hwnd == SXParticlesEditor::EditVelocityX->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.x, tfloat); } - else if (hwnd == SXParticlesEditor::EditVelocityY->GetHWND()) + else if (hwnd == SXParticlesEditor::EditVelocityY->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.y, tfloat); } - else if (hwnd == SXParticlesEditor::EditVelocityZ->GetHWND()) + else if (hwnd == SXParticlesEditor::EditVelocityZ->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.z, tfloat); } - else if (hwnd == SXParticlesEditor::EditVelocityDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditVelocityDisp->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDisp, tfloat); } - else if (hwnd == SXParticlesEditor::EditAccelerationX->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAccelerationX->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.x, tfloat); } - else if (hwnd == SXParticlesEditor::EditAccelerationY->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAccelerationY->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.y, tfloat); } - else if (hwnd == SXParticlesEditor::EditAccelerationZ->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAccelerationZ->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.z, tfloat); } - else if (hwnd == SXParticlesEditor::EditAccelerationDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditAccelerationDisp->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDisp, tfloat); } - else if (hwnd == SXParticlesEditor::EditCircleAngle->GetHWND()) + else if (hwnd == SXParticlesEditor::EditCircleAngle->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngle, tfloat); } - else if (hwnd == SXParticlesEditor::EditCircleAngleDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditCircleAngleDisp->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngleDisp, tfloat); } - else if (hwnd == SXParticlesEditor::EditRotateAngle->GetHWND()) + else if (hwnd == SXParticlesEditor::EditRotateAngle->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngle, tfloat); } - else if (hwnd == SXParticlesEditor::EditRotateAngleDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditRotateAngleDisp->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngleDisp, tfloat); } - else if (hwnd == SXParticlesEditor::EditDeviationAmplitude->GetHWND()) + else if (hwnd == SXParticlesEditor::EditDeviationAmplitude->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationAmplitude, tfloat); } - else if (hwnd == SXParticlesEditor::EditDeviationCoefAngle->GetHWND()) + else if (hwnd == SXParticlesEditor::EditDeviationCoefAngle->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngle, tfloat); } - else if (hwnd == SXParticlesEditor::EditDeviationCoefAngleDisp->GetHWND()) + else if (hwnd == SXParticlesEditor::EditDeviationCoefAngleDisp->getHWND()) { sscanf(ttext, "%f", &tfloat); SPE_EmitterSet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngleDisp, tfloat); diff --git a/source/sxparticleseditor/callback_common.h b/source/sxparticleseditor/callback_common.h index 2ccc458c4fc8881364b84b13a9cf68d0fea73387..f2294d6ea553ce6ce9115d7371293263a877fe55 100644 --- a/source/sxparticleseditor/callback_common.h +++ b/source/sxparticleseditor/callback_common.h @@ -12,6 +12,8 @@ #include "particles_editor.h" #include "callback_list.h" +#include <skyxengine.h> + LRESULT TrueExit(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT ComMenuId(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); diff --git a/source/sxparticleseditor/callback_list.cpp b/source/sxparticleseditor/callback_list.cpp index bc71b430fcb9d349c6e069526f6d04927c95cf82..eb5da9a69cd7f9093ff88c61deb4bcefe27cc69c 100644 --- a/source/sxparticleseditor/callback_list.cpp +++ b/source/sxparticleseditor/callback_list.cpp @@ -3,14 +3,14 @@ LRESULT SXParticlesEditor_ListBoxEffects_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - int sel = SXParticlesEditor::ListBoxEffects->GetSel(); + int sel = SXParticlesEditor::ListBoxEffects->getSel(); if (sel < 0) return 0; - SXParticlesEditor::ListBoxEmitters->Clear(); + SXParticlesEditor::ListBoxEmitters->clear(); if (SPE_EffectCountGet() == 0) { - SXParticlesEditor::ListBoxEffects->Clear(); + SXParticlesEditor::ListBoxEffects->clear(); SXParticlesEditor::EffVisible(true, true); SXParticlesEditor::TabsVisible(false); return 0; @@ -26,10 +26,10 @@ LRESULT SXParticlesEditor_ListBoxEffects_Click(HWND hwnd, UINT msg, WPARAM wPara SPE_EmitterNameGet(SXParticlesEditor::SelEffID, i, partname); if (partname[0] == 0) partname[0] = '!'; - SXParticlesEditor::ListBoxEmitters->AddItem(partname); + SXParticlesEditor::ListBoxEmitters->addItem(partname); } - SXParticlesEditor::StaticEmittersCount->SetText(String(partcount).c_str()); + SXParticlesEditor::StaticEmittersCount->setText(String(partcount).c_str()); if (hwnd != 0) SXParticlesEditor::TabsVisible(false); @@ -58,7 +58,7 @@ LRESULT SXParticlesEditor_ListBoxEmitters_Click(HWND hwnd, UINT msg, WPARAM wPar if (SXParticlesEditor::SelEffID < 0) return 0; - SXParticlesEditor::SelEmitterID = SXParticlesEditor::ListBoxEmitters->GetSel(); + SXParticlesEditor::SelEmitterID = SXParticlesEditor::ListBoxEmitters->getSel(); int countemitters = SPE_EmitterSCountGet(SXParticlesEditor::SelEffID); if (SXParticlesEditor::SelEmitterID < 0 || countemitters <= 0 || SPE_EmitterSCountGet(SXParticlesEditor::SelEffID) <= SXParticlesEditor::SelEmitterID) return 0; @@ -113,16 +113,16 @@ LRESULT SXParticlesEditor_ButtonEffectsDelete_Click(HWND hwnd, UINT msg, WPARAM SPE_EffectDelete(SXParticlesEditor::SelEffID); SXParticlesEditor::SelEffID = -1; - SXParticlesEditor::ListBoxEmitters->Clear(); - SXParticlesEditor::StaticEmittersCount->SetText("0"); + SXParticlesEditor::ListBoxEmitters->clear(); + SXParticlesEditor::StaticEmittersCount->setText("0"); - int sel = SXParticlesEditor::ListBoxEffects->GetSel(); - SXParticlesEditor::ListBoxEffects->DeleteItem(SXParticlesEditor::ListBoxEffects->GetSel()); - SXParticlesEditor::StaticEffectsCount->SetText(String(SPE_EffectCountGet()).c_str()); + int sel = SXParticlesEditor::ListBoxEffects->getSel(); + SXParticlesEditor::ListBoxEffects->deleteItem(SXParticlesEditor::ListBoxEffects->getSel()); + SXParticlesEditor::StaticEffectsCount->setText(String(SPE_EffectCountGet()).c_str()); if (SPE_EffectCountGet() > 0) { - SXParticlesEditor::ListBoxEffects->SetSel((sel < SXParticlesEditor::ListBoxEffects->GetCountItem() ? sel : sel - 1)); + SXParticlesEditor::ListBoxEffects->setSel((sel < SXParticlesEditor::ListBoxEffects->getItemCount() ? sel : sel - 1)); SXParticlesEditor_ListBoxEffects_Click(hwnd, msg, wParam, lParam); } else @@ -186,13 +186,13 @@ LRESULT SXParticlesEditor_ButtonEmittersDelete_Click(HWND hwnd, UINT msg, WPARAM SPE_EmitterDelete(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID); SXParticlesEditor::SelEmitterID = -1; - int sel = SXParticlesEditor::ListBoxEmitters->GetSel(); - SXParticlesEditor::ListBoxEmitters->DeleteItem(sel); - SXParticlesEditor::StaticEmittersCount->SetText(String(SPE_EmitterSCountGet(SXParticlesEditor::SelEffID)).c_str()); + int sel = SXParticlesEditor::ListBoxEmitters->getSel(); + SXParticlesEditor::ListBoxEmitters->deleteItem(sel); + SXParticlesEditor::StaticEmittersCount->setText(String(SPE_EmitterSCountGet(SXParticlesEditor::SelEffID)).c_str()); if (SPE_EmitterSCountGet(SXParticlesEditor::SelEffID)) { - SXParticlesEditor::ListBoxEmitters->SetSel((sel < SXParticlesEditor::ListBoxEmitters->GetCountItem() ? sel : sel - 1)); + SXParticlesEditor::ListBoxEmitters->setSel((sel < SXParticlesEditor::ListBoxEmitters->getItemCount() ? sel : sel - 1)); SXParticlesEditor_ListBoxEmitters_Click(hwnd, msg, wParam, lParam); } else @@ -214,13 +214,13 @@ LRESULT SXParticlesEditor_ButtonEffCreate_Click(HWND hwnd, UINT msg, WPARAM wPar } char effname[OBJECT_NAME_MAX_LEN]; - SXParticlesEditor::EditEffName->GetText(effname, OBJECT_NAME_MAX_LEN); + SXParticlesEditor::EditEffName->getText(effname, OBJECT_NAME_MAX_LEN); SXParticlesEditor::SelEffID = SPE_EffectAdd(effname); - SXParticlesEditor::ListBoxEffects->AddItem(effname); - SXParticlesEditor::ListBoxEffects->SetSel(SXParticlesEditor::ListBoxEffects->GetCountItem() - 1); - SXParticlesEditor::StaticEffectsCount->SetText(String(SPE_EffectCountGet()).c_str()); + SXParticlesEditor::ListBoxEffects->addItem(effname); + SXParticlesEditor::ListBoxEffects->setSel(SXParticlesEditor::ListBoxEffects->getItemCount() - 1); + SXParticlesEditor::StaticEffectsCount->setText(String(SPE_EffectCountGet()).c_str()); SXParticlesEditor::EffVisible(true, false); return 0; @@ -231,7 +231,7 @@ LRESULT SXParticlesEditor_ButtonEffCreate_Click(HWND hwnd, UINT msg, WPARAM wPar LRESULT SXParticlesEditor_ButtonEmitterCreate_Click(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { char partname[OBJECT_NAME_MAX_LEN]; - SXParticlesEditor::EditName->GetText(partname, OBJECT_NAME_MAX_LEN); + SXParticlesEditor::EditName->getText(partname, OBJECT_NAME_MAX_LEN); if (!def_str_validate(partname)) { @@ -246,171 +246,171 @@ LRESULT SXParticlesEditor_ButtonEmitterCreate_Click(HWND hwnd, UINT msg, WPARAM } char tmptex[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; - SXParticlesEditor::EditTexture->GetText(tmptex, SXGC_LOADTEX_MAX_SIZE_DIRNAME); + SXParticlesEditor::EditTexture->getText(tmptex, SXGC_LOADTEX_MAX_SIZE_DIRNAME); char tmptxt[64]; ParticlesData pdata; - SXParticlesEditor::EditAccelerationX->GetText(tmptxt, 64); + SXParticlesEditor::EditAccelerationX->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.Acceleration.x)); - SXParticlesEditor::EditAccelerationY->GetText(tmptxt, 64); + SXParticlesEditor::EditAccelerationY->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.Acceleration.y)); - SXParticlesEditor::EditAccelerationZ->GetText(tmptxt, 64); + SXParticlesEditor::EditAccelerationZ->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.Acceleration.z)); - SXParticlesEditor::EditAccelerationDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditAccelerationDisp->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.AccelerationDisp)); - pdata.AccelerationDispXNeg = SXParticlesEditor::CheckBoxAccelerationDispXNeg->GetCheck(); - pdata.AccelerationDispYNeg = SXParticlesEditor::CheckBoxAccelerationDispYNeg->GetCheck(); - pdata.AccelerationDispZNeg = SXParticlesEditor::CheckBoxAccelerationDispZNeg->GetCheck(); + pdata.AccelerationDispXNeg = SXParticlesEditor::CheckBoxAccelerationDispXNeg->getCheck(); + pdata.AccelerationDispYNeg = SXParticlesEditor::CheckBoxAccelerationDispYNeg->getCheck(); + pdata.AccelerationDispZNeg = SXParticlesEditor::CheckBoxAccelerationDispZNeg->getCheck(); - SXParticlesEditor::EditVelocityX->GetText(tmptxt, 64); + SXParticlesEditor::EditVelocityX->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.Velocity.x)); - SXParticlesEditor::EditVelocityY->GetText(tmptxt, 64); + SXParticlesEditor::EditVelocityY->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.Velocity.y)); - SXParticlesEditor::EditVelocityZ->GetText(tmptxt, 64); + SXParticlesEditor::EditVelocityZ->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.Velocity.z)); - SXParticlesEditor::EditVelocityDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditVelocityDisp->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.VelocityDisp)); - pdata.VelocityDispXNeg = SXParticlesEditor::CheckBoxVelocityDispXNeg->GetCheck(); - pdata.VelocityDispYNeg = SXParticlesEditor::CheckBoxVelocityDispYNeg->GetCheck(); - pdata.VelocityDispZNeg = SXParticlesEditor::CheckBoxVelocityDispZNeg->GetCheck(); + pdata.VelocityDispXNeg = SXParticlesEditor::CheckBoxVelocityDispXNeg->getCheck(); + pdata.VelocityDispYNeg = SXParticlesEditor::CheckBoxVelocityDispYNeg->getCheck(); + pdata.VelocityDispZNeg = SXParticlesEditor::CheckBoxVelocityDispZNeg->getCheck(); - pdata.BoundType = (PARTICLESTYPE_BOUND)SXParticlesEditor::ComboBoxBoundType->GetSel(); + pdata.BoundType = (PARTICLESTYPE_BOUND)SXParticlesEditor::ComboBoxBoundType->getSel(); - SXParticlesEditor::EditBoundVec1X->GetText(tmptxt, 64); + SXParticlesEditor::EditBoundVec1X->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.BoundVec1.x)); - SXParticlesEditor::EditBoundVec1Y->GetText(tmptxt, 64); + SXParticlesEditor::EditBoundVec1Y->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.BoundVec1.y)); - SXParticlesEditor::EditBoundVec1Z->GetText(tmptxt, 64); + SXParticlesEditor::EditBoundVec1Z->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.BoundVec1.z)); - SXParticlesEditor::EditBoundVec2X->GetText(tmptxt, 64); + SXParticlesEditor::EditBoundVec2X->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.BoundVec2.x)); - SXParticlesEditor::EditBoundVec2Y->GetText(tmptxt, 64); + SXParticlesEditor::EditBoundVec2Y->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.BoundVec2.y)); - SXParticlesEditor::EditBoundVec2Z->GetText(tmptxt, 64); + SXParticlesEditor::EditBoundVec2Z->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.BoundVec2.z)); - pdata.SpawnPosType = (PARTICLESTYPE_SPAWNPOS)SXParticlesEditor::ComboBoxSpawnPosType->GetSel(); - SXParticlesEditor::EditSpawnOriginX->GetText(tmptxt, 64); + pdata.SpawnPosType = (PARTICLESTYPE_SPAWNPOS)SXParticlesEditor::ComboBoxSpawnPosType->getSel(); + SXParticlesEditor::EditSpawnOriginX->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.SpawnOrigin.x)); - SXParticlesEditor::EditSpawnOriginY->GetText(tmptxt, 64); + SXParticlesEditor::EditSpawnOriginY->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.SpawnOrigin.y)); - SXParticlesEditor::EditSpawnOriginZ->GetText(tmptxt, 64); + SXParticlesEditor::EditSpawnOriginZ->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.SpawnOrigin.z)); - SXParticlesEditor::EditSpawnOriginDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditSpawnOriginDisp->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.SpawnOriginDisp)); - pdata.SpawnBoundBindCreateXNeg = SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->GetCheck(); - pdata.SpawnBoundBindCreateXPos = SXParticlesEditor::CheckBoxSpawnOriginDispXPos->GetCheck(); - pdata.SpawnBoundBindCreateYNeg = SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->GetCheck(); - pdata.SpawnBoundBindCreateYPos = SXParticlesEditor::CheckBoxSpawnOriginDispYPos->GetCheck(); - pdata.SpawnBoundBindCreateZNeg = SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->GetCheck(); - pdata.SpawnBoundBindCreateZPos = SXParticlesEditor::CheckBoxSpawnOriginDispZPos->GetCheck(); + pdata.SpawnBoundBindCreateXNeg = SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->getCheck(); + pdata.SpawnBoundBindCreateXPos = SXParticlesEditor::CheckBoxSpawnOriginDispXPos->getCheck(); + pdata.SpawnBoundBindCreateYNeg = SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->getCheck(); + pdata.SpawnBoundBindCreateYPos = SXParticlesEditor::CheckBoxSpawnOriginDispYPos->getCheck(); + pdata.SpawnBoundBindCreateZNeg = SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->getCheck(); + pdata.SpawnBoundBindCreateZPos = SXParticlesEditor::CheckBoxSpawnOriginDispZPos->getCheck(); - SXParticlesEditor::EditSpawnNextTime->GetText(tmptxt, 64); + SXParticlesEditor::EditSpawnNextTime->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.SpawnNextTime)); - SXParticlesEditor::EditSpawnNextTimeDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditSpawnNextTimeDisp->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.SpawnNextTimeDisp)); - SXParticlesEditor::EditAnimTexCountCadrsX->GetText(tmptxt, 64); + SXParticlesEditor::EditAnimTexCountCadrsX->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.AnimTexCountCadrsX)); - SXParticlesEditor::EditAnimTexCountCadrsY->GetText(tmptxt, 64); + SXParticlesEditor::EditAnimTexCountCadrsY->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.AnimTexCountCadrsY)); - SXParticlesEditor::EditAnimTexRate->GetText(tmptxt, 64); + SXParticlesEditor::EditAnimTexRate->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.AnimTexRate)); - SXParticlesEditor::EditAnimTexRateDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditAnimTexRateDisp->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.AnimTexRateDisp)); - SXParticlesEditor::EditAnimTexStartCadr->GetText(tmptxt, 64); + SXParticlesEditor::EditAnimTexStartCadr->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.AnimTexStartCadr)); - SXParticlesEditor::EditAnimTexStartCadrDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditAnimTexStartCadrDisp->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.AnimTexStartCadrDisp)); - SXParticlesEditor::EditReCreateCount->GetText(tmptxt, 64); + SXParticlesEditor::EditReCreateCount->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.ReCreateCount)); - SXParticlesEditor::EditSoftCoef->GetText(tmptxt, 64); + SXParticlesEditor::EditSoftCoef->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.SoftCoef)); - SXParticlesEditor::EditRefractionCoef->GetText(tmptxt, 64); + SXParticlesEditor::EditRefractionCoef->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.RefractionCoef)); - SXParticlesEditor::EditTransparencyCoef->GetText(tmptxt, 64); + SXParticlesEditor::EditTransparencyCoef->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.TransparencyCoef)); - SXParticlesEditor::EditColorCoef->GetText(tmptxt, 64); + SXParticlesEditor::EditColorCoef->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.ColorCoef)); - pdata.Lighting = SXParticlesEditor::CheckBoxLighting->GetCheck(); + pdata.Lighting = SXParticlesEditor::CheckBoxLighting->getCheck(); - pdata.FigureType = (PARTICLESTYPE_FIGURE)SXParticlesEditor::ComboBoxFigureType->GetSel(); - SXParticlesEditor::EditFigureCountQuads->GetText(tmptxt, 64); + pdata.FigureType = (PARTICLESTYPE_FIGURE)SXParticlesEditor::ComboBoxFigureType->getSel(); + SXParticlesEditor::EditFigureCountQuads->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.FigureCountQuads)); - pdata.FigureRotRand = SXParticlesEditor::CheckBoxFigureRotRand->GetCheck(); - pdata.FigureTapX = SXParticlesEditor::CheckBoxFigureTapX->GetCheck(); - pdata.FigureTapY = SXParticlesEditor::CheckBoxFigureTapY->GetCheck(); - pdata.FigureTapZ = SXParticlesEditor::CheckBoxFigureTapZ->GetCheck(); + pdata.FigureRotRand = SXParticlesEditor::CheckBoxFigureRotRand->getCheck(); + pdata.FigureTapX = SXParticlesEditor::CheckBoxFigureTapX->getCheck(); + pdata.FigureTapY = SXParticlesEditor::CheckBoxFigureTapY->getCheck(); + pdata.FigureTapZ = SXParticlesEditor::CheckBoxFigureTapZ->getCheck(); - pdata.AlphaBlendType = (PARTICLESTYPE_ALPHABLEND)SXParticlesEditor::ComboBoxAlphaBlendType->GetSel(); + pdata.AlphaBlendType = (PARTICLESTYPE_ALPHABLEND)SXParticlesEditor::ComboBoxAlphaBlendType->getSel(); - SXParticlesEditor::EditTimeLife->GetText(tmptxt, 64); + SXParticlesEditor::EditTimeLife->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.TimeLife)); - SXParticlesEditor::EditTimeLifeDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditTimeLifeDisp->getText(tmptxt, 64); sscanf(tmptxt, "%d", &(pdata.TimeLifeDisp)); - pdata.AlphaDependAge = (PARTICLESTYPE_DEPEND)SXParticlesEditor::ComboBoxAlphaDependAge->GetSel(); - pdata.SizeDependAge = (PARTICLESTYPE_DEPEND)SXParticlesEditor::ComboBoxSizeDependAge->GetSel(); - pdata.CollisionDelete = (PARTICLESTYPE_DEPEND)SXParticlesEditor::CheckBoxCollisionDelete->GetCheck(); + pdata.AlphaDependAge = (PARTICLESTYPE_DEPEND)SXParticlesEditor::ComboBoxAlphaDependAge->getSel(); + pdata.SizeDependAge = (PARTICLESTYPE_DEPEND)SXParticlesEditor::ComboBoxSizeDependAge->getSel(); + pdata.CollisionDelete = (PARTICLESTYPE_DEPEND)SXParticlesEditor::CheckBoxCollisionDelete->getCheck(); - SXParticlesEditor::EditSizeX->GetText(tmptxt, 64); + SXParticlesEditor::EditSizeX->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.Size.x)); - SXParticlesEditor::EditSizeY->GetText(tmptxt, 64); + SXParticlesEditor::EditSizeY->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.Size.y)); - SXParticlesEditor::EditSizeDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditSizeDisp->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.SizeDisp)); - pdata.CharacterCircle = SXParticlesEditor::CheckBoxCircle->GetCheck(); - pdata.CharacterCircleAxis = (PARTICLES_AXIS)SXParticlesEditor::ComboBoxCircleAxis->GetSel(); - SXParticlesEditor::EditCircleAngle->GetText(tmptxt, 64); + pdata.CharacterCircle = SXParticlesEditor::CheckBoxCircle->getCheck(); + pdata.CharacterCircleAxis = (PARTICLES_AXIS)SXParticlesEditor::ComboBoxCircleAxis->getSel(); + SXParticlesEditor::EditCircleAngle->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.CharacterCircleAngle)); - SXParticlesEditor::EditCircleAngleDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditCircleAngleDisp->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.CharacterCircleAngleDisp)); - pdata.CharacterCircleAngleDispNeg = SXParticlesEditor::CheckBoxCircleAngleDispNeg->GetCheck(); + pdata.CharacterCircleAngleDispNeg = SXParticlesEditor::CheckBoxCircleAngleDispNeg->getCheck(); - pdata.CharacterRotate = SXParticlesEditor::CheckBoxRotate->GetCheck(); - SXParticlesEditor::EditRotateAngle->GetText(tmptxt, 64); + pdata.CharacterRotate = SXParticlesEditor::CheckBoxRotate->getCheck(); + SXParticlesEditor::EditRotateAngle->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.CharacterRotateAngle)); - SXParticlesEditor::EditRotateAngleDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditRotateAngleDisp->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.CharacterRotateAngleDisp)); - pdata.CharacterRotateAngleDispNeg = SXParticlesEditor::CheckBoxRotateAngleDispNeg->GetCheck(); + pdata.CharacterRotateAngleDispNeg = SXParticlesEditor::CheckBoxRotateAngleDispNeg->getCheck(); - pdata.CharacterDeviation = SXParticlesEditor::CheckBoxDeviation->GetCheck(); - pdata.CharacterDeviationType = (PARTICLESTYPE_DEVIATION)SXParticlesEditor::ComboBoxDeviationType->GetSel(); - SXParticlesEditor::EditDeviationAmplitude->GetText(tmptxt, 64); + pdata.CharacterDeviation = SXParticlesEditor::CheckBoxDeviation->getCheck(); + pdata.CharacterDeviationType = (PARTICLESTYPE_DEVIATION)SXParticlesEditor::ComboBoxDeviationType->getSel(); + SXParticlesEditor::EditDeviationAmplitude->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.CharacterDeviationAmplitude)); - SXParticlesEditor::EditDeviationCoefAngle->GetText(tmptxt, 64); + SXParticlesEditor::EditDeviationCoefAngle->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.CharacterDeviationCoefAngle)); - SXParticlesEditor::EditDeviationCoefAngleDisp->GetText(tmptxt, 64); + SXParticlesEditor::EditDeviationCoefAngleDisp->getText(tmptxt, 64); sscanf(tmptxt, "%f", &(pdata.CharacterDeviationCoefAngleDisp)); - pdata.CharacterDeviationCoefAngleDispNeg = SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->GetCheck(); - pdata.CharacterDeviationAxis = (PARTICLES_AXIS)SXParticlesEditor::ComboBoxDeviationAxis->GetSel(); - pdata.CharacterDeviationTapX = SXParticlesEditor::CheckBoxDeviationTapX->GetCheck(); - pdata.CharacterDeviationTapY = SXParticlesEditor::CheckBoxDeviationTapY->GetCheck(); - pdata.CharacterDeviationTapZ = SXParticlesEditor::CheckBoxDeviationTapZ->GetCheck(); + pdata.CharacterDeviationCoefAngleDispNeg = SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->getCheck(); + pdata.CharacterDeviationAxis = (PARTICLES_AXIS)SXParticlesEditor::ComboBoxDeviationAxis->getSel(); + pdata.CharacterDeviationTapX = SXParticlesEditor::CheckBoxDeviationTapX->getCheck(); + pdata.CharacterDeviationTapY = SXParticlesEditor::CheckBoxDeviationTapY->getCheck(); + pdata.CharacterDeviationTapZ = SXParticlesEditor::CheckBoxDeviationTapZ->getCheck(); ID partid = SPE_EmitterAdd(SXParticlesEditor::SelEffID, &pdata); @@ -418,13 +418,13 @@ LRESULT SXParticlesEditor_ButtonEmitterCreate_Click(HWND hwnd, UINT msg, WPARAM SPE_EmitterTextureSet(SXParticlesEditor::SelEffID, partid, tmptex); - SXParticlesEditor::EditCount->GetText(tmptxt, 64); + SXParticlesEditor::EditCount->getText(tmptxt, 64); int partcount; sscanf(tmptxt, "%d", &partcount); SPE_EmitterCountSet(SXParticlesEditor::SelEffID, partid, partcount); - SXParticlesEditor::ListBoxEmitters->AddItem(partname); - SXParticlesEditor::ListBoxEmitters->SetSel(SXParticlesEditor::ListBoxEmitters->GetCountItem() - 1); + SXParticlesEditor::ListBoxEmitters->addItem(partname); + SXParticlesEditor::ListBoxEmitters->setSel(SXParticlesEditor::ListBoxEmitters->getItemCount() - 1); SXParticlesEditor_ListBoxEmitters_Click(hwnd, msg, wParam, lParam); return 0; diff --git a/source/sxparticleseditor/callback_tabs.cpp b/source/sxparticleseditor/callback_tabs.cpp index 485873074df50e21d079f877ffd0aa1f86727108..0d21c619fef8a4679d24771694b5ef1d71f96e7e 100644 --- a/source/sxparticleseditor/callback_tabs.cpp +++ b/source/sxparticleseditor/callback_tabs.cpp @@ -6,7 +6,7 @@ LRESULT SXParticlesEditor_ButtonBase_Click(HWND hwnd, UINT msg, WPARAM wParam, L SXParticlesEditor::AllInTabsVisible(false); SXParticlesEditor::BaseVisible(true); if (SXParticlesEditor::SelEmitterID < 0) - SXParticlesEditor::ButtonEmitterCreate->Visible(true); + SXParticlesEditor::ButtonEmitterCreate->setVisible(true); //SXParticlesEditor::BaseNulling(); return 0; } @@ -16,7 +16,7 @@ LRESULT SXParticlesEditor_ButtonTextureAnimTex_Click(HWND hwnd, UINT msg, WPARAM SXParticlesEditor::AllInTabsVisible(false); SXParticlesEditor::TexVisible(true); if (SXParticlesEditor::SelEmitterID < 0) - SXParticlesEditor::ButtonEmitterCreate->Visible(true); + SXParticlesEditor::ButtonEmitterCreate->setVisible(true); //SXParticlesEditor::TexNulling(); return 0; } @@ -26,7 +26,7 @@ LRESULT SXParticlesEditor_ButtonSpawn_Click(HWND hwnd, UINT msg, WPARAM wParam, SXParticlesEditor::AllInTabsVisible(false); SXParticlesEditor::SpawnVisible(true); if (SXParticlesEditor::SelEmitterID < 0) - SXParticlesEditor::ButtonEmitterCreate->Visible(true); + SXParticlesEditor::ButtonEmitterCreate->setVisible(true); //SXParticlesEditor::SpawnNulling(); return 0; } @@ -36,7 +36,7 @@ LRESULT SXParticlesEditor_ButtonBound_Click(HWND hwnd, UINT msg, WPARAM wParam, SXParticlesEditor::AllInTabsVisible(false); SXParticlesEditor::BoundVisible(true); if (SXParticlesEditor::SelEmitterID < 0) - SXParticlesEditor::ButtonEmitterCreate->Visible(true); + SXParticlesEditor::ButtonEmitterCreate->setVisible(true); //SXParticlesEditor::BoundNulling(); return 0; } @@ -46,7 +46,7 @@ LRESULT SXParticlesEditor_ButtonCharacters_Click(HWND hwnd, UINT msg, WPARAM wPa SXParticlesEditor::AllInTabsVisible(false); SXParticlesEditor::CharacterVisible(true); if (SXParticlesEditor::SelEmitterID < 0) - SXParticlesEditor::ButtonEmitterCreate->Visible(true); + SXParticlesEditor::ButtonEmitterCreate->setVisible(true); //SXParticlesEditor::CharacterNulling(); return 0; } @@ -56,7 +56,7 @@ LRESULT SXParticlesEditor_ButtonVelocityAcceleration_Click(HWND hwnd, UINT msg, SXParticlesEditor::AllInTabsVisible(false); SXParticlesEditor::VelocityAccVisible(true); if (SXParticlesEditor::SelEmitterID < 0) - SXParticlesEditor::ButtonEmitterCreate->Visible(true); + SXParticlesEditor::ButtonEmitterCreate->setVisible(true); //SXParticlesEditor::VelocityAccNulling(); return 0; } \ No newline at end of file diff --git a/source/sxparticleseditor/particles_editor.cpp b/source/sxparticleseditor/particles_editor.cpp index 36f86f2add185ff1be863dd57619f96ff2edbfcb..68136f2ac4c743cd721cc050a7615ca16ff030eb 100644 --- a/source/sxparticleseditor/particles_editor.cpp +++ b/source/sxparticleseditor/particles_editor.cpp @@ -4,7 +4,7 @@ namespace SXParticlesEditor { ISXGUIBaseWnd* JobWindow; - ISXGUIMenu* MainMenu; + ISXGUIMenuWindow* MainMenu; ISXGUIStatusBar* StatusBar1; ISXGUIGroupBox* GroupBoxList; ISXGUIGroupBox* GroupBoxTabs; @@ -315,648 +315,647 @@ void SXParticlesEditor::InitAllElements() int cx = (wrect.right - MAINWIN_SIZE_X) / 2; int cy = (wrect.bottom - MAINWIN_SIZE_Y) / 2; - SXParticlesEditor::JobWindow = SXGUICrBaseWnd("JobWindow", "SXParticlesEditor", 0, 0, cx, cy, MAINWIN_SIZE_X, MAINWIN_SIZE_Y, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); - SXParticlesEditor::JobWindow->Visible(false); - SXGUIBaseHandlers::InitHandlerMsg(SXParticlesEditor::JobWindow); + SXParticlesEditor::JobWindow = SXGUICrBaseWndEx("JobWindow", "SXParticlesEditor", cx, cy, MAINWIN_SIZE_X, MAINWIN_SIZE_Y, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); + SXParticlesEditor::JobWindow->setVisible(false); + gui_func::base_handlers::InitHandlerMsg(SXParticlesEditor::JobWindow); - SXParticlesEditor::JobWindow->MinSizeX = MAINWIN_SIZE_X; - SXParticlesEditor::JobWindow->MinSizeY = MAINWIN_SIZE_Y; + SXParticlesEditor::JobWindow->setMixSize(MAINWIN_SIZE_X, MAINWIN_SIZE_Y); - SXParticlesEditor::JobWindow->AddHandler(ComMenuId, WM_COMMAND); - SXParticlesEditor::JobWindow->AddHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true); - SXParticlesEditor::JobWindow->AddHandler(MsgEditSize, WM_SIZE); - SXParticlesEditor::MainMenu = SXGUICrMenuEx(IDR_MENU1); - SXParticlesEditor::MainMenu->SetToWindow(SXParticlesEditor::JobWindow->GetHWND()); + SXParticlesEditor::JobWindow->addHandler(ComMenuId, WM_COMMAND); + SXParticlesEditor::JobWindow->addHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true); + SXParticlesEditor::JobWindow->addHandler(MsgEditSize, WM_SIZE); + SXParticlesEditor::MainMenu = SXGUICrMenuWindowEx(IDR_MENU1); + SXParticlesEditor::MainMenu->setToWindow(SXParticlesEditor::JobWindow->getHWND()); - SXParticlesEditor::StatusBar1 = SXGUICrStatusBar("StatusBar1", SXParticlesEditor::JobWindow->GetHWND(), 0, 0); - SXParticlesEditor::StatusBar1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StatusBar1 = SXGUICrStatusBar("StatusBar1", SXParticlesEditor::JobWindow->getHWND(), 0, 0); + SXParticlesEditor::StatusBar1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); int arrpart[5]; arrpart[0] = 300; arrpart[1] = -1; - SXParticlesEditor::StatusBar1->SetCountParts(2, arrpart); - SXParticlesEditor::StatusBar1->SetTextParts(0, "Playing emitters: 0/0"); - SXParticlesEditor::StatusBar1->SetTextParts(1, "Living particles: 0/0"); - - SXParticlesEditor::WindowRender = SXGUICrBaseWnd("WindowRender","Window1",0,0,0,27,600,400,0,0,CreateSolidBrush(RGB(200,200,200)),0,CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER,SXParticlesEditor::JobWindow->GetHWND(),0); - SXParticlesEditor::WindowRender->GAlign.left = true; - SXParticlesEditor::WindowRender->GAlign.right = true; - SXParticlesEditor::WindowRender->GAlign.top = true; - SXParticlesEditor::WindowRender->GAlign.bottom = true; + SXParticlesEditor::StatusBar1->setPartsCount(2, arrpart); + SXParticlesEditor::StatusBar1->setPartText(0, "Playing emitters: 0/0"); + SXParticlesEditor::StatusBar1->setPartText(1, "Living particles: 0/0"); + + SXParticlesEditor::WindowRender = SXGUICrBaseWndEx("WindowRender","Window1",0,27,600,400,0,0,CreateSolidBrush(RGB(200,200,200)),0,CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER,SXParticlesEditor::JobWindow->getHWND(),0); + SXParticlesEditor::WindowRender->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::WindowRender->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXParticlesEditor::WindowRender->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::WindowRender->setFollowParentSide(SXGUI_SIDE_BOTTOM, true); - SXParticlesEditor::ToolBar1 = SXGUICrToolBar(0, 0, 804, 27, SXParticlesEditor::JobWindow->GetHWND(), WndProcAllDefault, 0); - SXParticlesEditor::ToolBar1->GAlign.left = true; - SXParticlesEditor::ToolBar1->GAlign.right = true; - SXParticlesEditor::ToolBar1->GAlign.top = true; - SXParticlesEditor::ToolBar1->GAlign.bottom = false; - SXParticlesEditor::ToolBar1->AddHandler(SXParticlesEditor_ToolBar1_CallWmCommand, WM_COMMAND); - - SXParticlesEditor::ButtonTBReOpen = SXGUICrButtonEx("", 2, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->GetHWND(), 0, 0); - SXParticlesEditor::ButtonTBReOpen->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonTBReOpen->GAlign.left = true; - SXParticlesEditor::ButtonTBReOpen->GAlign.top = true; - SXParticlesEditor::ButtonTBReOpen->SetBmpInResourse(IDB_BITMAP1); - - SXParticlesEditor::ButtonTBSave = SXGUICrButtonEx("", 26, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->GetHWND(), 0, 0); - SXParticlesEditor::ButtonTBSave->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonTBSave->GAlign.left = true; - SXParticlesEditor::ButtonTBSave->GAlign.top = true; - SXParticlesEditor::ButtonTBSave->SetBmpInResourse(IDB_BITMAP2); - - SXParticlesEditor::CheckBoxTBGrid = SXGUICrCheckBoxEx("", 54, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->GetHWND(), 0, 0); - SXParticlesEditor::CheckBoxTBGrid->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxTBGrid->GAlign.left = true; - SXParticlesEditor::CheckBoxTBGrid->GAlign.top = true; - SXParticlesEditor::CheckBoxTBGrid->SetBmpInResourse(IDB_BITMAP3); - - SXParticlesEditor::CheckBoxTBAxes = SXGUICrCheckBoxEx("", 78, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->GetHWND(), 0, 0); - SXParticlesEditor::CheckBoxTBAxes->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxTBAxes->GAlign.left = true; - SXParticlesEditor::CheckBoxTBAxes->GAlign.top = true; - SXParticlesEditor::CheckBoxTBAxes->SetBmpInResourse(IDB_BITMAP4); - - SXParticlesEditor::CheckBoxTBBound = SXGUICrCheckBoxEx("", 102, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->GetHWND(), 0, 0); - SXParticlesEditor::CheckBoxTBBound->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxTBBound->GAlign.left = true; - SXParticlesEditor::CheckBoxTBBound->GAlign.top = true; - SXParticlesEditor::CheckBoxTBBound->SetBmpInResourse(IDB_BITMAP5); - - SXParticlesEditor::CheckBoxTBPlay = SXGUICrCheckBoxEx("", 130, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->GetHWND(), 0, 0); - SXParticlesEditor::CheckBoxTBPlay->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxTBPlay->GAlign.left = true; - SXParticlesEditor::CheckBoxTBPlay->GAlign.top = true; - SXParticlesEditor::CheckBoxTBPlay->SetBmpInResourse(IDB_BITMAP6); - - SXParticlesEditor::CheckBoxTBPause = SXGUICrCheckBoxEx("", 154, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->GetHWND(), 0, 0); - SXParticlesEditor::CheckBoxTBPause->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxTBPause->GAlign.left = true; - SXParticlesEditor::CheckBoxTBPause->GAlign.top = true; - SXParticlesEditor::CheckBoxTBPause->SetBmpInResourse(IDB_BITMAP7); - - SXParticlesEditor::CheckBoxTBStop = SXGUICrCheckBoxEx("", 178, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->GetHWND(), 0, 0); - SXParticlesEditor::CheckBoxTBStop->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxTBStop->GAlign.left = true; - SXParticlesEditor::CheckBoxTBStop->GAlign.top = true; - SXParticlesEditor::CheckBoxTBStop->SetBmpInResourse(IDB_BITMAP8); + SXParticlesEditor::ToolBar1 = SXGUICrToolBar(0, 0, 804, 27, SXParticlesEditor::JobWindow->getHWND(), WndProcAllDefault, 0); + SXParticlesEditor::ToolBar1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ToolBar1->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXParticlesEditor::ToolBar1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ToolBar1->setFollowParentSide(SXGUI_SIDE_BOTTOM, false); + SXParticlesEditor::ToolBar1->addHandler(SXParticlesEditor_ToolBar1_CallWmCommand, WM_COMMAND); + + SXParticlesEditor::ButtonTBReOpen = SXGUICrButtonEx("", 2, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->getHWND(), 0, 0); + SXParticlesEditor::ButtonTBReOpen->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonTBReOpen->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonTBReOpen->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonTBReOpen->setBmpFromResourse(IDB_BITMAP1); + + SXParticlesEditor::ButtonTBSave = SXGUICrButtonEx("", 26, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->getHWND(), 0, 0); + SXParticlesEditor::ButtonTBSave->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonTBSave->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonTBSave->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonTBSave->setBmpFromResourse(IDB_BITMAP2); + + SXParticlesEditor::CheckBoxTBGrid = SXGUICrCheckBoxEx("", 54, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->getHWND(), 0, 0); + SXParticlesEditor::CheckBoxTBGrid->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxTBGrid->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxTBGrid->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxTBGrid->setBmpFromResourse(IDB_BITMAP3); + + SXParticlesEditor::CheckBoxTBAxes = SXGUICrCheckBoxEx("", 78, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->getHWND(), 0, 0); + SXParticlesEditor::CheckBoxTBAxes->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxTBAxes->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxTBAxes->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxTBAxes->setBmpFromResourse(IDB_BITMAP4); + + SXParticlesEditor::CheckBoxTBBound = SXGUICrCheckBoxEx("", 102, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->getHWND(), 0, 0); + SXParticlesEditor::CheckBoxTBBound->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxTBBound->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxTBBound->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxTBBound->setBmpFromResourse(IDB_BITMAP5); + + SXParticlesEditor::CheckBoxTBPlay = SXGUICrCheckBoxEx("", 130, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->getHWND(), 0, 0); + SXParticlesEditor::CheckBoxTBPlay->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxTBPlay->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxTBPlay->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxTBPlay->setBmpFromResourse(IDB_BITMAP6); + + SXParticlesEditor::CheckBoxTBPause = SXGUICrCheckBoxEx("", 154, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->getHWND(), 0, 0); + SXParticlesEditor::CheckBoxTBPause->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxTBPause->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxTBPause->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxTBPause->setBmpFromResourse(IDB_BITMAP7); + + SXParticlesEditor::CheckBoxTBStop = SXGUICrCheckBoxEx("", 178, 1, 22, 22, 0, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_BITMAP, SXParticlesEditor::ToolBar1->getHWND(), 0, 0); + SXParticlesEditor::CheckBoxTBStop->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxTBStop->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxTBStop->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxTBStop->setBmpFromResourse(IDB_BITMAP8); - SXParticlesEditor::GroupBoxList = SXGUICrGroupBox("", 601, 28, 204, 400, SXParticlesEditor::JobWindow->GetHWND(), WndProcAllDefault, 0); - SXGUIBaseHandlers::InitHandlerMsg(SXParticlesEditor::GroupBoxList); - SXParticlesEditor::GroupBoxList->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::GroupBoxList->SetColorText(0, 0, 0); - SXParticlesEditor::GroupBoxList->SetColorTextBk(220, 220, 220); - SXParticlesEditor::GroupBoxList->SetTransparentTextBk(true); - SXParticlesEditor::GroupBoxList->SetColorBrush(220, 220, 220); - - SXParticlesEditor::GroupBoxList->GAlign.left = false; - SXParticlesEditor::GroupBoxList->GAlign.right = true; - SXParticlesEditor::GroupBoxList->GAlign.top = true; - SXParticlesEditor::GroupBoxList->GAlign.bottom = true; - - SXParticlesEditor::StaticEffects = SXGUICrStatic("Effects:", 10, 10, 50, 15, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::StaticEffects->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticEffects->SetColorText(0, 0, 0); - SXParticlesEditor::StaticEffects->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticEffects->SetTransparentTextBk(true); - SXParticlesEditor::StaticEffects->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticEffects->GAlign.left = true; - SXParticlesEditor::StaticEffects->GAlign.top = true; - - SXParticlesEditor::StaticEffectsCount = SXGUICrStatic("0", 70, 10, 100, 15, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::StaticEffectsCount->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticEffectsCount->SetColorText(0, 0, 0); - SXParticlesEditor::StaticEffectsCount->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticEffectsCount->SetTransparentTextBk(true); - SXParticlesEditor::StaticEffectsCount->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticEffectsCount->GAlign.left = true; - SXParticlesEditor::StaticEffectsCount->GAlign.top = true; + SXParticlesEditor::GroupBoxList = SXGUICrGroupBox("", 601, 28, 204, 400, SXParticlesEditor::JobWindow->getHWND(), WndProcAllDefault, 0); + gui_func::base_handlers::InitHandlerMsg(SXParticlesEditor::GroupBoxList); + SXParticlesEditor::GroupBoxList->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::GroupBoxList->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::GroupBoxList->setColorTextBk(RGB(220, 220, 220)); + SXParticlesEditor::GroupBoxList->setTransparentTextBk(true); + SXParticlesEditor::GroupBoxList->setColorBrush(RGB(220, 220, 220)); + + SXParticlesEditor::GroupBoxList->setFollowParentSide(SXGUI_SIDE_LEFT, false); + SXParticlesEditor::GroupBoxList->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXParticlesEditor::GroupBoxList->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::GroupBoxList->setFollowParentSide(SXGUI_SIDE_BOTTOM, true); + + SXParticlesEditor::StaticEffects = SXGUICrStatic("Effects:", 10, 10, 50, 15, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::StaticEffects->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticEffects->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticEffects->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticEffects->setTransparentTextBk(true); + SXParticlesEditor::StaticEffects->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticEffects->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticEffects->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::StaticEffectsCount = SXGUICrStatic("0", 70, 10, 100, 15, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::StaticEffectsCount->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticEffectsCount->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticEffectsCount->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticEffectsCount->setTransparentTextBk(true); + SXParticlesEditor::StaticEffectsCount->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticEffectsCount->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticEffectsCount->setFollowParentSide(SXGUI_SIDE_TOP, true); - SXParticlesEditor::ListBoxEffects = SXGUICrListBox("", 2, 30, 200, 200, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0, false); - SXParticlesEditor::ListBoxEffects->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXParticlesEditor::ListBoxEffects->SetColorText(0,0,0); - SXParticlesEditor::ListBoxEffects->SetColorTextBk(255,255,255); - SXParticlesEditor::ListBoxEffects->SetTransparentTextBk(true); - SXParticlesEditor::ListBoxEffects->SetColorBrush(255,255,255); - SXParticlesEditor::ListBoxEffects->GAlign.left = true; - SXParticlesEditor::ListBoxEffects->GAlign.top = true; - SXParticlesEditor::ListBoxEffects->AddHandler(SXParticlesEditor_ListBoxEffects_Click,WM_LBUTTONUP); - SXParticlesEditor::ListBoxEffects->AddHandler(SXParticlesEditor_ListBoxEffects_Click, WM_KEYUP, VK_UP, true, 0, false, false); - SXParticlesEditor::ListBoxEffects->AddHandler(SXParticlesEditor_ListBoxEffects_Click, WM_KEYUP, VK_DOWN, true, 0, false, false); - - SXParticlesEditor::ButtonEffectsCreate = SXGUICrButton("Create", 5, 225, 60, 15, 0, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::ButtonEffectsCreate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonEffectsCreate->GAlign.left = true; - SXParticlesEditor::ButtonEffectsCreate->GAlign.top = true; - SXParticlesEditor::ButtonEffectsCreate->AddHandler(SXParticlesEditor_ButtonEffectsCreate_Click, WM_LBUTTONUP); - /*SXParticlesEditor::ButtonEffectsEdit = SXGUICrButton("Edit", 70, 225, 60, 15, 0, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::ButtonEffectsEdit->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonEffectsEdit->GAlign.left = true; - SXParticlesEditor::ButtonEffectsEdit->GAlign.top = true;*/ - SXParticlesEditor::ButtonEffectsDelete = SXGUICrButton("Delete", 135, 225, 60, 15, 0, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::ButtonEffectsDelete->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonEffectsDelete->GAlign.left = true; - SXParticlesEditor::ButtonEffectsDelete->GAlign.top = true; - SXParticlesEditor::ButtonEffectsDelete->AddHandler(SXParticlesEditor_ButtonEffectsDelete_Click, WM_LBUTTONUP); - - - SXParticlesEditor::StaticEmitters = SXGUICrStatic("Emitters:", 10, 250, 50, 15, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::StaticEmitters->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticEmitters->SetColorText(0, 0, 0); - SXParticlesEditor::StaticEmitters->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticEmitters->SetTransparentTextBk(true); - SXParticlesEditor::StaticEmitters->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticEmitters->GAlign.left = true; - SXParticlesEditor::StaticEmitters->GAlign.top = true; - - SXParticlesEditor::StaticEmittersCount = SXGUICrStatic("0", 65, 250, 100, 15, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::StaticEmittersCount->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticEmittersCount->SetColorText(0, 0, 0); - SXParticlesEditor::StaticEmittersCount->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticEmittersCount->SetTransparentTextBk(true); - SXParticlesEditor::StaticEmittersCount->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticEmittersCount->GAlign.left = true; - SXParticlesEditor::StaticEmittersCount->GAlign.top = true; - - SXParticlesEditor::ListBoxEmitters = SXGUICrListBox("", 2, 270, 200, 120, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0, false); - SXParticlesEditor::ListBoxEmitters->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXParticlesEditor::ListBoxEmitters->SetColorText(0,0,0); - SXParticlesEditor::ListBoxEmitters->SetColorTextBk(255,255,255); - SXParticlesEditor::ListBoxEmitters->SetTransparentTextBk(true); - SXParticlesEditor::ListBoxEmitters->SetColorBrush(255, 255, 255); - SXParticlesEditor::ListBoxEmitters->GAlign.left = true; - SXParticlesEditor::ListBoxEmitters->GAlign.top = true; - SXParticlesEditor::ListBoxEmitters->AddHandler(SXParticlesEditor_ListBoxEmitters_Click, WM_LBUTTONUP); - SXParticlesEditor::ListBoxEmitters->AddHandler(SXParticlesEditor_ListBoxEmitters_Click, WM_KEYUP, VK_UP, true, 0, false, false); - SXParticlesEditor::ListBoxEmitters->AddHandler(SXParticlesEditor_ListBoxEmitters_Click, WM_KEYUP, VK_DOWN, true, 0, false, false); + SXParticlesEditor::ListBoxEffects = SXGUICrListBox(2, 30, 200, 200, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0, false); + SXParticlesEditor::ListBoxEffects->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXParticlesEditor::ListBoxEffects->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ListBoxEffects->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ListBoxEffects->setTransparentTextBk(true); + SXParticlesEditor::ListBoxEffects->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ListBoxEffects->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ListBoxEffects->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ListBoxEffects->addHandler(SXParticlesEditor_ListBoxEffects_Click,WM_LBUTTONUP); + SXParticlesEditor::ListBoxEffects->addHandler(SXParticlesEditor_ListBoxEffects_Click, WM_KEYUP, VK_UP, true, 0, false, false); + SXParticlesEditor::ListBoxEffects->addHandler(SXParticlesEditor_ListBoxEffects_Click, WM_KEYUP, VK_DOWN, true, 0, false, false); + + SXParticlesEditor::ButtonEffectsCreate = SXGUICrButton("Create", 5, 225, 60, 15, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::ButtonEffectsCreate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonEffectsCreate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonEffectsCreate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonEffectsCreate->addHandler(SXParticlesEditor_ButtonEffectsCreate_Click, WM_LBUTTONUP); + /*SXParticlesEditor::ButtonEffectsEdit = SXGUICrButton("Edit", 70, 225, 60, 15, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::ButtonEffectsEdit->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonEffectsEdit->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonEffectsEdit->setFollowParentSide(SXGUI_SIDE_TOP, true);*/ + SXParticlesEditor::ButtonEffectsDelete = SXGUICrButton("Delete", 135, 225, 60, 15, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::ButtonEffectsDelete->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonEffectsDelete->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonEffectsDelete->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonEffectsDelete->addHandler(SXParticlesEditor_ButtonEffectsDelete_Click, WM_LBUTTONUP); + + + SXParticlesEditor::StaticEmitters = SXGUICrStatic("Emitters:", 10, 250, 50, 15, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::StaticEmitters->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticEmitters->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticEmitters->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticEmitters->setTransparentTextBk(true); + SXParticlesEditor::StaticEmitters->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticEmitters->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticEmitters->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::StaticEmittersCount = SXGUICrStatic("0", 65, 250, 100, 15, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::StaticEmittersCount->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticEmittersCount->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticEmittersCount->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticEmittersCount->setTransparentTextBk(true); + SXParticlesEditor::StaticEmittersCount->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticEmittersCount->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticEmittersCount->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::ListBoxEmitters = SXGUICrListBox(2, 270, 200, 120, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0, false); + SXParticlesEditor::ListBoxEmitters->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXParticlesEditor::ListBoxEmitters->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ListBoxEmitters->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ListBoxEmitters->setTransparentTextBk(true); + SXParticlesEditor::ListBoxEmitters->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ListBoxEmitters->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ListBoxEmitters->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ListBoxEmitters->addHandler(SXParticlesEditor_ListBoxEmitters_Click, WM_LBUTTONUP); + SXParticlesEditor::ListBoxEmitters->addHandler(SXParticlesEditor_ListBoxEmitters_Click, WM_KEYUP, VK_UP, true, 0, false, false); + SXParticlesEditor::ListBoxEmitters->addHandler(SXParticlesEditor_ListBoxEmitters_Click, WM_KEYUP, VK_DOWN, true, 0, false, false); - SXParticlesEditor::ButtonEmittersCreate = SXGUICrButton("Create", 5, 380, 60, 15, 0, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::ButtonEmittersCreate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonEmittersCreate->GAlign.left = true; - SXParticlesEditor::ButtonEmittersCreate->GAlign.top = true; - SXParticlesEditor::ButtonEmittersCreate->AddHandler(SXParticlesEditor_ButtonEmittersCreate_Click, WM_LBUTTONUP); - - SXParticlesEditor::ButtonEmittersBasis = SXGUICrButton("basis", 70, 380, 60, 15, 0, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::ButtonEmittersBasis->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonEmittersBasis->GAlign.left = true; - SXParticlesEditor::ButtonEmittersBasis->GAlign.top = true; - SXParticlesEditor::ButtonEmittersBasis->AddHandler(SXParticlesEditor_ButtonEmittersBasis_Click, WM_LBUTTONUP); - SXParticlesEditor::ButtonEmittersDelete = SXGUICrButton("Delete", 135, 380, 60, 15, 0, SXParticlesEditor::GroupBoxList->GetHWND(), 0, 0); - SXParticlesEditor::ButtonEmittersDelete->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonEmittersDelete->GAlign.left = true; - SXParticlesEditor::ButtonEmittersDelete->GAlign.top = true; - SXParticlesEditor::ButtonEmittersDelete->AddHandler(SXParticlesEditor_ButtonEmittersDelete_Click, WM_LBUTTONUP); - - - SXParticlesEditor::GroupBoxData = SXGUICrGroupBox("", 0, 425, 803, 170, SXParticlesEditor::JobWindow->GetHWND(), WndProcAllDefault, 0); - SXGUIBaseHandlers::InitHandlerMsg(SXParticlesEditor::GroupBoxData); - //SXParticlesEditor::GroupBoxData->AddHandler(SXLevelEditor_GroupBoxLight_CallWmCommand, WM_COMMAND); - SXParticlesEditor::GroupBoxData->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::GroupBoxData->SetColorText(0, 0, 0); - SXParticlesEditor::GroupBoxData->SetColorTextBk(220, 220, 220); - SXParticlesEditor::GroupBoxData->SetTransparentTextBk(true); - SXParticlesEditor::GroupBoxData->SetColorBrush(220, 220, 220); - - SXParticlesEditor::GroupBoxData->GAlign.left = true; - SXParticlesEditor::GroupBoxData->GAlign.right = true; - SXParticlesEditor::GroupBoxData->GAlign.top = false; - SXParticlesEditor::GroupBoxData->GAlign.bottom = true; - - SXParticlesEditor::GroupBoxData2 = SXGUICrGroupBox("", 0, 25, 803, 145, SXParticlesEditor::GroupBoxData->GetHWND(), WndProcAllDefault, 0); - SXGUIBaseHandlers::InitHandlerMsg(SXParticlesEditor::GroupBoxData2); - //SXParticlesEditor::GroupBoxData->AddHandler(SXLevelEditor_GroupBoxLight_CallWmCommand, WM_COMMAND); - SXParticlesEditor::GroupBoxData2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::GroupBoxData2->SetColorText(0, 0, 0); - SXParticlesEditor::GroupBoxData2->SetColorTextBk(220, 220, 220); - SXParticlesEditor::GroupBoxData2->SetTransparentTextBk(true); - SXParticlesEditor::GroupBoxData2->SetColorBrush(220, 220, 220); - - SXParticlesEditor::GroupBoxData2->GAlign.left = true; - SXParticlesEditor::GroupBoxData2->GAlign.right = true; - SXParticlesEditor::GroupBoxData2->GAlign.top = false; - SXParticlesEditor::GroupBoxData2->GAlign.bottom = true; - SXParticlesEditor::GroupBoxData2->AddHandler(SXParticlesEditor_GroupBoxData2_CallWmCommand, WM_COMMAND); - - SXParticlesEditor::GroupBoxTabs = SXGUICrGroupBox("", 0, 0, 655, 30, SXParticlesEditor::GroupBoxData->GetHWND(), WndProcAllDefault, 0); - SXGUIBaseHandlers::InitHandlerMsg(SXParticlesEditor::GroupBoxTabs); - SXParticlesEditor::GroupBoxTabs->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::GroupBoxTabs->SetColorText(0, 0, 0); - SXParticlesEditor::GroupBoxTabs->SetColorTextBk(220, 220, 220); - SXParticlesEditor::GroupBoxTabs->SetTransparentTextBk(true); - SXParticlesEditor::GroupBoxTabs->SetColorBrush(220, 220, 220); - - SXParticlesEditor::GroupBoxTabs->GAlign.left = true; - SXParticlesEditor::GroupBoxTabs->GAlign.right = false; - SXParticlesEditor::GroupBoxTabs->GAlign.top = false; - SXParticlesEditor::GroupBoxTabs->GAlign.bottom = true; - - - SXParticlesEditor::ButtonBase = SXGUICrRadioButtonEx("Base", 10, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->GetHWND(), 0, 0); - SXParticlesEditor::ButtonBase->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonBase->GAlign.left = true; - SXParticlesEditor::ButtonBase->GAlign.top = true; - SXParticlesEditor::ButtonBase->AddHandler(SXParticlesEditor_ButtonBase_Click, WM_LBUTTONUP); - - SXParticlesEditor::ButtonTextureAnimTex = SXGUICrRadioButtonEx("TextureAnimTex", 115, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->GetHWND(), 0, 0); - SXParticlesEditor::ButtonTextureAnimTex->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonTextureAnimTex->GAlign.left = true; - SXParticlesEditor::ButtonTextureAnimTex->GAlign.top = true; - SXParticlesEditor::ButtonTextureAnimTex->AddHandler(SXParticlesEditor_ButtonTextureAnimTex_Click, WM_LBUTTONUP); - - SXParticlesEditor::ButtonSpawn = SXGUICrRadioButtonEx("Spawn", 220, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->GetHWND(), 0, 0); - SXParticlesEditor::ButtonSpawn->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonSpawn->GAlign.left = true; - SXParticlesEditor::ButtonSpawn->GAlign.top = true; - SXParticlesEditor::ButtonSpawn->AddHandler(SXParticlesEditor_ButtonSpawn_Click, WM_LBUTTONUP); - - SXParticlesEditor::ButtonBound = SXGUICrRadioButtonEx("Bound", 325, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->GetHWND(), 0, 0); - SXParticlesEditor::ButtonBound->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonBound->GAlign.left = true; - SXParticlesEditor::ButtonBound->GAlign.top = true; - SXParticlesEditor::ButtonBound->AddHandler(SXParticlesEditor_ButtonBound_Click, WM_LBUTTONUP); - - SXParticlesEditor::ButtonCharacters = SXGUICrRadioButtonEx("Charaters", 430, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->GetHWND(), 0, 0); - SXParticlesEditor::ButtonCharacters->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonCharacters->GAlign.left = true; - SXParticlesEditor::ButtonCharacters->GAlign.top = true; - SXParticlesEditor::ButtonCharacters->AddHandler(SXParticlesEditor_ButtonCharacters_Click, WM_LBUTTONUP); - - SXParticlesEditor::ButtonVelocityAcceleration = SXGUICrRadioButtonEx("VelocityAcceleration", 535, 10, 110, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->GetHWND(), 0, 0); - SXParticlesEditor::ButtonVelocityAcceleration->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonVelocityAcceleration->GAlign.left = true; - SXParticlesEditor::ButtonVelocityAcceleration->GAlign.top = true; - SXParticlesEditor::ButtonVelocityAcceleration->AddHandler(SXParticlesEditor_ButtonVelocityAcceleration_Click, WM_LBUTTONUP); - - SXParticlesEditor::StaticEffName = SXGUICrStatic("Name:", 5, 10, 40, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticEffName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticEffName->SetColorText(0, 0, 0); - SXParticlesEditor::StaticEffName->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticEffName->SetTransparentTextBk(true); - SXParticlesEditor::StaticEffName->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticEffName->GAlign.left = true; - SXParticlesEditor::StaticEffName->GAlign.top = true; - SXParticlesEditor::EditEffName = SXGUICrEdit("0", 50, 10, 200, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditEffName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditEffName->SetColorText(0, 0, 0); - SXParticlesEditor::EditEffName->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditEffName->SetTransparentTextBk(true); - SXParticlesEditor::EditEffName->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditEffName->GAlign.left = true; - SXParticlesEditor::EditEffName->GAlign.top = true; - SXParticlesEditor::EditEffName->AddHandler(SXParticlesEditor_EditEffName_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - - SXParticlesEditor::ButtonEffCreate = SXGUICrButton("Create", 260, 10, 50, 15, 0, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ButtonEffCreate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonEffCreate->GAlign.left = true; - SXParticlesEditor::ButtonEffCreate->GAlign.top = true; - SXParticlesEditor::ButtonEffCreate->AddHandler(SXParticlesEditor_ButtonEffCreate_Click, WM_LBUTTONUP); + SXParticlesEditor::ButtonEmittersCreate = SXGUICrButton("Create", 5, 380, 60, 15, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::ButtonEmittersCreate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonEmittersCreate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonEmittersCreate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonEmittersCreate->addHandler(SXParticlesEditor_ButtonEmittersCreate_Click, WM_LBUTTONUP); + + SXParticlesEditor::ButtonEmittersBasis = SXGUICrButton("basis", 70, 380, 60, 15, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::ButtonEmittersBasis->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonEmittersBasis->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonEmittersBasis->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonEmittersBasis->addHandler(SXParticlesEditor_ButtonEmittersBasis_Click, WM_LBUTTONUP); + SXParticlesEditor::ButtonEmittersDelete = SXGUICrButton("Delete", 135, 380, 60, 15, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxList->getHWND(), 0, 0); + SXParticlesEditor::ButtonEmittersDelete->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonEmittersDelete->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonEmittersDelete->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonEmittersDelete->addHandler(SXParticlesEditor_ButtonEmittersDelete_Click, WM_LBUTTONUP); + + + SXParticlesEditor::GroupBoxData = SXGUICrGroupBox("", 0, 425, 803, 170, SXParticlesEditor::JobWindow->getHWND(), WndProcAllDefault, 0); + gui_func::base_handlers::InitHandlerMsg(SXParticlesEditor::GroupBoxData); + //SXParticlesEditor::GroupBoxData->addHandler(SXLevelEditor_GroupBoxLight_CallWmCommand, WM_COMMAND); + SXParticlesEditor::GroupBoxData->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::GroupBoxData->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::GroupBoxData->setColorTextBk(RGB(220, 220, 220)); + SXParticlesEditor::GroupBoxData->setTransparentTextBk(true); + SXParticlesEditor::GroupBoxData->setColorBrush(RGB(220, 220, 220)); + + SXParticlesEditor::GroupBoxData->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::GroupBoxData->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXParticlesEditor::GroupBoxData->setFollowParentSide(SXGUI_SIDE_TOP, false); + SXParticlesEditor::GroupBoxData->setFollowParentSide(SXGUI_SIDE_BOTTOM, true); + + SXParticlesEditor::GroupBoxData2 = SXGUICrGroupBox("", 0, 25, 803, 145, SXParticlesEditor::GroupBoxData->getHWND(), WndProcAllDefault, 0); + gui_func::base_handlers::InitHandlerMsg(SXParticlesEditor::GroupBoxData2); + //SXParticlesEditor::GroupBoxData->addHandler(SXLevelEditor_GroupBoxLight_CallWmCommand, WM_COMMAND); + SXParticlesEditor::GroupBoxData2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::GroupBoxData2->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::GroupBoxData2->setColorTextBk(RGB(220, 220, 220)); + SXParticlesEditor::GroupBoxData2->setTransparentTextBk(true); + SXParticlesEditor::GroupBoxData2->setColorBrush(RGB(220, 220, 220)); + + SXParticlesEditor::GroupBoxData2->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::GroupBoxData2->setFollowParentSide(SXGUI_SIDE_RIGHT, true); + SXParticlesEditor::GroupBoxData2->setFollowParentSide(SXGUI_SIDE_TOP, false); + SXParticlesEditor::GroupBoxData2->setFollowParentSide(SXGUI_SIDE_BOTTOM, true); + SXParticlesEditor::GroupBoxData2->addHandler(SXParticlesEditor_GroupBoxData2_CallWmCommand, WM_COMMAND); + + SXParticlesEditor::GroupBoxTabs = SXGUICrGroupBox("", 0, 0, 655, 30, SXParticlesEditor::GroupBoxData->getHWND(), WndProcAllDefault, 0); + gui_func::base_handlers::InitHandlerMsg(SXParticlesEditor::GroupBoxTabs); + SXParticlesEditor::GroupBoxTabs->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::GroupBoxTabs->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::GroupBoxTabs->setColorTextBk(RGB(220, 220, 220)); + SXParticlesEditor::GroupBoxTabs->setTransparentTextBk(true); + SXParticlesEditor::GroupBoxTabs->setColorBrush(RGB(220, 220, 220)); + + SXParticlesEditor::GroupBoxTabs->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::GroupBoxTabs->setFollowParentSide(SXGUI_SIDE_RIGHT, false); + SXParticlesEditor::GroupBoxTabs->setFollowParentSide(SXGUI_SIDE_TOP, false); + SXParticlesEditor::GroupBoxTabs->setFollowParentSide(SXGUI_SIDE_BOTTOM, true); + + + SXParticlesEditor::ButtonBase = SXGUICrRadioButtonEx("Base", 10, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->getHWND(), 0, 0); + SXParticlesEditor::ButtonBase->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonBase->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonBase->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonBase->addHandler(SXParticlesEditor_ButtonBase_Click, WM_LBUTTONUP); + + SXParticlesEditor::ButtonTextureAnimTex = SXGUICrRadioButtonEx("TextureAnimTex", 115, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->getHWND(), 0, 0); + SXParticlesEditor::ButtonTextureAnimTex->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonTextureAnimTex->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonTextureAnimTex->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonTextureAnimTex->addHandler(SXParticlesEditor_ButtonTextureAnimTex_Click, WM_LBUTTONUP); + + SXParticlesEditor::ButtonSpawn = SXGUICrRadioButtonEx("Spawn", 220, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->getHWND(), 0, 0); + SXParticlesEditor::ButtonSpawn->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonSpawn->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonSpawn->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonSpawn->addHandler(SXParticlesEditor_ButtonSpawn_Click, WM_LBUTTONUP); + + SXParticlesEditor::ButtonBound = SXGUICrRadioButtonEx("Bound", 325, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->getHWND(), 0, 0); + SXParticlesEditor::ButtonBound->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonBound->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonBound->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonBound->addHandler(SXParticlesEditor_ButtonBound_Click, WM_LBUTTONUP); + + SXParticlesEditor::ButtonCharacters = SXGUICrRadioButtonEx("Charaters", 430, 10, 100, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->getHWND(), 0, 0); + SXParticlesEditor::ButtonCharacters->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonCharacters->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonCharacters->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonCharacters->addHandler(SXParticlesEditor_ButtonCharacters_Click, WM_LBUTTONUP); + + SXParticlesEditor::ButtonVelocityAcceleration = SXGUICrRadioButtonEx("VelocityAcceleration", 535, 10, 110, 15, 0, WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_PUSHLIKE, SXParticlesEditor::GroupBoxTabs->getHWND(), 0, 0); + SXParticlesEditor::ButtonVelocityAcceleration->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonVelocityAcceleration->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonVelocityAcceleration->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonVelocityAcceleration->addHandler(SXParticlesEditor_ButtonVelocityAcceleration_Click, WM_LBUTTONUP); + + SXParticlesEditor::StaticEffName = SXGUICrStatic("Name:", 5, 10, 40, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticEffName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticEffName->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticEffName->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticEffName->setTransparentTextBk(true); + SXParticlesEditor::StaticEffName->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticEffName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticEffName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditEffName = SXGUICrEdit("0", 50, 10, 200, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditEffName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditEffName->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditEffName->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditEffName->setTransparentTextBk(true); + SXParticlesEditor::EditEffName->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditEffName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditEffName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditEffName->addHandler(SXParticlesEditor_EditEffName_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + + SXParticlesEditor::ButtonEffCreate = SXGUICrButton("Create", 260, 10, 50, 15, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ButtonEffCreate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonEffCreate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonEffCreate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonEffCreate->addHandler(SXParticlesEditor_ButtonEffCreate_Click, WM_LBUTTONUP); //base //{ - SXParticlesEditor::StaticName = SXGUICrStatic("Name:", 5, 10, 40, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticName->SetColorText(0, 0, 0); - SXParticlesEditor::StaticName->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticName->SetTransparentTextBk(true); - SXParticlesEditor::StaticName->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticName->GAlign.left = true; - SXParticlesEditor::StaticName->GAlign.top = true; - SXParticlesEditor::EditName = SXGUICrEdit("0", 50, 10, 200, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditName->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditName->SetColorText(0, 0, 0); - SXParticlesEditor::EditName->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditName->SetTransparentTextBk(true); - SXParticlesEditor::EditName->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditName->GAlign.left = true; - SXParticlesEditor::EditName->GAlign.top = true; - SXParticlesEditor::EditName->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditName->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticCount = SXGUICrStatic("Count:", 5, 30, 75, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticCount->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticCount->SetColorText(0, 0, 0); - SXParticlesEditor::StaticCount->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticCount->SetTransparentTextBk(true); - SXParticlesEditor::StaticCount->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticCount->GAlign.left = true; - SXParticlesEditor::StaticCount->GAlign.top = true; - SXParticlesEditor::EditCount = SXGUICrEdit("0", 50, 30, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditCount->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditCount->SetColorText(0, 0, 0); - SXParticlesEditor::EditCount->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditCount->SetTransparentTextBk(true); - SXParticlesEditor::EditCount->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditCount->GAlign.left = true; - SXParticlesEditor::EditCount->GAlign.top = true; - SXParticlesEditor::EditCount->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditCount->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticColorCoef = SXGUICrStatic("ColorCoef:", 130, 30, 75, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticColorCoef->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticColorCoef->SetColorText(0, 0, 0); - SXParticlesEditor::StaticColorCoef->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticColorCoef->SetTransparentTextBk(true); - SXParticlesEditor::StaticColorCoef->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticColorCoef->GAlign.left = true; - SXParticlesEditor::StaticColorCoef->GAlign.top = true; - SXParticlesEditor::EditColorCoef = SXGUICrEdit("0", 180, 30, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditColorCoef->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditColorCoef->SetColorText(0, 0, 0); - SXParticlesEditor::EditColorCoef->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditColorCoef->SetTransparentTextBk(true); - SXParticlesEditor::EditColorCoef->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditColorCoef->GAlign.left = true; - SXParticlesEditor::EditColorCoef->GAlign.top = true; - SXParticlesEditor::EditColorCoef->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditColorCoef->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::ButtonEmitterCreate = SXGUICrButton("CREATE", 725, 120, 70, 20, 0, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ButtonEmitterCreate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonEmitterCreate->SetColorText(0, 0, 0); - SXParticlesEditor::ButtonEmitterCreate->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ButtonEmitterCreate->SetTransparentTextBk(true); - SXParticlesEditor::ButtonEmitterCreate->SetColorBrush(220, 220, 220); - SXParticlesEditor::ButtonEmitterCreate->GAlign.left = true; - SXParticlesEditor::ButtonEmitterCreate->GAlign.top = true; - SXParticlesEditor::ButtonEmitterCreate->AddHandler(SXParticlesEditor_ButtonEmitterCreate_Click, WM_LBUTTONUP); - - SXParticlesEditor::StaticReCreateCount = SXGUICrStatic("ReCreateCount:", 5, 50, 75, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticReCreateCount->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticReCreateCount->SetColorText(0, 0, 0); - SXParticlesEditor::StaticReCreateCount->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticReCreateCount->SetTransparentTextBk(true); - SXParticlesEditor::StaticReCreateCount->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticReCreateCount->GAlign.left = true; - SXParticlesEditor::StaticReCreateCount->GAlign.top = true; - SXParticlesEditor::EditReCreateCount = SXGUICrEdit("0", 100, 50, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditReCreateCount->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditReCreateCount->SetColorText(0, 0, 0); - SXParticlesEditor::EditReCreateCount->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditReCreateCount->SetTransparentTextBk(true); - SXParticlesEditor::EditReCreateCount->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditReCreateCount->GAlign.left = true; - SXParticlesEditor::EditReCreateCount->GAlign.top = true; - SXParticlesEditor::EditReCreateCount->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditReCreateCount->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticSoftCoef = SXGUICrStatic("SoftCoef:", 5, 70, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSoftCoef->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSoftCoef->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSoftCoef->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSoftCoef->SetTransparentTextBk(true); - SXParticlesEditor::StaticSoftCoef->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSoftCoef->GAlign.left = true; - SXParticlesEditor::StaticSoftCoef->GAlign.top = true; - SXParticlesEditor::EditSoftCoef = SXGUICrEdit("0", 100, 70, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSoftCoef->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSoftCoef->SetColorText(0, 0, 0); - SXParticlesEditor::EditSoftCoef->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSoftCoef->SetTransparentTextBk(true); - SXParticlesEditor::EditSoftCoef->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSoftCoef->GAlign.left = true; - SXParticlesEditor::EditSoftCoef->GAlign.top = true; - SXParticlesEditor::EditSoftCoef->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSoftCoef->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticRefractionCoef = SXGUICrStatic("RefractionCoef:", 5, 90, 75, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticRefractionCoef->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticRefractionCoef->SetColorText(0, 0, 0); - SXParticlesEditor::StaticRefractionCoef->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticRefractionCoef->SetTransparentTextBk(true); - SXParticlesEditor::StaticRefractionCoef->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticRefractionCoef->GAlign.left = true; - SXParticlesEditor::StaticRefractionCoef->GAlign.top = true; - SXParticlesEditor::EditRefractionCoef = SXGUICrEdit("0", 100, 90, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditRefractionCoef->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditRefractionCoef->SetColorText(0, 0, 0); - SXParticlesEditor::EditRefractionCoef->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditRefractionCoef->SetTransparentTextBk(true); - SXParticlesEditor::EditRefractionCoef->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditRefractionCoef->GAlign.left = true; - SXParticlesEditor::EditRefractionCoef->GAlign.top = true; - SXParticlesEditor::EditRefractionCoef->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditRefractionCoef->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticTransparencyCoef = SXGUICrStatic("TransparencyCoef:", 5, 110, 90, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticTransparencyCoef->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticTransparencyCoef->SetColorText(0, 0, 0); - SXParticlesEditor::StaticTransparencyCoef->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticTransparencyCoef->SetTransparentTextBk(true); - SXParticlesEditor::StaticTransparencyCoef->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticTransparencyCoef->GAlign.left = true; - SXParticlesEditor::StaticTransparencyCoef->GAlign.top = true; - SXParticlesEditor::EditTransparencyCoef = SXGUICrEdit("0", 100, 110, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditTransparencyCoef->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditTransparencyCoef->SetColorText(0, 0, 0); - SXParticlesEditor::EditTransparencyCoef->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditTransparencyCoef->SetTransparentTextBk(true); - SXParticlesEditor::EditTransparencyCoef->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditTransparencyCoef->GAlign.left = true; - SXParticlesEditor::EditTransparencyCoef->GAlign.top = true; - SXParticlesEditor::EditTransparencyCoef->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditTransparencyCoef->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxLighting = SXGUICrCheckBox("Lighting", 180, 50, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxLighting->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxLighting->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxLighting->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxLighting->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxLighting->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxLighting->GAlign.left = true; - SXParticlesEditor::CheckBoxLighting->GAlign.top = true; - - SXParticlesEditor::CheckBoxCollisionDelete = SXGUICrCheckBox("CollisionDelete", 180, 70, 90, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxCollisionDelete->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxCollisionDelete->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxCollisionDelete->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxCollisionDelete->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxCollisionDelete->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxCollisionDelete->GAlign.left = true; - SXParticlesEditor::CheckBoxCollisionDelete->GAlign.top = true; - - - SXParticlesEditor::StaticFigureType = SXGUICrStatic("FigureType:", 270, 12, 60, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticFigureType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticFigureType->SetColorText(0, 0, 0); - SXParticlesEditor::StaticFigureType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticFigureType->SetTransparentTextBk(true); - SXParticlesEditor::StaticFigureType->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticFigureType->GAlign.left = true; - SXParticlesEditor::StaticFigureType->GAlign.top = true; - SXParticlesEditor::ComboBoxFigureType = SXGUICrComboBox("", 335, 10, 170, 75, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxFigureType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxFigureType->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxFigureType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxFigureType->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxFigureType->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxFigureType->AddItem("quad"); - SXParticlesEditor::ComboBoxFigureType->AddItem("billboard"); - SXParticlesEditor::ComboBoxFigureType->AddItem("quad_composite"); - SXParticlesEditor::ComboBoxFigureType->SetSel(0); - SXParticlesEditor::ComboBoxFigureType->GAlign.left = true; - SXParticlesEditor::ComboBoxFigureType->GAlign.top = true; - - SXParticlesEditor::StaticFigureCountQuads = SXGUICrStatic("FigureCountQuads:", 270, 35, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticFigureCountQuads->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticFigureCountQuads->SetColorText(0, 0, 0); - SXParticlesEditor::StaticFigureCountQuads->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticFigureCountQuads->SetTransparentTextBk(true); - SXParticlesEditor::StaticFigureCountQuads->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticFigureCountQuads->GAlign.left = true; - SXParticlesEditor::StaticFigureCountQuads->GAlign.top = true; - SXParticlesEditor::EditFigureCountQuads = SXGUICrEdit("0", 375, 35, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditFigureCountQuads->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditFigureCountQuads->SetColorText(0, 0, 0); - SXParticlesEditor::EditFigureCountQuads->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditFigureCountQuads->SetTransparentTextBk(true); - SXParticlesEditor::EditFigureCountQuads->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditFigureCountQuads->GAlign.left = true; - SXParticlesEditor::EditFigureCountQuads->GAlign.top = true; - SXParticlesEditor::EditFigureCountQuads->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditFigureCountQuads->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxFigureRotRand = SXGUICrCheckBox("FigureRotRand", 270, 55, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxFigureRotRand->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxFigureRotRand->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxFigureRotRand->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxFigureRotRand->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxFigureRotRand->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxFigureRotRand->GAlign.left = true; - SXParticlesEditor::CheckBoxFigureRotRand->GAlign.top = true; - SXParticlesEditor::CheckBoxFigureTapX = SXGUICrCheckBox("FigureTapX", 270, 75, 75, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxFigureTapX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxFigureTapX->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxFigureTapX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxFigureTapX->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxFigureTapX->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxFigureTapX->GAlign.left = true; - SXParticlesEditor::CheckBoxFigureTapX->GAlign.top = true; - SXParticlesEditor::CheckBoxFigureTapY = SXGUICrCheckBox("FigureTapY", 350, 75, 75, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxFigureTapY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxFigureTapY->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxFigureTapY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxFigureTapY->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxFigureTapY->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxFigureTapY->GAlign.left = true; - SXParticlesEditor::CheckBoxFigureTapY->GAlign.top = true; - SXParticlesEditor::CheckBoxFigureTapZ = SXGUICrCheckBox("FigureTapZ", 430, 75, 75, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxFigureTapZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxFigureTapZ->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxFigureTapZ->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxFigureTapZ->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxFigureTapZ->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxFigureTapZ->GAlign.left = true; - SXParticlesEditor::CheckBoxFigureTapZ->GAlign.top = true; - - SXParticlesEditor::StaticAlphaBlendType = SXGUICrStatic("AlphaBlendType:", 270, 97, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAlphaBlendType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAlphaBlendType->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAlphaBlendType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAlphaBlendType->SetTransparentTextBk(true); - SXParticlesEditor::StaticAlphaBlendType->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAlphaBlendType->GAlign.left = true; - SXParticlesEditor::StaticAlphaBlendType->GAlign.top = true; - SXParticlesEditor::ComboBoxAlphaBlendType = SXGUICrComboBox("", 355, 95, 150, 75, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxAlphaBlendType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxAlphaBlendType->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxAlphaBlendType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxAlphaBlendType->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxAlphaBlendType->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxAlphaBlendType->AddItem("pabt_alpha"); - SXParticlesEditor::ComboBoxAlphaBlendType->AddItem("pabt_add"); - SXParticlesEditor::ComboBoxAlphaBlendType->SetSel(0); - SXParticlesEditor::ComboBoxAlphaBlendType->GAlign.left = true; - SXParticlesEditor::ComboBoxAlphaBlendType->GAlign.top = true; - - - SXParticlesEditor::StaticColor = SXGUICrStatic("Color:", 270, 120, 30, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticColor->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticColor->SetColorText(0, 0, 0); - SXParticlesEditor::StaticColor->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticColor->SetTransparentTextBk(true); - SXParticlesEditor::StaticColor->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticColor->GAlign.left = true; - SXParticlesEditor::StaticColor->GAlign.top = true; - - SXParticlesEditor::StaticColorR = SXGUICrStatic("r:", 302, 120, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticColorR->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticColorR->SetColorText(0, 0, 0); - SXParticlesEditor::StaticColorR->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticColorR->SetTransparentTextBk(true); - SXParticlesEditor::StaticColorR->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticColorR->GAlign.left = true; - SXParticlesEditor::StaticColorR->GAlign.top = true; - - SXParticlesEditor::EditColorR = SXGUICrEdit("0", 310, 120, 45, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditColorR->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditColorR->SetColorText(0, 0, 0); - SXParticlesEditor::EditColorR->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditColorR->SetTransparentTextBk(true); - SXParticlesEditor::EditColorR->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditColorR->GAlign.left = true; - SXParticlesEditor::EditColorR->GAlign.top = true; - SXParticlesEditor::EditColorR->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditColorR->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticColorG = SXGUICrStatic("g:", 356, 120, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticColorG->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticColorG->SetColorText(0, 0, 0); - SXParticlesEditor::StaticColorG->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticColorG->SetTransparentTextBk(true); - SXParticlesEditor::StaticColorG->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticColorG->GAlign.left = true; - SXParticlesEditor::StaticColorG->GAlign.top = true; - - SXParticlesEditor::EditColorG = SXGUICrEdit("0", 365, 120, 45, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditColorG->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditColorG->SetColorText(0, 0, 0); - SXParticlesEditor::EditColorG->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditColorG->SetTransparentTextBk(true); - SXParticlesEditor::EditColorG->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditColorG->GAlign.left = true; - SXParticlesEditor::EditColorG->GAlign.top = true; - SXParticlesEditor::EditColorG->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditColorG->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticColorB = SXGUICrStatic("b:", 411, 120, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticColorB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticColorB->SetColorText(0, 0, 0); - SXParticlesEditor::StaticColorB->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticColorB->SetTransparentTextBk(true); - SXParticlesEditor::StaticColorB->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticColorB->GAlign.left = true; - SXParticlesEditor::StaticColorB->GAlign.top = true; - - SXParticlesEditor::EditColorB = SXGUICrEdit("0", 420, 120, 45, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditColorB->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditColorB->SetColorText(0, 0, 0); - SXParticlesEditor::EditColorB->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditColorB->SetTransparentTextBk(true); - SXParticlesEditor::EditColorB->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditColorB->GAlign.left = true; - SXParticlesEditor::EditColorB->GAlign.top = true; - SXParticlesEditor::EditColorB->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditColorB->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticColorA = SXGUICrStatic("a:", 466, 120, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticColorA->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticColorA->SetColorText(0, 0, 0); - SXParticlesEditor::StaticColorA->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticColorA->SetTransparentTextBk(true); - SXParticlesEditor::StaticColorA->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticColorA->GAlign.left = true; - SXParticlesEditor::StaticColorA->GAlign.top = true; - - SXParticlesEditor::EditColorA = SXGUICrEdit("0", 475, 120, 45, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditColorA->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditColorA->SetColorText(0, 0, 0); - SXParticlesEditor::EditColorA->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditColorA->SetTransparentTextBk(true); - SXParticlesEditor::EditColorA->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditColorA->GAlign.left = true; - SXParticlesEditor::EditColorA->GAlign.top = true; - SXParticlesEditor::EditColorA->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditColorA->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + SXParticlesEditor::StaticName = SXGUICrStatic("Name:", 5, 10, 40, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticName->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticName->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticName->setTransparentTextBk(true); + SXParticlesEditor::StaticName->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditName = SXGUICrEdit("0", 50, 10, 200, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditName->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditName->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditName->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditName->setTransparentTextBk(true); + SXParticlesEditor::EditName->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditName->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditName->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditName->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditName->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticCount = SXGUICrStatic("Count:", 5, 30, 75, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticCount->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticCount->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticCount->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticCount->setTransparentTextBk(true); + SXParticlesEditor::StaticCount->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticCount->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticCount->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditCount = SXGUICrEdit("0", 50, 30, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditCount->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditCount->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditCount->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditCount->setTransparentTextBk(true); + SXParticlesEditor::EditCount->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditCount->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditCount->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditCount->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditCount->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticColorCoef = SXGUICrStatic("ColorCoef:", 130, 30, 75, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticColorCoef->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticColorCoef->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticColorCoef->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticColorCoef->setTransparentTextBk(true); + SXParticlesEditor::StaticColorCoef->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticColorCoef->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticColorCoef->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditColorCoef = SXGUICrEdit("0", 180, 30, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditColorCoef->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditColorCoef->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditColorCoef->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditColorCoef->setTransparentTextBk(true); + SXParticlesEditor::EditColorCoef->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditColorCoef->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditColorCoef->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditColorCoef->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditColorCoef->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::ButtonEmitterCreate = SXGUICrButton("CREATE", 725, 120, 70, 20, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ButtonEmitterCreate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonEmitterCreate->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ButtonEmitterCreate->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ButtonEmitterCreate->setTransparentTextBk(true); + SXParticlesEditor::ButtonEmitterCreate->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::ButtonEmitterCreate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonEmitterCreate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonEmitterCreate->addHandler(SXParticlesEditor_ButtonEmitterCreate_Click, WM_LBUTTONUP); + + SXParticlesEditor::StaticReCreateCount = SXGUICrStatic("ReCreateCount:", 5, 50, 75, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticReCreateCount->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticReCreateCount->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticReCreateCount->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticReCreateCount->setTransparentTextBk(true); + SXParticlesEditor::StaticReCreateCount->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticReCreateCount->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticReCreateCount->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditReCreateCount = SXGUICrEdit("0", 100, 50, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditReCreateCount->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditReCreateCount->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditReCreateCount->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditReCreateCount->setTransparentTextBk(true); + SXParticlesEditor::EditReCreateCount->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditReCreateCount->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditReCreateCount->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditReCreateCount->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditReCreateCount->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticSoftCoef = SXGUICrStatic("SoftCoef:", 5, 70, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSoftCoef->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSoftCoef->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSoftCoef->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSoftCoef->setTransparentTextBk(true); + SXParticlesEditor::StaticSoftCoef->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSoftCoef->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSoftCoef->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSoftCoef = SXGUICrEdit("0", 100, 70, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSoftCoef->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSoftCoef->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSoftCoef->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSoftCoef->setTransparentTextBk(true); + SXParticlesEditor::EditSoftCoef->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSoftCoef->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSoftCoef->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSoftCoef->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSoftCoef->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticRefractionCoef = SXGUICrStatic("RefractionCoef:", 5, 90, 75, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticRefractionCoef->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticRefractionCoef->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticRefractionCoef->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticRefractionCoef->setTransparentTextBk(true); + SXParticlesEditor::StaticRefractionCoef->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticRefractionCoef->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticRefractionCoef->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditRefractionCoef = SXGUICrEdit("0", 100, 90, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditRefractionCoef->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditRefractionCoef->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditRefractionCoef->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditRefractionCoef->setTransparentTextBk(true); + SXParticlesEditor::EditRefractionCoef->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditRefractionCoef->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditRefractionCoef->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditRefractionCoef->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditRefractionCoef->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticTransparencyCoef = SXGUICrStatic("TransparencyCoef:", 5, 110, 90, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticTransparencyCoef->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticTransparencyCoef->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticTransparencyCoef->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticTransparencyCoef->setTransparentTextBk(true); + SXParticlesEditor::StaticTransparencyCoef->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticTransparencyCoef->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticTransparencyCoef->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTransparencyCoef = SXGUICrEdit("0", 100, 110, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditTransparencyCoef->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditTransparencyCoef->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditTransparencyCoef->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditTransparencyCoef->setTransparentTextBk(true); + SXParticlesEditor::EditTransparencyCoef->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditTransparencyCoef->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditTransparencyCoef->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTransparencyCoef->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditTransparencyCoef->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxLighting = SXGUICrCheckBox("Lighting", 180, 50, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxLighting->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxLighting->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxLighting->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxLighting->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxLighting->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxLighting->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxLighting->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::CheckBoxCollisionDelete = SXGUICrCheckBox("CollisionDelete", 180, 70, 90, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxCollisionDelete->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxCollisionDelete->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxCollisionDelete->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxCollisionDelete->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxCollisionDelete->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxCollisionDelete->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxCollisionDelete->setFollowParentSide(SXGUI_SIDE_TOP, true); + + + SXParticlesEditor::StaticFigureType = SXGUICrStatic("FigureType:", 270, 12, 60, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticFigureType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticFigureType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticFigureType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticFigureType->setTransparentTextBk(true); + SXParticlesEditor::StaticFigureType->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticFigureType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticFigureType->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxFigureType = SXGUICrComboBox(335, 10, 170, 75, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxFigureType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxFigureType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxFigureType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxFigureType->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxFigureType->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxFigureType->addItem("quad"); + SXParticlesEditor::ComboBoxFigureType->addItem("billboard"); + SXParticlesEditor::ComboBoxFigureType->addItem("quad_composite"); + SXParticlesEditor::ComboBoxFigureType->setSel(0); + SXParticlesEditor::ComboBoxFigureType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxFigureType->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::StaticFigureCountQuads = SXGUICrStatic("FigureCountQuads:", 270, 35, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticFigureCountQuads->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticFigureCountQuads->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticFigureCountQuads->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticFigureCountQuads->setTransparentTextBk(true); + SXParticlesEditor::StaticFigureCountQuads->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticFigureCountQuads->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticFigureCountQuads->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditFigureCountQuads = SXGUICrEdit("0", 375, 35, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditFigureCountQuads->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditFigureCountQuads->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditFigureCountQuads->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditFigureCountQuads->setTransparentTextBk(true); + SXParticlesEditor::EditFigureCountQuads->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditFigureCountQuads->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditFigureCountQuads->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditFigureCountQuads->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditFigureCountQuads->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxFigureRotRand = SXGUICrCheckBox("FigureRotRand", 270, 55, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxFigureRotRand->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxFigureRotRand->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxFigureRotRand->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxFigureRotRand->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxFigureRotRand->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxFigureRotRand->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxFigureRotRand->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxFigureTapX = SXGUICrCheckBox("FigureTapX", 270, 75, 75, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxFigureTapX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxFigureTapX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxFigureTapX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxFigureTapX->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxFigureTapX->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxFigureTapX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxFigureTapX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxFigureTapY = SXGUICrCheckBox("FigureTapY", 350, 75, 75, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxFigureTapY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxFigureTapY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxFigureTapY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxFigureTapY->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxFigureTapY->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxFigureTapY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxFigureTapY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxFigureTapZ = SXGUICrCheckBox("FigureTapZ", 430, 75, 75, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxFigureTapZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxFigureTapZ->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxFigureTapZ->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxFigureTapZ->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxFigureTapZ->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxFigureTapZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxFigureTapZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::StaticAlphaBlendType = SXGUICrStatic("AlphaBlendType:", 270, 97, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAlphaBlendType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAlphaBlendType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAlphaBlendType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAlphaBlendType->setTransparentTextBk(true); + SXParticlesEditor::StaticAlphaBlendType->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAlphaBlendType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAlphaBlendType->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxAlphaBlendType = SXGUICrComboBox(355, 95, 150, 75, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxAlphaBlendType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxAlphaBlendType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxAlphaBlendType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxAlphaBlendType->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxAlphaBlendType->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxAlphaBlendType->addItem("pabt_alpha"); + SXParticlesEditor::ComboBoxAlphaBlendType->addItem("pabt_add"); + SXParticlesEditor::ComboBoxAlphaBlendType->setSel(0); + SXParticlesEditor::ComboBoxAlphaBlendType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxAlphaBlendType->setFollowParentSide(SXGUI_SIDE_TOP, true); + + + SXParticlesEditor::StaticColor = SXGUICrStatic("Color:", 270, 120, 30, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticColor->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticColor->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticColor->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticColor->setTransparentTextBk(true); + SXParticlesEditor::StaticColor->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticColor->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticColor->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::StaticColorR = SXGUICrStatic("r:", 302, 120, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticColorR->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticColorR->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticColorR->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticColorR->setTransparentTextBk(true); + SXParticlesEditor::StaticColorR->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticColorR->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticColorR->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::EditColorR = SXGUICrEdit("0", 310, 120, 45, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditColorR->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditColorR->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditColorR->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditColorR->setTransparentTextBk(true); + SXParticlesEditor::EditColorR->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditColorR->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditColorR->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditColorR->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditColorR->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticColorG = SXGUICrStatic("g:", 356, 120, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticColorG->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticColorG->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticColorG->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticColorG->setTransparentTextBk(true); + SXParticlesEditor::StaticColorG->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticColorG->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticColorG->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::EditColorG = SXGUICrEdit("0", 365, 120, 45, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditColorG->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditColorG->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditColorG->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditColorG->setTransparentTextBk(true); + SXParticlesEditor::EditColorG->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditColorG->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditColorG->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditColorG->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditColorG->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticColorB = SXGUICrStatic("b:", 411, 120, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticColorB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticColorB->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticColorB->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticColorB->setTransparentTextBk(true); + SXParticlesEditor::StaticColorB->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticColorB->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticColorB->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::EditColorB = SXGUICrEdit("0", 420, 120, 45, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditColorB->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditColorB->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditColorB->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditColorB->setTransparentTextBk(true); + SXParticlesEditor::EditColorB->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditColorB->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditColorB->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditColorB->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditColorB->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticColorA = SXGUICrStatic("a:", 466, 120, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticColorA->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticColorA->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticColorA->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticColorA->setTransparentTextBk(true); + SXParticlesEditor::StaticColorA->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticColorA->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticColorA->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::EditColorA = SXGUICrEdit("0", 475, 120, 45, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditColorA->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditColorA->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditColorA->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditColorA->setTransparentTextBk(true); + SXParticlesEditor::EditColorA->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditColorA->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditColorA->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditColorA->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditColorA->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); /*ISXGUIStatic* StaticColorG; ISXGUIEdit* EditColorG; @@ -966,1238 +965,1238 @@ void SXParticlesEditor::InitAllElements() ISXGUIEdit* EditColorA;*/ - SXParticlesEditor::StaticTimeLife = SXGUICrStatic("TimeLife:", 530, 10, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticTimeLife->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticTimeLife->SetColorText(0, 0, 0); - SXParticlesEditor::StaticTimeLife->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticTimeLife->SetTransparentTextBk(true); - SXParticlesEditor::StaticTimeLife->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticTimeLife->GAlign.left = true; - SXParticlesEditor::StaticTimeLife->GAlign.top = true; - SXParticlesEditor::EditTimeLife = SXGUICrEdit("0", 585, 10, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditTimeLife->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditTimeLife->SetColorText(0, 0, 0); - SXParticlesEditor::EditTimeLife->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditTimeLife->SetTransparentTextBk(true); - SXParticlesEditor::EditTimeLife->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditTimeLife->GAlign.left = true; - SXParticlesEditor::EditTimeLife->GAlign.top = true; - SXParticlesEditor::EditTimeLife->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditTimeLife->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticTimeLifeDisp = SXGUICrStatic("TimeLifeDisp:", 660, 10, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticTimeLifeDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticTimeLifeDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticTimeLifeDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticTimeLifeDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticTimeLifeDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticTimeLifeDisp->GAlign.left = true; - SXParticlesEditor::StaticTimeLifeDisp->GAlign.top = true; - SXParticlesEditor::EditTimeLifeDisp = SXGUICrEdit("0", 730, 10, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditTimeLifeDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditTimeLifeDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditTimeLifeDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditTimeLifeDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditTimeLifeDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditTimeLifeDisp->GAlign.left = true; - SXParticlesEditor::EditTimeLifeDisp->GAlign.top = true; - SXParticlesEditor::EditTimeLifeDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditTimeLifeDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticAlphaAgeDepend = SXGUICrStatic("AlphaAgeDepend:", 530, 32, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAlphaAgeDepend->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAlphaAgeDepend->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAlphaAgeDepend->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAlphaAgeDepend->SetTransparentTextBk(true); - SXParticlesEditor::StaticAlphaAgeDepend->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAlphaAgeDepend->GAlign.left = true; - SXParticlesEditor::StaticAlphaAgeDepend->GAlign.top = true; - SXParticlesEditor::ComboBoxAlphaDependAge = SXGUICrComboBox("", 630, 30, 170, 75, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxAlphaDependAge->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxAlphaDependAge->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxAlphaDependAge->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxAlphaDependAge->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxAlphaDependAge->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxAlphaDependAge->AddItem("none"); - SXParticlesEditor::ComboBoxAlphaDependAge->AddItem("direct"); - SXParticlesEditor::ComboBoxAlphaDependAge->AddItem("inverse"); - SXParticlesEditor::ComboBoxAlphaDependAge->SetSel(0); - SXParticlesEditor::ComboBoxAlphaDependAge->GAlign.left = true; - SXParticlesEditor::ComboBoxAlphaDependAge->GAlign.top = true; - - SXParticlesEditor::StaticSize = SXGUICrStatic("Size:", 530, 55, 25, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSize->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSize->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSize->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSize->SetTransparentTextBk(true); - SXParticlesEditor::StaticSize->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSize->GAlign.left = true; - SXParticlesEditor::StaticSize->GAlign.top = true; - SXParticlesEditor::StaticSizeX = SXGUICrStatic("x:", 555, 55, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSizeX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSizeX->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSizeX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSizeX->SetTransparentTextBk(true); - SXParticlesEditor::StaticSizeX->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSizeX->GAlign.left = true; - SXParticlesEditor::StaticSizeX->GAlign.top = true; - SXParticlesEditor::EditSizeX = SXGUICrEdit("0", 565, 55, 65, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSizeX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSizeX->SetColorText(0, 0, 0); - SXParticlesEditor::EditSizeX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSizeX->SetTransparentTextBk(true); - SXParticlesEditor::EditSizeX->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSizeX->GAlign.left = true; - SXParticlesEditor::EditSizeX->GAlign.top = true; - SXParticlesEditor::EditSizeX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSizeX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticSizeY = SXGUICrStatic("y:", 635, 55, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSizeY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSizeY->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSizeY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSizeY->SetTransparentTextBk(true); - SXParticlesEditor::StaticSizeY->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSizeY->GAlign.left = true; - SXParticlesEditor::StaticSizeY->GAlign.top = true; - SXParticlesEditor::EditSizeY = SXGUICrEdit("0", 645, 55, 65, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSizeY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSizeY->SetColorText(0, 0, 0); - SXParticlesEditor::EditSizeY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSizeY->SetTransparentTextBk(true); - SXParticlesEditor::EditSizeY->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSizeY->GAlign.left = true; - SXParticlesEditor::EditSizeY->GAlign.top = true; - SXParticlesEditor::EditSizeY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSizeY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticSizeDisp = SXGUICrStatic("Disp:", 710, 55, 25, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSizeDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSizeDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSizeDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSizeDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticSizeDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSizeDisp->GAlign.left = true; - SXParticlesEditor::StaticSizeDisp->GAlign.top = true; - SXParticlesEditor::EditSizeDisp = SXGUICrEdit("0", 735, 55, 65, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSizeDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSizeDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditSizeDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSizeDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditSizeDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSizeDisp->GAlign.left = true; - SXParticlesEditor::EditSizeDisp->GAlign.top = true; - SXParticlesEditor::EditSizeDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSizeDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticSizeDependAge = SXGUICrStatic("SizeDependAge:", 530, 77, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSizeDependAge->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSizeDependAge->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSizeDependAge->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSizeDependAge->SetTransparentTextBk(true); - SXParticlesEditor::StaticSizeDependAge->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSizeDependAge->GAlign.left = true; - SXParticlesEditor::StaticSizeDependAge->GAlign.top = true; - SXParticlesEditor::ComboBoxSizeDependAge = SXGUICrComboBox("", 630, 75, 170, 75, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxSizeDependAge->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxSizeDependAge->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxSizeDependAge->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxSizeDependAge->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxSizeDependAge->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxSizeDependAge->AddItem("none"); - SXParticlesEditor::ComboBoxSizeDependAge->AddItem("direct"); - SXParticlesEditor::ComboBoxSizeDependAge->AddItem("inverse"); - SXParticlesEditor::ComboBoxSizeDependAge->SetSel(0); - SXParticlesEditor::ComboBoxSizeDependAge->GAlign.left = true; - SXParticlesEditor::ComboBoxSizeDependAge->GAlign.top = true; - - - SXParticlesEditor::CheckBoxTrack = SXGUICrCheckBox("Track", 530, 100, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxTrack->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxTrack->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxTrack->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxTrack->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxTrack->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxTrack->GAlign.left = true; - SXParticlesEditor::CheckBoxTrack->GAlign.top = true; - - SXParticlesEditor::StaticTrackSize = SXGUICrStatic("Size:", 580, 100, 25, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticTrackSize->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticTrackSize->SetColorText(0, 0, 0); - SXParticlesEditor::StaticTrackSize->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticTrackSize->SetTransparentTextBk(true); - SXParticlesEditor::StaticTrackSize->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticTrackSize->GAlign.left = true; - SXParticlesEditor::StaticTrackSize->GAlign.top = true; - - SXParticlesEditor::EditTrackSize = SXGUICrEdit("0", 605, 100, 60, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditTrackSize->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditTrackSize->SetColorText(0, 0, 0); - SXParticlesEditor::EditTrackSize->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditTrackSize->SetTransparentTextBk(true); - SXParticlesEditor::EditTrackSize->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditTrackSize->GAlign.left = true; - SXParticlesEditor::EditTrackSize->GAlign.top = true; - SXParticlesEditor::EditTrackSize->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditTrackSize->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticTrackTime = SXGUICrStatic("Time:", 670, 100, 25, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticTrackTime->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticTrackTime->SetColorText(0, 0, 0); - SXParticlesEditor::StaticTrackTime->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticTrackTime->SetTransparentTextBk(true); - SXParticlesEditor::StaticTrackTime->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticTrackTime->GAlign.left = true; - SXParticlesEditor::StaticTrackTime->GAlign.top = true; - - SXParticlesEditor::EditTrackTime = SXGUICrEdit("0", 700, 100, 60, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditTrackTime->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditTrackTime->SetColorText(0, 0, 0); - SXParticlesEditor::EditTrackTime->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditTrackTime->SetTransparentTextBk(true); - SXParticlesEditor::EditTrackTime->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditTrackTime->GAlign.left = true; - SXParticlesEditor::EditTrackTime->GAlign.top = true; - SXParticlesEditor::EditTrackTime->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditTrackTime->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + SXParticlesEditor::StaticTimeLife = SXGUICrStatic("TimeLife:", 530, 10, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticTimeLife->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticTimeLife->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticTimeLife->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticTimeLife->setTransparentTextBk(true); + SXParticlesEditor::StaticTimeLife->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticTimeLife->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticTimeLife->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTimeLife = SXGUICrEdit("0", 585, 10, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditTimeLife->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditTimeLife->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditTimeLife->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditTimeLife->setTransparentTextBk(true); + SXParticlesEditor::EditTimeLife->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditTimeLife->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditTimeLife->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTimeLife->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditTimeLife->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticTimeLifeDisp = SXGUICrStatic("TimeLifeDisp:", 660, 10, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticTimeLifeDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticTimeLifeDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticTimeLifeDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticTimeLifeDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticTimeLifeDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticTimeLifeDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticTimeLifeDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTimeLifeDisp = SXGUICrEdit("0", 730, 10, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditTimeLifeDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditTimeLifeDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditTimeLifeDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditTimeLifeDisp->setTransparentTextBk(true); + SXParticlesEditor::EditTimeLifeDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditTimeLifeDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditTimeLifeDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTimeLifeDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditTimeLifeDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticAlphaAgeDepend = SXGUICrStatic("AlphaAgeDepend:", 530, 32, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAlphaAgeDepend->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAlphaAgeDepend->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAlphaAgeDepend->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAlphaAgeDepend->setTransparentTextBk(true); + SXParticlesEditor::StaticAlphaAgeDepend->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAlphaAgeDepend->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAlphaAgeDepend->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxAlphaDependAge = SXGUICrComboBox(630, 30, 170, 75, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxAlphaDependAge->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxAlphaDependAge->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxAlphaDependAge->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxAlphaDependAge->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxAlphaDependAge->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxAlphaDependAge->addItem("none"); + SXParticlesEditor::ComboBoxAlphaDependAge->addItem("direct"); + SXParticlesEditor::ComboBoxAlphaDependAge->addItem("inverse"); + SXParticlesEditor::ComboBoxAlphaDependAge->setSel(0); + SXParticlesEditor::ComboBoxAlphaDependAge->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxAlphaDependAge->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::StaticSize = SXGUICrStatic("Size:", 530, 55, 25, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSize->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSize->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSize->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSize->setTransparentTextBk(true); + SXParticlesEditor::StaticSize->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSize->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSize->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticSizeX = SXGUICrStatic("x:", 555, 55, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSizeX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSizeX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSizeX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSizeX->setTransparentTextBk(true); + SXParticlesEditor::StaticSizeX->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSizeX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSizeX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSizeX = SXGUICrEdit("0", 565, 55, 65, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSizeX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSizeX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSizeX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSizeX->setTransparentTextBk(true); + SXParticlesEditor::EditSizeX->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSizeX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSizeX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSizeX->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSizeX->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticSizeY = SXGUICrStatic("y:", 635, 55, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSizeY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSizeY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSizeY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSizeY->setTransparentTextBk(true); + SXParticlesEditor::StaticSizeY->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSizeY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSizeY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSizeY = SXGUICrEdit("0", 645, 55, 65, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSizeY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSizeY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSizeY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSizeY->setTransparentTextBk(true); + SXParticlesEditor::EditSizeY->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSizeY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSizeY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSizeY->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSizeY->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticSizeDisp = SXGUICrStatic("Disp:", 710, 55, 25, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSizeDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSizeDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSizeDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSizeDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticSizeDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSizeDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSizeDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSizeDisp = SXGUICrEdit("0", 735, 55, 65, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSizeDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSizeDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSizeDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSizeDisp->setTransparentTextBk(true); + SXParticlesEditor::EditSizeDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSizeDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSizeDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSizeDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSizeDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticSizeDependAge = SXGUICrStatic("SizeDependAge:", 530, 77, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSizeDependAge->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSizeDependAge->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSizeDependAge->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSizeDependAge->setTransparentTextBk(true); + SXParticlesEditor::StaticSizeDependAge->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSizeDependAge->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSizeDependAge->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxSizeDependAge = SXGUICrComboBox(630, 75, 170, 75, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxSizeDependAge->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxSizeDependAge->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxSizeDependAge->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxSizeDependAge->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxSizeDependAge->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxSizeDependAge->addItem("none"); + SXParticlesEditor::ComboBoxSizeDependAge->addItem("direct"); + SXParticlesEditor::ComboBoxSizeDependAge->addItem("inverse"); + SXParticlesEditor::ComboBoxSizeDependAge->setSel(0); + SXParticlesEditor::ComboBoxSizeDependAge->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxSizeDependAge->setFollowParentSide(SXGUI_SIDE_TOP, true); + + + SXParticlesEditor::CheckBoxTrack = SXGUICrCheckBox("Track", 530, 100, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxTrack->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxTrack->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxTrack->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxTrack->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxTrack->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxTrack->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxTrack->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::StaticTrackSize = SXGUICrStatic("Size:", 580, 100, 25, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticTrackSize->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticTrackSize->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticTrackSize->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticTrackSize->setTransparentTextBk(true); + SXParticlesEditor::StaticTrackSize->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticTrackSize->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticTrackSize->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::EditTrackSize = SXGUICrEdit("0", 605, 100, 60, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditTrackSize->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditTrackSize->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditTrackSize->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditTrackSize->setTransparentTextBk(true); + SXParticlesEditor::EditTrackSize->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditTrackSize->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditTrackSize->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTrackSize->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditTrackSize->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticTrackTime = SXGUICrStatic("Time:", 670, 100, 25, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticTrackTime->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticTrackTime->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticTrackTime->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticTrackTime->setTransparentTextBk(true); + SXParticlesEditor::StaticTrackTime->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticTrackTime->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticTrackTime->setFollowParentSide(SXGUI_SIDE_TOP, true); + + SXParticlesEditor::EditTrackTime = SXGUICrEdit("0", 700, 100, 60, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditTrackTime->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditTrackTime->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditTrackTime->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditTrackTime->setTransparentTextBk(true); + SXParticlesEditor::EditTrackTime->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditTrackTime->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditTrackTime->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTrackTime->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditTrackTime->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); //} //bound //{ - SXParticlesEditor::StaticBoundType = SXGUICrStatic("Bound type:", 5, 12, 60, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundType->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundType->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundType->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundType->GAlign.left = true; - SXParticlesEditor::StaticBoundType->GAlign.top = true; - SXParticlesEditor::ComboBoxBoundType = SXGUICrComboBox("", 80, 10, 140, 100, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxBoundType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxBoundType->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxBoundType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxBoundType->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxBoundType->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxBoundType->AddItem("none"); - SXParticlesEditor::ComboBoxBoundType->AddItem("sphere"); - SXParticlesEditor::ComboBoxBoundType->AddItem("box"); - SXParticlesEditor::ComboBoxBoundType->AddItem("cone"); - SXParticlesEditor::ComboBoxBoundType->SetSel(0); - SXParticlesEditor::ComboBoxBoundType->GAlign.left = true; - SXParticlesEditor::ComboBoxBoundType->GAlign.top = true; - SXParticlesEditor::StaticBoundVec1 = SXGUICrStatic("Vector1:", 5, 40, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec1->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec1->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec1->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec1->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec1->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec1->GAlign.left = true; - SXParticlesEditor::StaticBoundVec1->GAlign.top = true; - SXParticlesEditor::StaticBoundVec1X = SXGUICrStatic("x:", 60, 40, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec1X->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec1X->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec1X->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec1X->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec1X->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec1X->GAlign.left = true; - SXParticlesEditor::StaticBoundVec1X->GAlign.top = true; - SXParticlesEditor::EditBoundVec1X = SXGUICrEdit("0", 70, 40, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditBoundVec1X->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditBoundVec1X->SetColorText(0, 0, 0); - SXParticlesEditor::EditBoundVec1X->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditBoundVec1X->SetTransparentTextBk(true); - SXParticlesEditor::EditBoundVec1X->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditBoundVec1X->GAlign.left = true; - SXParticlesEditor::EditBoundVec1X->GAlign.top = true; - SXParticlesEditor::EditBoundVec1X->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditBoundVec1X->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticBoundVec1Y = SXGUICrStatic("y:", 150, 40, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec1Y->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec1Y->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec1Y->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec1Y->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec1Y->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec1Y->GAlign.left = true; - SXParticlesEditor::StaticBoundVec1Y->GAlign.top = true; - SXParticlesEditor::EditBoundVec1Y = SXGUICrEdit("0", 160, 40, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditBoundVec1Y->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditBoundVec1Y->SetColorText(0, 0, 0); - SXParticlesEditor::EditBoundVec1Y->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditBoundVec1Y->SetTransparentTextBk(true); - SXParticlesEditor::EditBoundVec1Y->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditBoundVec1Y->GAlign.left = true; - SXParticlesEditor::EditBoundVec1Y->GAlign.top = true; - SXParticlesEditor::EditBoundVec1Y->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditBoundVec1Y->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticBoundVec1Z = SXGUICrStatic("z:", 235, 40, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec1Z->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec1Z->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec1Z->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec1Z->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec1Z->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec1Z->GAlign.left = true; - SXParticlesEditor::StaticBoundVec1Z->GAlign.top = true; - SXParticlesEditor::EditBoundVec1Z = SXGUICrEdit("0", 245, 40, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditBoundVec1Z->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditBoundVec1Z->SetColorText(0, 0, 0); - SXParticlesEditor::EditBoundVec1Z->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditBoundVec1Z->SetTransparentTextBk(true); - SXParticlesEditor::EditBoundVec1Z->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditBoundVec1Z->GAlign.left = true; - SXParticlesEditor::EditBoundVec1Z->GAlign.top = true; - SXParticlesEditor::EditBoundVec1Z->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditBoundVec1Z->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticBoundVec1W = SXGUICrStatic("w:", 320, 40, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec1W->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec1W->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec1W->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec1W->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec1W->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec1W->GAlign.left = true; - SXParticlesEditor::StaticBoundVec1W->GAlign.top = true; - SXParticlesEditor::EditBoundVec1W = SXGUICrEdit("0", 330, 40, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditBoundVec1W->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditBoundVec1W->SetColorText(0, 0, 0); - SXParticlesEditor::EditBoundVec1W->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditBoundVec1W->SetTransparentTextBk(true); - SXParticlesEditor::EditBoundVec1W->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditBoundVec1W->GAlign.left = true; - SXParticlesEditor::EditBoundVec1W->GAlign.top = true; - SXParticlesEditor::EditBoundVec1W->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditBoundVec1W->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticBoundVec2 = SXGUICrStatic("Vector2:", 5, 60, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec2->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec2->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec2->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec2->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec2->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec2->GAlign.left = true; - SXParticlesEditor::StaticBoundVec2->GAlign.top = true; - SXParticlesEditor::StaticBoundVec2X = SXGUICrStatic("x:", 60, 60, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec2X->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec2X->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec2X->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec2X->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec2X->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec2X->GAlign.left = true; - SXParticlesEditor::StaticBoundVec2X->GAlign.top = true; - SXParticlesEditor::EditBoundVec2X = SXGUICrEdit("0", 70, 60, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditBoundVec2X->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditBoundVec2X->SetColorText(0, 0, 0); - SXParticlesEditor::EditBoundVec2X->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditBoundVec2X->SetTransparentTextBk(true); - SXParticlesEditor::EditBoundVec2X->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditBoundVec2X->GAlign.left = true; - SXParticlesEditor::EditBoundVec2X->GAlign.top = true; - SXParticlesEditor::EditBoundVec2X->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditBoundVec2X->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticBoundVec2Y = SXGUICrStatic("y:", 150, 60, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec2Y->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec2Y->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec2Y->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec2Y->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec2Y->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec2Y->GAlign.left = true; - SXParticlesEditor::StaticBoundVec2Y->GAlign.top = true; - SXParticlesEditor::EditBoundVec2Y = SXGUICrEdit("0", 160, 60, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditBoundVec2Y->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditBoundVec2Y->SetColorText(0, 0, 0); - SXParticlesEditor::EditBoundVec2Y->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditBoundVec2Y->SetTransparentTextBk(true); - SXParticlesEditor::EditBoundVec2Y->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditBoundVec2Y->GAlign.left = true; - SXParticlesEditor::EditBoundVec2Y->GAlign.top = true; - SXParticlesEditor::EditBoundVec2Y->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditBoundVec2Y->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticBoundVec2Z = SXGUICrStatic("z:", 235, 60, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec2Z->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec2Z->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec2Z->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec2Z->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec2Z->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec2Z->GAlign.left = true; - SXParticlesEditor::StaticBoundVec2Z->GAlign.top = true; - SXParticlesEditor::EditBoundVec2Z = SXGUICrEdit("0", 245, 60, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditBoundVec2Z->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditBoundVec2Z->SetColorText(0, 0, 0); - SXParticlesEditor::EditBoundVec2Z->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditBoundVec2Z->SetTransparentTextBk(true); - SXParticlesEditor::EditBoundVec2Z->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditBoundVec2Z->GAlign.left = true; - SXParticlesEditor::EditBoundVec2Z->GAlign.top = true; - SXParticlesEditor::EditBoundVec2Z->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditBoundVec2Z->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticBoundVec2W = SXGUICrStatic("w:", 320, 60, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticBoundVec2W->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticBoundVec2W->SetColorText(0, 0, 0); - SXParticlesEditor::StaticBoundVec2W->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticBoundVec2W->SetTransparentTextBk(true); - SXParticlesEditor::StaticBoundVec2W->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticBoundVec2W->GAlign.left = true; - SXParticlesEditor::StaticBoundVec2W->GAlign.top = true; - SXParticlesEditor::EditBoundVec2W = SXGUICrEdit("0", 330, 60, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditBoundVec2W->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditBoundVec2W->SetColorText(0, 0, 0); - SXParticlesEditor::EditBoundVec2W->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditBoundVec2W->SetTransparentTextBk(true); - SXParticlesEditor::EditBoundVec2W->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditBoundVec2W->GAlign.left = true; - SXParticlesEditor::EditBoundVec2W->GAlign.top = true; - SXParticlesEditor::EditBoundVec2W->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditBoundVec2W->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + SXParticlesEditor::StaticBoundType = SXGUICrStatic("Bound type:", 5, 12, 60, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundType->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundType->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundType->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxBoundType = SXGUICrComboBox(80, 10, 140, 100, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxBoundType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxBoundType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxBoundType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxBoundType->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxBoundType->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxBoundType->addItem("none"); + SXParticlesEditor::ComboBoxBoundType->addItem("sphere"); + SXParticlesEditor::ComboBoxBoundType->addItem("box"); + SXParticlesEditor::ComboBoxBoundType->addItem("cone"); + SXParticlesEditor::ComboBoxBoundType->setSel(0); + SXParticlesEditor::ComboBoxBoundType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxBoundType->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticBoundVec1 = SXGUICrStatic("Vector1:", 5, 40, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec1->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec1->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec1->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec1->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec1->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec1->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec1->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticBoundVec1X = SXGUICrStatic("x:", 60, 40, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec1X->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec1X->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec1X->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec1X->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec1X->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec1X->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec1X->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec1X = SXGUICrEdit("0", 70, 40, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditBoundVec1X->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditBoundVec1X->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditBoundVec1X->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec1X->setTransparentTextBk(true); + SXParticlesEditor::EditBoundVec1X->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec1X->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditBoundVec1X->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec1X->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditBoundVec1X->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticBoundVec1Y = SXGUICrStatic("y:", 150, 40, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec1Y->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec1Y->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec1Y->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec1Y->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec1Y->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec1Y->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec1Y->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec1Y = SXGUICrEdit("0", 160, 40, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditBoundVec1Y->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditBoundVec1Y->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditBoundVec1Y->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec1Y->setTransparentTextBk(true); + SXParticlesEditor::EditBoundVec1Y->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec1Y->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditBoundVec1Y->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec1Y->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditBoundVec1Y->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticBoundVec1Z = SXGUICrStatic("z:", 235, 40, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec1Z->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec1Z->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec1Z->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec1Z->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec1Z->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec1Z->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec1Z->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec1Z = SXGUICrEdit("0", 245, 40, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditBoundVec1Z->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditBoundVec1Z->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditBoundVec1Z->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec1Z->setTransparentTextBk(true); + SXParticlesEditor::EditBoundVec1Z->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec1Z->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditBoundVec1Z->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec1Z->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditBoundVec1Z->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticBoundVec1W = SXGUICrStatic("w:", 320, 40, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec1W->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec1W->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec1W->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec1W->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec1W->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec1W->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec1W->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec1W = SXGUICrEdit("0", 330, 40, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditBoundVec1W->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditBoundVec1W->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditBoundVec1W->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec1W->setTransparentTextBk(true); + SXParticlesEditor::EditBoundVec1W->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec1W->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditBoundVec1W->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec1W->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditBoundVec1W->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticBoundVec2 = SXGUICrStatic("Vector2:", 5, 60, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec2->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec2->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec2->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec2->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec2->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec2->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec2->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticBoundVec2X = SXGUICrStatic("x:", 60, 60, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec2X->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec2X->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec2X->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec2X->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec2X->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec2X->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec2X->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec2X = SXGUICrEdit("0", 70, 60, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditBoundVec2X->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditBoundVec2X->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditBoundVec2X->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec2X->setTransparentTextBk(true); + SXParticlesEditor::EditBoundVec2X->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec2X->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditBoundVec2X->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec2X->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditBoundVec2X->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticBoundVec2Y = SXGUICrStatic("y:", 150, 60, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec2Y->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec2Y->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec2Y->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec2Y->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec2Y->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec2Y->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec2Y->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec2Y = SXGUICrEdit("0", 160, 60, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditBoundVec2Y->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditBoundVec2Y->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditBoundVec2Y->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec2Y->setTransparentTextBk(true); + SXParticlesEditor::EditBoundVec2Y->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec2Y->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditBoundVec2Y->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec2Y->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditBoundVec2Y->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticBoundVec2Z = SXGUICrStatic("z:", 235, 60, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec2Z->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec2Z->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec2Z->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec2Z->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec2Z->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec2Z->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec2Z->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec2Z = SXGUICrEdit("0", 245, 60, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditBoundVec2Z->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditBoundVec2Z->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditBoundVec2Z->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec2Z->setTransparentTextBk(true); + SXParticlesEditor::EditBoundVec2Z->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec2Z->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditBoundVec2Z->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec2Z->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditBoundVec2Z->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticBoundVec2W = SXGUICrStatic("w:", 320, 60, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticBoundVec2W->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticBoundVec2W->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticBoundVec2W->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticBoundVec2W->setTransparentTextBk(true); + SXParticlesEditor::StaticBoundVec2W->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticBoundVec2W->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticBoundVec2W->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec2W = SXGUICrEdit("0", 330, 60, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditBoundVec2W->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditBoundVec2W->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditBoundVec2W->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec2W->setTransparentTextBk(true); + SXParticlesEditor::EditBoundVec2W->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditBoundVec2W->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditBoundVec2W->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditBoundVec2W->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditBoundVec2W->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); //} //character //{ - SXParticlesEditor::CheckBoxCircle = SXGUICrCheckBox("Circle", 5, 10, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxCircle->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxCircle->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxCircle->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxCircle->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxCircle->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxCircle->GAlign.left = true; - SXParticlesEditor::CheckBoxCircle->GAlign.top = true; - SXParticlesEditor::StaticCircleAxis = SXGUICrStatic("CircleAxis:", 5, 32, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticCircleAxis->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticCircleAxis->SetColorText(0, 0, 0); - SXParticlesEditor::StaticCircleAxis->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticCircleAxis->SetTransparentTextBk(true); - SXParticlesEditor::StaticCircleAxis->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticCircleAxis->GAlign.left = true; - SXParticlesEditor::StaticCircleAxis->GAlign.top = true; - SXParticlesEditor::ComboBoxCircleAxis = SXGUICrComboBox("", 60, 30, 100, 75, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxCircleAxis->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxCircleAxis->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxCircleAxis->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxCircleAxis->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxCircleAxis->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxCircleAxis->AddItem("x"); - SXParticlesEditor::ComboBoxCircleAxis->AddItem("y"); - SXParticlesEditor::ComboBoxCircleAxis->AddItem("z"); - SXParticlesEditor::ComboBoxCircleAxis->SetSel(0); - SXParticlesEditor::ComboBoxCircleAxis->GAlign.left = true; - SXParticlesEditor::ComboBoxCircleAxis->GAlign.top = true; - SXParticlesEditor::StaticCircleAngle = SXGUICrStatic("CircleAngle:", 5, 55, 60, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticCircleAngle->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticCircleAngle->SetColorText(0, 0, 0); - SXParticlesEditor::StaticCircleAngle->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticCircleAngle->SetTransparentTextBk(true); - SXParticlesEditor::StaticCircleAngle->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticCircleAngle->GAlign.left = true; - SXParticlesEditor::StaticCircleAngle->GAlign.top = true; - SXParticlesEditor::EditCircleAngle = SXGUICrEdit("0", 90, 55, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditCircleAngle->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditCircleAngle->SetColorText(0, 0, 0); - SXParticlesEditor::EditCircleAngle->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditCircleAngle->SetTransparentTextBk(true); - SXParticlesEditor::EditCircleAngle->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditCircleAngle->GAlign.left = true; - SXParticlesEditor::EditCircleAngle->GAlign.top = true; - SXParticlesEditor::EditCircleAngle->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditCircleAngle->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticCircleAngleDisp = SXGUICrStatic("CircleAngleDisp:", 6, 75, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticCircleAngleDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticCircleAngleDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticCircleAngleDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticCircleAngleDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticCircleAngleDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticCircleAngleDisp->GAlign.left = true; - SXParticlesEditor::StaticCircleAngleDisp->GAlign.top = true; - SXParticlesEditor::EditCircleAngleDisp = SXGUICrEdit("0", 90, 75, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditCircleAngleDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditCircleAngleDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditCircleAngleDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditCircleAngleDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditCircleAngleDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditCircleAngleDisp->GAlign.left = true; - SXParticlesEditor::EditCircleAngleDisp->GAlign.top = true; - SXParticlesEditor::EditCircleAngleDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditCircleAngleDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxRotate = SXGUICrCheckBox("Rotate", 175, 10, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxRotate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxRotate->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxRotate->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxRotate->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxRotate->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxRotate->GAlign.left = true; - SXParticlesEditor::CheckBoxRotate->GAlign.top = true; - SXParticlesEditor::StaticRotateAngle = SXGUICrStatic("RotateAngle:", 175, 30, 85, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticRotateAngle->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticRotateAngle->SetColorText(0, 0, 0); - SXParticlesEditor::StaticRotateAngle->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticRotateAngle->SetTransparentTextBk(true); - SXParticlesEditor::StaticRotateAngle->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticRotateAngle->GAlign.left = true; - SXParticlesEditor::StaticRotateAngle->GAlign.top = true; - SXParticlesEditor::EditRotateAngle = SXGUICrEdit("0", 265, 30, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditRotateAngle->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditRotateAngle->SetColorText(0, 0, 0); - SXParticlesEditor::EditRotateAngle->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditRotateAngle->SetTransparentTextBk(true); - SXParticlesEditor::EditRotateAngle->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditRotateAngle->GAlign.left = true; - SXParticlesEditor::EditRotateAngle->GAlign.top = true; - SXParticlesEditor::EditRotateAngle->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditRotateAngle->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticRotateAngleDisp = SXGUICrStatic("RotateAngleDisp:", 175, 50, 85, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticRotateAngleDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticRotateAngleDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticRotateAngleDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticRotateAngleDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticRotateAngleDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticRotateAngleDisp->GAlign.left = true; - SXParticlesEditor::StaticRotateAngleDisp->GAlign.top = true; - SXParticlesEditor::CheckBoxCircleAngleDispNeg = SXGUICrCheckBox("CircleAngleDispNeg", 5, 95, 120, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxCircleAngleDispNeg->GAlign.top = true; - SXParticlesEditor::EditRotateAngleDisp = SXGUICrEdit("0", 265, 50, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditRotateAngleDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditRotateAngleDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditRotateAngleDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditRotateAngleDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditRotateAngleDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditRotateAngleDisp->GAlign.left = true; - SXParticlesEditor::EditRotateAngleDisp->GAlign.top = true; - SXParticlesEditor::EditRotateAngleDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditRotateAngleDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxRotateAngleDispNeg = SXGUICrCheckBox("RotateAngleDispNeg", 175, 70, 120, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxRotateAngleDispNeg->GAlign.top = true; - SXParticlesEditor::CheckBoxDeviation = SXGUICrCheckBox("Deviation", 350, 10, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxDeviation->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxDeviation->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxDeviation->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxDeviation->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxDeviation->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxDeviation->GAlign.left = true; - SXParticlesEditor::CheckBoxDeviation->GAlign.top = true; - SXParticlesEditor::StaticDeviationType = SXGUICrStatic("DeviationType:", 350, 30, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticDeviationType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticDeviationType->SetColorText(0, 0, 0); - SXParticlesEditor::StaticDeviationType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticDeviationType->SetTransparentTextBk(true); - SXParticlesEditor::StaticDeviationType->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticDeviationType->GAlign.left = true; - SXParticlesEditor::StaticDeviationType->GAlign.top = true; - SXParticlesEditor::ComboBoxDeviationType = SXGUICrComboBox("", 455, 25, 130, 75, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxDeviationType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxDeviationType->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxDeviationType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxDeviationType->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxDeviationType->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxDeviationType->AddItem("rnd"); - SXParticlesEditor::ComboBoxDeviationType->AddItem("along"); - SXParticlesEditor::ComboBoxDeviationType->AddItem("wave"); - SXParticlesEditor::ComboBoxDeviationType->SetSel(0); - SXParticlesEditor::ComboBoxDeviationType->GAlign.left = true; - SXParticlesEditor::ComboBoxDeviationType->GAlign.top = true; - SXParticlesEditor::StaticDeviationAmplitude = SXGUICrStatic("DeviationAmplitude:", 350, 50, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticDeviationAmplitude->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticDeviationAmplitude->SetColorText(0, 0, 0); - SXParticlesEditor::StaticDeviationAmplitude->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticDeviationAmplitude->SetTransparentTextBk(true); - SXParticlesEditor::StaticDeviationAmplitude->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticDeviationAmplitude->GAlign.left = true; - SXParticlesEditor::StaticDeviationAmplitude->GAlign.top = true; - SXParticlesEditor::StaticDeviationCoefAngle = SXGUICrStatic("DeviationCoefAngle:", 350, 70, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticDeviationCoefAngle->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticDeviationCoefAngle->SetColorText(0, 0, 0); - SXParticlesEditor::StaticDeviationCoefAngle->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticDeviationCoefAngle->SetTransparentTextBk(true); - SXParticlesEditor::StaticDeviationCoefAngle->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticDeviationCoefAngle->GAlign.left = true; - SXParticlesEditor::StaticDeviationCoefAngle->GAlign.top = true; - SXParticlesEditor::EditDeviationAmplitude = SXGUICrEdit("0", 490, 50, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditDeviationAmplitude->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditDeviationAmplitude->SetColorText(0, 0, 0); - SXParticlesEditor::EditDeviationAmplitude->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditDeviationAmplitude->SetTransparentTextBk(true); - SXParticlesEditor::EditDeviationAmplitude->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditDeviationAmplitude->GAlign.left = true; - SXParticlesEditor::EditDeviationAmplitude->GAlign.top = true; - SXParticlesEditor::EditDeviationAmplitude->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditDeviationAmplitude->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::EditDeviationCoefAngle = SXGUICrEdit("0", 490, 70, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditDeviationCoefAngle->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditDeviationCoefAngle->SetColorText(0, 0, 0); - SXParticlesEditor::EditDeviationCoefAngle->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditDeviationCoefAngle->SetTransparentTextBk(true); - SXParticlesEditor::EditDeviationCoefAngle->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditDeviationCoefAngle->GAlign.left = true; - SXParticlesEditor::EditDeviationCoefAngle->GAlign.top = true; - SXParticlesEditor::EditDeviationCoefAngle->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditDeviationCoefAngle->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticDeviationAxis = SXGUICrStatic("DeviationAxis:", 590, 25, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticDeviationAxis->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticDeviationAxis->SetColorText(0, 0, 0); - SXParticlesEditor::StaticDeviationAxis->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticDeviationAxis->SetTransparentTextBk(true); - SXParticlesEditor::StaticDeviationAxis->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticDeviationAxis->GAlign.left = true; - SXParticlesEditor::StaticDeviationAxis->GAlign.top = true; - SXParticlesEditor::ComboBoxDeviationAxis = SXGUICrComboBox("", 665, 20, 130, 75, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxDeviationAxis->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxDeviationAxis->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxDeviationAxis->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxDeviationAxis->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxDeviationAxis->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxDeviationAxis->AddItem("x"); - SXParticlesEditor::ComboBoxDeviationAxis->AddItem("y"); - SXParticlesEditor::ComboBoxDeviationAxis->AddItem("z"); - SXParticlesEditor::ComboBoxDeviationAxis->SetSel(0); - SXParticlesEditor::ComboBoxDeviationAxis->GAlign.left = true; - SXParticlesEditor::ComboBoxDeviationAxis->GAlign.top = true; - SXParticlesEditor::StaticDeviationCountDelayMls = SXGUICrStatic("DeviationCountDelayMls:", 590, 45, 120, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticDeviationCountDelayMls->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticDeviationCountDelayMls->SetColorText(0, 0, 0); - SXParticlesEditor::StaticDeviationCountDelayMls->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticDeviationCountDelayMls->SetTransparentTextBk(true); - SXParticlesEditor::StaticDeviationCountDelayMls->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticDeviationCountDelayMls->GAlign.left = true; - SXParticlesEditor::StaticDeviationCountDelayMls->GAlign.top = true; - SXParticlesEditor::EditDeviationCountDelayMls = SXGUICrEdit("0", 715, 45, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditDeviationCountDelayMls->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditDeviationCountDelayMls->SetColorText(0, 0, 0); - SXParticlesEditor::EditDeviationCountDelayMls->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditDeviationCountDelayMls->SetTransparentTextBk(true); - SXParticlesEditor::EditDeviationCountDelayMls->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditDeviationCountDelayMls->GAlign.left = true; - SXParticlesEditor::EditDeviationCountDelayMls->GAlign.top = true; - SXParticlesEditor::EditDeviationCountDelayMls->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditDeviationCountDelayMls->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticDeviationCoefAngleDisp = SXGUICrStatic("DeviationCoefAngleDisp:", 350, 90, 120, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticDeviationCoefAngleDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticDeviationCoefAngleDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticDeviationCoefAngleDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticDeviationCoefAngleDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticDeviationCoefAngleDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticDeviationCoefAngleDisp->GAlign.left = true; - SXParticlesEditor::StaticDeviationCoefAngleDisp->GAlign.top = true; - SXParticlesEditor::EditDeviationCoefAngleDisp = SXGUICrEdit("0", 490, 90, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditDeviationCoefAngleDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditDeviationCoefAngleDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditDeviationCoefAngleDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditDeviationCoefAngleDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditDeviationCoefAngleDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditDeviationCoefAngleDisp->GAlign.left = true; - SXParticlesEditor::EditDeviationCoefAngleDisp->GAlign.top = true; - SXParticlesEditor::EditDeviationCoefAngleDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditDeviationCoefAngleDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg = SXGUICrCheckBox("DeviationCoefAngleDispNeg", 350, 110, 160, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->GAlign.top = true; - SXParticlesEditor::CheckBoxDeviationTapX = SXGUICrCheckBox("DeviationTapX", 590, 65, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxDeviationTapX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxDeviationTapX->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxDeviationTapX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxDeviationTapX->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxDeviationTapX->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxDeviationTapX->GAlign.left = true; - SXParticlesEditor::CheckBoxDeviationTapX->GAlign.top = true; - SXParticlesEditor::CheckBoxDeviationTapY = SXGUICrCheckBox("DeviationTapY", 590, 85, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxDeviationTapY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxDeviationTapY->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxDeviationTapY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxDeviationTapY->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxDeviationTapY->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxDeviationTapY->GAlign.left = true; - SXParticlesEditor::CheckBoxDeviationTapY->GAlign.top = true; - SXParticlesEditor::CheckBoxDeviationTapZ = SXGUICrCheckBox("DeviationTapZ", 590, 105, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxDeviationTapZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxDeviationTapZ->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxDeviationTapZ->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxDeviationTapZ->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxDeviationTapZ->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxDeviationTapZ->GAlign.left = true; - SXParticlesEditor::CheckBoxDeviationTapZ->GAlign.top = true; + SXParticlesEditor::CheckBoxCircle = SXGUICrCheckBox("Circle", 5, 10, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxCircle->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxCircle->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxCircle->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxCircle->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxCircle->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxCircle->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxCircle->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticCircleAxis = SXGUICrStatic("CircleAxis:", 5, 32, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticCircleAxis->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticCircleAxis->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticCircleAxis->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticCircleAxis->setTransparentTextBk(true); + SXParticlesEditor::StaticCircleAxis->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticCircleAxis->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticCircleAxis->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxCircleAxis = SXGUICrComboBox(60, 30, 100, 75, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxCircleAxis->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxCircleAxis->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxCircleAxis->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxCircleAxis->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxCircleAxis->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxCircleAxis->addItem("x"); + SXParticlesEditor::ComboBoxCircleAxis->addItem("y"); + SXParticlesEditor::ComboBoxCircleAxis->addItem("z"); + SXParticlesEditor::ComboBoxCircleAxis->setSel(0); + SXParticlesEditor::ComboBoxCircleAxis->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxCircleAxis->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticCircleAngle = SXGUICrStatic("CircleAngle:", 5, 55, 60, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticCircleAngle->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticCircleAngle->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticCircleAngle->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticCircleAngle->setTransparentTextBk(true); + SXParticlesEditor::StaticCircleAngle->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticCircleAngle->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticCircleAngle->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditCircleAngle = SXGUICrEdit("0", 90, 55, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditCircleAngle->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditCircleAngle->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditCircleAngle->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditCircleAngle->setTransparentTextBk(true); + SXParticlesEditor::EditCircleAngle->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditCircleAngle->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditCircleAngle->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditCircleAngle->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditCircleAngle->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticCircleAngleDisp = SXGUICrStatic("CircleAngleDisp:", 6, 75, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticCircleAngleDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticCircleAngleDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticCircleAngleDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticCircleAngleDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticCircleAngleDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticCircleAngleDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticCircleAngleDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditCircleAngleDisp = SXGUICrEdit("0", 90, 75, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditCircleAngleDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditCircleAngleDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditCircleAngleDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditCircleAngleDisp->setTransparentTextBk(true); + SXParticlesEditor::EditCircleAngleDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditCircleAngleDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditCircleAngleDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditCircleAngleDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditCircleAngleDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxRotate = SXGUICrCheckBox("Rotate", 175, 10, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxRotate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxRotate->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxRotate->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxRotate->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxRotate->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxRotate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxRotate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticRotateAngle = SXGUICrStatic("RotateAngle:", 175, 30, 85, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticRotateAngle->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticRotateAngle->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticRotateAngle->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticRotateAngle->setTransparentTextBk(true); + SXParticlesEditor::StaticRotateAngle->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticRotateAngle->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticRotateAngle->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditRotateAngle = SXGUICrEdit("0", 265, 30, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditRotateAngle->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditRotateAngle->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditRotateAngle->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditRotateAngle->setTransparentTextBk(true); + SXParticlesEditor::EditRotateAngle->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditRotateAngle->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditRotateAngle->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditRotateAngle->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditRotateAngle->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticRotateAngleDisp = SXGUICrStatic("RotateAngleDisp:", 175, 50, 85, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticRotateAngleDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticRotateAngleDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticRotateAngleDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticRotateAngleDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticRotateAngleDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticRotateAngleDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticRotateAngleDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxCircleAngleDispNeg = SXGUICrCheckBox("CircleAngleDispNeg", 5, 95, 120, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditRotateAngleDisp = SXGUICrEdit("0", 265, 50, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditRotateAngleDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditRotateAngleDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditRotateAngleDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditRotateAngleDisp->setTransparentTextBk(true); + SXParticlesEditor::EditRotateAngleDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditRotateAngleDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditRotateAngleDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditRotateAngleDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditRotateAngleDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxRotateAngleDispNeg = SXGUICrCheckBox("RotateAngleDispNeg", 175, 70, 120, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxDeviation = SXGUICrCheckBox("Deviation", 350, 10, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxDeviation->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxDeviation->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxDeviation->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxDeviation->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxDeviation->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxDeviation->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxDeviation->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticDeviationType = SXGUICrStatic("DeviationType:", 350, 30, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticDeviationType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticDeviationType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticDeviationType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticDeviationType->setTransparentTextBk(true); + SXParticlesEditor::StaticDeviationType->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticDeviationType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticDeviationType->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxDeviationType = SXGUICrComboBox(455, 25, 130, 75, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxDeviationType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxDeviationType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxDeviationType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxDeviationType->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxDeviationType->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxDeviationType->addItem("rnd"); + SXParticlesEditor::ComboBoxDeviationType->addItem("along"); + SXParticlesEditor::ComboBoxDeviationType->addItem("wave"); + SXParticlesEditor::ComboBoxDeviationType->setSel(0); + SXParticlesEditor::ComboBoxDeviationType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxDeviationType->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticDeviationAmplitude = SXGUICrStatic("DeviationAmplitude:", 350, 50, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticDeviationAmplitude->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticDeviationAmplitude->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticDeviationAmplitude->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticDeviationAmplitude->setTransparentTextBk(true); + SXParticlesEditor::StaticDeviationAmplitude->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticDeviationAmplitude->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticDeviationAmplitude->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticDeviationCoefAngle = SXGUICrStatic("DeviationCoefAngle:", 350, 70, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticDeviationCoefAngle->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticDeviationCoefAngle->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticDeviationCoefAngle->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticDeviationCoefAngle->setTransparentTextBk(true); + SXParticlesEditor::StaticDeviationCoefAngle->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticDeviationCoefAngle->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticDeviationCoefAngle->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditDeviationAmplitude = SXGUICrEdit("0", 490, 50, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditDeviationAmplitude->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditDeviationAmplitude->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditDeviationAmplitude->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditDeviationAmplitude->setTransparentTextBk(true); + SXParticlesEditor::EditDeviationAmplitude->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditDeviationAmplitude->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditDeviationAmplitude->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditDeviationAmplitude->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditDeviationAmplitude->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::EditDeviationCoefAngle = SXGUICrEdit("0", 490, 70, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditDeviationCoefAngle->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditDeviationCoefAngle->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditDeviationCoefAngle->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditDeviationCoefAngle->setTransparentTextBk(true); + SXParticlesEditor::EditDeviationCoefAngle->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditDeviationCoefAngle->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditDeviationCoefAngle->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditDeviationCoefAngle->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditDeviationCoefAngle->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticDeviationAxis = SXGUICrStatic("DeviationAxis:", 590, 25, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticDeviationAxis->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticDeviationAxis->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticDeviationAxis->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticDeviationAxis->setTransparentTextBk(true); + SXParticlesEditor::StaticDeviationAxis->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticDeviationAxis->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticDeviationAxis->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxDeviationAxis = SXGUICrComboBox(665, 20, 130, 75, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxDeviationAxis->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxDeviationAxis->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxDeviationAxis->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxDeviationAxis->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxDeviationAxis->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxDeviationAxis->addItem("x"); + SXParticlesEditor::ComboBoxDeviationAxis->addItem("y"); + SXParticlesEditor::ComboBoxDeviationAxis->addItem("z"); + SXParticlesEditor::ComboBoxDeviationAxis->setSel(0); + SXParticlesEditor::ComboBoxDeviationAxis->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxDeviationAxis->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticDeviationCountDelayMls = SXGUICrStatic("DeviationCountDelayMls:", 590, 45, 120, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticDeviationCountDelayMls->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticDeviationCountDelayMls->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticDeviationCountDelayMls->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticDeviationCountDelayMls->setTransparentTextBk(true); + SXParticlesEditor::StaticDeviationCountDelayMls->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticDeviationCountDelayMls->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticDeviationCountDelayMls->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditDeviationCountDelayMls = SXGUICrEdit("0", 715, 45, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditDeviationCountDelayMls->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditDeviationCountDelayMls->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditDeviationCountDelayMls->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditDeviationCountDelayMls->setTransparentTextBk(true); + SXParticlesEditor::EditDeviationCountDelayMls->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditDeviationCountDelayMls->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditDeviationCountDelayMls->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditDeviationCountDelayMls->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditDeviationCountDelayMls->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticDeviationCoefAngleDisp = SXGUICrStatic("DeviationCoefAngleDisp:", 350, 90, 120, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticDeviationCoefAngleDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticDeviationCoefAngleDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticDeviationCoefAngleDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticDeviationCoefAngleDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticDeviationCoefAngleDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticDeviationCoefAngleDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticDeviationCoefAngleDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditDeviationCoefAngleDisp = SXGUICrEdit("0", 490, 90, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditDeviationCoefAngleDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditDeviationCoefAngleDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditDeviationCoefAngleDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditDeviationCoefAngleDisp->setTransparentTextBk(true); + SXParticlesEditor::EditDeviationCoefAngleDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditDeviationCoefAngleDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditDeviationCoefAngleDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditDeviationCoefAngleDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditDeviationCoefAngleDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg = SXGUICrCheckBox("DeviationCoefAngleDispNeg", 350, 110, 160, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxDeviationTapX = SXGUICrCheckBox("DeviationTapX", 590, 65, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxDeviationTapX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxDeviationTapX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxDeviationTapX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxDeviationTapX->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxDeviationTapX->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxDeviationTapX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxDeviationTapX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxDeviationTapY = SXGUICrCheckBox("DeviationTapY", 590, 85, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxDeviationTapY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxDeviationTapY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxDeviationTapY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxDeviationTapY->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxDeviationTapY->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxDeviationTapY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxDeviationTapY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxDeviationTapZ = SXGUICrCheckBox("DeviationTapZ", 590, 105, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxDeviationTapZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxDeviationTapZ->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxDeviationTapZ->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxDeviationTapZ->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxDeviationTapZ->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxDeviationTapZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxDeviationTapZ->setFollowParentSide(SXGUI_SIDE_TOP, true); //} //spawn //{ - SXParticlesEditor::StaticSpawnPosType = SXGUICrStatic("SpawnPosType:", 5, 12, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSpawnPosType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSpawnPosType->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSpawnPosType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSpawnPosType->SetTransparentTextBk(true); - SXParticlesEditor::StaticSpawnPosType->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSpawnPosType->GAlign.left = true; - SXParticlesEditor::StaticSpawnPosType->GAlign.top = true; - SXParticlesEditor::ComboBoxSpawnPosType = SXGUICrComboBox("", 90, 10, 140, 75, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ComboBoxSpawnPosType->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ComboBoxSpawnPosType->SetColorText(0, 0, 0); - SXParticlesEditor::ComboBoxSpawnPosType->SetColorTextBk(255, 255, 255); - SXParticlesEditor::ComboBoxSpawnPosType->SetTransparentTextBk(true); - SXParticlesEditor::ComboBoxSpawnPosType->SetColorBrush(255, 255, 255); - SXParticlesEditor::ComboBoxSpawnPosType->AddItem("strictly"); - SXParticlesEditor::ComboBoxSpawnPosType->AddItem("bound"); - SXParticlesEditor::ComboBoxSpawnPosType->SetSel(0); - SXParticlesEditor::ComboBoxSpawnPosType->GAlign.left = true; - SXParticlesEditor::ComboBoxSpawnPosType->GAlign.top = true; - SXParticlesEditor::StaticSpawnOrigin = SXGUICrStatic("SpawnOrigin:", 5, 40, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSpawnOrigin->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSpawnOrigin->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSpawnOrigin->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSpawnOrigin->SetTransparentTextBk(true); - SXParticlesEditor::StaticSpawnOrigin->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSpawnOrigin->GAlign.left = true; - SXParticlesEditor::StaticSpawnOrigin->GAlign.top = true; - SXParticlesEditor::StaticSpawnOriginX = SXGUICrStatic("x:", 90, 40, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSpawnOriginX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSpawnOriginX->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSpawnOriginX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSpawnOriginX->SetTransparentTextBk(true); - SXParticlesEditor::StaticSpawnOriginX->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSpawnOriginX->GAlign.left = true; - SXParticlesEditor::StaticSpawnOriginX->GAlign.top = true; - SXParticlesEditor::EditSpawnOriginX = SXGUICrEdit("0", 100, 40, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSpawnOriginX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSpawnOriginX->SetColorText(0, 0, 0); - SXParticlesEditor::EditSpawnOriginX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSpawnOriginX->SetTransparentTextBk(true); - SXParticlesEditor::EditSpawnOriginX->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSpawnOriginX->GAlign.left = true; - SXParticlesEditor::EditSpawnOriginX->GAlign.top = true; - SXParticlesEditor::EditSpawnOriginX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSpawnOriginX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticSpawnOriginY = SXGUICrStatic("y:", 180, 40, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSpawnOriginY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSpawnOriginY->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSpawnOriginY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSpawnOriginY->SetTransparentTextBk(true); - SXParticlesEditor::StaticSpawnOriginY->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSpawnOriginY->GAlign.left = true; - SXParticlesEditor::StaticSpawnOriginY->GAlign.top = true; - SXParticlesEditor::EditSpawnOriginY = SXGUICrEdit("0", 190, 40, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSpawnOriginY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSpawnOriginY->SetColorText(0, 0, 0); - SXParticlesEditor::EditSpawnOriginY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSpawnOriginY->SetTransparentTextBk(true); - SXParticlesEditor::EditSpawnOriginY->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSpawnOriginY->GAlign.left = true; - SXParticlesEditor::EditSpawnOriginY->GAlign.top = true; - SXParticlesEditor::EditSpawnOriginY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSpawnOriginY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticSpawnOriginZ = SXGUICrStatic("z:", 270, 40, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSpawnOriginZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSpawnOriginZ->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSpawnOriginZ->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSpawnOriginZ->SetTransparentTextBk(true); - SXParticlesEditor::StaticSpawnOriginZ->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSpawnOriginZ->GAlign.left = true; - SXParticlesEditor::StaticSpawnOriginZ->GAlign.top = true; - SXParticlesEditor::EditSpawnOriginZ = SXGUICrEdit("0", 280, 40, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSpawnOriginZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSpawnOriginZ->SetColorText(0, 0, 0); - SXParticlesEditor::EditSpawnOriginZ->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSpawnOriginZ->SetTransparentTextBk(true); - SXParticlesEditor::EditSpawnOriginZ->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSpawnOriginZ->GAlign.left = true; - SXParticlesEditor::EditSpawnOriginZ->GAlign.top = true; - SXParticlesEditor::EditSpawnOriginZ->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSpawnOriginZ->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticSpawnOriginDisp = SXGUICrStatic("SpawnOriginDisp:", 370, 40, 85, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSpawnOriginDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSpawnOriginDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSpawnOriginDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSpawnOriginDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticSpawnOriginDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSpawnOriginDisp->GAlign.left = true; - SXParticlesEditor::StaticSpawnOriginDisp->GAlign.top = true; - SXParticlesEditor::EditSpawnOriginDisp = SXGUICrEdit("0", 455, 40, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSpawnOriginDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSpawnOriginDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditSpawnOriginDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSpawnOriginDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditSpawnOriginDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSpawnOriginDisp->GAlign.left = true; - SXParticlesEditor::EditSpawnOriginDisp->GAlign.top = true; - SXParticlesEditor::EditSpawnOriginDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSpawnOriginDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxSpawnOriginDispXPos = SXGUICrCheckBox("x+", 90, 60, 30, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->GAlign.left = true; - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->GAlign.top = true; - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg = SXGUICrCheckBox("x-", 140, 60, 30, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->GAlign.top = true; - SXParticlesEditor::CheckBoxSpawnOriginDispYPos = SXGUICrCheckBox("y+", 180, 60, 30, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->GAlign.left = true; - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->GAlign.top = true; - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg = SXGUICrCheckBox("y-", 230, 60, 30, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->GAlign.top = true; - SXParticlesEditor::CheckBoxSpawnOriginDispZPos = SXGUICrCheckBox("z+", 270, 60, 30, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->GAlign.left = true; - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->GAlign.top = true; - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg = SXGUICrCheckBox("z-", 320, 59, 30, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->GAlign.top = true; - SXParticlesEditor::StaticSpawnNextTime = SXGUICrStatic("SpawnNextTime:", 5, 90, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSpawnNextTime->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSpawnNextTime->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSpawnNextTime->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSpawnNextTime->SetTransparentTextBk(true); - SXParticlesEditor::StaticSpawnNextTime->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSpawnNextTime->GAlign.left = true; - SXParticlesEditor::StaticSpawnNextTime->GAlign.top = true; - SXParticlesEditor::EditSpawnNextTime = SXGUICrEdit("0", 90, 90, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSpawnNextTime->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSpawnNextTime->SetColorText(0, 0, 0); - SXParticlesEditor::EditSpawnNextTime->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSpawnNextTime->SetTransparentTextBk(true); - SXParticlesEditor::EditSpawnNextTime->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSpawnNextTime->GAlign.left = true; - SXParticlesEditor::EditSpawnNextTime->GAlign.top = true; - SXParticlesEditor::EditSpawnNextTime->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSpawnNextTime->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticSpawnNextTimeDisp = SXGUICrStatic("SpawnNextTimeDisp:", 175, 90, 105, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticSpawnNextTimeDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticSpawnNextTimeDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticSpawnNextTimeDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticSpawnNextTimeDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticSpawnNextTimeDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticSpawnNextTimeDisp->GAlign.left = true; - SXParticlesEditor::StaticSpawnNextTimeDisp->GAlign.top = true; - SXParticlesEditor::EditSpawnNextTimeDisp = SXGUICrEdit("0", 280, 90, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditSpawnNextTimeDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditSpawnNextTimeDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditSpawnNextTimeDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditSpawnNextTimeDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditSpawnNextTimeDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditSpawnNextTimeDisp->GAlign.left = true; - SXParticlesEditor::EditSpawnNextTimeDisp->GAlign.top = true; - SXParticlesEditor::EditSpawnNextTimeDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditSpawnNextTimeDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + SXParticlesEditor::StaticSpawnPosType = SXGUICrStatic("SpawnPosType:", 5, 12, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSpawnPosType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSpawnPosType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSpawnPosType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSpawnPosType->setTransparentTextBk(true); + SXParticlesEditor::StaticSpawnPosType->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSpawnPosType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSpawnPosType->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ComboBoxSpawnPosType = SXGUICrComboBox(90, 10, 140, 75, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ComboBoxSpawnPosType->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ComboBoxSpawnPosType->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::ComboBoxSpawnPosType->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxSpawnPosType->setTransparentTextBk(true); + SXParticlesEditor::ComboBoxSpawnPosType->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::ComboBoxSpawnPosType->addItem("strictly"); + SXParticlesEditor::ComboBoxSpawnPosType->addItem("bound"); + SXParticlesEditor::ComboBoxSpawnPosType->setSel(0); + SXParticlesEditor::ComboBoxSpawnPosType->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ComboBoxSpawnPosType->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticSpawnOrigin = SXGUICrStatic("SpawnOrigin:", 5, 40, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSpawnOrigin->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSpawnOrigin->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSpawnOrigin->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSpawnOrigin->setTransparentTextBk(true); + SXParticlesEditor::StaticSpawnOrigin->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSpawnOrigin->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSpawnOrigin->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticSpawnOriginX = SXGUICrStatic("x:", 90, 40, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSpawnOriginX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSpawnOriginX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSpawnOriginX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSpawnOriginX->setTransparentTextBk(true); + SXParticlesEditor::StaticSpawnOriginX->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSpawnOriginX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSpawnOriginX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnOriginX = SXGUICrEdit("0", 100, 40, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSpawnOriginX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSpawnOriginX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSpawnOriginX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnOriginX->setTransparentTextBk(true); + SXParticlesEditor::EditSpawnOriginX->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnOriginX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSpawnOriginX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnOriginX->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSpawnOriginX->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticSpawnOriginY = SXGUICrStatic("y:", 180, 40, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSpawnOriginY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSpawnOriginY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSpawnOriginY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSpawnOriginY->setTransparentTextBk(true); + SXParticlesEditor::StaticSpawnOriginY->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSpawnOriginY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSpawnOriginY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnOriginY = SXGUICrEdit("0", 190, 40, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSpawnOriginY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSpawnOriginY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSpawnOriginY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnOriginY->setTransparentTextBk(true); + SXParticlesEditor::EditSpawnOriginY->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnOriginY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSpawnOriginY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnOriginY->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSpawnOriginY->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticSpawnOriginZ = SXGUICrStatic("z:", 270, 40, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSpawnOriginZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSpawnOriginZ->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSpawnOriginZ->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSpawnOriginZ->setTransparentTextBk(true); + SXParticlesEditor::StaticSpawnOriginZ->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSpawnOriginZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSpawnOriginZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnOriginZ = SXGUICrEdit("0", 280, 40, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSpawnOriginZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSpawnOriginZ->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSpawnOriginZ->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnOriginZ->setTransparentTextBk(true); + SXParticlesEditor::EditSpawnOriginZ->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnOriginZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSpawnOriginZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnOriginZ->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSpawnOriginZ->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticSpawnOriginDisp = SXGUICrStatic("SpawnOriginDisp:", 370, 40, 85, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSpawnOriginDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSpawnOriginDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSpawnOriginDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSpawnOriginDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticSpawnOriginDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSpawnOriginDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSpawnOriginDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnOriginDisp = SXGUICrEdit("0", 455, 40, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSpawnOriginDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSpawnOriginDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSpawnOriginDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnOriginDisp->setTransparentTextBk(true); + SXParticlesEditor::EditSpawnOriginDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnOriginDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSpawnOriginDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnOriginDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSpawnOriginDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxSpawnOriginDispXPos = SXGUICrCheckBox("x+", 90, 60, 30, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg = SXGUICrCheckBox("x-", 140, 60, 30, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos = SXGUICrCheckBox("y+", 180, 60, 30, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg = SXGUICrCheckBox("y-", 230, 60, 30, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos = SXGUICrCheckBox("z+", 270, 60, 30, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg = SXGUICrCheckBox("z-", 320, 59, 30, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticSpawnNextTime = SXGUICrStatic("SpawnNextTime:", 5, 90, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSpawnNextTime->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSpawnNextTime->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSpawnNextTime->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSpawnNextTime->setTransparentTextBk(true); + SXParticlesEditor::StaticSpawnNextTime->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSpawnNextTime->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSpawnNextTime->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnNextTime = SXGUICrEdit("0", 90, 90, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSpawnNextTime->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSpawnNextTime->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSpawnNextTime->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnNextTime->setTransparentTextBk(true); + SXParticlesEditor::EditSpawnNextTime->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnNextTime->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSpawnNextTime->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnNextTime->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSpawnNextTime->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticSpawnNextTimeDisp = SXGUICrStatic("SpawnNextTimeDisp:", 175, 90, 105, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticSpawnNextTimeDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticSpawnNextTimeDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticSpawnNextTimeDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticSpawnNextTimeDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticSpawnNextTimeDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticSpawnNextTimeDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticSpawnNextTimeDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnNextTimeDisp = SXGUICrEdit("0", 280, 90, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditSpawnNextTimeDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditSpawnNextTimeDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditSpawnNextTimeDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnNextTimeDisp->setTransparentTextBk(true); + SXParticlesEditor::EditSpawnNextTimeDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditSpawnNextTimeDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditSpawnNextTimeDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditSpawnNextTimeDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditSpawnNextTimeDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); //} //tex //{ - SXParticlesEditor::StaticTexture = SXGUICrStatic("Texture:", 5, 10, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticTexture->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticTexture->SetColorText(0, 0, 0); - SXParticlesEditor::StaticTexture->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticTexture->SetTransparentTextBk(true); - SXParticlesEditor::StaticTexture->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticTexture->GAlign.left = true; - SXParticlesEditor::StaticTexture->GAlign.top = true; - SXParticlesEditor::EditTexture = SXGUICrEdit("0", 60, 10, 290, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditTexture->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditTexture->SetColorText(0, 0, 0); - SXParticlesEditor::EditTexture->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditTexture->SetTransparentTextBk(true); - SXParticlesEditor::EditTexture->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditTexture->GAlign.left = true; - SXParticlesEditor::EditTexture->GAlign.top = true; - SXParticlesEditor::EditTexture->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditTexture->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - - SXParticlesEditor::ButtonTextureSel = SXGUICrButton("...", 355, 10, 25, 15, 0, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::ButtonTextureSel->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::ButtonTextureSel->GAlign.left = true; - SXParticlesEditor::ButtonTextureSel->GAlign.top = true; - SXParticlesEditor::ButtonTextureSel->AddHandler(SXParticlesEditor_ButtonTextureSel_Click, WM_LBUTTONUP); - - SXParticlesEditor::StaticAnimTexCountCadrsX = SXGUICrStatic("AnimTexCountCadrsX:", 5, 35, 110, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAnimTexCountCadrsX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAnimTexCountCadrsX->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAnimTexCountCadrsX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAnimTexCountCadrsX->SetTransparentTextBk(true); - SXParticlesEditor::StaticAnimTexCountCadrsX->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAnimTexCountCadrsX->GAlign.left = true; - SXParticlesEditor::StaticAnimTexCountCadrsX->GAlign.top = true; - SXParticlesEditor::StaticAnimTexCountCadrsY = SXGUICrStatic("AnimTexCountCadrsY:", 200, 35, 110, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAnimTexCountCadrsY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAnimTexCountCadrsY->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAnimTexCountCadrsY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAnimTexCountCadrsY->SetTransparentTextBk(true); - SXParticlesEditor::StaticAnimTexCountCadrsY->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAnimTexCountCadrsY->GAlign.left = true; - SXParticlesEditor::StaticAnimTexCountCadrsY->GAlign.top = true; - SXParticlesEditor::EditAnimTexCountCadrsX = SXGUICrEdit("0", 115, 35, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAnimTexCountCadrsX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAnimTexCountCadrsX->SetColorText(0, 0, 0); - SXParticlesEditor::EditAnimTexCountCadrsX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAnimTexCountCadrsX->SetTransparentTextBk(true); - SXParticlesEditor::EditAnimTexCountCadrsX->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAnimTexCountCadrsX->GAlign.left = true; - SXParticlesEditor::EditAnimTexCountCadrsX->GAlign.top = true; - SXParticlesEditor::EditAnimTexCountCadrsX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAnimTexCountCadrsX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::EditAnimTexCountCadrsY = SXGUICrEdit("0", 310, 35, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAnimTexCountCadrsY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAnimTexCountCadrsY->SetColorText(0, 0, 0); - SXParticlesEditor::EditAnimTexCountCadrsY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAnimTexCountCadrsY->SetTransparentTextBk(true); - SXParticlesEditor::EditAnimTexCountCadrsY->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAnimTexCountCadrsY->GAlign.left = true; - SXParticlesEditor::EditAnimTexCountCadrsY->GAlign.top = true; - SXParticlesEditor::EditAnimTexCountCadrsY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAnimTexCountCadrsY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticAnimTexRate = SXGUICrStatic("AnimTexRate:", 5, 55, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAnimTexRate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAnimTexRate->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAnimTexRate->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAnimTexRate->SetTransparentTextBk(true); - SXParticlesEditor::StaticAnimTexRate->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAnimTexRate->GAlign.left = true; - SXParticlesEditor::StaticAnimTexRate->GAlign.top = true; - SXParticlesEditor::EditAnimTexRate = SXGUICrEdit("0", 115, 55, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAnimTexRate->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAnimTexRate->SetColorText(0, 0, 0); - SXParticlesEditor::EditAnimTexRate->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAnimTexRate->SetTransparentTextBk(true); - SXParticlesEditor::EditAnimTexRate->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAnimTexRate->GAlign.left = true; - SXParticlesEditor::EditAnimTexRate->GAlign.top = true; - SXParticlesEditor::EditAnimTexRate->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAnimTexRate->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticAnimTexRateDisp = SXGUICrStatic("AnimTexRateDisp:", 200, 55, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAnimTexRateDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAnimTexRateDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAnimTexRateDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAnimTexRateDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticAnimTexRateDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAnimTexRateDisp->GAlign.left = true; - SXParticlesEditor::StaticAnimTexRateDisp->GAlign.top = true; - SXParticlesEditor::EditAnimTexRateDisp = SXGUICrEdit("0", 310, 55, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAnimTexRateDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAnimTexRateDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditAnimTexRateDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAnimTexRateDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditAnimTexRateDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAnimTexRateDisp->GAlign.left = true; - SXParticlesEditor::EditAnimTexRateDisp->GAlign.top = true; - SXParticlesEditor::EditAnimTexRateDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAnimTexRateDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticAnimTexStartCadr = SXGUICrStatic("AnimTexStartCadr:", 5, 75, 100, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAnimTexStartCadr->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAnimTexStartCadr->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAnimTexStartCadr->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAnimTexStartCadr->SetTransparentTextBk(true); - SXParticlesEditor::StaticAnimTexStartCadr->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAnimTexStartCadr->GAlign.left = true; - SXParticlesEditor::StaticAnimTexStartCadr->GAlign.top = true; - SXParticlesEditor::EditAnimTexStartCadr = SXGUICrEdit("0", 115, 75, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAnimTexStartCadr->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAnimTexStartCadr->SetColorText(0, 0, 0); - SXParticlesEditor::EditAnimTexStartCadr->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAnimTexStartCadr->SetTransparentTextBk(true); - SXParticlesEditor::EditAnimTexStartCadr->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAnimTexStartCadr->GAlign.left = true; - SXParticlesEditor::EditAnimTexStartCadr->GAlign.top = true; - SXParticlesEditor::EditAnimTexStartCadr->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAnimTexStartCadr->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticAnimTexStartCadrDisp = SXGUICrStatic("AnimTexStartCadrDisp:", 200, 75, 110, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAnimTexStartCadrDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAnimTexStartCadrDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAnimTexStartCadrDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAnimTexStartCadrDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticAnimTexStartCadrDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAnimTexStartCadrDisp->GAlign.left = true; - SXParticlesEditor::StaticAnimTexStartCadrDisp->GAlign.top = true; - SXParticlesEditor::EditAnimTexStartCadrDisp = SXGUICrEdit("0", 310, 75, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAnimTexStartCadrDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAnimTexStartCadrDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditAnimTexStartCadrDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAnimTexStartCadrDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditAnimTexStartCadrDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAnimTexStartCadrDisp->GAlign.left = true; - SXParticlesEditor::EditAnimTexStartCadrDisp->GAlign.top = true; - SXParticlesEditor::EditAnimTexStartCadrDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAnimTexStartCadrDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + SXParticlesEditor::StaticTexture = SXGUICrStatic("Texture:", 5, 10, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticTexture->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticTexture->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticTexture->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticTexture->setTransparentTextBk(true); + SXParticlesEditor::StaticTexture->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticTexture->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticTexture->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTexture = SXGUICrEdit("0", 60, 10, 290, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditTexture->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditTexture->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditTexture->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditTexture->setTransparentTextBk(true); + SXParticlesEditor::EditTexture->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditTexture->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditTexture->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditTexture->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditTexture->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + + SXParticlesEditor::ButtonTextureSel = SXGUICrButton("...", 355, 10, 25, 15, SXGUI_BUTTON_IMAGE_NONE, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::ButtonTextureSel->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::ButtonTextureSel->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::ButtonTextureSel->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::ButtonTextureSel->addHandler(SXParticlesEditor_ButtonTextureSel_Click, WM_LBUTTONUP); + + SXParticlesEditor::StaticAnimTexCountCadrsX = SXGUICrStatic("AnimTexCountCadrsX:", 5, 35, 110, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAnimTexCountCadrsX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAnimTexCountCadrsX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAnimTexCountCadrsX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAnimTexCountCadrsX->setTransparentTextBk(true); + SXParticlesEditor::StaticAnimTexCountCadrsX->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAnimTexCountCadrsX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAnimTexCountCadrsX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticAnimTexCountCadrsY = SXGUICrStatic("AnimTexCountCadrsY:", 200, 35, 110, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAnimTexCountCadrsY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAnimTexCountCadrsY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAnimTexCountCadrsY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAnimTexCountCadrsY->setTransparentTextBk(true); + SXParticlesEditor::StaticAnimTexCountCadrsY->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAnimTexCountCadrsY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAnimTexCountCadrsY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexCountCadrsX = SXGUICrEdit("0", 115, 35, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAnimTexCountCadrsX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAnimTexCountCadrsX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAnimTexCountCadrsX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexCountCadrsX->setTransparentTextBk(true); + SXParticlesEditor::EditAnimTexCountCadrsX->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexCountCadrsX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAnimTexCountCadrsX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexCountCadrsX->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAnimTexCountCadrsX->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::EditAnimTexCountCadrsY = SXGUICrEdit("0", 310, 35, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAnimTexCountCadrsY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAnimTexCountCadrsY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAnimTexCountCadrsY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexCountCadrsY->setTransparentTextBk(true); + SXParticlesEditor::EditAnimTexCountCadrsY->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexCountCadrsY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAnimTexCountCadrsY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexCountCadrsY->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAnimTexCountCadrsY->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticAnimTexRate = SXGUICrStatic("AnimTexRate:", 5, 55, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAnimTexRate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAnimTexRate->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAnimTexRate->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAnimTexRate->setTransparentTextBk(true); + SXParticlesEditor::StaticAnimTexRate->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAnimTexRate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAnimTexRate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexRate = SXGUICrEdit("0", 115, 55, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAnimTexRate->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAnimTexRate->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAnimTexRate->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexRate->setTransparentTextBk(true); + SXParticlesEditor::EditAnimTexRate->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexRate->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAnimTexRate->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexRate->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAnimTexRate->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticAnimTexRateDisp = SXGUICrStatic("AnimTexRateDisp:", 200, 55, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAnimTexRateDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAnimTexRateDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAnimTexRateDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAnimTexRateDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticAnimTexRateDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAnimTexRateDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAnimTexRateDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexRateDisp = SXGUICrEdit("0", 310, 55, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAnimTexRateDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAnimTexRateDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAnimTexRateDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexRateDisp->setTransparentTextBk(true); + SXParticlesEditor::EditAnimTexRateDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexRateDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAnimTexRateDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexRateDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAnimTexRateDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticAnimTexStartCadr = SXGUICrStatic("AnimTexStartCadr:", 5, 75, 100, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAnimTexStartCadr->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAnimTexStartCadr->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAnimTexStartCadr->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAnimTexStartCadr->setTransparentTextBk(true); + SXParticlesEditor::StaticAnimTexStartCadr->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAnimTexStartCadr->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAnimTexStartCadr->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexStartCadr = SXGUICrEdit("0", 115, 75, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAnimTexStartCadr->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAnimTexStartCadr->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAnimTexStartCadr->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexStartCadr->setTransparentTextBk(true); + SXParticlesEditor::EditAnimTexStartCadr->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexStartCadr->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAnimTexStartCadr->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexStartCadr->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAnimTexStartCadr->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticAnimTexStartCadrDisp = SXGUICrStatic("AnimTexStartCadrDisp:", 200, 75, 110, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAnimTexStartCadrDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAnimTexStartCadrDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAnimTexStartCadrDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAnimTexStartCadrDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticAnimTexStartCadrDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAnimTexStartCadrDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAnimTexStartCadrDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexStartCadrDisp = SXGUICrEdit("0", 310, 75, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAnimTexStartCadrDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAnimTexStartCadrDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAnimTexStartCadrDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexStartCadrDisp->setTransparentTextBk(true); + SXParticlesEditor::EditAnimTexStartCadrDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAnimTexStartCadrDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAnimTexStartCadrDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAnimTexStartCadrDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAnimTexStartCadrDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); //} //velocity/acceleration //{ - SXParticlesEditor::StaticVelocity = SXGUICrStatic("Velocity:", 5, 15, 50, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticVelocity->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticVelocity->SetColorText(0, 0, 0); - SXParticlesEditor::StaticVelocity->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticVelocity->SetTransparentTextBk(true); - SXParticlesEditor::StaticVelocity->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticVelocity->GAlign.left = true; - SXParticlesEditor::StaticVelocity->GAlign.top = true; - SXParticlesEditor::StaticVelocityX = SXGUICrStatic("x:", 80, 15, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticVelocityX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticVelocityX->SetColorText(0, 0, 0); - SXParticlesEditor::StaticVelocityX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticVelocityX->SetTransparentTextBk(true); - SXParticlesEditor::StaticVelocityX->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticVelocityX->GAlign.left = true; - SXParticlesEditor::StaticVelocityX->GAlign.top = true; - SXParticlesEditor::EditVelocityX = SXGUICrEdit("0", 90, 15, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditVelocityX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditVelocityX->SetColorText(0, 0, 0); - SXParticlesEditor::EditVelocityX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditVelocityX->SetTransparentTextBk(true); - SXParticlesEditor::EditVelocityX->SetColorBrush(250, 250, 250); - SXParticlesEditor::EditVelocityX->GAlign.left = true; - SXParticlesEditor::EditVelocityX->GAlign.top = true; - SXParticlesEditor::EditVelocityX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditVelocityX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticVelocityY = SXGUICrStatic("y:", 170, 15, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticVelocityY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticVelocityY->SetColorText(0, 0, 0); - SXParticlesEditor::StaticVelocityY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticVelocityY->SetTransparentTextBk(true); - SXParticlesEditor::StaticVelocityY->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticVelocityY->GAlign.left = true; - SXParticlesEditor::StaticVelocityY->GAlign.top = true; - SXParticlesEditor::EditVelocityY = SXGUICrEdit("0", 180, 15, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditVelocityY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditVelocityY->SetColorText(0, 0, 0); - SXParticlesEditor::EditVelocityY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditVelocityY->SetTransparentTextBk(true); - SXParticlesEditor::EditVelocityY->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditVelocityY->GAlign.left = true; - SXParticlesEditor::EditVelocityY->GAlign.top = true; - SXParticlesEditor::EditVelocityY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditVelocityY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxVelocityDispXNeg = SXGUICrCheckBox("XDispNeg", 80, 35, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxVelocityDispXNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxVelocityDispXNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxVelocityDispXNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxVelocityDispXNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxVelocityDispXNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxVelocityDispXNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxVelocityDispXNeg->GAlign.top = true; - SXParticlesEditor::StaticVelocityZ = SXGUICrStatic("z:", 260, 15, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticVelocityZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticVelocityZ->SetColorText(0, 0, 0); - SXParticlesEditor::StaticVelocityZ->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticVelocityZ->SetTransparentTextBk(true); - SXParticlesEditor::StaticVelocityZ->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticVelocityZ->GAlign.left = true; - SXParticlesEditor::StaticVelocityZ->GAlign.top = true; - SXParticlesEditor::EditVelocityZ = SXGUICrEdit("0", 270, 15, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditVelocityZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditVelocityZ->SetColorText(0, 0, 0); - SXParticlesEditor::EditVelocityZ->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditVelocityZ->SetTransparentTextBk(true); - SXParticlesEditor::EditVelocityZ->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditVelocityZ->GAlign.left = true; - SXParticlesEditor::EditVelocityZ->GAlign.top = true; - SXParticlesEditor::EditVelocityZ->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditVelocityZ->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticVelocityDisp = SXGUICrStatic("Dispersion:", 355, 15, 60, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticVelocityDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticVelocityDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticVelocityDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticVelocityDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticVelocityDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticVelocityDisp->GAlign.left = true; - SXParticlesEditor::StaticVelocityDisp->GAlign.top = true; - SXParticlesEditor::EditVelocityDisp = SXGUICrEdit("0", 420, 15, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditVelocityDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditVelocityDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditVelocityDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditVelocityDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditVelocityDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditVelocityDisp->GAlign.left = true; - SXParticlesEditor::EditVelocityDisp->GAlign.top = true; - SXParticlesEditor::EditVelocityDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditVelocityDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxVelocityDispYNeg = SXGUICrCheckBox("YDispNeg", 170, 35, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxVelocityDispYNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxVelocityDispYNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxVelocityDispYNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxVelocityDispYNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxVelocityDispYNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxVelocityDispYNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxVelocityDispYNeg->GAlign.top = true; - SXParticlesEditor::CheckBoxVelocityDispZNeg = SXGUICrCheckBox("ZDispNeg", 260, 35, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxVelocityDispZNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxVelocityDispZNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxVelocityDispZNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxVelocityDispZNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxVelocityDispZNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxVelocityDispZNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxVelocityDispZNeg->GAlign.top = true; - SXParticlesEditor::StaticAcceleration = SXGUICrStatic("Acceleration:", 5, 65, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAcceleration->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAcceleration->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAcceleration->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAcceleration->SetTransparentTextBk(true); - SXParticlesEditor::StaticAcceleration->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAcceleration->GAlign.left = true; - SXParticlesEditor::StaticAcceleration->GAlign.top = true; - SXParticlesEditor::StaticAccelerationX = SXGUICrStatic("x:", 80, 65, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAccelerationX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAccelerationX->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAccelerationX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAccelerationX->SetTransparentTextBk(true); - SXParticlesEditor::StaticAccelerationX->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAccelerationX->GAlign.left = true; - SXParticlesEditor::StaticAccelerationX->GAlign.top = true; - SXParticlesEditor::EditAccelerationX = SXGUICrEdit("0", 90, 65, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAccelerationX->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAccelerationX->SetColorText(0, 0, 0); - SXParticlesEditor::EditAccelerationX->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAccelerationX->SetTransparentTextBk(true); - SXParticlesEditor::EditAccelerationX->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAccelerationX->GAlign.left = true; - SXParticlesEditor::EditAccelerationX->GAlign.top = true; - SXParticlesEditor::EditAccelerationX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAccelerationX->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticAccelerationY = SXGUICrStatic("y:", 170, 65, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAccelerationY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAccelerationY->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAccelerationY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAccelerationY->SetTransparentTextBk(true); - SXParticlesEditor::StaticAccelerationY->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAccelerationY->GAlign.left = true; - SXParticlesEditor::StaticAccelerationY->GAlign.top = true; - SXParticlesEditor::EditAccelerationY = SXGUICrEdit("0", 180, 65, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAccelerationY->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAccelerationY->SetColorText(0, 0, 0); - SXParticlesEditor::EditAccelerationY->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAccelerationY->SetTransparentTextBk(true); - SXParticlesEditor::EditAccelerationY->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAccelerationY->GAlign.left = true; - SXParticlesEditor::EditAccelerationY->GAlign.top = true; - SXParticlesEditor::EditAccelerationY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAccelerationY->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticAccelerationZ = SXGUICrStatic("z:", 260, 65, 10, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAccelerationZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAccelerationZ->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAccelerationZ->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAccelerationZ->SetTransparentTextBk(true); - SXParticlesEditor::StaticAccelerationZ->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAccelerationZ->GAlign.left = true; - SXParticlesEditor::StaticAccelerationZ->GAlign.top = true; - SXParticlesEditor::EditAccelerationZ = SXGUICrEdit("0", 270, 65, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAccelerationZ->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAccelerationZ->SetColorText(0, 0, 0); - SXParticlesEditor::EditAccelerationZ->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAccelerationZ->SetTransparentTextBk(true); - SXParticlesEditor::EditAccelerationZ->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAccelerationZ->GAlign.left = true; - SXParticlesEditor::EditAccelerationZ->GAlign.top = true; - SXParticlesEditor::EditAccelerationZ->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAccelerationZ->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::StaticAccelerationDisp = SXGUICrStatic("Dispersion:", 355, 65, 60, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::StaticAccelerationDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::StaticAccelerationDisp->SetColorText(0, 0, 0); - SXParticlesEditor::StaticAccelerationDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::StaticAccelerationDisp->SetTransparentTextBk(true); - SXParticlesEditor::StaticAccelerationDisp->SetColorBrush(220, 220, 220); - SXParticlesEditor::StaticAccelerationDisp->GAlign.left = true; - SXParticlesEditor::StaticAccelerationDisp->GAlign.top = true; - SXParticlesEditor::EditAccelerationDisp = SXGUICrEdit("0", 420, 65, 70, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0); - SXParticlesEditor::EditAccelerationDisp->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::EditAccelerationDisp->SetColorText(0, 0, 0); - SXParticlesEditor::EditAccelerationDisp->SetColorTextBk(255, 255, 255); - SXParticlesEditor::EditAccelerationDisp->SetTransparentTextBk(true); - SXParticlesEditor::EditAccelerationDisp->SetColorBrush(255, 255, 255); - SXParticlesEditor::EditAccelerationDisp->GAlign.left = true; - SXParticlesEditor::EditAccelerationDisp->GAlign.top = true; - SXParticlesEditor::EditAccelerationDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); - SXParticlesEditor::EditAccelerationDisp->AddHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); - - SXParticlesEditor::CheckBoxAccelerationDispXNeg = SXGUICrCheckBox("XDispNeg", 80, 85, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxAccelerationDispXNeg->GAlign.top = true; - SXParticlesEditor::CheckBoxAccelerationDispYNeg = SXGUICrCheckBox("YDispNeg", 170, 85, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxAccelerationDispYNeg->GAlign.top = true; - SXParticlesEditor::CheckBoxAccelerationDispZNeg = SXGUICrCheckBox("ZDispNeg", 260, 85, 80, 15, SXParticlesEditor::GroupBoxData2->GetHWND(), 0, 0, false); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->SetFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->SetColorText(0, 0, 0); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->SetColorTextBk(255, 255, 255); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->SetTransparentTextBk(true); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->SetColorBrush(220, 220, 220); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->GAlign.left = true; - SXParticlesEditor::CheckBoxAccelerationDispZNeg->GAlign.top = true; + SXParticlesEditor::StaticVelocity = SXGUICrStatic("Velocity:", 5, 15, 50, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticVelocity->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticVelocity->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticVelocity->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticVelocity->setTransparentTextBk(true); + SXParticlesEditor::StaticVelocity->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticVelocity->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticVelocity->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticVelocityX = SXGUICrStatic("x:", 80, 15, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticVelocityX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticVelocityX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticVelocityX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticVelocityX->setTransparentTextBk(true); + SXParticlesEditor::StaticVelocityX->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticVelocityX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticVelocityX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditVelocityX = SXGUICrEdit("0", 90, 15, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditVelocityX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditVelocityX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditVelocityX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditVelocityX->setTransparentTextBk(true); + SXParticlesEditor::EditVelocityX->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditVelocityX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditVelocityX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditVelocityX->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditVelocityX->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticVelocityY = SXGUICrStatic("y:", 170, 15, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticVelocityY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticVelocityY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticVelocityY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticVelocityY->setTransparentTextBk(true); + SXParticlesEditor::StaticVelocityY->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticVelocityY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticVelocityY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditVelocityY = SXGUICrEdit("0", 180, 15, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditVelocityY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditVelocityY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditVelocityY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditVelocityY->setTransparentTextBk(true); + SXParticlesEditor::EditVelocityY->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditVelocityY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditVelocityY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditVelocityY->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditVelocityY->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxVelocityDispXNeg = SXGUICrCheckBox("XDispNeg", 80, 35, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticVelocityZ = SXGUICrStatic("z:", 260, 15, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticVelocityZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticVelocityZ->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticVelocityZ->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticVelocityZ->setTransparentTextBk(true); + SXParticlesEditor::StaticVelocityZ->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticVelocityZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticVelocityZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditVelocityZ = SXGUICrEdit("0", 270, 15, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditVelocityZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditVelocityZ->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditVelocityZ->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditVelocityZ->setTransparentTextBk(true); + SXParticlesEditor::EditVelocityZ->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditVelocityZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditVelocityZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditVelocityZ->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditVelocityZ->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticVelocityDisp = SXGUICrStatic("Dispersion:", 355, 15, 60, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticVelocityDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticVelocityDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticVelocityDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticVelocityDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticVelocityDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticVelocityDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticVelocityDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditVelocityDisp = SXGUICrEdit("0", 420, 15, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditVelocityDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditVelocityDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditVelocityDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditVelocityDisp->setTransparentTextBk(true); + SXParticlesEditor::EditVelocityDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditVelocityDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditVelocityDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditVelocityDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditVelocityDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxVelocityDispYNeg = SXGUICrCheckBox("YDispNeg", 170, 35, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxVelocityDispZNeg = SXGUICrCheckBox("ZDispNeg", 260, 35, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticAcceleration = SXGUICrStatic("Acceleration:", 5, 65, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAcceleration->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAcceleration->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAcceleration->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAcceleration->setTransparentTextBk(true); + SXParticlesEditor::StaticAcceleration->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAcceleration->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAcceleration->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::StaticAccelerationX = SXGUICrStatic("x:", 80, 65, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAccelerationX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAccelerationX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAccelerationX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAccelerationX->setTransparentTextBk(true); + SXParticlesEditor::StaticAccelerationX->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAccelerationX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAccelerationX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAccelerationX = SXGUICrEdit("0", 90, 65, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAccelerationX->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAccelerationX->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAccelerationX->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAccelerationX->setTransparentTextBk(true); + SXParticlesEditor::EditAccelerationX->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAccelerationX->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAccelerationX->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAccelerationX->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAccelerationX->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticAccelerationY = SXGUICrStatic("y:", 170, 65, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAccelerationY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAccelerationY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAccelerationY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAccelerationY->setTransparentTextBk(true); + SXParticlesEditor::StaticAccelerationY->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAccelerationY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAccelerationY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAccelerationY = SXGUICrEdit("0", 180, 65, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAccelerationY->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAccelerationY->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAccelerationY->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAccelerationY->setTransparentTextBk(true); + SXParticlesEditor::EditAccelerationY->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAccelerationY->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAccelerationY->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAccelerationY->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAccelerationY->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticAccelerationZ = SXGUICrStatic("z:", 260, 65, 10, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAccelerationZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAccelerationZ->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAccelerationZ->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAccelerationZ->setTransparentTextBk(true); + SXParticlesEditor::StaticAccelerationZ->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAccelerationZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAccelerationZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAccelerationZ = SXGUICrEdit("0", 270, 65, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAccelerationZ->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAccelerationZ->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAccelerationZ->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAccelerationZ->setTransparentTextBk(true); + SXParticlesEditor::EditAccelerationZ->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAccelerationZ->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAccelerationZ->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAccelerationZ->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAccelerationZ->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::StaticAccelerationDisp = SXGUICrStatic("Dispersion:", 355, 65, 60, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::StaticAccelerationDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::StaticAccelerationDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::StaticAccelerationDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::StaticAccelerationDisp->setTransparentTextBk(true); + SXParticlesEditor::StaticAccelerationDisp->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::StaticAccelerationDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::StaticAccelerationDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAccelerationDisp = SXGUICrEdit("0", 420, 65, 70, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0); + SXParticlesEditor::EditAccelerationDisp->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::EditAccelerationDisp->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::EditAccelerationDisp->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::EditAccelerationDisp->setTransparentTextBk(true); + SXParticlesEditor::EditAccelerationDisp->setColorBrush(RGB(255, 255, 255)); + SXParticlesEditor::EditAccelerationDisp->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::EditAccelerationDisp->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::EditAccelerationDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXParticlesEditor::EditAccelerationDisp->addHandler(SXParticlesEditor_Edits_Enter, WM_KILLFOCUS); + + SXParticlesEditor::CheckBoxAccelerationDispXNeg = SXGUICrCheckBox("XDispNeg", 80, 85, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxAccelerationDispYNeg = SXGUICrCheckBox("YDispNeg", 170, 85, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); + SXParticlesEditor::CheckBoxAccelerationDispZNeg = SXGUICrCheckBox("ZDispNeg", 260, 85, 80, 15, SXParticlesEditor::GroupBoxData2->getHWND(), 0, 0, false); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setColorText(RGB(0, 0, 0)); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setColorTextBk(RGB(255, 255, 255)); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setTransparentTextBk(true); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setColorBrush(RGB(220, 220, 220)); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setFollowParentSide(SXGUI_SIDE_LEFT, true); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setFollowParentSide(SXGUI_SIDE_TOP, true); //} } @@ -2395,9 +2394,9 @@ void SXParticlesEditor::ParticlesEditorUpdate(DWORD timeDelta) { if (SPE_EffectEnableGet(SPE_EffectIdOfKey(i))) { - SXParticlesEditor::CheckBoxTBPlay->SetCheck(true); - SXParticlesEditor::CheckBoxTBPause->SetCheck(false); - SXParticlesEditor::CheckBoxTBStop->SetCheck(false); + SXParticlesEditor::CheckBoxTBPlay->setCheck(true); + SXParticlesEditor::CheckBoxTBPause->setCheck(false); + SXParticlesEditor::CheckBoxTBStop->setCheck(false); whyplay = true; break; } @@ -2405,9 +2404,9 @@ void SXParticlesEditor::ParticlesEditorUpdate(DWORD timeDelta) if (!whyplay) { - SXParticlesEditor::CheckBoxTBPlay->SetCheck(false); - SXParticlesEditor::CheckBoxTBPause->SetCheck(false); - SXParticlesEditor::CheckBoxTBStop->SetCheck(true); + SXParticlesEditor::CheckBoxTBPlay->setCheck(false); + SXParticlesEditor::CheckBoxTBPause->setCheck(false); + SXParticlesEditor::CheckBoxTBStop->setCheck(true); } int emitters_count = 0; @@ -2441,10 +2440,10 @@ void SXParticlesEditor::ParticlesEditorUpdate(DWORD timeDelta) char ttext[256]; sprintf(ttext, "Playing emitters: %d/%d", emitters_all_count, emitters_count); - SXParticlesEditor::StatusBar1->SetTextParts(0, ttext); + SXParticlesEditor::StatusBar1->setPartText(0, ttext); sprintf(ttext, "Living particles: %d/%d", particles_all_count, particles_life_count); - SXParticlesEditor::StatusBar1->SetTextParts(1, ttext); + SXParticlesEditor::StatusBar1->setPartText(1, ttext); IDirect3DDevice9 *pDXdevice = SGCore_GetDXDevice(); diff --git a/source/sxparticleseditor/particles_editor.h b/source/sxparticleseditor/particles_editor.h index bf6644222ad06fd906c330b4fab7d0c34a00f9bd..83bc1eada254be21a163c0e741bdc57175c6efc0 100644 --- a/source/sxparticleseditor/particles_editor.h +++ b/source/sxparticleseditor/particles_editor.h @@ -20,7 +20,7 @@ namespace SXParticlesEditor { extern ISXGUIBaseWnd* JobWindow; - extern ISXGUIMenu* MainMenu; + extern ISXGUIMenuWindow* MainMenu; extern ISXGUIStatusBar* StatusBar1; extern ISXGUIGroupBox* GroupBoxList; extern ISXGUIGroupBox* GroupBoxTabs; diff --git a/source/sxparticleseditor/particles_editor_op.cpp b/source/sxparticleseditor/particles_editor_op.cpp index 85946db49b857debd638df9690e944844241ca05..5247e246f2a662387338aac6fb770bc3c84c7043 100644 --- a/source/sxparticleseditor/particles_editor_op.cpp +++ b/source/sxparticleseditor/particles_editor_op.cpp @@ -3,8 +3,8 @@ void SXParticlesEditor::EffInitList() { - SXParticlesEditor::ListBoxEffects->Clear(); - SXParticlesEditor::ListBoxEmitters->Clear(); + SXParticlesEditor::ListBoxEffects->clear(); + SXParticlesEditor::ListBoxEmitters->clear(); int effcount = SPE_EffectCountGet(); char effname[OBJECT_NAME_MAX_LEN]; for (int i = 0; i < effcount; ++i) @@ -12,13 +12,13 @@ void SXParticlesEditor::EffInitList() effname[0] = '!'; effname[1] = 0; SPE_EffectNameGet(SPE_EffectIdOfKey(i), effname); - SXParticlesEditor::ListBoxEffects->AddItem(effname); + SXParticlesEditor::ListBoxEffects->addItem(effname); if (effname[0] == 0) effname[0] = '!'; } - SXParticlesEditor::StaticEffectsCount->SetText(String(effcount).c_str()); - SXParticlesEditor::StaticEmittersCount->SetText("0"); + SXParticlesEditor::StaticEffectsCount->setText(String(effcount).c_str()); + SXParticlesEditor::StaticEmittersCount->setText("0"); SXParticlesEditor::TabsVisible(false); SXParticlesEditor::SelEffID = SXParticlesEditor::SelEmitterID = -1; @@ -26,32 +26,32 @@ void SXParticlesEditor::EffInitList() void SXParticlesEditor::EffVisible(bool visible, bool iscreate) { - StaticEffName->Visible(visible); - EditEffName->Visible(visible); - ButtonEffCreate->Visible(iscreate); + StaticEffName->setVisible(visible); + EditEffName->setVisible(visible); + ButtonEffCreate->setVisible(iscreate); } void SXParticlesEditor::EffNulling() { - EditEffName->SetText("0"); + EditEffName->setText("0"); } void SXParticlesEditor::EffDataInit() { char effname[OBJECT_NAME_MAX_LEN]; SPE_EffectNameGet(SXParticlesEditor::SelEffID, effname); - SXParticlesEditor::EditEffName->SetText(effname); + SXParticlesEditor::EditEffName->setText(effname); } void SXParticlesEditor::TabsVisible(bool visible) { - SXParticlesEditor::GroupBoxTabs->Visible(visible); + SXParticlesEditor::GroupBoxTabs->setVisible(visible); if (visible == false) { AllInTabsVisible(false); } - else if (!(SXParticlesEditor::GroupBoxTabs->Visible()) && visible) + else if (!(SXParticlesEditor::GroupBoxTabs->getVisible()) && visible) { SXParticlesEditor::BaseVisible(true); } @@ -68,13 +68,13 @@ void SXParticlesEditor::AllInTabsVisible(bool visible) if (!visible) { - SXParticlesEditor::ButtonBase->SetCheck(false); - SXParticlesEditor::ButtonBound->SetCheck(false); - SXParticlesEditor::ButtonCharacters->SetCheck(false); - SXParticlesEditor::ButtonSpawn->SetCheck(false); - SXParticlesEditor::ButtonTextureAnimTex->SetCheck(false); - SXParticlesEditor::ButtonVelocityAcceleration->SetCheck(false); - SXParticlesEditor::ButtonEmitterCreate->Visible(false); + SXParticlesEditor::ButtonBase->setCheck(false); + SXParticlesEditor::ButtonBound->setCheck(false); + SXParticlesEditor::ButtonCharacters->setCheck(false); + SXParticlesEditor::ButtonSpawn->setCheck(false); + SXParticlesEditor::ButtonTextureAnimTex->setCheck(false); + SXParticlesEditor::ButtonVelocityAcceleration->setCheck(false); + SXParticlesEditor::ButtonEmitterCreate->setVisible(false); } } @@ -90,69 +90,69 @@ void SXParticlesEditor::AllInTabsNulling() void SXParticlesEditor::EmitterCreateVisible(bool visible) { - SXParticlesEditor::ButtonEmitterCreate->Visible(visible); + SXParticlesEditor::ButtonEmitterCreate->setVisible(visible); } void SXParticlesEditor::BaseVisible(bool visible) { - StaticName->Visible(visible); - EditName->Visible(visible); + StaticName->setVisible(visible); + EditName->setVisible(visible); - StaticReCreateCount->Visible(visible); - EditReCreateCount->Visible(visible); - StaticCount->Visible(visible); - EditCount->Visible(visible); - StaticColorCoef->Visible(visible); - EditColorCoef->Visible(visible); - StaticSoftCoef->Visible(visible); - EditSoftCoef->Visible(visible); - StaticRefractionCoef->Visible(visible); - EditRefractionCoef->Visible(visible); - StaticTransparencyCoef->Visible(visible); - EditTransparencyCoef->Visible(visible); - CheckBoxLighting->Visible(visible); - StaticFigureType->Visible(visible); - ComboBoxFigureType->Visible(visible); - StaticFigureCountQuads->Visible(visible); - EditFigureCountQuads->Visible(visible); - CheckBoxFigureRotRand->Visible(visible); - CheckBoxFigureTapX->Visible(visible); - CheckBoxFigureTapY->Visible(visible); - CheckBoxFigureTapZ->Visible(visible); - StaticAlphaBlendType->Visible(visible); - ComboBoxAlphaBlendType->Visible(visible); - StaticTimeLife->Visible(visible); - EditTimeLife->Visible(visible); - StaticTimeLifeDisp->Visible(visible); - EditTimeLifeDisp->Visible(visible); - StaticAlphaAgeDepend->Visible(visible); - ComboBoxAlphaDependAge->Visible(visible); - StaticSize->Visible(visible); - StaticSizeX->Visible(visible); - EditSizeX->Visible(visible); - StaticSizeY->Visible(visible); - EditSizeY->Visible(visible); - StaticSizeDisp->Visible(visible); - EditSizeDisp->Visible(visible); - StaticSizeDependAge->Visible(visible); - ComboBoxSizeDependAge->Visible(visible); - CheckBoxCollisionDelete->Visible(visible); - - SXParticlesEditor::StaticColor->Visible(visible); - SXParticlesEditor::StaticColorR->Visible(visible); - SXParticlesEditor::EditColorR->Visible(visible); - SXParticlesEditor::StaticColorG->Visible(visible); - SXParticlesEditor::EditColorG->Visible(visible); - SXParticlesEditor::StaticColorB->Visible(visible); - SXParticlesEditor::EditColorB->Visible(visible); - SXParticlesEditor::StaticColorA->Visible(visible); - SXParticlesEditor::EditColorA->Visible(visible); - - SXParticlesEditor::CheckBoxTrack->Visible(visible); - SXParticlesEditor::StaticTrackSize->Visible(visible); - SXParticlesEditor::EditTrackSize->Visible(visible); - SXParticlesEditor::StaticTrackTime->Visible(visible); - SXParticlesEditor::EditTrackTime->Visible(visible); + StaticReCreateCount->setVisible(visible); + EditReCreateCount->setVisible(visible); + StaticCount->setVisible(visible); + EditCount->setVisible(visible); + StaticColorCoef->setVisible(visible); + EditColorCoef->setVisible(visible); + StaticSoftCoef->setVisible(visible); + EditSoftCoef->setVisible(visible); + StaticRefractionCoef->setVisible(visible); + EditRefractionCoef->setVisible(visible); + StaticTransparencyCoef->setVisible(visible); + EditTransparencyCoef->setVisible(visible); + CheckBoxLighting->setVisible(visible); + StaticFigureType->setVisible(visible); + ComboBoxFigureType->setVisible(visible); + StaticFigureCountQuads->setVisible(visible); + EditFigureCountQuads->setVisible(visible); + CheckBoxFigureRotRand->setVisible(visible); + CheckBoxFigureTapX->setVisible(visible); + CheckBoxFigureTapY->setVisible(visible); + CheckBoxFigureTapZ->setVisible(visible); + StaticAlphaBlendType->setVisible(visible); + ComboBoxAlphaBlendType->setVisible(visible); + StaticTimeLife->setVisible(visible); + EditTimeLife->setVisible(visible); + StaticTimeLifeDisp->setVisible(visible); + EditTimeLifeDisp->setVisible(visible); + StaticAlphaAgeDepend->setVisible(visible); + ComboBoxAlphaDependAge->setVisible(visible); + StaticSize->setVisible(visible); + StaticSizeX->setVisible(visible); + EditSizeX->setVisible(visible); + StaticSizeY->setVisible(visible); + EditSizeY->setVisible(visible); + StaticSizeDisp->setVisible(visible); + EditSizeDisp->setVisible(visible); + StaticSizeDependAge->setVisible(visible); + ComboBoxSizeDependAge->setVisible(visible); + CheckBoxCollisionDelete->setVisible(visible); + + SXParticlesEditor::StaticColor->setVisible(visible); + SXParticlesEditor::StaticColorR->setVisible(visible); + SXParticlesEditor::EditColorR->setVisible(visible); + SXParticlesEditor::StaticColorG->setVisible(visible); + SXParticlesEditor::EditColorG->setVisible(visible); + SXParticlesEditor::StaticColorB->setVisible(visible); + SXParticlesEditor::EditColorB->setVisible(visible); + SXParticlesEditor::StaticColorA->setVisible(visible); + SXParticlesEditor::EditColorA->setVisible(visible); + + SXParticlesEditor::CheckBoxTrack->setVisible(visible); + SXParticlesEditor::StaticTrackSize->setVisible(visible); + SXParticlesEditor::EditTrackSize->setVisible(visible); + SXParticlesEditor::StaticTrackTime->setVisible(visible); + SXParticlesEditor::EditTrackTime->setVisible(visible); } void SXParticlesEditor::BaseDataInit() @@ -169,99 +169,99 @@ void SXParticlesEditor::BaseDataInit() char tmpname[OBJECT_NAME_MAX_LEN]; SPE_EmitterNameGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, tmpname); - SXParticlesEditor::EditName->SetText(tmpname); - SXParticlesEditor::EditCount->SetText(String(SPE_EmitterCountGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID)).c_str()); - SXParticlesEditor::EditReCreateCount->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, ReCreateCount)).c_str()); - SXParticlesEditor::EditColorCoef->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, ColorCoef)).c_str()); - SXParticlesEditor::EditSoftCoef->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SoftCoef)).c_str()); - SXParticlesEditor::EditRefractionCoef->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, RefractionCoef)).c_str()); - SXParticlesEditor::EditTransparencyCoef->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TransparencyCoef)).c_str()); - SXParticlesEditor::CheckBoxLighting->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Lighting)); - SXParticlesEditor::ComboBoxFigureType->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureType)); - SXParticlesEditor::ComboBoxAlphaBlendType->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaBlendType)); - SXParticlesEditor::EditFigureCountQuads->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureCountQuads)).c_str()); - SXParticlesEditor::CheckBoxFigureRotRand->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureRotRand)); - SXParticlesEditor::CheckBoxFigureTapX->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapX)); - SXParticlesEditor::CheckBoxFigureTapY->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapY)); - SXParticlesEditor::CheckBoxFigureTapZ->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapZ)); - SXParticlesEditor::ComboBoxAlphaBlendType->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaBlendType)); - SXParticlesEditor::EditTimeLife->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLife)).c_str()); - SXParticlesEditor::EditTimeLifeDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLifeDisp)).c_str()); - SXParticlesEditor::ComboBoxAlphaDependAge->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaDependAge)); - SXParticlesEditor::EditSizeX->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.x)).c_str()); - SXParticlesEditor::EditSizeY->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.y)).c_str()); - SXParticlesEditor::EditSizeDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDisp)).c_str()); - SXParticlesEditor::ComboBoxSizeDependAge->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDependAge)); - SXParticlesEditor::CheckBoxCollisionDelete->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CollisionDelete)); - - SXParticlesEditor::EditColorR->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.x)).c_str()); - SXParticlesEditor::EditColorG->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.y)).c_str()); - SXParticlesEditor::EditColorB->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.z)).c_str()); - SXParticlesEditor::EditColorA->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.w)).c_str()); - - SXParticlesEditor::CheckBoxTrack->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Track)); - SXParticlesEditor::EditTrackSize->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TrackSize)).c_str()); - SXParticlesEditor::EditTrackTime->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TrackTime)).c_str()); + SXParticlesEditor::EditName->setText(tmpname); + SXParticlesEditor::EditCount->setText(String(SPE_EmitterCountGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID)).c_str()); + SXParticlesEditor::EditReCreateCount->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, ReCreateCount)).c_str()); + SXParticlesEditor::EditColorCoef->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, ColorCoef)).c_str()); + SXParticlesEditor::EditSoftCoef->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SoftCoef)).c_str()); + SXParticlesEditor::EditRefractionCoef->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, RefractionCoef)).c_str()); + SXParticlesEditor::EditTransparencyCoef->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TransparencyCoef)).c_str()); + SXParticlesEditor::CheckBoxLighting->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Lighting)); + SXParticlesEditor::ComboBoxFigureType->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureType)); + SXParticlesEditor::ComboBoxAlphaBlendType->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaBlendType)); + SXParticlesEditor::EditFigureCountQuads->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureCountQuads)).c_str()); + SXParticlesEditor::CheckBoxFigureRotRand->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureRotRand)); + SXParticlesEditor::CheckBoxFigureTapX->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapX)); + SXParticlesEditor::CheckBoxFigureTapY->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapY)); + SXParticlesEditor::CheckBoxFigureTapZ->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, FigureTapZ)); + SXParticlesEditor::ComboBoxAlphaBlendType->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaBlendType)); + SXParticlesEditor::EditTimeLife->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLife)).c_str()); + SXParticlesEditor::EditTimeLifeDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TimeLifeDisp)).c_str()); + SXParticlesEditor::ComboBoxAlphaDependAge->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AlphaDependAge)); + SXParticlesEditor::EditSizeX->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.x)).c_str()); + SXParticlesEditor::EditSizeY->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Size.y)).c_str()); + SXParticlesEditor::EditSizeDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDisp)).c_str()); + SXParticlesEditor::ComboBoxSizeDependAge->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SizeDependAge)); + SXParticlesEditor::CheckBoxCollisionDelete->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CollisionDelete)); + + SXParticlesEditor::EditColorR->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.x)).c_str()); + SXParticlesEditor::EditColorG->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.y)).c_str()); + SXParticlesEditor::EditColorB->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.z)).c_str()); + SXParticlesEditor::EditColorA->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Color.w)).c_str()); + + SXParticlesEditor::CheckBoxTrack->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Track)); + SXParticlesEditor::EditTrackSize->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TrackSize)).c_str()); + SXParticlesEditor::EditTrackTime->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, TrackTime)).c_str()); } void SXParticlesEditor::BaseNulling() { - SXParticlesEditor::EditName->SetText(""); - SXParticlesEditor::EditCount->SetText("0"); - SXParticlesEditor::EditReCreateCount->SetText("0"); - SXParticlesEditor::EditColorCoef->SetText("1"); - SXParticlesEditor::EditSoftCoef->SetText("0"); - SXParticlesEditor::EditRefractionCoef->SetText("0"); - SXParticlesEditor::EditTransparencyCoef->SetText("1"); - SXParticlesEditor::CheckBoxLighting->SetCheck(false); - SXParticlesEditor::ComboBoxFigureType->SetSel(0); - SXParticlesEditor::EditFigureCountQuads->SetText("1"); - SXParticlesEditor::CheckBoxFigureRotRand->SetCheck(false); - SXParticlesEditor::CheckBoxFigureTapX->SetCheck(false); - SXParticlesEditor::CheckBoxFigureTapY->SetCheck(false); - SXParticlesEditor::CheckBoxFigureTapZ->SetCheck(false); - SXParticlesEditor::ComboBoxAlphaBlendType->SetSel(0); - SXParticlesEditor::EditTimeLife->SetText("0"); - SXParticlesEditor::EditTimeLifeDisp->SetText("0"); - SXParticlesEditor::ComboBoxAlphaDependAge->SetSel(0); - SXParticlesEditor::EditSizeX->SetText("0.5"); - SXParticlesEditor::EditSizeY->SetText("0.5"); - SXParticlesEditor::EditSizeDisp->SetText("0"); - SXParticlesEditor::ComboBoxSizeDependAge->SetSel(0); - SXParticlesEditor::CheckBoxCollisionDelete->SetCheck(false); - - SXParticlesEditor::EditColorR->SetText("1"); - SXParticlesEditor::EditColorG->SetText("1"); - SXParticlesEditor::EditColorB->SetText("1"); - SXParticlesEditor::EditColorA->SetText("0"); - - SXParticlesEditor::CheckBoxTrack->SetCheck(false); - SXParticlesEditor::EditTrackSize->SetText("0"); - SXParticlesEditor::EditTrackTime->SetText("0"); + SXParticlesEditor::EditName->setText(""); + SXParticlesEditor::EditCount->setText("0"); + SXParticlesEditor::EditReCreateCount->setText("0"); + SXParticlesEditor::EditColorCoef->setText("1"); + SXParticlesEditor::EditSoftCoef->setText("0"); + SXParticlesEditor::EditRefractionCoef->setText("0"); + SXParticlesEditor::EditTransparencyCoef->setText("1"); + SXParticlesEditor::CheckBoxLighting->setCheck(false); + SXParticlesEditor::ComboBoxFigureType->setSel(0); + SXParticlesEditor::EditFigureCountQuads->setText("1"); + SXParticlesEditor::CheckBoxFigureRotRand->setCheck(false); + SXParticlesEditor::CheckBoxFigureTapX->setCheck(false); + SXParticlesEditor::CheckBoxFigureTapY->setCheck(false); + SXParticlesEditor::CheckBoxFigureTapZ->setCheck(false); + SXParticlesEditor::ComboBoxAlphaBlendType->setSel(0); + SXParticlesEditor::EditTimeLife->setText("0"); + SXParticlesEditor::EditTimeLifeDisp->setText("0"); + SXParticlesEditor::ComboBoxAlphaDependAge->setSel(0); + SXParticlesEditor::EditSizeX->setText("0.5"); + SXParticlesEditor::EditSizeY->setText("0.5"); + SXParticlesEditor::EditSizeDisp->setText("0"); + SXParticlesEditor::ComboBoxSizeDependAge->setSel(0); + SXParticlesEditor::CheckBoxCollisionDelete->setCheck(false); + + SXParticlesEditor::EditColorR->setText("1"); + SXParticlesEditor::EditColorG->setText("1"); + SXParticlesEditor::EditColorB->setText("1"); + SXParticlesEditor::EditColorA->setText("0"); + + SXParticlesEditor::CheckBoxTrack->setCheck(false); + SXParticlesEditor::EditTrackSize->setText("0"); + SXParticlesEditor::EditTrackTime->setText("0"); } void SXParticlesEditor::BoundVisible(bool visible) { - SXParticlesEditor::StaticBoundType->Visible(visible); - SXParticlesEditor::ComboBoxBoundType->Visible(visible); - SXParticlesEditor::StaticBoundVec1->Visible(visible); - SXParticlesEditor::StaticBoundVec1X->Visible(visible); - SXParticlesEditor::EditBoundVec1X->Visible(visible); - SXParticlesEditor::StaticBoundVec1Y->Visible(visible); - SXParticlesEditor::EditBoundVec1Y->Visible(visible); - SXParticlesEditor::StaticBoundVec1Z->Visible(visible); - SXParticlesEditor::EditBoundVec1Z->Visible(visible); - SXParticlesEditor::StaticBoundVec1W->Visible(visible); - SXParticlesEditor::EditBoundVec1W->Visible(visible); - SXParticlesEditor::StaticBoundVec2->Visible(visible); - SXParticlesEditor::StaticBoundVec2X->Visible(visible); - SXParticlesEditor::EditBoundVec2X->Visible(visible); - SXParticlesEditor::StaticBoundVec2Y->Visible(visible); - SXParticlesEditor::EditBoundVec2Y->Visible(visible); - SXParticlesEditor::StaticBoundVec2Z->Visible(visible); - SXParticlesEditor::EditBoundVec2Z->Visible(visible); - SXParticlesEditor::StaticBoundVec2W->Visible(visible); - SXParticlesEditor::EditBoundVec2W->Visible(visible); + SXParticlesEditor::StaticBoundType->setVisible(visible); + SXParticlesEditor::ComboBoxBoundType->setVisible(visible); + SXParticlesEditor::StaticBoundVec1->setVisible(visible); + SXParticlesEditor::StaticBoundVec1X->setVisible(visible); + SXParticlesEditor::EditBoundVec1X->setVisible(visible); + SXParticlesEditor::StaticBoundVec1Y->setVisible(visible); + SXParticlesEditor::EditBoundVec1Y->setVisible(visible); + SXParticlesEditor::StaticBoundVec1Z->setVisible(visible); + SXParticlesEditor::EditBoundVec1Z->setVisible(visible); + SXParticlesEditor::StaticBoundVec1W->setVisible(visible); + SXParticlesEditor::EditBoundVec1W->setVisible(visible); + SXParticlesEditor::StaticBoundVec2->setVisible(visible); + SXParticlesEditor::StaticBoundVec2X->setVisible(visible); + SXParticlesEditor::EditBoundVec2X->setVisible(visible); + SXParticlesEditor::StaticBoundVec2Y->setVisible(visible); + SXParticlesEditor::EditBoundVec2Y->setVisible(visible); + SXParticlesEditor::StaticBoundVec2Z->setVisible(visible); + SXParticlesEditor::EditBoundVec2Z->setVisible(visible); + SXParticlesEditor::StaticBoundVec2W->setVisible(visible); + SXParticlesEditor::EditBoundVec2W->setVisible(visible); } void SXParticlesEditor::BoundDataInit() @@ -276,63 +276,63 @@ void SXParticlesEditor::BoundDataInit() return; } - SXParticlesEditor::ComboBoxBoundType->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundType)); - SXParticlesEditor::EditBoundVec1X->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.x)).c_str()); - SXParticlesEditor::EditBoundVec1Y->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.y)).c_str()); - SXParticlesEditor::EditBoundVec1Z->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.z)).c_str()); - SXParticlesEditor::EditBoundVec1W->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.w)).c_str()); - SXParticlesEditor::EditBoundVec2X->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.x)).c_str()); - SXParticlesEditor::EditBoundVec2Y->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.y)).c_str()); - SXParticlesEditor::EditBoundVec2Z->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.z)).c_str()); - SXParticlesEditor::EditBoundVec2W->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.w)).c_str()); + SXParticlesEditor::ComboBoxBoundType->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundType)); + SXParticlesEditor::EditBoundVec1X->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.x)).c_str()); + SXParticlesEditor::EditBoundVec1Y->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.y)).c_str()); + SXParticlesEditor::EditBoundVec1Z->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.z)).c_str()); + SXParticlesEditor::EditBoundVec1W->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec1.w)).c_str()); + SXParticlesEditor::EditBoundVec2X->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.x)).c_str()); + SXParticlesEditor::EditBoundVec2Y->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.y)).c_str()); + SXParticlesEditor::EditBoundVec2Z->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.z)).c_str()); + SXParticlesEditor::EditBoundVec2W->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, BoundVec2.w)).c_str()); } void SXParticlesEditor::BoundNulling() { - SXParticlesEditor::ComboBoxBoundType->SetSel(0); - SXParticlesEditor::EditBoundVec1X->SetText("0"); - SXParticlesEditor::EditBoundVec1Y->SetText("0"); - SXParticlesEditor::EditBoundVec1Z->SetText("0"); - SXParticlesEditor::EditBoundVec1W->SetText("0"); - SXParticlesEditor::EditBoundVec2X->SetText("0"); - SXParticlesEditor::EditBoundVec2Y->SetText("0"); - SXParticlesEditor::EditBoundVec2Z->SetText("0"); - SXParticlesEditor::EditBoundVec2W->SetText("0"); + SXParticlesEditor::ComboBoxBoundType->setSel(0); + SXParticlesEditor::EditBoundVec1X->setText("0"); + SXParticlesEditor::EditBoundVec1Y->setText("0"); + SXParticlesEditor::EditBoundVec1Z->setText("0"); + SXParticlesEditor::EditBoundVec1W->setText("0"); + SXParticlesEditor::EditBoundVec2X->setText("0"); + SXParticlesEditor::EditBoundVec2Y->setText("0"); + SXParticlesEditor::EditBoundVec2Z->setText("0"); + SXParticlesEditor::EditBoundVec2W->setText("0"); } void SXParticlesEditor::CharacterVisible(bool visible) { - SXParticlesEditor::CheckBoxCircle->Visible(visible); - SXParticlesEditor::StaticCircleAxis->Visible(visible); - SXParticlesEditor::ComboBoxCircleAxis->Visible(visible); - SXParticlesEditor::StaticCircleAngle->Visible(visible); - SXParticlesEditor::EditCircleAngle->Visible(visible); - SXParticlesEditor::StaticCircleAngleDisp->Visible(visible); - SXParticlesEditor::EditCircleAngleDisp->Visible(visible); - SXParticlesEditor::CheckBoxRotate->Visible(visible); - SXParticlesEditor::StaticRotateAngle->Visible(visible); - SXParticlesEditor::EditRotateAngle->Visible(visible); - SXParticlesEditor::StaticRotateAngleDisp->Visible(visible); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->Visible(visible); - SXParticlesEditor::EditRotateAngleDisp->Visible(visible); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->Visible(visible); - SXParticlesEditor::CheckBoxDeviation->Visible(visible); - SXParticlesEditor::StaticDeviationType->Visible(visible); - SXParticlesEditor::ComboBoxDeviationType->Visible(visible); - SXParticlesEditor::StaticDeviationAmplitude->Visible(visible); - SXParticlesEditor::StaticDeviationCoefAngle->Visible(visible); - SXParticlesEditor::EditDeviationAmplitude->Visible(visible); - SXParticlesEditor::EditDeviationCoefAngle->Visible(visible); - SXParticlesEditor::StaticDeviationAxis->Visible(visible); - SXParticlesEditor::ComboBoxDeviationAxis->Visible(visible); - SXParticlesEditor::StaticDeviationCountDelayMls->Visible(visible); - SXParticlesEditor::EditDeviationCountDelayMls->Visible(visible); - SXParticlesEditor::StaticDeviationCoefAngleDisp->Visible(visible); - SXParticlesEditor::EditDeviationCoefAngleDisp->Visible(visible); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->Visible(visible); - SXParticlesEditor::CheckBoxDeviationTapX->Visible(visible); - SXParticlesEditor::CheckBoxDeviationTapY->Visible(visible); - SXParticlesEditor::CheckBoxDeviationTapZ->Visible(visible); + SXParticlesEditor::CheckBoxCircle->setVisible(visible); + SXParticlesEditor::StaticCircleAxis->setVisible(visible); + SXParticlesEditor::ComboBoxCircleAxis->setVisible(visible); + SXParticlesEditor::StaticCircleAngle->setVisible(visible); + SXParticlesEditor::EditCircleAngle->setVisible(visible); + SXParticlesEditor::StaticCircleAngleDisp->setVisible(visible); + SXParticlesEditor::EditCircleAngleDisp->setVisible(visible); + SXParticlesEditor::CheckBoxRotate->setVisible(visible); + SXParticlesEditor::StaticRotateAngle->setVisible(visible); + SXParticlesEditor::EditRotateAngle->setVisible(visible); + SXParticlesEditor::StaticRotateAngleDisp->setVisible(visible); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setVisible(visible); + SXParticlesEditor::EditRotateAngleDisp->setVisible(visible); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setVisible(visible); + SXParticlesEditor::CheckBoxDeviation->setVisible(visible); + SXParticlesEditor::StaticDeviationType->setVisible(visible); + SXParticlesEditor::ComboBoxDeviationType->setVisible(visible); + SXParticlesEditor::StaticDeviationAmplitude->setVisible(visible); + SXParticlesEditor::StaticDeviationCoefAngle->setVisible(visible); + SXParticlesEditor::EditDeviationAmplitude->setVisible(visible); + SXParticlesEditor::EditDeviationCoefAngle->setVisible(visible); + SXParticlesEditor::StaticDeviationAxis->setVisible(visible); + SXParticlesEditor::ComboBoxDeviationAxis->setVisible(visible); + SXParticlesEditor::StaticDeviationCountDelayMls->setVisible(visible); + SXParticlesEditor::EditDeviationCountDelayMls->setVisible(visible); + SXParticlesEditor::StaticDeviationCoefAngleDisp->setVisible(visible); + SXParticlesEditor::EditDeviationCoefAngleDisp->setVisible(visible); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setVisible(visible); + SXParticlesEditor::CheckBoxDeviationTapX->setVisible(visible); + SXParticlesEditor::CheckBoxDeviationTapY->setVisible(visible); + SXParticlesEditor::CheckBoxDeviationTapZ->setVisible(visible); } void SXParticlesEditor::CharacterDataInit() @@ -347,75 +347,75 @@ void SXParticlesEditor::CharacterDataInit() return; } - SXParticlesEditor::CheckBoxCircle->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircle)); - SXParticlesEditor::ComboBoxCircleAxis->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAxis)); - SXParticlesEditor::EditCircleAngle->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngle)).c_str()); - SXParticlesEditor::EditCircleAngleDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngleDisp)).c_str()); - SXParticlesEditor::CheckBoxRotate->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotate)); - SXParticlesEditor::EditRotateAngle->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngle)).c_str()); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngleDispNeg)); - SXParticlesEditor::EditRotateAngleDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngleDisp)).c_str()); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngleDispNeg)); - SXParticlesEditor::CheckBoxDeviation->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviation)); - SXParticlesEditor::ComboBoxDeviationType->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationType)); - SXParticlesEditor::EditDeviationAmplitude->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationAmplitude)).c_str()); - SXParticlesEditor::EditDeviationCoefAngle->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngle)).c_str()); - SXParticlesEditor::ComboBoxDeviationAxis->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationAxis)); - SXParticlesEditor::EditDeviationCountDelayMls->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCountDelayMls)).c_str()); - SXParticlesEditor::EditDeviationCoefAngleDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngleDisp)).c_str()); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngleDispNeg)); - SXParticlesEditor::CheckBoxDeviationTapX->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapX)); - SXParticlesEditor::CheckBoxDeviationTapY->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapY)); - SXParticlesEditor::CheckBoxDeviationTapZ->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapZ)); + SXParticlesEditor::CheckBoxCircle->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircle)); + SXParticlesEditor::ComboBoxCircleAxis->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAxis)); + SXParticlesEditor::EditCircleAngle->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngle)).c_str()); + SXParticlesEditor::EditCircleAngleDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngleDisp)).c_str()); + SXParticlesEditor::CheckBoxRotate->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotate)); + SXParticlesEditor::EditRotateAngle->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngle)).c_str()); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterCircleAngleDispNeg)); + SXParticlesEditor::EditRotateAngleDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngleDisp)).c_str()); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterRotateAngleDispNeg)); + SXParticlesEditor::CheckBoxDeviation->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviation)); + SXParticlesEditor::ComboBoxDeviationType->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationType)); + SXParticlesEditor::EditDeviationAmplitude->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationAmplitude)).c_str()); + SXParticlesEditor::EditDeviationCoefAngle->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngle)).c_str()); + SXParticlesEditor::ComboBoxDeviationAxis->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationAxis)); + SXParticlesEditor::EditDeviationCountDelayMls->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCountDelayMls)).c_str()); + SXParticlesEditor::EditDeviationCoefAngleDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngleDisp)).c_str()); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationCoefAngleDispNeg)); + SXParticlesEditor::CheckBoxDeviationTapX->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapX)); + SXParticlesEditor::CheckBoxDeviationTapY->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapY)); + SXParticlesEditor::CheckBoxDeviationTapZ->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, CharacterDeviationTapZ)); } void SXParticlesEditor::CharacterNulling() { - SXParticlesEditor::CheckBoxCircle->SetCheck(false); - SXParticlesEditor::ComboBoxCircleAxis->SetSel(0); - SXParticlesEditor::EditCircleAngle->SetText("0"); - SXParticlesEditor::EditCircleAngleDisp->SetText("0"); - SXParticlesEditor::CheckBoxRotate->SetCheck(false); - SXParticlesEditor::EditRotateAngle->SetText("0"); - SXParticlesEditor::CheckBoxCircleAngleDispNeg->SetCheck(false); - SXParticlesEditor::EditRotateAngleDisp->SetText("0"); - SXParticlesEditor::CheckBoxRotateAngleDispNeg->SetCheck(false); - SXParticlesEditor::CheckBoxDeviation->SetCheck(false); - SXParticlesEditor::ComboBoxDeviationType->SetSel(0); - SXParticlesEditor::EditDeviationAmplitude->SetText("0"); - SXParticlesEditor::EditDeviationCoefAngle->SetText("0"); - SXParticlesEditor::ComboBoxDeviationAxis->SetSel(0); - SXParticlesEditor::EditDeviationCountDelayMls->SetText("0"); - SXParticlesEditor::EditDeviationCoefAngleDisp->SetText("0"); - SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->SetCheck(false); - SXParticlesEditor::CheckBoxDeviationTapX->SetCheck(false); - SXParticlesEditor::CheckBoxDeviationTapY->SetCheck(false); - SXParticlesEditor::CheckBoxDeviationTapZ->SetCheck(false); + SXParticlesEditor::CheckBoxCircle->setCheck(false); + SXParticlesEditor::ComboBoxCircleAxis->setSel(0); + SXParticlesEditor::EditCircleAngle->setText("0"); + SXParticlesEditor::EditCircleAngleDisp->setText("0"); + SXParticlesEditor::CheckBoxRotate->setCheck(false); + SXParticlesEditor::EditRotateAngle->setText("0"); + SXParticlesEditor::CheckBoxCircleAngleDispNeg->setCheck(false); + SXParticlesEditor::EditRotateAngleDisp->setText("0"); + SXParticlesEditor::CheckBoxRotateAngleDispNeg->setCheck(false); + SXParticlesEditor::CheckBoxDeviation->setCheck(false); + SXParticlesEditor::ComboBoxDeviationType->setSel(0); + SXParticlesEditor::EditDeviationAmplitude->setText("0"); + SXParticlesEditor::EditDeviationCoefAngle->setText("0"); + SXParticlesEditor::ComboBoxDeviationAxis->setSel(0); + SXParticlesEditor::EditDeviationCountDelayMls->setText("0"); + SXParticlesEditor::EditDeviationCoefAngleDisp->setText("0"); + SXParticlesEditor::CheckBoxDeviationCoefAngleDispNeg->setCheck(false); + SXParticlesEditor::CheckBoxDeviationTapX->setCheck(false); + SXParticlesEditor::CheckBoxDeviationTapY->setCheck(false); + SXParticlesEditor::CheckBoxDeviationTapZ->setCheck(false); } void SXParticlesEditor::SpawnVisible(bool visible) { - SXParticlesEditor::StaticSpawnPosType->Visible(visible); - SXParticlesEditor::ComboBoxSpawnPosType->Visible(visible); - SXParticlesEditor::StaticSpawnOrigin->Visible(visible); - SXParticlesEditor::StaticSpawnOriginX->Visible(visible); - SXParticlesEditor::EditSpawnOriginX->Visible(visible); - SXParticlesEditor::StaticSpawnOriginY->Visible(visible); - SXParticlesEditor::EditSpawnOriginY->Visible(visible); - SXParticlesEditor::StaticSpawnOriginZ->Visible(visible); - SXParticlesEditor::EditSpawnOriginZ->Visible(visible); - SXParticlesEditor::StaticSpawnOriginDisp->Visible(visible); - SXParticlesEditor::EditSpawnOriginDisp->Visible(visible); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->Visible(visible); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->Visible(visible); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->Visible(visible); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->Visible(visible); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->Visible(visible); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->Visible(visible); - SXParticlesEditor::StaticSpawnNextTime->Visible(visible); - SXParticlesEditor::EditSpawnNextTime->Visible(visible); - SXParticlesEditor::StaticSpawnNextTimeDisp->Visible(visible); - SXParticlesEditor::EditSpawnNextTimeDisp->Visible(visible); + SXParticlesEditor::StaticSpawnPosType->setVisible(visible); + SXParticlesEditor::ComboBoxSpawnPosType->setVisible(visible); + SXParticlesEditor::StaticSpawnOrigin->setVisible(visible); + SXParticlesEditor::StaticSpawnOriginX->setVisible(visible); + SXParticlesEditor::EditSpawnOriginX->setVisible(visible); + SXParticlesEditor::StaticSpawnOriginY->setVisible(visible); + SXParticlesEditor::EditSpawnOriginY->setVisible(visible); + SXParticlesEditor::StaticSpawnOriginZ->setVisible(visible); + SXParticlesEditor::EditSpawnOriginZ->setVisible(visible); + SXParticlesEditor::StaticSpawnOriginDisp->setVisible(visible); + SXParticlesEditor::EditSpawnOriginDisp->setVisible(visible); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setVisible(visible); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setVisible(visible); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setVisible(visible); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setVisible(visible); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setVisible(visible); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setVisible(visible); + SXParticlesEditor::StaticSpawnNextTime->setVisible(visible); + SXParticlesEditor::EditSpawnNextTime->setVisible(visible); + SXParticlesEditor::StaticSpawnNextTimeDisp->setVisible(visible); + SXParticlesEditor::EditSpawnNextTimeDisp->setVisible(visible); } void SXParticlesEditor::SpawnDataInit() @@ -430,55 +430,55 @@ void SXParticlesEditor::SpawnDataInit() return; } - SXParticlesEditor::ComboBoxSpawnPosType->SetSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnPosType)); - SXParticlesEditor::EditSpawnOriginX->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.x)).c_str()); - SXParticlesEditor::EditSpawnOriginY->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.y)).c_str()); - SXParticlesEditor::EditSpawnOriginZ->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.z)).c_str()); - SXParticlesEditor::EditSpawnOriginDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOriginDisp)).c_str()); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateXPos)); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateXNeg)); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateYPos)); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateYNeg)); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateZPos)); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateZNeg)); - SXParticlesEditor::EditSpawnNextTime->SetText(String((DWORD)SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTime)).c_str()); - SXParticlesEditor::EditSpawnNextTimeDisp->SetText(String((DWORD)SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTimeDisp)).c_str()); + SXParticlesEditor::ComboBoxSpawnPosType->setSel(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnPosType)); + SXParticlesEditor::EditSpawnOriginX->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.x)).c_str()); + SXParticlesEditor::EditSpawnOriginY->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.y)).c_str()); + SXParticlesEditor::EditSpawnOriginZ->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOrigin.z)).c_str()); + SXParticlesEditor::EditSpawnOriginDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnOriginDisp)).c_str()); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateXPos)); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateXNeg)); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateYPos)); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateYNeg)); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateZPos)); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnBoundBindCreateZNeg)); + SXParticlesEditor::EditSpawnNextTime->setText(String((DWORD)SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTime)).c_str()); + SXParticlesEditor::EditSpawnNextTimeDisp->setText(String((DWORD)SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, SpawnNextTimeDisp)).c_str()); } void SXParticlesEditor::SpawnNulling() { - SXParticlesEditor::ComboBoxSpawnPosType->SetSel(0); - SXParticlesEditor::EditSpawnOriginX->SetText("0"); - SXParticlesEditor::EditSpawnOriginY->SetText("0"); - SXParticlesEditor::EditSpawnOriginZ->SetText("0"); - SXParticlesEditor::EditSpawnOriginDisp->SetText("0"); - SXParticlesEditor::CheckBoxSpawnOriginDispXPos->SetCheck(false); - SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->SetCheck(false); - SXParticlesEditor::CheckBoxSpawnOriginDispYPos->SetCheck(false); - SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->SetCheck(false); - SXParticlesEditor::CheckBoxSpawnOriginDispZPos->SetCheck(false); - SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->SetCheck(false); - SXParticlesEditor::EditSpawnNextTime->SetText("0"); - SXParticlesEditor::EditSpawnNextTimeDisp->SetText("0"); + SXParticlesEditor::ComboBoxSpawnPosType->setSel(0); + SXParticlesEditor::EditSpawnOriginX->setText("0"); + SXParticlesEditor::EditSpawnOriginY->setText("0"); + SXParticlesEditor::EditSpawnOriginZ->setText("0"); + SXParticlesEditor::EditSpawnOriginDisp->setText("0"); + SXParticlesEditor::CheckBoxSpawnOriginDispXPos->setCheck(false); + SXParticlesEditor::CheckBoxSpawnOriginDispXNeg->setCheck(false); + SXParticlesEditor::CheckBoxSpawnOriginDispYPos->setCheck(false); + SXParticlesEditor::CheckBoxSpawnOriginDispYNeg->setCheck(false); + SXParticlesEditor::CheckBoxSpawnOriginDispZPos->setCheck(false); + SXParticlesEditor::CheckBoxSpawnOriginDispZNeg->setCheck(false); + SXParticlesEditor::EditSpawnNextTime->setText("0"); + SXParticlesEditor::EditSpawnNextTimeDisp->setText("0"); } void SXParticlesEditor::TexVisible(bool visible) { - SXParticlesEditor::StaticTexture->Visible(visible); - SXParticlesEditor::EditTexture->Visible(visible); - SXParticlesEditor::ButtonTextureSel->Visible(visible); - SXParticlesEditor::StaticAnimTexCountCadrsX->Visible(visible); - SXParticlesEditor::StaticAnimTexCountCadrsY->Visible(visible); - SXParticlesEditor::EditAnimTexCountCadrsX->Visible(visible); - SXParticlesEditor::EditAnimTexCountCadrsY->Visible(visible); - SXParticlesEditor::StaticAnimTexRate->Visible(visible); - SXParticlesEditor::EditAnimTexRate->Visible(visible); - SXParticlesEditor::StaticAnimTexRateDisp->Visible(visible); - SXParticlesEditor::EditAnimTexRateDisp->Visible(visible); - SXParticlesEditor::StaticAnimTexStartCadr->Visible(visible); - SXParticlesEditor::EditAnimTexStartCadr->Visible(visible); - SXParticlesEditor::StaticAnimTexStartCadrDisp->Visible(visible); - SXParticlesEditor::EditAnimTexStartCadrDisp->Visible(visible); + SXParticlesEditor::StaticTexture->setVisible(visible); + SXParticlesEditor::EditTexture->setVisible(visible); + SXParticlesEditor::ButtonTextureSel->setVisible(visible); + SXParticlesEditor::StaticAnimTexCountCadrsX->setVisible(visible); + SXParticlesEditor::StaticAnimTexCountCadrsY->setVisible(visible); + SXParticlesEditor::EditAnimTexCountCadrsX->setVisible(visible); + SXParticlesEditor::EditAnimTexCountCadrsY->setVisible(visible); + SXParticlesEditor::StaticAnimTexRate->setVisible(visible); + SXParticlesEditor::EditAnimTexRate->setVisible(visible); + SXParticlesEditor::StaticAnimTexRateDisp->setVisible(visible); + SXParticlesEditor::EditAnimTexRateDisp->setVisible(visible); + SXParticlesEditor::StaticAnimTexStartCadr->setVisible(visible); + SXParticlesEditor::EditAnimTexStartCadr->setVisible(visible); + SXParticlesEditor::StaticAnimTexStartCadrDisp->setVisible(visible); + SXParticlesEditor::EditAnimTexStartCadrDisp->setVisible(visible); } void SXParticlesEditor::TexDataInit() @@ -496,52 +496,52 @@ void SXParticlesEditor::TexDataInit() char tmptex[SXGC_LOADTEX_MAX_SIZE_DIRNAME]; SPE_EmitterTextureGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, tmptex); - SXParticlesEditor::EditTexture->SetText(tmptex); - SXParticlesEditor::EditAnimTexCountCadrsX->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsX)).c_str()); - SXParticlesEditor::EditAnimTexCountCadrsY->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsY)).c_str()); - SXParticlesEditor::EditAnimTexRate->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRate)).c_str()); - SXParticlesEditor::EditAnimTexRateDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRateDisp)).c_str()); - SXParticlesEditor::EditAnimTexStartCadr->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadr)).c_str()); - SXParticlesEditor::EditAnimTexStartCadrDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadrDisp)).c_str()); + SXParticlesEditor::EditTexture->setText(tmptex); + SXParticlesEditor::EditAnimTexCountCadrsX->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsX)).c_str()); + SXParticlesEditor::EditAnimTexCountCadrsY->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexCountCadrsY)).c_str()); + SXParticlesEditor::EditAnimTexRate->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRate)).c_str()); + SXParticlesEditor::EditAnimTexRateDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexRateDisp)).c_str()); + SXParticlesEditor::EditAnimTexStartCadr->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadr)).c_str()); + SXParticlesEditor::EditAnimTexStartCadrDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AnimTexStartCadrDisp)).c_str()); } void SXParticlesEditor::TexNulling() { - SXParticlesEditor::EditTexture->SetText(""); - SXParticlesEditor::EditAnimTexCountCadrsX->SetText("0"); - SXParticlesEditor::EditAnimTexCountCadrsY->SetText("0"); - SXParticlesEditor::EditAnimTexRate->SetText("0"); - SXParticlesEditor::EditAnimTexRateDisp->SetText("0"); - SXParticlesEditor::EditAnimTexStartCadr->SetText("0"); - SXParticlesEditor::EditAnimTexStartCadrDisp->SetText("0"); + SXParticlesEditor::EditTexture->setText(""); + SXParticlesEditor::EditAnimTexCountCadrsX->setText("0"); + SXParticlesEditor::EditAnimTexCountCadrsY->setText("0"); + SXParticlesEditor::EditAnimTexRate->setText("0"); + SXParticlesEditor::EditAnimTexRateDisp->setText("0"); + SXParticlesEditor::EditAnimTexStartCadr->setText("0"); + SXParticlesEditor::EditAnimTexStartCadrDisp->setText("0"); } void SXParticlesEditor::VelocityAccVisible(bool visible) { - SXParticlesEditor::StaticVelocity->Visible(visible); - SXParticlesEditor::StaticVelocityX->Visible(visible); - SXParticlesEditor::EditVelocityX->Visible(visible); - SXParticlesEditor::StaticVelocityY->Visible(visible); - SXParticlesEditor::EditVelocityY->Visible(visible); - SXParticlesEditor::CheckBoxVelocityDispXNeg->Visible(visible); - SXParticlesEditor::StaticVelocityZ->Visible(visible); - SXParticlesEditor::EditVelocityZ->Visible(visible); - SXParticlesEditor::StaticVelocityDisp->Visible(visible); - SXParticlesEditor::EditVelocityDisp->Visible(visible); - SXParticlesEditor::CheckBoxVelocityDispYNeg->Visible(visible); - SXParticlesEditor::CheckBoxVelocityDispZNeg->Visible(visible); - SXParticlesEditor::StaticAcceleration->Visible(visible); - SXParticlesEditor::StaticAccelerationX->Visible(visible); - SXParticlesEditor::EditAccelerationX->Visible(visible); - SXParticlesEditor::StaticAccelerationY->Visible(visible); - SXParticlesEditor::EditAccelerationY->Visible(visible); - SXParticlesEditor::StaticAccelerationZ->Visible(visible); - SXParticlesEditor::EditAccelerationZ->Visible(visible); - SXParticlesEditor::StaticAccelerationDisp->Visible(visible); - SXParticlesEditor::EditAccelerationDisp->Visible(visible); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->Visible(visible); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->Visible(visible); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->Visible(visible); + SXParticlesEditor::StaticVelocity->setVisible(visible); + SXParticlesEditor::StaticVelocityX->setVisible(visible); + SXParticlesEditor::EditVelocityX->setVisible(visible); + SXParticlesEditor::StaticVelocityY->setVisible(visible); + SXParticlesEditor::EditVelocityY->setVisible(visible); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setVisible(visible); + SXParticlesEditor::StaticVelocityZ->setVisible(visible); + SXParticlesEditor::EditVelocityZ->setVisible(visible); + SXParticlesEditor::StaticVelocityDisp->setVisible(visible); + SXParticlesEditor::EditVelocityDisp->setVisible(visible); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setVisible(visible); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setVisible(visible); + SXParticlesEditor::StaticAcceleration->setVisible(visible); + SXParticlesEditor::StaticAccelerationX->setVisible(visible); + SXParticlesEditor::EditAccelerationX->setVisible(visible); + SXParticlesEditor::StaticAccelerationY->setVisible(visible); + SXParticlesEditor::EditAccelerationY->setVisible(visible); + SXParticlesEditor::StaticAccelerationZ->setVisible(visible); + SXParticlesEditor::EditAccelerationZ->setVisible(visible); + SXParticlesEditor::StaticAccelerationDisp->setVisible(visible); + SXParticlesEditor::EditAccelerationDisp->setVisible(visible); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setVisible(visible); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setVisible(visible); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setVisible(visible); } void SXParticlesEditor::VelocityDataInit() @@ -556,36 +556,36 @@ void SXParticlesEditor::VelocityDataInit() return; } - SXParticlesEditor::EditVelocityX->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.x)).c_str()); - SXParticlesEditor::EditVelocityY->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.y)).c_str()); - SXParticlesEditor::EditVelocityZ->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.z)).c_str()); - SXParticlesEditor::EditVelocityDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDisp)).c_str()); - SXParticlesEditor::CheckBoxVelocityDispYNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispYNeg)); - SXParticlesEditor::CheckBoxVelocityDispZNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispZNeg)); - SXParticlesEditor::CheckBoxVelocityDispXNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispXNeg)); - SXParticlesEditor::EditAccelerationX->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.x)).c_str()); - SXParticlesEditor::EditAccelerationY->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.y)).c_str()); - SXParticlesEditor::EditAccelerationZ->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.z)).c_str()); - SXParticlesEditor::EditAccelerationDisp->SetText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDisp)).c_str()); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispXNeg)); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispYNeg)); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->SetCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispZNeg)); + SXParticlesEditor::EditVelocityX->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.x)).c_str()); + SXParticlesEditor::EditVelocityY->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.y)).c_str()); + SXParticlesEditor::EditVelocityZ->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Velocity.z)).c_str()); + SXParticlesEditor::EditVelocityDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDisp)).c_str()); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispYNeg)); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispZNeg)); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, VelocityDispXNeg)); + SXParticlesEditor::EditAccelerationX->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.x)).c_str()); + SXParticlesEditor::EditAccelerationY->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.y)).c_str()); + SXParticlesEditor::EditAccelerationZ->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, Acceleration.z)).c_str()); + SXParticlesEditor::EditAccelerationDisp->setText(String(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDisp)).c_str()); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispXNeg)); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispYNeg)); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setCheck(SPE_EmitterGet(SXParticlesEditor::SelEffID, SXParticlesEditor::SelEmitterID, AccelerationDispZNeg)); } void SXParticlesEditor::VelocityAccNulling() { - SXParticlesEditor::EditVelocityX->SetText("0"); - SXParticlesEditor::EditVelocityY->SetText("0"); - SXParticlesEditor::EditVelocityZ->SetText("0"); - SXParticlesEditor::EditVelocityDisp->SetText("0"); - SXParticlesEditor::CheckBoxVelocityDispYNeg->SetCheck(false); - SXParticlesEditor::CheckBoxVelocityDispZNeg->SetCheck(false); - SXParticlesEditor::CheckBoxVelocityDispXNeg->SetCheck(false); - SXParticlesEditor::EditAccelerationX->SetText("0"); - SXParticlesEditor::EditAccelerationY->SetText("0"); - SXParticlesEditor::EditAccelerationZ->SetText("0"); - SXParticlesEditor::EditAccelerationDisp->SetText("0"); - SXParticlesEditor::CheckBoxAccelerationDispXNeg->SetCheck(false); - SXParticlesEditor::CheckBoxAccelerationDispYNeg->SetCheck(false); - SXParticlesEditor::CheckBoxAccelerationDispZNeg->SetCheck(false); + SXParticlesEditor::EditVelocityX->setText("0"); + SXParticlesEditor::EditVelocityY->setText("0"); + SXParticlesEditor::EditVelocityZ->setText("0"); + SXParticlesEditor::EditVelocityDisp->setText("0"); + SXParticlesEditor::CheckBoxVelocityDispYNeg->setCheck(false); + SXParticlesEditor::CheckBoxVelocityDispZNeg->setCheck(false); + SXParticlesEditor::CheckBoxVelocityDispXNeg->setCheck(false); + SXParticlesEditor::EditAccelerationX->setText("0"); + SXParticlesEditor::EditAccelerationY->setText("0"); + SXParticlesEditor::EditAccelerationZ->setText("0"); + SXParticlesEditor::EditAccelerationDisp->setText("0"); + SXParticlesEditor::CheckBoxAccelerationDispXNeg->setCheck(false); + SXParticlesEditor::CheckBoxAccelerationDispYNeg->setCheck(false); + SXParticlesEditor::CheckBoxAccelerationDispZNeg->setCheck(false); } \ No newline at end of file diff --git a/source/sxparticleseditor/sxparticleseditor.cpp b/source/sxparticleseditor/sxparticleseditor.cpp index 8c71d40c09d7f0d3adb6c4aab43ff8190c93c7d0..f03d24b4a35415a096dbba7af188c7f4f135fb09 100644 --- a/source/sxparticleseditor/sxparticleseditor.cpp +++ b/source/sxparticleseditor/sxparticleseditor.cpp @@ -4,9 +4,9 @@ Copyright © Vitaliy Buturlin, Evgeny Danilovich, 2017 See the license in LICENSE ******************************************************/ -/*! -\file -Главный файл редактора партиклов SXParticlesEditor +/*! +\file +Главный файл редактора партиклов SXParticlesEditor */ /*! @@ -238,8 +238,7 @@ Cone: Vector1 x y z – нижняя точка конуса, w – радиус int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { SkyXEngine_PreviewCreate(); - SXGUIRegClass::RegGroupBox(); - SXGUIRegClass::RegButtonImg(); + SXGUIinit(); srand((unsigned int)time(0)); SXParticlesEditor::InitAllElements(); @@ -253,15 +252,16 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin GData::WinSize.x = winrndrect.right; GData::WinSize.y = winrndrect.bottom;*/ - SkyXEngine_Init(SXParticlesEditor::WindowRender->GetHWND(), SXParticlesEditor::JobWindow->GetHWND()); + SkyXEngine_Init(SXParticlesEditor::WindowRender->getHWND(), SXParticlesEditor::JobWindow->getHWND()); + SkyXEngine_RunGenPreview(); Core_0SetCVarInt("r_final_image",DS_RT_COLOR); - SRender_GetCamera()->SetPosition(&float3(0, 0.5, -2)); - SXParticlesEditor::MainMenu->CheckItem(ID_VIEW_GRID, true); - SXParticlesEditor::MainMenu->CheckItem(ID_VIEW_AXES, true); - SXParticlesEditor::MainMenu->CheckItem(ID_VIEW_BOUND, true); - SXParticlesEditor::CheckBoxTBGrid->SetCheck(true); - SXParticlesEditor::CheckBoxTBAxes->SetCheck(true); - SXParticlesEditor::CheckBoxTBBound->SetCheck(true); + SRender_GetCamera()->setPosition(&float3(0, 0.5, -2)); + SXParticlesEditor::MainMenu->setCheckItem(ID_VIEW_GRID, true); + SXParticlesEditor::MainMenu->setCheckItem(ID_VIEW_AXES, true); + SXParticlesEditor::MainMenu->setCheckItem(ID_VIEW_BOUND, true); + SXParticlesEditor::CheckBoxTBGrid->setCheck(true); + SXParticlesEditor::CheckBoxTBAxes->setCheck(true); + SXParticlesEditor::CheckBoxTBBound->setCheck(true); SRender_EditorSetRenderGrid(true); SRender_EditorSetRenderAxesStatic(true); SXParticlesEditor::canRenderBound = true; @@ -269,12 +269,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin SXParticlesEditor::PEcreateData(); - SGCore_LoadTexLoadTextures(); + SGCore_LoadTexAllLoad(); SXParticlesEditor::EffInitList(); SkyXEngine_PreviewKill(); - SXParticlesEditor::JobWindow->Visible(true); + SXParticlesEditor::JobWindow->setVisible(true); int result = SkyXEngine_CycleMain(); SkyXEngine_Kill(); diff --git a/source/sxparticleseditor/sxparticleseditor.rc b/source/sxparticleseditor/sxparticleseditor.rc index bdaf4f39b3ce1e053335ec4edec57730896d759e..b3a89999ec37914dc8e7d0805ec6fff798b8d94d 100644 Binary files a/source/sxparticleseditor/sxparticleseditor.rc and b/source/sxparticleseditor/sxparticleseditor.rc differ diff --git a/source/sxwincreator/WindowOutput.cpp b/source/sxwincreator/WindowOutput.cpp index 5328af1c45a807f747af46a18c717e929444ebb4..20d56a821ac30302ab3791777939c2785b86c63b 100644 --- a/source/sxwincreator/WindowOutput.cpp +++ b/source/sxwincreator/WindowOutput.cpp @@ -1,7 +1,5 @@ -extern LRESULT MinimuzeWinInsteadClose(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -extern void OutputInFile(const char* path,const char* name_space,bool in_ns,bool constructors,bool destructors,bool comments,bool include); - +#include "WindowOutput.h" namespace SXNameSapce { @@ -27,26 +25,26 @@ namespace SXNameSapce LRESULT StartButClick(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { char PathForFile[1024]; - SXNameSapce::PathForFile->GetText(PathForFile,1024); + SXNameSapce::PathForFile->getText(PathForFile,1024); if(strstr(PathForFile,":\\")) { char name_space[64]; bool in_ns,constructors,destructors,comments,include; - SXNameSapce::SXNameSpace->GetText(name_space,64); - in_ns = SXNameSapce::DetectedNameSpace->GetCheck() == 1 ? true : false; - constructors = SXNameSapce::Constructors->GetCheck() == 1 ? true : false; - destructors = SXNameSapce::Destructors->GetCheck() == 1 ? true : false; - comments = SXNameSapce::Comments->GetCheck() == 1 ? true : false; - include = SXNameSapce::Inlude->GetCheck() == 1 ? true : false; + SXNameSapce::SXNameSpace->getText(name_space,64); + in_ns = SXNameSapce::DetectedNameSpace->getCheck() == 1 ? true : false; + constructors = SXNameSapce::Constructors->getCheck() == 1 ? true : false; + destructors = SXNameSapce::Destructors->getCheck() == 1 ? true : false; + comments = SXNameSapce::Comments->getCheck() == 1 ? true : false; + include = SXNameSapce::Inlude->getCheck() == 1 ? true : false; OutputInFile(PathForFile,name_space,in_ns,constructors,destructors,comments,include); MessageBox(0,"Output in file is completed! Check result","Completed",MB_TASKMODAL); - SXNameSapce::OutputGUIInFile->Visible(false); - SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); - SetActiveWindow(SXMainWndElem::MainWnd->GetHWND()); + SXNameSapce::OutputGUIInFile->setVisible(false); + SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); + SetActiveWindow(SXMainWndElem::MainWnd->getHWND()); } else MessageBox(0,"Make sure the path to the output file!",0,MB_TASKMODAL); @@ -77,19 +75,19 @@ LRESULT SelectButClick(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; //InLog("%s","������������ ���� � ����� ����������� ���� ���������� ����� ..."); - /*SXMainWndElem::MainWnd->Enable(false); - SXMainWndElem::JobMainWnd->Enable(false); - SXMainWndElem::ParamWnd->Enable(false); - SXMainWndElem::WndLog->Enable(false);*/ + /*SXMainWndElem::MainWnd->setEnable(false); + SXMainWndElem::JobMainWnd->setEnable(false); + SXMainWndElem::ParamWnd->setEnable(false); + SXMainWndElem::WndLog->setEnable(false);*/ if(GetSaveFileName(&ofn) == TRUE) { - SXNameSapce::PathForFile->SetText(szFileName); + SXNameSapce::PathForFile->setText(szFileName); } - /*SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); - SetActiveWindow(SXMainWndElem::MainWnd->GetHWND());*/ + /*SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); + SetActiveWindow(SXMainWndElem::MainWnd->getHWND());*/ //InLog("%s","����� ����������� ���� ���������� ����� ������� ��������, ��������� ����"); return 0; @@ -98,11 +96,11 @@ LRESULT SelectButClick(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT HideSettingsWndClose(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ShowWindow(hwnd,SW_HIDE); - SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); - SetActiveWindow(SXMainWndElem::MainWnd->GetHWND()); + SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); + SetActiveWindow(SXMainWndElem::MainWnd->getHWND()); return 0; } @@ -111,72 +109,72 @@ void SXNameSapce::InitAllElements() RECT wrect; SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); - SXNameSapce::OutputGUIInFile = SXGUICrBaseWnd("OutputGUIInFile", "OutputGUIInFile", 0, 0, ((wrect.right / 2) - 170), ((wrect.bottom / 2) - 115), 340, 230, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_OVERLAPPED, 0, WndProcAllDefault); - SXGUIBaseHandlers::InitHandlerMsg(SXNameSapce::OutputGUIInFile); - SXNameSapce::OutputGUIInFile->AddHandler(HideSettingsWndClose,WM_CLOSE,0,0,0,0,true); - SXNameSapce::NameSpace = SXGUICrStatic("NameSpace", 13, 13, 100, 20, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0); - SXNameSapce::NameSpace->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::NameSpace->SetColorText(0,0,0); - SXNameSapce::NameSpace->SetColorTextBk(255,255,255); - SXNameSapce::NameSpace->SetTransparentTextBk(true); - SXNameSapce::NameSpace->SetColorBrush(220,220,220); - SXNameSapce::SXNameSpace = SXGUICrEdit("SXNameSpace", 119, 11, 199, 20, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0); - SXNameSapce::SXNameSpace->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::SXNameSpace->SetColorText(0,0,0); - SXNameSapce::SXNameSpace->SetColorTextBk(255,255,255); - SXNameSapce::SXNameSpace->SetTransparentTextBk(true); - SXNameSapce::SXNameSpace->SetColorBrush(255,255,255); - SXNameSapce::Constructors = SXGUICrCheckBox("Constructors", 15, 60, 100, 20, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0, false); - SXNameSapce::Constructors->SetCheck(SXGUI_CHECKBOX_CHECKED); - SXNameSapce::Constructors->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::Constructors->SetColorText(0,0,0); - SXNameSapce::Constructors->SetColorTextBk(255,255,255); - SXNameSapce::Constructors->SetTransparentTextBk(true); - SXNameSapce::Constructors->SetColorBrush(220,220,220); - SXNameSapce::Destructors = SXGUICrCheckBox("Destructors", 15, 80, 100, 20, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0, false); - SXNameSapce::Destructors->SetCheck(SXGUI_CHECKBOX_CHECKED); - SXNameSapce::Destructors->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::Destructors->SetColorText(0,0,0); - SXNameSapce::Destructors->SetColorTextBk(255,255,255); - SXNameSapce::Destructors->SetTransparentTextBk(true); - SXNameSapce::Destructors->SetColorBrush(220,220,220); - SXNameSapce::Comments = SXGUICrCheckBox("Comments", 15, 100, 100, 20, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0, false); - SXNameSapce::Comments->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::Comments->SetColorText(0,0,0); - SXNameSapce::Comments->SetColorTextBk(255,255,255); - SXNameSapce::Comments->SetTransparentTextBk(true); - SXNameSapce::Comments->SetColorBrush(220,220,220); - SXNameSapce::Inlude = SXGUICrCheckBox("Inlude", 15, 120, 125, 20, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0, false); - SXNameSapce::Inlude->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::Inlude->SetColorText(0,0,0); - SXNameSapce::Inlude->SetColorTextBk(255,255,255); - SXNameSapce::Inlude->SetTransparentTextBk(true); - SXNameSapce::Inlude->SetColorBrush(220,220,220); - SXNameSapce::DetectedNameSpace = SXGUICrCheckBox("In Name Space", 15, 40, 100, 20, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0, false); - SXNameSapce::DetectedNameSpace->SetCheck(SXGUI_CHECKBOX_CHECKED); - SXNameSapce::DetectedNameSpace->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::DetectedNameSpace->SetColorText(0,0,0); - SXNameSapce::DetectedNameSpace->SetColorTextBk(255,255,255); - SXNameSapce::DetectedNameSpace->SetTransparentTextBk(true); - SXNameSapce::DetectedNameSpace->SetColorBrush(220,220,220); - SXNameSapce::SaveFile = SXGUICrStatic("SaveFile", 7, 161, 58, 16, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0); - SXNameSapce::SaveFile->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::SaveFile->SetColorText(0,0,0); - SXNameSapce::SaveFile->SetColorTextBk(255,255,255); - SXNameSapce::SaveFile->SetTransparentTextBk(true); - SXNameSapce::SaveFile->SetColorBrush(220,220,220); - SXNameSapce::PathForFile = SXGUICrEdit("PathForFile", 61, 159, 233, 20, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0); - SXNameSapce::PathForFile->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::PathForFile->SetColorText(0,0,0); - SXNameSapce::PathForFile->SetColorTextBk(255,255,255); - SXNameSapce::PathForFile->SetTransparentTextBk(true); - SXNameSapce::PathForFile->SetColorBrush(255,255,255); - SXNameSapce::ButtonSelectFile = SXGUICrButton("...", 298, 159, 23, 19, SXGUI_BUTTON_IMAGE_NONE, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0); - SXNameSapce::ButtonSelectFile->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::ButtonSelectFile->AddHandler(SelectButClick,WM_LBUTTONUP); - SXNameSapce::StartOutput = SXGUICrButton("Start output", 160, 51, 134, 77, SXGUI_BUTTON_IMAGE_NONE, SXNameSapce::OutputGUIInFile->GetHWND(), 0, 0); - SXNameSapce::StartOutput->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - SXNameSapce::StartOutput->AddHandler(StartButClick,WM_LBUTTONUP); + SXNameSapce::OutputGUIInFile = SXGUICrBaseWndEx("OutputGUIInFile", "OutputGUIInFile", ((wrect.right / 2) - 170), ((wrect.bottom / 2) - 115), 340, 230, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_OVERLAPPED, 0, WndProcAllDefault); + gui_func::base_handlers::InitHandlerMsg(SXNameSapce::OutputGUIInFile); + SXNameSapce::OutputGUIInFile->addHandler(HideSettingsWndClose,WM_CLOSE,0,0,0,0,true); + SXNameSapce::NameSpace = SXGUICrStatic("NameSpace", 13, 13, 100, 20, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0); + SXNameSapce::NameSpace->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::NameSpace->setColorText(RGB(0, 0, 0)); + SXNameSapce::NameSpace->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::NameSpace->setTransparentTextBk(true); + SXNameSapce::NameSpace->setColorBrush(RGB(220, 220, 220)); + SXNameSapce::SXNameSpace = SXGUICrEdit("SXNameSpace", 119, 11, 199, 20, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0); + SXNameSapce::SXNameSpace->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::SXNameSpace->setColorText(RGB(0, 0, 0)); + SXNameSapce::SXNameSpace->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::SXNameSpace->setTransparentTextBk(true); + SXNameSapce::SXNameSpace->setColorBrush(RGB(255, 255, 255)); + SXNameSapce::Constructors = SXGUICrCheckBox("Constructors", 15, 60, 100, 20, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0, false); + SXNameSapce::Constructors->setCheck(SXGUI_CHECKBOX_STATE_CHECKED); + SXNameSapce::Constructors->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::Constructors->setColorText(RGB(0, 0, 0)); + SXNameSapce::Constructors->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::Constructors->setTransparentTextBk(true); + SXNameSapce::Constructors->setColorBrush(RGB(220, 220, 220)); + SXNameSapce::Destructors = SXGUICrCheckBox("Destructors", 15, 80, 100, 20, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0, false); + SXNameSapce::Destructors->setCheck(SXGUI_CHECKBOX_STATE_CHECKED); + SXNameSapce::Destructors->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::Destructors->setColorText(RGB(0, 0, 0)); + SXNameSapce::Destructors->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::Destructors->setTransparentTextBk(true); + SXNameSapce::Destructors->setColorBrush(RGB(220, 220, 220)); + SXNameSapce::Comments = SXGUICrCheckBox("Comments", 15, 100, 100, 20, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0, false); + SXNameSapce::Comments->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::Comments->setColorText(RGB(0, 0, 0)); + SXNameSapce::Comments->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::Comments->setTransparentTextBk(true); + SXNameSapce::Comments->setColorBrush(RGB(220, 220, 220)); + SXNameSapce::Inlude = SXGUICrCheckBox("Inlude", 15, 120, 125, 20, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0, false); + SXNameSapce::Inlude->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::Inlude->setColorText(RGB(0, 0, 0)); + SXNameSapce::Inlude->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::Inlude->setTransparentTextBk(true); + SXNameSapce::Inlude->setColorBrush(RGB(220, 220, 220)); + SXNameSapce::DetectedNameSpace = SXGUICrCheckBox("In Name Space", 15, 40, 100, 20, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0, false); + SXNameSapce::DetectedNameSpace->setCheck(SXGUI_CHECKBOX_STATE_CHECKED); + SXNameSapce::DetectedNameSpace->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::DetectedNameSpace->setColorText(RGB(0, 0, 0)); + SXNameSapce::DetectedNameSpace->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::DetectedNameSpace->setTransparentTextBk(true); + SXNameSapce::DetectedNameSpace->setColorBrush(RGB(220, 220, 220)); + SXNameSapce::SaveFile = SXGUICrStatic("SaveFile", 7, 161, 58, 16, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0); + SXNameSapce::SaveFile->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::SaveFile->setColorText(RGB(0, 0, 0)); + SXNameSapce::SaveFile->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::SaveFile->setTransparentTextBk(true); + SXNameSapce::SaveFile->setColorBrush(RGB(220, 220, 220)); + SXNameSapce::PathForFile = SXGUICrEdit("PathForFile", 61, 159, 233, 20, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0); + SXNameSapce::PathForFile->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::PathForFile->setColorText(RGB(0, 0, 0)); + SXNameSapce::PathForFile->setColorTextBk(RGB(255, 255, 255)); + SXNameSapce::PathForFile->setTransparentTextBk(true); + SXNameSapce::PathForFile->setColorBrush(RGB(255,255,255)); + SXNameSapce::ButtonSelectFile = SXGUICrButton("...", 298, 159, 23, 19, SXGUI_BUTTON_IMAGE_NONE, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0); + SXNameSapce::ButtonSelectFile->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::ButtonSelectFile->addHandler(SelectButClick,WM_LBUTTONUP); + SXNameSapce::StartOutput = SXGUICrButton("Start output", 160, 51, 134, 77, SXGUI_BUTTON_IMAGE_NONE, SXNameSapce::OutputGUIInFile->getHWND(), 0, 0); + SXNameSapce::StartOutput->setFont("MS Shell Dlg",-11,0,400,0,0,0); + SXNameSapce::StartOutput->addHandler(StartButClick,WM_LBUTTONUP); } void SXNameSapce::DeleteAllElements() { diff --git a/source/sxwincreator/WindowOutput.h b/source/sxwincreator/WindowOutput.h new file mode 100644 index 0000000000000000000000000000000000000000..e43de94539bc1f27b7f0a9d446f1c123948ee811 --- /dev/null +++ b/source/sxwincreator/WindowOutput.h @@ -0,0 +1,37 @@ + +#ifndef __WINDOW_OUTPUT_H +#define __WINDOW_OUTPUT_H + +#include <windows.h> +#include <SXGUIWinApi/sxgui.h> +#include "sxwincreator.h" +#include "sx_param_wnd_data.h" + +namespace SXNameSapce +{ + extern ISXGUIBaseWnd* OutputGUIInFile; + extern ISXGUIStatic* NameSpace; + extern ISXGUIEdit* SXNameSpace; + extern ISXGUICheckBox* Constructors; + extern ISXGUICheckBox* Destructors; + extern ISXGUICheckBox* Comments; + extern ISXGUICheckBox* Inlude; + extern ISXGUICheckBox* DetectedNameSpace; + extern ISXGUIStatic* SaveFile; + extern ISXGUIEdit* PathForFile; + extern ISXGUIButton* ButtonSelectFile; + extern ISXGUIButton* StartOutput; + + void InitAllElements(); + + void DeleteAllElements(); + +}; + +LRESULT StartButClick(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT SelectButClick(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT HideSettingsWndClose(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +#endif \ No newline at end of file diff --git a/source/sxwincreator/about_sxwincreator.cpp b/source/sxwincreator/about_sxwincreator.cpp index 34012792566a1d07ac6970c046d5a34706eacc5c..94339a23579371e2c6f19ac375748fe4755d9847 100644 --- a/source/sxwincreator/about_sxwincreator.cpp +++ b/source/sxwincreator/about_sxwincreator.cpp @@ -1,4 +1,6 @@ +#include "about_sxwincreator.h" + namespace AboutSXWinCreator { ISXGUIBaseWnd* JobWindow; @@ -18,11 +20,11 @@ namespace AboutSXWinCreator LRESULT HideAboutWndClose(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ShowWindow(hwnd,SW_HIDE); - SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); - SetActiveWindow(SXMainWndElem::MainWnd->GetHWND()); + SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); + SetActiveWindow(SXMainWndElem::MainWnd->getHWND()); return 0; } @@ -31,53 +33,53 @@ void AboutSXWinCreator::InitAllElements() RECT wrect; SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); - AboutSXWinCreator::JobWindow = SXGUICrBaseWnd("About_SXWinCreator","About_SXWinCreator",0,0,((wrect.right/2) - 160),((wrect.bottom/2) - 100),320,200,0,0,CreateSolidBrush(RGB(220,220,220)),0,CS_HREDRAW | CS_VREDRAW,WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_OVERLAPPED,0,WndProcAllDefault); - SXGUIBaseHandlers::InitHandlerMsg(AboutSXWinCreator::JobWindow); - AboutSXWinCreator::JobWindow->AddHandler(HideAboutWndClose,WM_CLOSE,0,0,0,0,true); - AboutSXWinCreator::StaticVerWinCreatorText = SXGUICrStatic("Current version of SXWinCreator: ", 20, 54, 163, 15, AboutSXWinCreator::JobWindow->GetHWND(), 0, 0); - AboutSXWinCreator::StaticVerWinCreatorText->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - AboutSXWinCreator::StaticVerWinCreatorText->SetColorText(0,0,0); - AboutSXWinCreator::StaticVerWinCreatorText->SetColorTextBk(255,255,255); - AboutSXWinCreator::StaticVerWinCreatorText->SetTransparentTextBk(true); - AboutSXWinCreator::StaticVerWinCreatorText->SetColorBrush(220,220,220); - AboutSXWinCreator::StaticThisIs = SXGUICrStatic("SXWinCreator - program for the creation of elements WinAPI with library SXGUIWinApi", 48, 10, 210, 30, AboutSXWinCreator::JobWindow->GetHWND(), 0, 0); - AboutSXWinCreator::StaticThisIs->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - AboutSXWinCreator::StaticThisIs->SetColorText(0,0,0); - AboutSXWinCreator::StaticThisIs->SetColorTextBk(255,255,255); - AboutSXWinCreator::StaticThisIs->SetTransparentTextBk(true); - AboutSXWinCreator::StaticThisIs->SetColorBrush(220,220,220); - AboutSXWinCreator::StaticVerGuiWinApiText = SXGUICrStatic("Current version of SXGUIWinapi:", 20, 74, 162, 15, AboutSXWinCreator::JobWindow->GetHWND(), 0, 0); - AboutSXWinCreator::StaticVerGuiWinApiText->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - AboutSXWinCreator::StaticVerGuiWinApiText->SetColorText(0,0,0); - AboutSXWinCreator::StaticVerGuiWinApiText->SetColorTextBk(255,255,255); - AboutSXWinCreator::StaticVerGuiWinApiText->SetTransparentTextBk(true); - AboutSXWinCreator::StaticVerGuiWinApiText->SetColorBrush(220,220,220); - AboutSXWinCreator::DevelodepBy = SXGUICrStatic("Developed by the Project S.I.P", 46, 121, 222, 26, AboutSXWinCreator::JobWindow->GetHWND(), 0, 0); - AboutSXWinCreator::DevelodepBy->SetFont("Microsoft Sans Serif",-16,0,400,0,0,0); - AboutSXWinCreator::DevelodepBy->SetColorText(0,0,0); - AboutSXWinCreator::DevelodepBy->SetColorTextBk(220,220,220); - AboutSXWinCreator::DevelodepBy->SetTransparentTextBk(true); - AboutSXWinCreator::DevelodepBy->SetColorBrush(220,220,220); - AboutSXWinCreator::StaticVerWinCreatorVer = SXGUICrStatic("0.9.0", 185, 54, 100, 15, AboutSXWinCreator::JobWindow->GetHWND(), 0, 0); - AboutSXWinCreator::StaticVerWinCreatorVer->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - AboutSXWinCreator::StaticVerWinCreatorVer->SetColorText(0,0,0); - AboutSXWinCreator::StaticVerWinCreatorVer->SetColorTextBk(255,255,255); - AboutSXWinCreator::StaticVerWinCreatorVer->SetTransparentTextBk(true); - AboutSXWinCreator::StaticVerWinCreatorVer->SetColorBrush(220,220,220); - AboutSXWinCreator::StaticVerGUIWinApiVer = SXGUICrStatic("0.9.81", 185, 74, 100, 15, AboutSXWinCreator::JobWindow->GetHWND(), 0, 0); - AboutSXWinCreator::StaticVerGUIWinApiVer->SetFont("MS Shell Dlg",-11,0,400,0,0,0); - AboutSXWinCreator::StaticVerGUIWinApiVer->SetColorText(0,0,0); - AboutSXWinCreator::StaticVerGUIWinApiVer->SetColorTextBk(255,255,255); - AboutSXWinCreator::StaticVerGUIWinApiVer->SetTransparentTextBk(true); - AboutSXWinCreator::StaticVerGUIWinApiVer->SetColorBrush(220,220,220); + AboutSXWinCreator::JobWindow = SXGUICrBaseWndEx("About_SXWinCreator","About_SXWinCreator",((wrect.right/2) - 160),((wrect.bottom/2) - 100),320,200,0,0,CreateSolidBrush(RGB(220,220,220)),0,CS_HREDRAW | CS_VREDRAW,WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_OVERLAPPED,0,WndProcAllDefault); + gui_func::base_handlers::InitHandlerMsg(AboutSXWinCreator::JobWindow); + AboutSXWinCreator::JobWindow->addHandler(HideAboutWndClose,WM_CLOSE,0,0,0,0,true); + AboutSXWinCreator::StaticVerWinCreatorText = SXGUICrStatic("Current version of SXWinCreator: ", 20, 54, 163, 15, AboutSXWinCreator::JobWindow->getHWND(), 0, 0); + AboutSXWinCreator::StaticVerWinCreatorText->setFont("MS Shell Dlg",-11,0,400,0,0,0); + AboutSXWinCreator::StaticVerWinCreatorText->setColorText(RGB(0, 0, 0)); + AboutSXWinCreator::StaticVerWinCreatorText->setColorTextBk(RGB(255, 255, 255)); + AboutSXWinCreator::StaticVerWinCreatorText->setTransparentTextBk(true); + AboutSXWinCreator::StaticVerWinCreatorText->setColorBrush(RGB(220, 220, 220)); + AboutSXWinCreator::StaticThisIs = SXGUICrStatic("SXWinCreator - program for the creation of elements WinAPI with library SXGUIWinApi", 48, 10, 210, 30, AboutSXWinCreator::JobWindow->getHWND(), 0, 0); + AboutSXWinCreator::StaticThisIs->setFont("MS Shell Dlg",-11,0,400,0,0,0); + AboutSXWinCreator::StaticThisIs->setColorText(RGB(0, 0, 0)); + AboutSXWinCreator::StaticThisIs->setColorTextBk(RGB(255, 255, 255)); + AboutSXWinCreator::StaticThisIs->setTransparentTextBk(true); + AboutSXWinCreator::StaticThisIs->setColorBrush(RGB(220, 220, 220)); + AboutSXWinCreator::StaticVerGuiWinApiText = SXGUICrStatic("Current version of SXGUIWinapi:", 20, 74, 162, 15, AboutSXWinCreator::JobWindow->getHWND(), 0, 0); + AboutSXWinCreator::StaticVerGuiWinApiText->setFont("MS Shell Dlg",-11,0,400,0,0,0); + AboutSXWinCreator::StaticVerGuiWinApiText->setColorText(RGB(0, 0, 0)); + AboutSXWinCreator::StaticVerGuiWinApiText->setColorTextBk(RGB(255, 255, 255)); + AboutSXWinCreator::StaticVerGuiWinApiText->setTransparentTextBk(true); + AboutSXWinCreator::StaticVerGuiWinApiText->setColorBrush(RGB(220, 220, 220)); + AboutSXWinCreator::DevelodepBy = SXGUICrStatic("Developed by the Project S.I.P", 46, 121, 222, 26, AboutSXWinCreator::JobWindow->getHWND(), 0, 0); + AboutSXWinCreator::DevelodepBy->setFont("Microsoft Sans Serif",-16,0,400,0,0,0); + AboutSXWinCreator::DevelodepBy->setColorText(RGB(0, 0, 0)); + AboutSXWinCreator::DevelodepBy->setColorTextBk(RGB(220, 220, 220)); + AboutSXWinCreator::DevelodepBy->setTransparentTextBk(true); + AboutSXWinCreator::DevelodepBy->setColorBrush(RGB(220, 220, 220)); + AboutSXWinCreator::StaticVerWinCreatorVer = SXGUICrStatic("0.9.0", 185, 54, 100, 15, AboutSXWinCreator::JobWindow->getHWND(), 0, 0); + AboutSXWinCreator::StaticVerWinCreatorVer->setFont("MS Shell Dlg",-11,0,400,0,0,0); + AboutSXWinCreator::StaticVerWinCreatorVer->setColorText(RGB(0, 0, 0)); + AboutSXWinCreator::StaticVerWinCreatorVer->setColorTextBk(RGB(255, 255, 255)); + AboutSXWinCreator::StaticVerWinCreatorVer->setTransparentTextBk(true); + AboutSXWinCreator::StaticVerWinCreatorVer->setColorBrush(RGB(220, 220, 220)); + AboutSXWinCreator::StaticVerGUIWinApiVer = SXGUICrStatic("0.9.81", 185, 74, 100, 15, AboutSXWinCreator::JobWindow->getHWND(), 0, 0); + AboutSXWinCreator::StaticVerGUIWinApiVer->setFont("MS Shell Dlg",-11,0,400,0,0,0); + AboutSXWinCreator::StaticVerGUIWinApiVer->setColorText(RGB(0, 0, 0)); + AboutSXWinCreator::StaticVerGUIWinApiVer->setColorTextBk(RGB(255, 255, 255)); + AboutSXWinCreator::StaticVerGUIWinApiVer->setTransparentTextBk(true); + AboutSXWinCreator::StaticVerGUIWinApiVer->setColorBrush(RGB(220,220,220)); } void AboutSXWinCreator::DeleteAllElements() { - SX_SAFE_DELETE(AboutSXWinCreator::JobWindow); - SX_SAFE_DELETE(AboutSXWinCreator::StaticVerWinCreatorText); - SX_SAFE_DELETE(AboutSXWinCreator::StaticThisIs); - SX_SAFE_DELETE(AboutSXWinCreator::StaticVerGuiWinApiText); - SX_SAFE_DELETE(AboutSXWinCreator::DevelodepBy); - SX_SAFE_DELETE(AboutSXWinCreator::StaticVerWinCreatorVer); - SX_SAFE_DELETE(AboutSXWinCreator::StaticVerGUIWinApiVer); + mem_delete(AboutSXWinCreator::JobWindow); + mem_delete(AboutSXWinCreator::StaticVerWinCreatorText); + mem_delete(AboutSXWinCreator::StaticThisIs); + mem_delete(AboutSXWinCreator::StaticVerGuiWinApiText); + mem_delete(AboutSXWinCreator::DevelodepBy); + mem_delete(AboutSXWinCreator::StaticVerWinCreatorVer); + mem_delete(AboutSXWinCreator::StaticVerGUIWinApiVer); } diff --git a/source/sxwincreator/about_sxwincreator.h b/source/sxwincreator/about_sxwincreator.h new file mode 100644 index 0000000000000000000000000000000000000000..d6bd9fe09566eb0d60ff1963eb60ac95146adaca --- /dev/null +++ b/source/sxwincreator/about_sxwincreator.h @@ -0,0 +1,29 @@ + +#ifndef __ABOUT_SXWINCREATOR_H +#define __ABOUT_SXWINCREATOR_H + +#include <SXGUIWinApi/sxgui.h> +#include "sxwincreator.h" + +namespace AboutSXWinCreator +{ + extern ISXGUIBaseWnd* JobWindow; + extern ISXGUIStatic* StaticVerWinCreatorText; + extern ISXGUIStatic* StaticThisIs; + extern ISXGUIStatic* StaticVerGuiWinApiText; + extern ISXGUIStatic* DevelodepBy; + extern ISXGUIStatic* StaticVerWinCreatorVer; + extern ISXGUIStatic* StaticVerGUIWinApiVer; + + void InitAllElements(); + + void DeleteAllElements(); +}; + +LRESULT HideAboutWndClose(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +void AboutSXWinCreator::InitAllElements(); + +void AboutSXWinCreator::DeleteAllElements(); + +#endif \ No newline at end of file diff --git a/source/sxwincreator/callbacks.cpp b/source/sxwincreator/callbacks.cpp index 22362fd8a0940a9432b2d9fa2bf45d057ac14ed7..e87cd4a2c0bcdd953d14b58004f076d9b9155d12 100644 --- a/source/sxwincreator/callbacks.cpp +++ b/source/sxwincreator/callbacks.cpp @@ -1,5 +1,5 @@ -#pragma once +#include "callbacks.h" LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { @@ -34,12 +34,12 @@ LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar }*/ //���� ����� ������������ � ������ ������ ������ ��� ����������� - if(msg == WM_MOUSEMOVE && SXMainWndElem::NumActiveElement != -1 && SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHWND() == hwnd) + if(msg == WM_MOUSEMOVE && SXMainWndElem::NumActiveElement != -1 && SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHWND() == hwnd) { POINT global_pos_cursor; GetCursorPos(&global_pos_cursor); RECT grect; - Component->GetWinRect(&grect); + Component->getWinRect(&grect); //���� �� ��������� �������� ����������� if(HowComDown != 0 && WhereResize == -1) { @@ -126,7 +126,7 @@ LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar else { RECT rect; - Component->GetClientRect(&rect); + Component->getClientRect(&rect); if(HowComDown == 1) { @@ -205,7 +205,7 @@ LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar rect.left += moveX; rect.right += moveX; } - bool bf = Component->SetClientRect(&rect,true); + bool bf = Component->setClientRect(&rect,true); LastPosCursor = global_pos_cursor; InvalidateRect(hwnd,0,1); @@ -238,13 +238,13 @@ LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar { for(int i=0;i<SXMainWndElem::CreateElements.size();i++) { - if(hwnd == SXMainWndElem::CreateElements[i]->Object->GetHWND()) + if(hwnd == SXMainWndElem::CreateElements[i]->Object->getHWND()) { SXMainWndElem::NumActiveElement = i; - SXMainWndElem::ListBoxAllElements->SetSel(i); + SXMainWndElem::ListBoxAllElements->setSel(i); //break; } - InvalidateRect(SXMainWndElem::CreateElements[i]->Object->GetHWND(),0,1); + InvalidateRect(SXMainWndElem::CreateElements[i]->Object->getHWND(),0,1); } if (SXMainWndElem::NumActiveElement != -1) @@ -260,14 +260,14 @@ LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar //� ���� �������� ������� //� ��� ���� ������ ��� ��������� � ���� ��������� ������� //�� ������������ ��� ����� - else if(msg == WM_PAINT && SXMainWndElem::NumActiveElement != -1 && SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHWND() == hwnd) + else if(msg == WM_PAINT && SXMainWndElem::NumActiveElement != -1 && SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHWND() == hwnd) { if (strcmp(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName, "SXGUIButtonImg") == 0) WndProcButtonImgDefault(hwnd, msg, wParam, lParam); else if (strcmp(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName, "SXGUIGroupBox") == 0) WndProcGroupBoxPaint(hwnd, msg, wParam, lParam); else - CallWindowProc(Component->OldProc,hwnd, msg, wParam, lParam); + CallWindowProc(Component->getPrevWndProc(),hwnd, msg, wParam, lParam); HDC hdcp = GetDC(hwnd); RECT clrect; @@ -298,11 +298,11 @@ LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar else if (strcmp(ClassName, "SXGUIGROUPBOX") == 0) WndProcGroupBoxPaint(hwnd, msg, wParam, lParam); else - CallWindowProc(Component->OldProc, hwnd, msg, wParam, lParam); + CallWindowProc(Component->getPrevWndProc(), hwnd, msg, wParam, lParam); return 1; } - return CallWindowProc(Component->OldProc, hwnd, msg, wParam, lParam); + return CallWindowProc(Component->getPrevWndProc(), hwnd, msg, wParam, lParam); } LRESULT WndProcChildJob2(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -329,7 +329,7 @@ BOOL CALLBACK GroupBoxLButtonDown(HWND hwnd,LPARAM lParam) if(((p.x >= rect.left && p.x <= rect.right) && (p.y >= rect.top && p.y <= rect.bottom))) { - SendMessage(Component->GetHWND(),WM_LBUTTONDOWN,0,lParam); + SendMessage(Component->getHWND(),WM_LBUTTONDOWN,0,lParam); IsFindGroupBox = true; } } @@ -347,7 +347,7 @@ LRESULT AddElement(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) WORD yPos = HIWORD(lParam); for(int i=0;i<SX_WINCREATOR_COUNT_ELEMENT;i++) { - if (SXMainWndElem::Elements[i].Object->GetEnable()) + if (SXMainWndElem::Elements[i].Object->getEnable()) { SXCreateElement* Object = new SXCreateElement(); Object->SysClassName[0] = 0; @@ -357,115 +357,115 @@ LRESULT AddElement(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if(strcmp(SXMainWndElem::Elements[i].Name,"Button") == 0) { Object->Object = SXGUICrButton(NameElem, xPos, yPos, 100, 20, SXGUI_BUTTON_IMAGE_NONE, hwnd, WndProcChildJob, 0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIButton"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"ImgButton") == 0) { ISXGUIButtonImg* tmpButtonImg = SXGUICrButtonImgLoad("",xPos,yPos,24,24,RGB(0,0,0),RGB(100,100,100),hwnd,WndProcChildJob,0); - tmpButtonImg->SetColorFrame(100, 100, 100); - tmpButtonImg->SetEnable(true); - tmpButtonImg->SetEnableActive(true); + tmpButtonImg->setColorFrame(RGB(100, 100, 100)); + tmpButtonImg->setEnable(true); + tmpButtonImg->setActive(true); Object->Object = tmpButtonImg; - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIButtonImg"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"Edit") == 0) { Object->Object = SXGUICrEdit(NameElem,xPos,yPos,100,20,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIEdit"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"CheckBox") == 0) { Object->Object = SXGUICrCheckBox(NameElem,xPos,yPos,100,20,hwnd,WndProcChildJob,0,true); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUICheckBox"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"ComboBox") == 0) { - Object->Object = SXGUICrComboBox(NameElem,xPos,yPos,100,20,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + Object->Object = SXGUICrComboBox(xPos,yPos,100,20,hwnd,WndProcChildJob,0); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIComboBox"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"GroupBox") == 0) { Object->Object = SXGUICrGroupBox(NameElem,xPos,yPos,100,20,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIGroupBox"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"ListBox") == 0) { - Object->Object = SXGUICrListBox(NameElem,xPos,yPos,100,100,hwnd,WndProcChildJob,0,true); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + Object->Object = SXGUICrListBox(xPos,yPos,100,100,hwnd,WndProcChildJob,0,true); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIListBox"); - SendMessage(Object->Object->GetHWND(),LB_SETITEMHEIGHT,0,1); + SendMessage(Object->Object->getHWND(),LB_SETITEMHEIGHT,0,1); } else if (strcmp(SXMainWndElem::Elements[i].Name, "ListView") == 0) { - Object->Object = SXGUICrListView(NameElem, xPos, yPos, 200, 100, hwnd, WndProcChildJob, 0); - GetClassName(Object->Object->GetHWND(), Object->SysClassName, 64); + Object->Object = SXGUICrListView(xPos, yPos, 200, 100, hwnd, WndProcChildJob, 0); + GetClassName(Object->Object->getHWND(), Object->SysClassName, 64); sprintf(Object->SXClassName, "%s", "SXGUIListView"); - SendMessage(Object->Object->GetHWND(), LB_SETITEMHEIGHT, 0, 1); + SendMessage(Object->Object->getHWND(), LB_SETITEMHEIGHT, 0, 1); } else if(strcmp(SXMainWndElem::Elements[i].Name,"Memo") == 0) { Object->Object = SXGUICrMemo(NameElem,xPos,yPos,100,20,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIMemo"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"ProgressBar") == 0) { Object->Object = SXGUICrProgressBar(xPos,yPos,100,20,hwnd,WndProcChildJob,0,true,true); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIProgressBar"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"RadioButton") == 0) { Object->Object = SXGUICrRadioButton(NameElem,xPos,yPos,100,20,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIRadioButton"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"Static") == 0) { Object->Object = SXGUICrStatic(NameElem,xPos,yPos,100,20,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIStatic"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"TrackBar") == 0) { Object->Object = SXGUICrTrackBar(NameElem,xPos,yPos,100,20,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUITrackBar"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"StatusBar") == 0) { Object->Object = SXGUICrStatusBar(NameElem,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIStatusBar"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"ToolBar") == 0) { Object->Object = SXGUICrToolBar(xPos,yPos,100,20,hwnd,WndProcChildJob,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIToolBar"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"UpDown") == 0) { Object->Object = SXGUICrUpDown(xPos,yPos,100,20,hwnd,WndProcChildJob,0,0,0); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIUpDown"); } else if(strcmp(SXMainWndElem::Elements[i].Name,"Window") == 0) { - Object->Object = SXGUICrBaseWnd(NameElem,NameElem,0, - 0,xPos,yPos,200,200, + Object->Object = SXGUICrBaseWndEx(NameElem,NameElem, + xPos,yPos,200,200, 0,0,CreateSolidBrush(RGB(200,200,200)), 0,CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER /*| WS_CAPTION | WS_MAXIMIZEBOX | WS_SYSMENU | WS_MINIMIZEBOX | WS_THICKFRAME*/, hwnd,WndProcChildJob); - GetClassName(Object->Object->GetHWND(),Object->SysClassName,64); + GetClassName(Object->Object->getHWND(),Object->SysClassName,64); sprintf(Object->SXClassName,"%s","SXGUIBaseWnd"); } @@ -484,7 +484,7 @@ LRESULT AddElement(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) //������ ������������ ��� ��������� �������� for(int e=0;e<SXMainWndElem::CreateElements.size();e++) { - InvalidateRect(SXMainWndElem::CreateElements[e]->Object->GetHWND(),0,1); + InvalidateRect(SXMainWndElem::CreateElements[e]->Object->getHWND(),0,1); } IsCreateNewObject = true; @@ -496,16 +496,16 @@ LRESULT AddElement(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) //������������ � �������� ������ ���������� ����� ���������� �������� char tmpAddItem[256]; sprintf(tmpAddItem,"%s%s%s%s%s",NameElem, " - ",Object->SXClassName," : ",Object->SysClassName); - SXMainWndElem::ListBoxAllElements->AddItem(tmpAddItem); + SXMainWndElem::ListBoxAllElements->addItem(tmpAddItem); - int countitem = SXMainWndElem::ListBoxAllElements->GetCountItem(); - SXMainWndElem::ListBoxAllElements->SetItemData(SXMainWndElem::ListBoxAllElements->GetCountItem()-1,(LPARAM)SXMainWndElem::CreateElements.size()-1); - SXMainWndElem::ListBoxAllElements->SetSel(SXMainWndElem::NumActiveElement); + int countitem = SXMainWndElem::ListBoxAllElements->getItemCount(); + SXMainWndElem::ListBoxAllElements->setItemData(SXMainWndElem::ListBoxAllElements->getItemCount() - 1, (LPARAM)SXMainWndElem::CreateElements.size() - 1); + SXMainWndElem::ListBoxAllElements->setSel(SXMainWndElem::NumActiveElement); //��������� ��� ������ //SXUpdateParam::PosSize(); InLog("%s","Parameters ParamWnd overwritten, serial number of elements writed (userdata32)"); - SendMessage(SXMainWndElem::ButtonArrow->GetHWND(),WM_LBUTTONUP,0,0); + SendMessage(SXMainWndElem::ButtonArrow->getHWND(),WM_LBUTTONUP,0,0); SXMainWndElem::IsCreatedEl = true; } @@ -518,7 +518,7 @@ LRESULT AddElement(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { int tmptmp = SXMainWndElem::NumActiveElement; SXMainWndElem::NumActiveElement = -1; - InvalidateRect(SXMainWndElem::CreateElements[tmptmp]->Object->GetHWND(),0,1); + InvalidateRect(SXMainWndElem::CreateElements[tmptmp]->Object->getHWND(),0,1); InLog("%s","Elements of job window deactivated (AddElement)"); } } @@ -545,7 +545,7 @@ BOOL CALLBACK GroupBoxMouseMove(HWND hwnd,LPARAM lParam) if(((p.x >= rect.left && p.x <= rect.right) && (p.y >= rect.top && p.y <= rect.bottom))) { - SendMessage(Component->GetHWND(),WM_MOUSEMOVE,lParam,0); + SendMessage(Component->getHWND(),WM_MOUSEMOVE,lParam,0); } } return TRUE; @@ -560,7 +560,7 @@ BOOL CALLBACK GroupBoxRButtonUp(HWND hwnd,LPARAM lParam) { int Style; Style = GetWindowLong(hwnd,GWL_STYLE); - SendMessage(Component->GetHWND(),WM_RBUTTONUP,0,lParam); + SendMessage(Component->getHWND(),WM_RBUTTONUP,0,lParam); } return TRUE; } @@ -584,20 +584,20 @@ LRESULT RButtonUp(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT ListBoxAllElementsDBLClick(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - int tmpNumSel = SXMainWndElem::ListBoxAllElements->GetSel(); + int tmpNumSel = SXMainWndElem::ListBoxAllElements->getSel(); if(tmpNumSel != -1) { - int tmpNumElem = (SXMainWndElem::ListBoxAllElements->GetItemData(tmpNumSel)); + int tmpNumElem = (SXMainWndElem::ListBoxAllElements->getItemData(tmpNumSel)); SXMainWndElem::NumActiveElement = tmpNumElem; for(int i=0;i<SXMainWndElem::CreateElements.size();i++) - InvalidateRect(SXMainWndElem::CreateElements[i]->Object->GetHWND(),0,1); + InvalidateRect(SXMainWndElem::CreateElements[i]->Object->getHWND(),0,1); - InvalidateRect(SXMainWndElem::JobMainWnd->GetHWND(),0,1); + InvalidateRect(SXMainWndElem::JobMainWnd->getHWND(),0,1); SXUpdateParam::UpdateAll(); } - return CallWindowProc(SXMainWndElem::ListBoxAllElements->OldProc,hwnd, msg, wParam, lParam); + return CallWindowProc(SXMainWndElem::ListBoxAllElements->getPrevWndProc(),hwnd, msg, wParam, lParam); } LRESULT InitColorText(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -609,23 +609,23 @@ LRESULT InitColorText(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) COLORREF cust_colors[16]; cc.lpCustColors = cust_colors; char bufr[160],bufg[160],bufb[160]; - if(hwnd == SXMainWndElem::EditParamColorTextR->GetHWND() || hwnd == SXMainWndElem::EditParamColorTextG->GetHWND() || hwnd == SXMainWndElem::EditParamColorTextB->GetHWND()) + if(hwnd == SXMainWndElem::EditParamColorTextR->getHWND() || hwnd == SXMainWndElem::EditParamColorTextG->getHWND() || hwnd == SXMainWndElem::EditParamColorTextB->getHWND()) { - SXMainWndElem::EditParamColorTextR->GetText(bufr,4); - SXMainWndElem::EditParamColorTextG->GetText(bufg,4); - SXMainWndElem::EditParamColorTextB->GetText(bufb,4); + SXMainWndElem::EditParamColorTextR->getText(bufr,4); + SXMainWndElem::EditParamColorTextG->getText(bufg,4); + SXMainWndElem::EditParamColorTextB->getText(bufb,4); } - else if(hwnd == SXMainWndElem::EditParamColorTextBKR->GetHWND() || hwnd == SXMainWndElem::EditParamColorTextBKG->GetHWND() || hwnd == SXMainWndElem::EditParamColorTextBKB->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorTextBKR->getHWND() || hwnd == SXMainWndElem::EditParamColorTextBKG->getHWND() || hwnd == SXMainWndElem::EditParamColorTextBKB->getHWND()) { - SXMainWndElem::EditParamColorTextBKR->GetText(bufr,4); - SXMainWndElem::EditParamColorTextBKG->GetText(bufg,4); - SXMainWndElem::EditParamColorTextBKB->GetText(bufb,4); + SXMainWndElem::EditParamColorTextBKR->getText(bufr,4); + SXMainWndElem::EditParamColorTextBKG->getText(bufg,4); + SXMainWndElem::EditParamColorTextBKB->getText(bufb,4); } - else if(hwnd == SXMainWndElem::EditParamColorBKR->GetHWND() || hwnd == SXMainWndElem::EditParamColorBKG->GetHWND() || hwnd == SXMainWndElem::EditParamColorBKB->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorBKR->getHWND() || hwnd == SXMainWndElem::EditParamColorBKG->getHWND() || hwnd == SXMainWndElem::EditParamColorBKB->getHWND()) { - SXMainWndElem::EditParamColorBKR->GetText(bufr,4); - SXMainWndElem::EditParamColorBKG->GetText(bufg,4); - SXMainWndElem::EditParamColorBKB->GetText(bufb,4); + SXMainWndElem::EditParamColorBKR->getText(bufr,4); + SXMainWndElem::EditParamColorBKG->getText(bufg,4); + SXMainWndElem::EditParamColorBKB->getText(bufb,4); } int tmpr=0,tmpg=0,tmpb=0; sscanf(bufr,"%d",&tmpr); @@ -634,10 +634,10 @@ LRESULT InitColorText(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) cc.rgbResult = RGB(tmpr,tmpg,tmpb); cc.Flags = CC_FULLOPEN | CC_RGBINIT; - SXMainWndElem::MainWnd->Enable(false); - SXMainWndElem::JobMainWnd->Enable(false); - SXMainWndElem::ParamWnd->Enable(false); - SXMainWndElem::WndLog->Enable(false); + SXMainWndElem::MainWnd->setEnable(false); + SXMainWndElem::JobMainWnd->setEnable(false); + SXMainWndElem::ParamWnd->setEnable(false); + SXMainWndElem::WndLog->setEnable(false); if(ChooseColor(&cc)) { if(cc.rgbResult != RGB(tmpr,tmpg,tmpb)) @@ -649,33 +649,33 @@ LRESULT InitColorText(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) sprintf(bufg,"%d",tmpg); sprintf(bufb,"%d",tmpb); - if(hwnd == SXMainWndElem::EditParamColorTextR->GetHWND() || hwnd == SXMainWndElem::EditParamColorTextG->GetHWND() || hwnd == SXMainWndElem::EditParamColorTextB->GetHWND()) + if(hwnd == SXMainWndElem::EditParamColorTextR->getHWND() || hwnd == SXMainWndElem::EditParamColorTextG->getHWND() || hwnd == SXMainWndElem::EditParamColorTextB->getHWND()) { - SXMainWndElem::EditParamColorTextR->SetText(bufr); - SXMainWndElem::EditParamColorTextG->SetText(bufg); - SXMainWndElem::EditParamColorTextB->SetText(bufb); + SXMainWndElem::EditParamColorTextR->setText(bufr); + SXMainWndElem::EditParamColorTextG->setText(bufg); + SXMainWndElem::EditParamColorTextB->setText(bufb); SXUpdateParam::SetColorText(); } - else if(hwnd == SXMainWndElem::EditParamColorTextBKR->GetHWND() || hwnd == SXMainWndElem::EditParamColorTextBKG->GetHWND() || hwnd == SXMainWndElem::EditParamColorTextBKB->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorTextBKR->getHWND() || hwnd == SXMainWndElem::EditParamColorTextBKG->getHWND() || hwnd == SXMainWndElem::EditParamColorTextBKB->getHWND()) { - SXMainWndElem::EditParamColorTextBKR->SetText(bufr); - SXMainWndElem::EditParamColorTextBKG->SetText(bufg); - SXMainWndElem::EditParamColorTextBKB->SetText(bufb); + SXMainWndElem::EditParamColorTextBKR->setText(bufr); + SXMainWndElem::EditParamColorTextBKG->setText(bufg); + SXMainWndElem::EditParamColorTextBKB->setText(bufb); SXUpdateParam::SetColorTextBK(); } - else if(hwnd == SXMainWndElem::EditParamColorBKR->GetHWND() || hwnd == SXMainWndElem::EditParamColorBKG->GetHWND() || hwnd == SXMainWndElem::EditParamColorBKB->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorBKR->getHWND() || hwnd == SXMainWndElem::EditParamColorBKG->getHWND() || hwnd == SXMainWndElem::EditParamColorBKB->getHWND()) { - SXMainWndElem::EditParamColorBKR->SetText(bufr); - SXMainWndElem::EditParamColorBKG->SetText(bufg); - SXMainWndElem::EditParamColorBKB->SetText(bufb); + SXMainWndElem::EditParamColorBKR->setText(bufr); + SXMainWndElem::EditParamColorBKG->setText(bufg); + SXMainWndElem::EditParamColorBKB->setText(bufb); SXUpdateParam::SetColorBK(); } } } - SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); + SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); return 1; } @@ -686,75 +686,75 @@ LRESULT InputInfoEdit(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if(wParam == VK_RETURN) { bool is_execute = false; - if(hwnd == SXMainWndElem::EditParamPosX->GetHWND()) + if(hwnd == SXMainWndElem::EditParamPosX->getHWND()) { //InLog("%s","��� ������, ������ ����� ..."); SXUpdateParam::SetPosX(); is_execute = true; } - else if(hwnd == SXMainWndElem::EditParamPosY->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamPosY->getHWND()) { SXUpdateParam::SetPosY(); is_execute = true; } - else if(hwnd == SXMainWndElem::EditParamWidth->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamWidth->getHWND()) { SXUpdateParam::SetWidth(); is_execute = true; } - else if(hwnd == SXMainWndElem::EditParamHeight->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamHeight->getHWND()) { SXUpdateParam::SetHeight(); is_execute = true; } - else if(hwnd == SXMainWndElem::EditParamHintText->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamHintText->getHWND()) { SXUpdateParam::SetHintText(); } - else if(hwnd == SXMainWndElem::EditParamCaption->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamCaption->getHWND()) { SXUpdateParam::SetCaption(); } - else if(hwnd == SXMainWndElem::EditParamVarName->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamVarName->getHWND()) { SXUpdateParam::SetVarName(); } - else if(hwnd == SXMainWndElem::EditParamColorBKR->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorBKR->getHWND()) { SXUpdateParam::SetColorBK(); } - else if(hwnd == SXMainWndElem::EditParamColorBKG->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorBKG->getHWND()) { SXUpdateParam::SetColorBK(); } - else if(hwnd == SXMainWndElem::EditParamColorBKB->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorBKB->getHWND()) { SXUpdateParam::SetColorBK(); } - else if(hwnd == SXMainWndElem::EditParamColorTextR->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorTextR->getHWND()) { SXUpdateParam::SetColorText(); } - else if(hwnd == SXMainWndElem::EditParamColorTextG->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorTextG->getHWND()) { SXUpdateParam::SetColorText(); } - else if(hwnd == SXMainWndElem::EditParamColorTextB->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorTextB->getHWND()) { SXUpdateParam::SetColorText(); } - else if(hwnd == SXMainWndElem::EditParamColorTextBKR->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorTextBKR->getHWND()) { SXUpdateParam::SetColorTextBK(); } - else if(hwnd == SXMainWndElem::EditParamColorTextBKG->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorTextBKG->getHWND()) { SXUpdateParam::SetColorTextBK(); } - else if(hwnd == SXMainWndElem::EditParamColorTextBKB->GetHWND()) + else if(hwnd == SXMainWndElem::EditParamColorTextBKB->getHWND()) { SXUpdateParam::SetColorTextBK(); } @@ -770,27 +770,27 @@ LRESULT InputInfoEdit(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT InputInfoComboBox(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { bool is_execute = false; - if(hwnd == SXMainWndElem::ComboBoxParamEnabled->GetHWND()) + if(hwnd == SXMainWndElem::ComboBoxParamEnabled->getHWND()) { SXUpdateParam::SetEnable(); is_execute = true; } - else if(hwnd == SXMainWndElem::ComboBoxParamVisible->GetHWND()) + else if(hwnd == SXMainWndElem::ComboBoxParamVisible->getHWND()) { SXUpdateParam::SetVisible(); is_execute = true; } - else if(hwnd == SXMainWndElem::ComboBoxParamHintVisible->GetHWND()) + else if(hwnd == SXMainWndElem::ComboBoxParamHintVisible->getHWND()) { SXUpdateParam::SetVisibleHint(); is_execute = true; } - else if(hwnd == SXMainWndElem::ComboBoxParamTransparentText->GetHWND()) + else if(hwnd == SXMainWndElem::ComboBoxParamTransparentText->getHWND()) { SXUpdateParam::SetTransparentTextBk(); is_execute = true; } - else if(hwnd == SXMainWndElem::ComboBoxParamParentFont->GetHWND()) + else if(hwnd == SXMainWndElem::ComboBoxParamParentFont->getHWND()) { SXUpdateParam::SetParentFont(); is_execute = true; @@ -811,13 +811,13 @@ LRESULT InputToEditColor(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ISXGUIEdit *Component = dynamic_cast<ISXGUIEdit*>((ISXGUIComponent*)GetWindowLong(hwnd, GWL_USERDATA));// (ISXGUIEdit*)GetWindowLong(hwnd, GWL_USERDATA); char buf[32]; - Component->GetText(buf,32); + Component->getText(buf,32); int numbuf; sscanf(buf,"%d",&numbuf); if(numbuf > 255 || strlen(buf) > 3) - Component->SetText("255"); + Component->setText("255"); else if(numbuf < 0 ) - Component->SetText("0"); + Component->setText("0"); InvalidateRect(hwnd,0,1); return 0; } @@ -842,7 +842,7 @@ LRESULT CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if(Notification == BN_CLICKED) { HWND handle_elem = (HWND)(lParam); - if(handle_elem == SXMainWndElem::CheckBoxParamWinMenu->GetHWND()) + if(handle_elem == SXMainWndElem::CheckBoxParamWinMenu->getHWND()) SXUpdateParam::SetMenuWindow(); } @@ -873,21 +873,21 @@ void SaveResult() ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; InLog("%s","Deactivation windows and a dialog box to save the file ..."); - SXMainWndElem::MainWnd->Enable(false); - SXMainWndElem::JobMainWnd->Enable(false); - SXMainWndElem::ParamWnd->Enable(false); - SXMainWndElem::WndLog->Enable(false); + SXMainWndElem::MainWnd->setEnable(false); + SXMainWndElem::JobMainWnd->setEnable(false); + SXMainWndElem::ParamWnd->setEnable(false); + SXMainWndElem::WndLog->setEnable(false); if(GetSaveFileName(&ofn) == TRUE) { if(ofn.nFileExtension == 0 || strcmp(szFileName+ofn.nFileExtension,"bin") != 0) sprintf(szFileName+strlen(szFileName),"%s",".bin"); SaveFile(szFileName); } - SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); - SetActiveWindow(SXMainWndElem::MainWnd->GetHWND()); + SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); + SetActiveWindow(SXMainWndElem::MainWnd->getHWND()); InLog("%s","Call dialog box to save the file successfully completed, activation window"); } @@ -916,21 +916,21 @@ void LoadResult() ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; InLog("%s","Deactivation windows and a dialog box to open the file ..."); - SXMainWndElem::MainWnd->Enable(false); - SXMainWndElem::JobMainWnd->Enable(false); - SXMainWndElem::ParamWnd->Enable(false); - SXMainWndElem::WndLog->Enable(false); + SXMainWndElem::MainWnd->setEnable(false); + SXMainWndElem::JobMainWnd->setEnable(false); + SXMainWndElem::ParamWnd->setEnable(false); + SXMainWndElem::WndLog->setEnable(false); if(GetOpenFileName(&ofn) == TRUE) { CreateNew(false); LoadFile(szFileName); SXMainWndElem::IsLoadedEl = true; } - SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); - SetActiveWindow(SXMainWndElem::MainWnd->GetHWND()); + SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); + SetActiveWindow(SXMainWndElem::MainWnd->getHWND()); InLog("%s","Call dialog box to open the file successfully completed, activation window"); } @@ -947,22 +947,22 @@ void CallLoadResult() void CallOutputWnd() { - SXMainWndElem::MainWnd->Enable(false); - SXMainWndElem::JobMainWnd->Enable(false); - SXMainWndElem::ParamWnd->Enable(false); - SXMainWndElem::WndLog->Enable(false); + SXMainWndElem::MainWnd->setEnable(false); + SXMainWndElem::JobMainWnd->setEnable(false); + SXMainWndElem::ParamWnd->setEnable(false); + SXMainWndElem::WndLog->setEnable(false); - SXNameSapce::OutputGUIInFile->Enable(true); - SXNameSapce::OutputGUIInFile->Visible(true); + SXNameSapce::OutputGUIInFile->setEnable(true); + SXNameSapce::OutputGUIInFile->setVisible(true); } void CallAboutSXWinCreator() { - SXMainWndElem::MainWnd->Enable(false); - SXMainWndElem::JobMainWnd->Enable(false); - SXMainWndElem::ParamWnd->Enable(false); - SXMainWndElem::WndLog->Enable(false); - AboutSXWinCreator::JobWindow->Visible(true); + SXMainWndElem::MainWnd->setEnable(false); + SXMainWndElem::JobMainWnd->setEnable(false); + SXMainWndElem::ParamWnd->setEnable(false); + SXMainWndElem::WndLog->setEnable(false); + AboutSXWinCreator::JobWindow->setVisible(true); } LRESULT ComMenuId(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -973,42 +973,42 @@ LRESULT ComMenuId(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) //{ if(id == ID_VIEW_JOB) { - if(!SXMainWndElem::MainMenu->GetCheckedItem(id)) + if(!SXMainWndElem::MainMenu->getCheckedItem(id)) { - ShowWindow(SXMainWndElem::JobMainWnd->GetHWND(),SW_SHOW); - SetActiveWindow(SXMainWndElem::JobMainWnd->GetHWND()); - SXMainWndElem::MainMenu->CheckItem(id,true); + ShowWindow(SXMainWndElem::JobMainWnd->getHWND(),SW_SHOW); + SetActiveWindow(SXMainWndElem::JobMainWnd->getHWND()); + SXMainWndElem::MainMenu->setCheckItem(id,true); } else { - ShowWindow(SXMainWndElem::JobMainWnd->GetHWND(),SW_HIDE); - SXMainWndElem::MainMenu->CheckItem(id,false); + ShowWindow(SXMainWndElem::JobMainWnd->getHWND(),SW_HIDE); + SXMainWndElem::MainMenu->setCheckItem(id,false); } } else if(id == ID_VIEW_PARAM) { - if(!SXMainWndElem::MainMenu->GetCheckedItem(id)) + if(!SXMainWndElem::MainMenu->getCheckedItem(id)) { - ShowWindow(SXMainWndElem::ParamWnd->GetHWND(),SW_SHOW); - SetActiveWindow(SXMainWndElem::ParamWnd->GetHWND()); + ShowWindow(SXMainWndElem::ParamWnd->getHWND(),SW_SHOW); + SetActiveWindow(SXMainWndElem::ParamWnd->getHWND()); } else { - ShowWindow(SXMainWndElem::ParamWnd->GetHWND(),SW_HIDE); - SXMainWndElem::MainMenu->CheckItem(id,false); + ShowWindow(SXMainWndElem::ParamWnd->getHWND(),SW_HIDE); + SXMainWndElem::MainMenu->setCheckItem(id, false); } } else if(id == ID_VIEW_LOGWINDOW) { - if(!SXMainWndElem::MainMenu->GetCheckedItem(id)) + if(!SXMainWndElem::MainMenu->getCheckedItem(id)) { - ShowWindow(SXMainWndElem::WndLog->GetHWND(),SW_SHOW); - SetActiveWindow(SXMainWndElem::WndLog->GetHWND()); + ShowWindow(SXMainWndElem::WndLog->getHWND(),SW_SHOW); + SetActiveWindow(SXMainWndElem::WndLog->getHWND()); } else { - ShowWindow(SXMainWndElem::WndLog->GetHWND(),SW_HIDE); - SXMainWndElem::MainMenu->CheckItem(id,false); + ShowWindow(SXMainWndElem::WndLog->getHWND(),SW_HIDE); + SXMainWndElem::MainMenu->setCheckItem(id, false); } } //} diff --git a/source/sxwincreator/callbacks.h b/source/sxwincreator/callbacks.h new file mode 100644 index 0000000000000000000000000000000000000000..773fd7e407aac0f05d7d3d7ee26215c13a963d37 --- /dev/null +++ b/source/sxwincreator/callbacks.h @@ -0,0 +1,77 @@ + + +#ifndef __CALLBACKS_H +#define __CALLBACKS_H + +#include <windows.h> +#include <SXGUIWinApi/sxgui.h> +#include "sxwincreator.h" +#include "sx_param_wnd_data.h" + +LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT WndProcChildJob2(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +//������ �� ���� �� ���� groupbox ��� static +//bool IsFindGroupBox = false; + +BOOL CALLBACK GroupBoxLButtonDown(HWND hwnd, LPARAM lParam); + +//��������� ����� ����� ������� ���� �� �������� ���� +LRESULT AddElement(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +BOOL CALLBACK GroupBoxMouseMove(HWND hwnd, LPARAM lParam); + +BOOL CALLBACK GroupBoxRButtonUp(HWND hwnd, LPARAM lParam); + + + +LRESULT MouseMove(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT RButtonUp(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT ListBoxAllElementsDBLClick(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT InitColorText(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + + +LRESULT InputInfoEdit(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT InputInfoComboBox(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT InputToEditColor(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT InitFont(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT InitImageForButtonImg(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT CallWmCommand(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +void SaveResult(); + + + +void LoadResult(); + +void CallLoadResult(); + +void CallOutputWnd(); + +void CallAboutSXWinCreator(); + +LRESULT ComMenuId(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT MinimuzeWinInsteadClose(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + + +LRESULT TrueExit(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT CallImgNew(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT CallImgSave(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT CallImgLoad(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +LRESULT CallImgBuild(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +#endif \ No newline at end of file diff --git a/source/sxwincreator/create_current_gui.cpp b/source/sxwincreator/create_current_gui.cpp index 77ed85c4cd85d1f36f4bef8819417605d58f37d0..1744c2f74cda6910ba2aee8a6348ffa4346162ec 100644 --- a/source/sxwincreator/create_current_gui.cpp +++ b/source/sxwincreator/create_current_gui.cpp @@ -1,5 +1,5 @@ - +/* void CreateCursor() { SXMainWndElem::CurSE = LoadCursor(0,IDC_SIZENWSE); @@ -8,4 +8,4 @@ void CreateCursor() SXMainWndElem::CurNS = LoadCursor(0,IDC_SIZENS); SXMainWndElem::CurWE = LoadCursor(0,IDC_SIZEWE); -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/source/sxwincreator/sx_param_wnd_data.cpp b/source/sxwincreator/sx_param_wnd_data.cpp index d57fdd61f527f65f0450f13e3f24660aa17e4777..d8182028167cecca5c8db62f71604576fc966a74 100644 --- a/source/sxwincreator/sx_param_wnd_data.cpp +++ b/source/sxwincreator/sx_param_wnd_data.cpp @@ -1,61 +1,5 @@ -extern LRESULT CALLBACK WndProcChildJob(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -extern void InLog(const char* format, ...); - -namespace SXUpdateParam -{ - //��������� ���������� ��������� �������� - void PosSize(); // ������� � �������� (x,y width,height) - void Caption(); - void VarName(); - void Enable(); - void Visible(); - void VisibleHint(); - void HintText(); - void ColorText(); - void ColorTextBK(); - void ColorBK(); - void TransparentTextBk(); - void ParentFont(); - void Font(); - void MenuWindow(); - - void UpdateAll(); - - void SetPosX(); - void SetPosY(); - void SetWidth(); - void SetHeight(); - void SetVisible(); - void SetEnable(); - void SetCaption(); - void SetVarName(); - void SetVisibleHint(); - void SetHintText(); - void SetColorText(); - void SetColorTextBK(); - void SetColorBK(); - void SetTransparentTextBk(); - void SetParentFont(); - void SetFont(); - void SetImgButton(); - void SetMenuWindow(); - - void LockPosSizeBlock(); - void LockFontBlock(); - void LockColorBlock(); - void LockColorTextBlock(); - void LockImgButton(); - - void UnLockPosSizeBlock(); - void UnLockFontBlock(); - void UnLockColorBlock(); - void UnLockColorTextBlock(); - void UnlockAll(); - void UnLockImgButton(); - - void SetDefaultValue(); -} +#include "sx_param_wnd_data.h" void SXUpdateParam::SetDefaultValue() { @@ -64,134 +8,134 @@ void SXUpdateParam::SetDefaultValue() void SXUpdateParam::LockColorBlock() { - SXMainWndElem::StaticParamColorText->Enable(false); - SXMainWndElem::StaticParamColorBK->Enable(false); - SXMainWndElem::StaticParamColorBKText->Enable(false); - SXMainWndElem::StaticParamTransparentText->Enable(false); + SXMainWndElem::StaticParamColorText->setEnable(false); + SXMainWndElem::StaticParamColorBK->setEnable(false); + SXMainWndElem::StaticParamColorBKText->setEnable(false); + SXMainWndElem::StaticParamTransparentText->setEnable(false); - SXMainWndElem::EditParamColorTextR->Enable(false); - SXMainWndElem::EditParamColorTextG->Enable(false); - SXMainWndElem::EditParamColorTextB->Enable(false); + SXMainWndElem::EditParamColorTextR->setEnable(false); + SXMainWndElem::EditParamColorTextG->setEnable(false); + SXMainWndElem::EditParamColorTextB->setEnable(false); - SXMainWndElem::EditParamColorTextBKR->Enable(false); - SXMainWndElem::EditParamColorTextBKG->Enable(false); - SXMainWndElem::EditParamColorTextBKB->Enable(false); + SXMainWndElem::EditParamColorTextBKR->setEnable(false); + SXMainWndElem::EditParamColorTextBKG->setEnable(false); + SXMainWndElem::EditParamColorTextBKB->setEnable(false); - SXMainWndElem::EditParamColorBKR->Enable(false); - SXMainWndElem::EditParamColorBKG->Enable(false); - SXMainWndElem::EditParamColorBKB->Enable(false); + SXMainWndElem::EditParamColorBKR->setEnable(false); + SXMainWndElem::EditParamColorBKG->setEnable(false); + SXMainWndElem::EditParamColorBKB->setEnable(false); - SXMainWndElem::ComboBoxParamTransparentText->Enable(false); + SXMainWndElem::ComboBoxParamTransparentText->setEnable(false); } void SXUpdateParam::UnLockColorBlock() { - SXMainWndElem::StaticParamColorText->Enable(true); - SXMainWndElem::StaticParamColorBK->Enable(true); - SXMainWndElem::StaticParamColorBKText->Enable(true); - SXMainWndElem::StaticParamTransparentText->Enable(true); + SXMainWndElem::StaticParamColorText->setEnable(true); + SXMainWndElem::StaticParamColorBK->setEnable(true); + SXMainWndElem::StaticParamColorBKText->setEnable(true); + SXMainWndElem::StaticParamTransparentText->setEnable(true); - SXMainWndElem::EditParamColorTextR->Enable(true); - SXMainWndElem::EditParamColorTextG->Enable(true); - SXMainWndElem::EditParamColorTextB->Enable(true); + SXMainWndElem::EditParamColorTextR->setEnable(true); + SXMainWndElem::EditParamColorTextG->setEnable(true); + SXMainWndElem::EditParamColorTextB->setEnable(true); - SXMainWndElem::EditParamColorTextBKR->Enable(true); - SXMainWndElem::EditParamColorTextBKG->Enable(true); - SXMainWndElem::EditParamColorTextBKB->Enable(true); + SXMainWndElem::EditParamColorTextBKR->setEnable(true); + SXMainWndElem::EditParamColorTextBKG->setEnable(true); + SXMainWndElem::EditParamColorTextBKB->setEnable(true); - SXMainWndElem::EditParamColorBKR->Enable(true); - SXMainWndElem::EditParamColorBKG->Enable(true); - SXMainWndElem::EditParamColorBKB->Enable(true); + SXMainWndElem::EditParamColorBKR->setEnable(true); + SXMainWndElem::EditParamColorBKG->setEnable(true); + SXMainWndElem::EditParamColorBKB->setEnable(true); - SXMainWndElem::ComboBoxParamTransparentText->Enable(true); + SXMainWndElem::ComboBoxParamTransparentText->setEnable(true); } void SXUpdateParam::LockColorTextBlock() { - SXMainWndElem::StaticParamColorText->Enable(false); - SXMainWndElem::StaticParamColorBKText->Enable(false); - SXMainWndElem::StaticParamTransparentText->Enable(false); + SXMainWndElem::StaticParamColorText->setEnable(false); + SXMainWndElem::StaticParamColorBKText->setEnable(false); + SXMainWndElem::StaticParamTransparentText->setEnable(false); - SXMainWndElem::EditParamColorTextR->Enable(false); - SXMainWndElem::EditParamColorTextG->Enable(false); - SXMainWndElem::EditParamColorTextB->Enable(false); + SXMainWndElem::EditParamColorTextR->setEnable(false); + SXMainWndElem::EditParamColorTextG->setEnable(false); + SXMainWndElem::EditParamColorTextB->setEnable(false); - SXMainWndElem::EditParamColorTextBKR->Enable(false); - SXMainWndElem::EditParamColorTextBKG->Enable(false); - SXMainWndElem::EditParamColorTextBKB->Enable(false); + SXMainWndElem::EditParamColorTextBKR->setEnable(false); + SXMainWndElem::EditParamColorTextBKG->setEnable(false); + SXMainWndElem::EditParamColorTextBKB->setEnable(false); - SXMainWndElem::ComboBoxParamTransparentText->Enable(false); + SXMainWndElem::ComboBoxParamTransparentText->setEnable(false); } void SXUpdateParam::UnLockColorTextBlock() { - SXMainWndElem::StaticParamColorText->Enable(true); - SXMainWndElem::StaticParamColorBKText->Enable(true); - SXMainWndElem::StaticParamTransparentText->Enable(true); + SXMainWndElem::StaticParamColorText->setEnable(true); + SXMainWndElem::StaticParamColorBKText->setEnable(true); + SXMainWndElem::StaticParamTransparentText->setEnable(true); - SXMainWndElem::EditParamColorTextR->Enable(true); - SXMainWndElem::EditParamColorTextG->Enable(true); - SXMainWndElem::EditParamColorTextB->Enable(true); + SXMainWndElem::EditParamColorTextR->setEnable(true); + SXMainWndElem::EditParamColorTextG->setEnable(true); + SXMainWndElem::EditParamColorTextB->setEnable(true); - SXMainWndElem::EditParamColorTextBKR->Enable(true); - SXMainWndElem::EditParamColorTextBKG->Enable(true); - SXMainWndElem::EditParamColorTextBKB->Enable(true); + SXMainWndElem::EditParamColorTextBKR->setEnable(true); + SXMainWndElem::EditParamColorTextBKG->setEnable(true); + SXMainWndElem::EditParamColorTextBKB->setEnable(true); - SXMainWndElem::ComboBoxParamTransparentText->Enable(true); + SXMainWndElem::ComboBoxParamTransparentText->setEnable(true); } void SXUpdateParam::LockFontBlock() { - SXMainWndElem::StaticParamFont->Enable(false); - SXMainWndElem::StaticParamFontParent->Enable(false); - SXMainWndElem::ComboBoxParamParentFont->Enable(false); - SXMainWndElem::ButtonParamSelectFont->Enable(false); + SXMainWndElem::StaticParamFont->setEnable(false); + SXMainWndElem::StaticParamFontParent->setEnable(false); + SXMainWndElem::ComboBoxParamParentFont->setEnable(false); + SXMainWndElem::ButtonParamSelectFont->setEnable(false); } void SXUpdateParam::UnLockFontBlock() { - SXMainWndElem::StaticParamFont->Enable(true); - SXMainWndElem::StaticParamFontParent->Enable(true); - SXMainWndElem::ComboBoxParamParentFont->Enable(true); - SXMainWndElem::ButtonParamSelectFont->Enable(true); + SXMainWndElem::StaticParamFont->setEnable(true); + SXMainWndElem::StaticParamFontParent->setEnable(true); + SXMainWndElem::ComboBoxParamParentFont->setEnable(true); + SXMainWndElem::ButtonParamSelectFont->setEnable(true); } void SXUpdateParam::LockPosSizeBlock() { - SXMainWndElem::StaticParamPosX->Enable(false); - SXMainWndElem::StaticParamPosY->Enable(false); - SXMainWndElem::StaticParamWidth->Enable(false); - SXMainWndElem::StaticParamHeight->Enable(false); - - SXMainWndElem::EditParamPosX->Enable(false); - SXMainWndElem::EditParamPosY->Enable(false); - SXMainWndElem::EditParamWidth->Enable(false); - SXMainWndElem::EditParamHeight->Enable(false); + SXMainWndElem::StaticParamPosX->setEnable(false); + SXMainWndElem::StaticParamPosY->setEnable(false); + SXMainWndElem::StaticParamWidth->setEnable(false); + SXMainWndElem::StaticParamHeight->setEnable(false); + + SXMainWndElem::EditParamPosX->setEnable(false); + SXMainWndElem::EditParamPosY->setEnable(false); + SXMainWndElem::EditParamWidth->setEnable(false); + SXMainWndElem::EditParamHeight->setEnable(false); } void SXUpdateParam::UnLockPosSizeBlock() { - SXMainWndElem::StaticParamPosX->Enable(true); - SXMainWndElem::StaticParamPosY->Enable(true); - SXMainWndElem::StaticParamWidth->Enable(true); - SXMainWndElem::StaticParamHeight->Enable(true); - - SXMainWndElem::EditParamPosX->Enable(true); - SXMainWndElem::EditParamPosY->Enable(true); - SXMainWndElem::EditParamWidth->Enable(true); - SXMainWndElem::EditParamHeight->Enable(true); + SXMainWndElem::StaticParamPosX->setEnable(true); + SXMainWndElem::StaticParamPosY->setEnable(true); + SXMainWndElem::StaticParamWidth->setEnable(true); + SXMainWndElem::StaticParamHeight->setEnable(true); + + SXMainWndElem::EditParamPosX->setEnable(true); + SXMainWndElem::EditParamPosY->setEnable(true); + SXMainWndElem::EditParamWidth->setEnable(true); + SXMainWndElem::EditParamHeight->setEnable(true); } void SXUpdateParam::LockImgButton() { - SXMainWndElem::StaticParamImgBLoadImg->Enable(false); - SXMainWndElem::ButtomParamImgBLoadImg->Enable(false); + SXMainWndElem::StaticParamImgBLoadImg->setEnable(false); + SXMainWndElem::ButtomParamImgBLoadImg->setEnable(false); } void SXUpdateParam::UnLockImgButton() { - SXMainWndElem::StaticParamImgBLoadImg->Enable(true); - SXMainWndElem::ButtomParamImgBLoadImg->Enable(true); + SXMainWndElem::StaticParamImgBLoadImg->setEnable(true); + SXMainWndElem::ButtomParamImgBLoadImg->setEnable(true); } void SXUpdateParam::UnlockAll() @@ -208,9 +152,9 @@ void SXUpdateParam::UpdateAll() if(SXMainWndElem::NumActiveElement != -1) { char ClassName[256]; - int error = GetClassName(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHWND(),ClassName,256); + int error = GetClassName(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHWND(),ClassName,256); //������� ������ - if (strcmp(ClassName, "SXGUIGROUPBOX") == 0) //strcmp(ClassName, "Button") == 0 && !(GetWindowLong(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHWND(), GWL_STYLE) & BS_GROUPBOX)) + if (strcmp(ClassName, "SXGUIGROUPBOX") == 0) //strcmp(ClassName, "Button") == 0 && !(GetWindowLong(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHWND(), GWL_STYLE) & BS_GROUPBOX)) { SXUpdateParam::UnlockAll(); //SXUpdateParam::LockColorBlock(); @@ -230,17 +174,17 @@ void SXUpdateParam::UpdateAll() SXUpdateParam::LockImgButton(); } else if( - strcmp(ClassName,"Static") == 0 || - (strcmp(ClassName,"Button") == 0 && GetWindowLong(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHWND(),GWL_STYLE) & BS_GROUPBOX) || - strcmp(ClassName,"ListBox") == 0 || - strcmp(ClassName,"Edit") == 0 || - strcmp(ClassName,"ComboBox") == 0 + strcmp(ClassName, "Static") == 0 || + (strcmp(ClassName, "Button") == 0 && GetWindowLong(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHWND(),GWL_STYLE) & BS_GROUPBOX) || + strcmp(ClassName, "ListBox") == 0 || + strcmp(ClassName, "Edit") == 0 || + strcmp(ClassName, "ComboBox") == 0 ) { SXUpdateParam::UnlockAll(); SXUpdateParam::LockImgButton(); } - else if(strcmp(ClassName,"SXGUIBUTTONIMG") == 0) + else if(strcmp(ClassName, "SXGUIBUTTONIMG") == 0) { SXUpdateParam::UnlockAll(); SXUpdateParam::UnLockImgButton(); @@ -285,20 +229,20 @@ void SXUpdateParam::PosSize() { RECT cr; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetClientRect(&cr); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getClientRect(&cr); else - SXMainWndElem::JobMainWnd->GetClientRect(&cr); - //GetWindowRect(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement].Object->GetHWND(),&gr); + SXMainWndElem::JobMainWnd->getClientRect(&cr); + //GetWindowRect(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement].Object->getHWND(),&gr); char tmp[32]; - sprintf(tmp,"%d",cr.right - cr.left); - SXMainWndElem::EditParamWidth->SetText(tmp); - sprintf(tmp,"%d",cr.bottom - cr.top); - SXMainWndElem::EditParamHeight->SetText(tmp); - - sprintf(tmp,"%d",cr.left); - SXMainWndElem::EditParamPosX->SetText(tmp); - sprintf(tmp,"%d",cr.top); - SXMainWndElem::EditParamPosY->SetText(tmp); + sprintf(tmp, "%d",cr.right - cr.left); + SXMainWndElem::EditParamWidth->setText(tmp); + sprintf(tmp, "%d",cr.bottom - cr.top); + SXMainWndElem::EditParamHeight->setText(tmp); + + sprintf(tmp, "%d",cr.left); + SXMainWndElem::EditParamPosX->setText(tmp); + sprintf(tmp, "%d",cr.top); + SXMainWndElem::EditParamPosY->setText(tmp); } void SXUpdateParam::Caption() @@ -307,15 +251,15 @@ void SXUpdateParam::Caption() str[0] = 0; if(SXMainWndElem::NumActiveElement != -1) { - SXGUIFuctinon::GetText(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object,str,256); + gui_func::text::GetText(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object,str,256); if(str[0] == 0) { - sprintf(str,"%s",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name); + sprintf(str, "%s",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name); } } else - SXMainWndElem::JobMainWnd->GetText(str,256); - SXMainWndElem::EditParamCaption->SetText(str); + SXMainWndElem::JobMainWnd->getText(str,256); + SXMainWndElem::EditParamCaption->setText(str); } void SXUpdateParam::VarName() @@ -326,56 +270,55 @@ void SXUpdateParam::VarName() { if(str[0] == 0) { - sprintf(str,"%s",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name); + sprintf(str, "%s",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name); } } else - sprintf(str,"%s",SXMainWndElem::NameJobWnd); - SXMainWndElem::EditParamVarName->SetText(str); + sprintf(str, "%s",SXMainWndElem::NameJobWnd); + SXMainWndElem::EditParamVarName->setText(str); } void SXUpdateParam::Enable() { bool enable; if(SXMainWndElem::NumActiveElement != -1) - enable = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->Enable(); + enable = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getEnable(); else - enable = SXMainWndElem::JobMainWnd->Enable(); + enable = SXMainWndElem::JobMainWnd->getEnable(); - SXMainWndElem::ComboBoxParamEnabled->SetSel((enable ? 0 : 1)); + SXMainWndElem::ComboBoxParamEnabled->setSel((enable ? 0 : 1)); } void SXUpdateParam::Visible() { bool visible; if(SXMainWndElem::NumActiveElement != -1) - visible = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->Visible(); + visible = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getVisible(); else - visible = SXMainWndElem::JobMainWnd->Visible(); + visible = SXMainWndElem::JobMainWnd->getVisible(); - SXMainWndElem::ComboBoxParamVisible->SetSel((visible ? 0 : 1)); + SXMainWndElem::ComboBoxParamVisible->setSel((visible ? 0 : 1)); } void SXUpdateParam::VisibleHint() { bool visible; if(SXMainWndElem::NumActiveElement != -1) - visible = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->ShowHint(); + visible = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getShowHint(); else - visible = SXMainWndElem::JobMainWnd->ShowHint(); + visible = SXMainWndElem::JobMainWnd->getShowHint(); - SXMainWndElem::ComboBoxParamHintVisible->SetSel((visible ? 0 : 1)); + SXMainWndElem::ComboBoxParamHintVisible->setSel((visible ? 0 : 1)); } void SXUpdateParam::HintText() { - char str[1024]; - str[0] = 0; + const char *str = 0; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHintText(str); + str = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHintText(); else - SXMainWndElem::JobMainWnd->GetHintText(str); - SXMainWndElem::EditParamHintText->SetText(str); + str = SXMainWndElem::JobMainWnd->getHintText(); + SXMainWndElem::EditParamHintText->setText(str); } void SXUpdateParam::ColorText() @@ -383,13 +326,13 @@ void SXUpdateParam::ColorText() if(SXMainWndElem::NumActiveElement != -1) { char bufr[16],bufg[16],bufb[16]; - DWORD color = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetColorText(); + DWORD color = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getColorText(); sprintf(bufr, "%d", GetRValue(color)); sprintf(bufg, "%d", GetGValue(color)); sprintf(bufb, "%d", GetBValue(color)); - SXMainWndElem::EditParamColorTextR->SetText(bufr); - SXMainWndElem::EditParamColorTextG->SetText(bufg); - SXMainWndElem::EditParamColorTextB->SetText(bufb); + SXMainWndElem::EditParamColorTextR->setText(bufr); + SXMainWndElem::EditParamColorTextG->setText(bufg); + SXMainWndElem::EditParamColorTextB->setText(bufb); } } @@ -398,13 +341,13 @@ void SXUpdateParam::ColorTextBK() if(SXMainWndElem::NumActiveElement != -1) { char bufr[16],bufg[16],bufb[16]; - DWORD color = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetColorTextBk(); + DWORD color = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getColorTextBk(); sprintf(bufr, "%d", GetRValue(color)); sprintf(bufg, "%d", GetGValue(color)); sprintf(bufb, "%d", GetBValue(color)); - SXMainWndElem::EditParamColorTextBKR->SetText(bufr); - SXMainWndElem::EditParamColorTextBKG->SetText(bufg); - SXMainWndElem::EditParamColorTextBKB->SetText(bufb); + SXMainWndElem::EditParamColorTextBKR->setText(bufr); + SXMainWndElem::EditParamColorTextBKG->setText(bufg); + SXMainWndElem::EditParamColorTextBKB->setText(bufb); } } @@ -414,27 +357,27 @@ void SXUpdateParam::ColorBK() DWORD color; if(SXMainWndElem::NumActiveElement != -1) { - color = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetColorBrush(); + color = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getColorBrush(); } else { - color = SXMainWndElem::JobMainWnd->GetColorBrush(); + color = SXMainWndElem::JobMainWnd->getColorBrush(); } sprintf(bufr, "%d", GetRValue(color)); sprintf(bufg, "%d", GetGValue(color)); sprintf(bufb, "%d", GetBValue(color)); - SXMainWndElem::EditParamColorBKR->SetText(bufr); - SXMainWndElem::EditParamColorBKG->SetText(bufg); - SXMainWndElem::EditParamColorBKB->SetText(bufb); + SXMainWndElem::EditParamColorBKR->setText(bufr); + SXMainWndElem::EditParamColorBKG->setText(bufg); + SXMainWndElem::EditParamColorBKB->setText(bufb); } void SXUpdateParam::TransparentTextBk() { bool ttbk = false; if(SXMainWndElem::NumActiveElement != -1) - ttbk = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetTransparentTextBk(); + ttbk = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getTransparentTextBk(); - SXMainWndElem::ComboBoxParamTransparentText->SetSel((ttbk ? 0 : 1)); + SXMainWndElem::ComboBoxParamTransparentText->setSel((ttbk ? 0 : 1)); } /*void SXUpdateParam::ParentFont() @@ -443,7 +386,7 @@ void SXUpdateParam::TransparentTextBk() if(SXMainWndElem::NumActiveElement != -1) pf = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->IsParentFont(); - SXMainWndElem::ComboBoxParamParentFont->SetSel((pf ? 0 : 1)); + SXMainWndElem::ComboBoxParamParentFont->setSel((pf ? 0 : 1)); }*/ void SXUpdateParam::Font() @@ -451,10 +394,10 @@ void SXUpdateParam::Font() if(SXMainWndElem::NumActiveElement != -1) { - HFONT hfont = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetFont(); + HFONT hfont = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHFont(); if(hfont == 0) { - SXMainWndElem::ButtonParamSelectFont->SetText("System font ..."); + SXMainWndElem::ButtonParamSelectFont->setText("System font ..."); } else { @@ -466,8 +409,8 @@ void SXUpdateParam::Font() int font_size = -MulDiv(lf.lfHeight, 72, GetDeviceCaps(hDC, LOGPIXELSY)); font_size = (font_size < 0) ? - font_size : font_size; ReleaseDC(NULL, hDC); - sprintf(buf,"%s%s%d",lf.lfFaceName,", ",font_size); - SXMainWndElem::ButtonParamSelectFont->SetText(buf); + sprintf(buf, "%s%s%d",lf.lfFaceName, ", ",font_size); + SXMainWndElem::ButtonParamSelectFont->setText(buf); } } } @@ -477,7 +420,7 @@ void SXUpdateParam::ParentFont() if(SXMainWndElem::NumActiveElement != -1) { HFONT defgui = (HFONT)GetStockObject(/*ANSI_VAR_FONT*/ANSI_VAR_FONT); - HFONT hfont = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetFont(); + HFONT hfont = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHFont(); /*LOGFONT LogFontDefGUI,LogFontCurrent; ZeroMemory(&LogFontDefGUI,sizeof(&LogFontDefGUI)); @@ -486,7 +429,7 @@ void SXUpdateParam::ParentFont() GetObject(hfont, sizeof(LOGFONT), &LogFontCurrent);*/ if(hfont == 0) { - SXMainWndElem::ComboBoxParamParentFont->SetSel(0); + SXMainWndElem::ComboBoxParamParentFont->setSel(0); } else if(defgui == hfont /*strcmp(LogFontDefGUI.lfFaceName,LogFontCurrent.lfFaceName) == 0 && @@ -498,11 +441,11 @@ void SXUpdateParam::ParentFont() LogFontDefGUI.lfStrikeOut == LogFontCurrent.lfStrikeOut*/ ) { - SXMainWndElem::ComboBoxParamParentFont->SetSel(1); + SXMainWndElem::ComboBoxParamParentFont->setSel(1); } else { - SXMainWndElem::ComboBoxParamParentFont->SetSel(2); + SXMainWndElem::ComboBoxParamParentFont->setSel(2); } //DeleteObject(hfont); DeleteObject(defgui); @@ -520,15 +463,15 @@ void SXUpdateParam::SetPosX() { RECT cr; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetClientRect(&cr); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getClientRect(&cr); else - SXMainWndElem::JobMainWnd->GetClientRect(&cr); + SXMainWndElem::JobMainWnd->getClientRect(&cr); RECT dtrect; SystemParametersInfo(SPI_GETWORKAREA, 0, &dtrect, 0); char posxtext[16]; - SXMainWndElem::EditParamPosX->GetText(posxtext,16); + SXMainWndElem::EditParamPosX->getText(posxtext,16); int posxnum = 0; - sscanf(posxtext,"%d",&posxnum); + sscanf(posxtext, "%d",&posxnum); int tmpright = (cr.right - cr.left) + posxnum; int tmpleft = posxnum; if(tmpright > dtrect.right) @@ -540,24 +483,24 @@ void SXUpdateParam::SetPosX() cr.left = tmpleft; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetClientRect(&cr,true); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setClientRect(&cr,true); else - SXMainWndElem::JobMainWnd->SetClientRect(&cr,true); + SXMainWndElem::JobMainWnd->setClientRect(&cr,true); } void SXUpdateParam::SetPosY() { RECT cr; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetClientRect(&cr); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getClientRect(&cr); else - SXMainWndElem::JobMainWnd->GetClientRect(&cr); + SXMainWndElem::JobMainWnd->getClientRect(&cr); RECT dtrect; SystemParametersInfo(SPI_GETWORKAREA, 0, &dtrect, 0); char posytext[16]; - SXMainWndElem::EditParamPosY->GetText(posytext,16); + SXMainWndElem::EditParamPosY->getText(posytext,16); int posynum = 0; - sscanf(posytext,"%d",&posynum); + sscanf(posytext, "%d",&posynum); int tmpbottom = (cr.bottom - cr.top) + posynum; int tmptop = posynum; if(tmpbottom > dtrect.bottom) @@ -569,80 +512,80 @@ void SXUpdateParam::SetPosY() cr.top = tmptop; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetClientRect(&cr,true); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setClientRect(&cr,true); else - SXMainWndElem::JobMainWnd->SetClientRect(&cr,true); + SXMainWndElem::JobMainWnd->setClientRect(&cr,true); } void SXUpdateParam::SetWidth() { RECT cr; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetClientRect(&cr); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getClientRect(&cr); else - SXMainWndElem::JobMainWnd->GetClientRect(&cr); + SXMainWndElem::JobMainWnd->getClientRect(&cr); RECT dtrect; SystemParametersInfo(SPI_GETWORKAREA, 0, &dtrect, 0); char widthtext[16]; - SXMainWndElem::EditParamWidth->GetText(widthtext,16); + SXMainWndElem::EditParamWidth->getText(widthtext,16); int widthnum = 0; - sscanf(widthtext,"%d",&widthnum); + sscanf(widthtext, "%d",&widthnum); if(widthnum + cr.left > dtrect.right) widthnum = dtrect.right - cr.left; cr.right = widthnum + cr.left; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetClientRect(&cr,true); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setClientRect(&cr,true); else - SXMainWndElem::JobMainWnd->SetClientRect(&cr,true); + SXMainWndElem::JobMainWnd->setClientRect(&cr,true); } void SXUpdateParam::SetHeight() { RECT cr; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetClientRect(&cr); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getClientRect(&cr); else - SXMainWndElem::JobMainWnd->GetClientRect(&cr); + SXMainWndElem::JobMainWnd->getClientRect(&cr); RECT dtrect; SystemParametersInfo(SPI_GETWORKAREA, 0, &dtrect, 0); char heighttext[16]; - SXMainWndElem::EditParamHeight->GetText(heighttext,16); + SXMainWndElem::EditParamHeight->getText(heighttext,16); int heightnum = 0; - sscanf(heighttext,"%d",&heightnum); + sscanf(heighttext, "%d",&heightnum); if(heightnum + cr.top > dtrect.bottom) heightnum = dtrect.bottom - cr.top; cr.bottom = heightnum + cr.top; if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetClientRect(&cr,true); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setClientRect(&cr,true); else - SXMainWndElem::JobMainWnd->SetClientRect(&cr,true); + SXMainWndElem::JobMainWnd->setClientRect(&cr,true); } void SXUpdateParam::SetVisible() { - int sel = SXMainWndElem::ComboBoxParamVisible->GetSel(); + int sel = SXMainWndElem::ComboBoxParamVisible->getSel(); if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->Visible(sel==0 ? true : false); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setVisible(sel==0 ? true : false); else - SXMainWndElem::JobMainWnd->Visible(sel==0 ? true : false); + SXMainWndElem::JobMainWnd->setVisible(sel==0 ? true : false); } void SXUpdateParam::SetEnable() { - int sel = SXMainWndElem::ComboBoxParamEnabled->GetSel(); + int sel = SXMainWndElem::ComboBoxParamEnabled->getSel(); if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->Enable(sel==0 ? true : false); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setEnable(sel==0 ? true : false); else - SXMainWndElem::JobMainWnd->Enable(sel==0 ? true : false); + SXMainWndElem::JobMainWnd->setEnable(sel==0 ? true : false); } void SXUpdateParam::SetCaption() { char str[256]; str[0] = 0; - SXMainWndElem::EditParamCaption->GetText(str,256); + SXMainWndElem::EditParamCaption->getText(str,256); //���� ���� ������ ��� ������� �� �������� //�� ������ ����������� ����� //�� ����������� ������ ��� @@ -652,15 +595,15 @@ void SXUpdateParam::SetCaption() { if(SXMainWndElem::NumActiveElement != -1) { - SXGUIFuctinon::SetText(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object,str); - /*sprintf(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name,"%s",str); + gui_func::text::SetText(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object, str); + /*sprintf(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name, "%s",str); char tmpAddItem[256]; - sprintf(tmpAddItem,"%s%s%s%s%s",str, " - ",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName," : ",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SysClassName); - SXMainWndElem::ListBoxAllElements->SetTextItem(SXMainWndElem::NumActiveElement,tmpAddItem); - SXMainWndElem::ListBoxAllElements->SetSel(SXMainWndElem::NumActiveElement);*/ + sprintf(tmpAddItem, "%s%s%s%s%s",str, " - ",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName, " : ",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SysClassName); + SXMainWndElem::ListBoxAllElements->setTextItem(SXMainWndElem::NumActiveElement,tmpAddItem); + SXMainWndElem::ListBoxAllElements->setSel(SXMainWndElem::NumActiveElement);*/ } else - SXMainWndElem::JobMainWnd->SetText(str); + SXMainWndElem::JobMainWnd->setText(str); } } @@ -668,7 +611,7 @@ void SXUpdateParam::SetVarName() { char str[256]; str[0] = 0; - SXMainWndElem::EditParamVarName->GetText(str,256); + SXMainWndElem::EditParamVarName->getText(str,256); //���� ���� ������ ��� ������� �� �������� //�� ������ ����������� ����� //�� ����������� ������ ��� @@ -678,41 +621,41 @@ void SXUpdateParam::SetVarName() { if(SXMainWndElem::NumActiveElement != -1) { - //SXGUIFuctinon::SetText(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object,str); - sprintf(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name,"%s",str); + //gui_func::text::SetText(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object,str); + sprintf(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name, "%s",str); char tmpAddItem[256]; - sprintf(tmpAddItem,"%s%s%s%s%s",str, " - ",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName," : ",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SysClassName); - SXMainWndElem::ListBoxAllElements->SetTextItem(SXMainWndElem::NumActiveElement,tmpAddItem); - SXMainWndElem::ListBoxAllElements->SetSel(SXMainWndElem::NumActiveElement); + sprintf(tmpAddItem, "%s%s%s%s%s",str, " - ",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName, " : ",SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SysClassName); + SXMainWndElem::ListBoxAllElements->setItemText(SXMainWndElem::NumActiveElement, tmpAddItem); + SXMainWndElem::ListBoxAllElements->setSel(SXMainWndElem::NumActiveElement); } else - sprintf(SXMainWndElem::NameJobWnd,"%s",str);//SXMainWndElem::JobMainWnd->SetText(str); + sprintf(SXMainWndElem::NameJobWnd, "%s",str);//SXMainWndElem::JobMainWnd->setText(str); } } void SXUpdateParam::SetVisibleHint() { - int sel = SXMainWndElem::ComboBoxParamHintVisible->GetSel(); + int sel = SXMainWndElem::ComboBoxParamHintVisible->getSel(); if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->ShowHint(sel==0 ? true : false); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setShowHint(sel==0 ? true : false); else - SXMainWndElem::JobMainWnd->ShowHint(sel==0 ? true : false); + SXMainWndElem::JobMainWnd->setShowHint(sel==0 ? true : false); } void SXUpdateParam::SetHintText() { char str[1024]; - SXMainWndElem::EditParamHintText->GetText(str,1024); - int sel = SXMainWndElem::ComboBoxParamHintVisible->GetSel(); + SXMainWndElem::EditParamHintText->getText(str,1024); + int sel = SXMainWndElem::ComboBoxParamHintVisible->getSel(); if(SXMainWndElem::NumActiveElement != -1) { - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetHintText(str); - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->ShowHint(sel==0 ? true : false); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setHintText(str); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setShowHint(sel==0 ? true : false); } else { - SXMainWndElem::JobMainWnd->SetHintText(str); - SXMainWndElem::JobMainWnd->ShowHint(sel==0 ? true : false); + SXMainWndElem::JobMainWnd->setHintText(str); + SXMainWndElem::JobMainWnd->setShowHint(sel==0 ? true : false); } } @@ -720,67 +663,67 @@ void SXUpdateParam::SetColorText() { char bufr[16],bufg[16],bufb[16]; int numr,numg,numb; - SXMainWndElem::EditParamColorTextR->GetText(bufr,4); - SXMainWndElem::EditParamColorTextG->GetText(bufg,4); - SXMainWndElem::EditParamColorTextB->GetText(bufb,4); - sscanf(bufr,"%d",&numr); - sscanf(bufg,"%d",&numg); - sscanf(bufb,"%d",&numb); + SXMainWndElem::EditParamColorTextR->getText(bufr,4); + SXMainWndElem::EditParamColorTextG->getText(bufg,4); + SXMainWndElem::EditParamColorTextB->getText(bufb,4); + sscanf(bufr, "%d",&numr); + sscanf(bufg, "%d",&numg); + sscanf(bufb, "%d",&numb); if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetColorText(numr,numg,numb); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setColorText(RGB(numr, numg, numb)); } void SXUpdateParam::SetColorTextBK() { char bufr[16],bufg[16],bufb[16]; int numr,numg,numb; - SXMainWndElem::EditParamColorTextBKR->GetText(bufr,4); - SXMainWndElem::EditParamColorTextBKG->GetText(bufg,4); - SXMainWndElem::EditParamColorTextBKB->GetText(bufb,4); - sscanf(bufr,"%d",&numr); - sscanf(bufg,"%d",&numg); - sscanf(bufb,"%d",&numb); + SXMainWndElem::EditParamColorTextBKR->getText(bufr,4); + SXMainWndElem::EditParamColorTextBKG->getText(bufg,4); + SXMainWndElem::EditParamColorTextBKB->getText(bufb,4); + sscanf(bufr, "%d",&numr); + sscanf(bufg, "%d",&numg); + sscanf(bufb, "%d",&numb); if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetColorTextBk(numr,numg,numb); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setColorTextBk(RGB(numr, numg, numb)); } void SXUpdateParam::SetColorBK() { char bufr[16],bufg[16],bufb[16]; int numr,numg,numb; - SXMainWndElem::EditParamColorBKR->GetText(bufr,4); - SXMainWndElem::EditParamColorBKG->GetText(bufg,4); - SXMainWndElem::EditParamColorBKB->GetText(bufb,4); - sscanf(bufr,"%d",&numr); - sscanf(bufg,"%d",&numg); - sscanf(bufb,"%d",&numb); + SXMainWndElem::EditParamColorBKR->getText(bufr,4); + SXMainWndElem::EditParamColorBKG->getText(bufg,4); + SXMainWndElem::EditParamColorBKB->getText(bufb,4); + sscanf(bufr, "%d",&numr); + sscanf(bufg, "%d",&numg); + sscanf(bufb, "%d",&numb); if(SXMainWndElem::NumActiveElement != -1) { - if(strcmp(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName,"SXGUIBaseWnd") == 0) - dynamic_cast<ISXGUIBaseWnd*>(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object)->SetColorBrush(numr, numg, numb); + if(strcmp(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName, "SXGUIBaseWnd") == 0) + dynamic_cast<ISXGUIBaseWnd*>(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object)->setColorBrush(RGB(numr, numg, numb)); else - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetColorBrush(numr,numg,numb); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setColorBrush(RGB(numr, numg, numb)); } else - SXMainWndElem::JobMainWnd->SetColorBrush(numr,numg,numb); + SXMainWndElem::JobMainWnd->setColorBrush(RGB(numr, numg, numb)); } void SXUpdateParam::SetTransparentTextBk() { - int sel = SXMainWndElem::ComboBoxParamTransparentText->GetSel(); + int sel = SXMainWndElem::ComboBoxParamTransparentText->getSel(); if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetTransparentTextBk(sel==0 ? true : false); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setTransparentTextBk(sel==0 ? true : false); } void SXUpdateParam::SetParentFont() { - int sel = SXMainWndElem::ComboBoxParamParentFont->GetSel(); + int sel = SXMainWndElem::ComboBoxParamParentFont->getSel(); if(SXMainWndElem::NumActiveElement != -1 && sel == 0) { - HFONT ParentFont = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->ParentFont(); + HFONT ParentFont = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getParentHFont(); - SendMessage(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHWND(),WM_SETFONT,WPARAM(ParentFont),1); + SendMessage(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHWND(),WM_SETFONT,WPARAM(ParentFont),1); DeleteObject(ParentFont); SXUpdateParam::Font(); @@ -789,7 +732,7 @@ void SXUpdateParam::SetParentFont() { HFONT DefaultFont = (HFONT) GetStockObject(ANSI_VAR_FONT); - SendMessage(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHWND(),WM_SETFONT,WPARAM(DefaultFont),1); + SendMessage(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHWND(),WM_SETFONT,WPARAM(DefaultFont),1); DeleteObject(DefaultFont); SXUpdateParam::Font(); @@ -804,7 +747,7 @@ void SXUpdateParam::SetFont() { HFONT hfont; if(SXMainWndElem::NumActiveElement != -1) - hfont = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetFont(); + hfont = SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHFont(); CHOOSEFONT cf; @@ -818,26 +761,26 @@ void SXUpdateParam::SetFont() cf.lpLogFont = &lf; cf.Flags = CF_SCREENFONTS | CF_INITTOLOGFONTSTRUCT; - SXMainWndElem::MainWnd->Enable(false); - SXMainWndElem::JobMainWnd->Enable(false); - SXMainWndElem::ParamWnd->Enable(false); - SXMainWndElem::WndLog->Enable(false); + SXMainWndElem::MainWnd->setEnable(false); + SXMainWndElem::JobMainWnd->setEnable(false); + SXMainWndElem::ParamWnd->setEnable(false); + SXMainWndElem::WndLog->setEnable(false); if(ChooseFont(&cf)) { if(SXMainWndElem::NumActiveElement != -1) - SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->SetFont(lf.lfFaceName,lf.lfHeight,lf.lfWidth,lf.lfWeight,lf.lfItalic,lf.lfUnderline,lf.lfStrikeOut); + SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->setFont(lf.lfFaceName,lf.lfHeight,lf.lfWidth,lf.lfWeight,lf.lfItalic,lf.lfUnderline,lf.lfStrikeOut); char buf[256]; HDC hDC = ::GetDC(NULL); int font_size = -MulDiv(lf.lfHeight, 72, GetDeviceCaps(hDC, LOGPIXELSY)); font_size = (font_size < 0) ? - font_size : font_size; ReleaseDC(NULL, hDC); - sprintf(buf,"%s%s%d",lf.lfFaceName,", ",font_size); - SXMainWndElem::ButtonParamSelectFont->SetText(buf); + sprintf(buf, "%s%s%d",lf.lfFaceName, ", ",font_size); + SXMainWndElem::ButtonParamSelectFont->setText(buf); } - SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); + SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); } void SXUpdateParam::SetImgButton() @@ -862,41 +805,41 @@ void SXUpdateParam::SetImgButton() ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; - SXMainWndElem::MainWnd->Enable(false); - SXMainWndElem::JobMainWnd->Enable(false); - SXMainWndElem::ParamWnd->Enable(false); - SXMainWndElem::WndLog->Enable(false); + SXMainWndElem::MainWnd->setEnable(false); + SXMainWndElem::JobMainWnd->setEnable(false); + SXMainWndElem::ParamWnd->setEnable(false); + SXMainWndElem::WndLog->setEnable(false); if(GetOpenFileName(&ofn) == TRUE) { - if(SXMainWndElem::NumActiveElement != -1 && strcmp(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName,"SXGUIButtonImg") == 0) + if(SXMainWndElem::NumActiveElement != -1 && strcmp(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName, "SXGUIButtonImg") == 0) { ISXGUIButtonImg* bimg = dynamic_cast<ISXGUIButtonImg*>(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object); - bimg->ReInitImage(szFileName); - InvalidateRect(bimg->GetHWND(),0,1); - SXMainWndElem::ButtomParamImgBLoadImg->SetText(szFileTitle); + bimg->reInitImage(szFileName); + InvalidateRect(bimg->getHWND(),0,1); + SXMainWndElem::ButtomParamImgBLoadImg->setText(szFileTitle); } } - SXMainWndElem::MainWnd->Enable(true); - SXMainWndElem::JobMainWnd->Enable(true); - SXMainWndElem::ParamWnd->Enable(true); - SXMainWndElem::WndLog->Enable(true); + SXMainWndElem::MainWnd->setEnable(true); + SXMainWndElem::JobMainWnd->setEnable(true); + SXMainWndElem::ParamWnd->setEnable(true); + SXMainWndElem::WndLog->setEnable(true); } void SXUpdateParam::SetMenuWindow() { - int check = SXMainWndElem::CheckBoxParamWinMenu->GetCheck(); + int check = SXMainWndElem::CheckBoxParamWinMenu->getCheck(); if(check == 1) { - SXMainWndElem::MenuWindow->SetToWindow(SXMainWndElem::JobMainWnd->GetHWND()); + SXMainWndElem::MenuWindow->setToWindow(SXMainWndElem::JobMainWnd->getHWND()); } else - SetMenu(SXMainWndElem::JobMainWnd->GetHWND(),0); + SetMenu(SXMainWndElem::JobMainWnd->getHWND(),0); } void SaveFile(const char* path) { FILE* file = 0; - file = fopen(path,"w"); + file = fopen(path, "w"); WORD CountSave = SXMainWndElem::CreateElements.size(); @@ -904,11 +847,11 @@ void SaveFile(const char* path) //{ fprintf(file, "[JobWindow]\n"); char classname[32]; - GetClassName(SXMainWndElem::JobMainWnd->GetHWND(),classname,31); + GetClassName(SXMainWndElem::JobMainWnd->getHWND(),classname,31); fprintf(file, "SysClassName = %s\n", classname); fprintf(file, "Name = %s\n", SXMainWndElem::NameJobWnd); char textwnd[256]; - SXMainWndElem::JobMainWnd->GetText(textwnd,255); + SXMainWndElem::JobMainWnd->getText(textwnd,255); fprintf(file, "CaptionElement = %s\n", textwnd); //} @@ -917,7 +860,7 @@ void SaveFile(const char* path) //{ RECT GClientRect; long Width,Height; - SXMainWndElem::JobMainWnd->GetClientRect(&GClientRect); + SXMainWndElem::JobMainWnd->getClientRect(&GClientRect); fprintf(file, "left = %d\n", GClientRect.left); fprintf(file, "top = %d\n", GClientRect.top); @@ -937,28 +880,30 @@ void SaveFile(const char* path) //���������� ������ ��� //{ - ColorBK = SXMainWndElem::JobMainWnd->GetColorBrush(); + ColorBK = SXMainWndElem::JobMainWnd->getColorBrush(); fprintf(file, "ColorBK = %d\n", ColorBK); //} //���������� ������������� ���� - bool MenuWindow = (SXMainWndElem::CheckBoxParamWinMenu->GetCheck() == 1) ? true : false; + bool MenuWindow = (SXMainWndElem::CheckBoxParamWinMenu->getCheck() == 1) ? true : false; fprintf(file, "MenuWindow = %d\n", MenuWindow); //���������� ���������� � ���������� //{ - bool HintVisible = SXMainWndElem::JobMainWnd->ShowHint(); + bool HintVisible = SXMainWndElem::JobMainWnd->getShowHint(); fprintf(file, "HintVisible = %d\n", HintVisible); - char HintText[1024]; - HintText[0] = 0; - SXMainWndElem::JobMainWnd->GetHintText(HintText); + /*char HintText[1024]; + HintText[0] = 0;*/ + const char *HintText = SXMainWndElem::JobMainWnd->getHintText(); + if (!HintText) + HintText = ""; fprintf(file, "HintText = %s\n", HintText); //} //��������� ��������� � ���������������� - bool Visible = SXMainWndElem::JobMainWnd->Visible(); + bool Visible = SXMainWndElem::JobMainWnd->getVisible(); fprintf(file, "Visible = %d\n", Visible); - bool Enable = SXMainWndElem::JobMainWnd->Enable(); + bool Enable = SXMainWndElem::JobMainWnd->getEnable(); fprintf(file, "Enable = %d\n", Enable); for(int i=0;i<CountSave;i++) @@ -975,17 +920,17 @@ void SaveFile(const char* path) strcmp(SXMainWndElem::CreateElements[i]->SysClassName,UPDOWN_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TRACKBAR_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,PROGRESS_CLASS) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIComboBox") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIComboBox") != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TOOLBARCLASSNAME) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIListBox") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIListBox") != 0 && strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIListView") != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName, STATUSCLASSNAME) != 0 ) { //char* tmptxt = SXMainWndElem::CreateElements[i]->SysClassName; ISXGUITextual* textual = dynamic_cast<ISXGUITextual*>(SXMainWndElem::CreateElements[i]->Object); - textual->GetText(CaptionElement,256); + textual->getText(CaptionElement,256); fprintf(file, "CaptionElement = %s\n", CaptionElement); } @@ -994,7 +939,7 @@ void SaveFile(const char* path) memset(&GClientRect,0,sizeof(RECT)); Width = Height = 0; - SXMainWndElem::CreateElements[i]->Object->GetClientRect(&GClientRect); + SXMainWndElem::CreateElements[i]->Object->getClientRect(&GClientRect); fprintf(file, "left = %d\n", GClientRect.left); fprintf(file, "top = %d\n", GClientRect.top); @@ -1011,12 +956,12 @@ void SaveFile(const char* path) strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TRACKBAR_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,PROGRESS_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TOOLBARCLASSNAME) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIBaseWnd") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButton") != 0 + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIBaseWnd") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButton") != 0 ) { - HFONT hfont = SXMainWndElem::CreateElements[i]->Object->GetFont(); + HFONT hfont = SXMainWndElem::CreateElements[i]->Object->getHFont(); LOGFONT LogFont; if(hfont == 0) { @@ -1034,7 +979,7 @@ void SaveFile(const char* path) ZeroMemory(&LogFont,sizeof(&LogFont)); GetObject(hfont, sizeof(LogFont), &LogFont); - sprintf(FontName,"%s",LogFont.lfFaceName); + sprintf(FontName, "%s",LogFont.lfFaceName); WidthFont = LogFont.lfWidth; HeightFont = LogFont.lfHeight; WeightFont = LogFont.lfWeight; @@ -1058,21 +1003,21 @@ void SaveFile(const char* path) if( strcmp(SXMainWndElem::CreateElements[i]->SysClassName,UPDOWN_CLASS) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButton") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButton") != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TRACKBAR_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,STATUSCLASSNAME) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,PROGRESS_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TOOLBARCLASSNAME) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIBaseWnd") != 0 + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIBaseWnd") != 0 ) { - ColorText = SXMainWndElem::CreateElements[i]->Object->GetColorText(); - ColorTextBK = SXMainWndElem::CreateElements[i]->Object->GetColorTextBk(); + ColorText = SXMainWndElem::CreateElements[i]->Object->getColorText(); + ColorTextBK = SXMainWndElem::CreateElements[i]->Object->getColorTextBk(); fprintf(file, "ColorText = %d\n", ColorText); fprintf(file, "ColorTextBK = %d\n", ColorTextBK); - TransparentTextBK = SXMainWndElem::CreateElements[i]->Object->GetTransparentTextBk(); + TransparentTextBK = SXMainWndElem::CreateElements[i]->Object->getTransparentTextBk(); fprintf(file, "TransparentTextBK = %d\n", TransparentTextBK); } @@ -1080,41 +1025,43 @@ void SaveFile(const char* path) //{ if( strcmp(SXMainWndElem::CreateElements[i]->SysClassName,UPDOWN_CLASS) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButton") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButton") != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TRACKBAR_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,STATUSCLASSNAME) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,PROGRESS_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TOOLBARCLASSNAME) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") ) { - ColorBK = SXMainWndElem::CreateElements[i]->Object->GetColorBrush(); + ColorBK = SXMainWndElem::CreateElements[i]->Object->getColorBrush(); fprintf(file, "ColorBK = %d\n", ColorBK); } //} //���������� ���������� � ���������� //{ - bool HintVisible = SXMainWndElem::CreateElements[i]->Object->ShowHint(); + bool HintVisible = SXMainWndElem::CreateElements[i]->Object->getShowHint(); fprintf(file, "HintVisible = %d\n", HintVisible); - char HintText[1024]; - HintText[0] = 0; - SXMainWndElem::CreateElements[i]->Object->GetHintText(HintText); + /*char HintText[1024]; + HintText[0] = 0;*/ + const char *HintText = SXMainWndElem::CreateElements[i]->Object->getHintText(); + if (!HintText) + HintText = ""; fprintf(file, "HintText = %s\n", HintText); //} //��������� ��������� � ���������������� - bool Visible = SXMainWndElem::CreateElements[i]->Object->Visible(); + bool Visible = SXMainWndElem::CreateElements[i]->Object->getVisible(); fprintf(file, "Visible = %d\n", Visible); - bool Enable = SXMainWndElem::CreateElements[i]->Object->Enable(); + bool Enable = SXMainWndElem::CreateElements[i]->Object->getEnable(); fprintf(file, "Enable = %d\n", Enable); - if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") == 0) + if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") == 0) { char PathForImg[1024]; PathForImg[0] = 0; ISXGUIButtonImg* tmpImgButton = dynamic_cast<ISXGUIButtonImg*>(SXMainWndElem::CreateElements[i]->Object); - tmpImgButton->GetPathForImg(PathForImg); + tmpImgButton->getPathForImg(PathForImg); fprintf(file, "PathForImg = %s\n", PathForImg); } } @@ -1132,12 +1079,12 @@ void LoadFile(const char* path) CaptionElement[0] = 0; char classname[256]; - sprintf(classname,"%s",tmpconfig->getKey("JobWindow", "SysClassName")); + sprintf(classname, "%s",tmpconfig->getKey("JobWindow", "SysClassName")); sprintf(SXMainWndElem::NameJobWnd, "%s", tmpconfig->getKey("JobWindow", "Name")); sprintf(CaptionElement, "%s", tmpconfig->getKey("JobWindow", "CaptionElement")); - SXMainWndElem::JobMainWnd->SetText(CaptionElement); + SXMainWndElem::JobMainWnd->setText(CaptionElement); RECT GClientRect; long Width,Height; @@ -1152,34 +1099,35 @@ void LoadFile(const char* path) GClientRect.right = Width + GClientRect.left; GClientRect.bottom = Height + GClientRect.top; - SXMainWndElem::JobMainWnd->SetClientRect(&GClientRect,false); + SXMainWndElem::JobMainWnd->setClientRect(&GClientRect,false); DWORD ColorText,ColorTextBK,ColorBK; BOOL TransparentTextBK; sscanf(tmpconfig->getKey("JobWindow", "ColorBK"), "%d", &ColorBK); - SXMainWndElem::JobMainWnd->SetColorBrush(ColorBK); + SXMainWndElem::JobMainWnd->setColorBrush(ColorBK); BOOL MenuWindow; sscanf(tmpconfig->getKey("JobWindow", "MenuWindow"), "%d", &MenuWindow); - SXMainWndElem::CheckBoxParamWinMenu->SetCheck(MenuWindow ? SXGUI_CHECKBOX_CHECKED : SXGUI_CHECKBOX_UNCHECKED); - InvalidateRect(SXMainWndElem::CheckBoxParamWinMenu->GetHWND(),0,1); + SXMainWndElem::CheckBoxParamWinMenu->setCheck(MenuWindow ? SXGUI_CHECKBOX_STATE_CHECKED : SXGUI_CHECKBOX_STATE_UNCHECKED); + InvalidateRect(SXMainWndElem::CheckBoxParamWinMenu->getHWND(),0,1); SXUpdateParam::SetMenuWindow(); BOOL HintVisible; sscanf(tmpconfig->getKey("JobWindow", "HintVisible"), "%d", &HintVisible); - SXMainWndElem::JobMainWnd->ShowHint(HintVisible); + SXMainWndElem::JobMainWnd->setShowHint(HintVisible); char HintText[1024]; HintText[0] = 0; sprintf(HintText, "%s", tmpconfig->getKey("JobWindow", "HintText")); - SXMainWndElem::JobMainWnd->SetHintText(HintText); + if (strlen(HintText) > 0) + SXMainWndElem::JobMainWnd->setHintText(HintText); BOOL Visible; sscanf(tmpconfig->getKey("JobWindow", "Visible"), "%d", &Visible); - SXMainWndElem::JobMainWnd->Visible(Visible); + SXMainWndElem::JobMainWnd->setVisible(Visible); BOOL Enable; sscanf(tmpconfig->getKey("JobWindow", "Enable"), "%d", &Enable); - SXMainWndElem::JobMainWnd->Enable(Enable); + SXMainWndElem::JobMainWnd->setEnable(Enable); int CountObject = 0; WORD CountSave = tmpconfig->getSectionCount() - 1; @@ -1223,100 +1171,100 @@ void LoadFile(const char* path) //�������������� ������ //{ - if(strcmp(Object->SXClassName,"SXGUIButton") == 0) + if(strcmp(Object->SXClassName, "SXGUIButton") == 0) { CountObject = 0; - Object->Object = SXGUICrButton(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXGUI_BUTTON_IMAGE_NONE, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrButton(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXGUI_BUTTON_IMAGE_NONE, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIButtonImg") == 0) + else if(strcmp(Object->SXClassName, "SXGUIButtonImg") == 0) { CountObject = 1; - ISXGUIButtonImg* tmpButtonImg = SXGUICrButtonImgLoad("",GClientRect.left,GClientRect.top,Width,Height,RGB(0,0,0),RGB(100,100,100),SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); - tmpButtonImg->SetColorFrame(100, 100, 100); - tmpButtonImg->SetEnable(true); - tmpButtonImg->SetEnableActive(true); + ISXGUIButtonImg* tmpButtonImg = SXGUICrButtonImgLoad("",GClientRect.left,GClientRect.top,Width,Height,RGB(0,0,0),RGB(100,100,100),SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); + tmpButtonImg->setColorFrame(RGB(100, 100, 100)); + tmpButtonImg->setEnable(true); + tmpButtonImg->setActive(true); Object->Object = tmpButtonImg; } - else if(strcmp(Object->SXClassName,"SXGUIEdit") == 0) + else if(strcmp(Object->SXClassName, "SXGUIEdit") == 0) { CountObject = 2; - Object->Object = SXGUICrEdit(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrEdit(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUICheckBox") == 0) + else if(strcmp(Object->SXClassName, "SXGUICheckBox") == 0) { CountObject = 3; - Object->Object = SXGUICrCheckBox(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0, true); + Object->Object = SXGUICrCheckBox(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0, true); } - else if(strcmp(Object->SXClassName,"SXGUIComboBox") == 0) + else if(strcmp(Object->SXClassName, "SXGUIComboBox") == 0) { CountObject = 4; - Object->Object = SXGUICrComboBox(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrComboBox(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIGroupBox") == 0) + else if(strcmp(Object->SXClassName, "SXGUIGroupBox") == 0) { CountObject = 5; - Object->Object = SXGUICrGroupBox(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrGroupBox(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIListBox") == 0) + else if(strcmp(Object->SXClassName, "SXGUIListBox") == 0) { CountObject = 6; - Object->Object = SXGUICrListBox(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0, true); - SendMessage(Object->Object->GetHWND(),LB_SETITEMHEIGHT,0,1); + Object->Object = SXGUICrListBox(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0, true); + SendMessage(Object->Object->getHWND(),LB_SETITEMHEIGHT,0,1); } else if (strcmp(Object->SXClassName, "SXGUIListView") == 0) { CountObject = 7; - Object->Object = SXGUICrListView(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrListView(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIMemo") == 0) + else if(strcmp(Object->SXClassName, "SXGUIMemo") == 0) { CountObject = 8; - Object->Object = SXGUICrMemo(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrMemo(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIProgressBar") == 0) + else if(strcmp(Object->SXClassName, "SXGUIProgressBar") == 0) { CountObject = 9; - Object->Object = SXGUICrProgressBar(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0, true, true); + Object->Object = SXGUICrProgressBar(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0, true, true); } - else if(strcmp(Object->SXClassName,"SXGUIRadioButton") == 0) + else if(strcmp(Object->SXClassName, "SXGUIRadioButton") == 0) { CountObject = 10; - Object->Object = SXGUICrRadioButton(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrRadioButton(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIStatic") == 0) + else if(strcmp(Object->SXClassName, "SXGUIStatic") == 0) { CountObject = 11; - Object->Object = SXGUICrStatic(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrStatic(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUITrackBar") == 0) + else if(strcmp(Object->SXClassName, "SXGUITrackBar") == 0) { CountObject = 12; - Object->Object = SXGUICrTrackBar(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrTrackBar(CaptionElement, GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIStatusBar") == 0) + else if(strcmp(Object->SXClassName, "SXGUIStatusBar") == 0) { CountObject = 13; - Object->Object = SXGUICrStatusBar(CaptionElement, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrStatusBar(CaptionElement, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIToolBar") == 0) + else if(strcmp(Object->SXClassName, "SXGUIToolBar") == 0) { CountObject = 14; - Object->Object = SXGUICrToolBar(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); + Object->Object = SXGUICrToolBar(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); } - else if(strcmp(Object->SXClassName,"SXGUIUpDown") == 0) + else if(strcmp(Object->SXClassName, "SXGUIUpDown") == 0) { CountObject = 15; - Object->Object = SXGUICrUpDown(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0, 0, 0); + Object->Object = SXGUICrUpDown(GClientRect.left, GClientRect.top, Width, Height, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0, 0, 0); } - else if(strcmp(Object->SXClassName,"SXGUIBaseWnd") == 0) + else if(strcmp(Object->SXClassName, "SXGUIBaseWnd") == 0) { CountObject = 16; - Object->Object = SXGUICrBaseWnd(Object->Name, CaptionElement, 0, - 0,GClientRect.left,GClientRect.top,Width,Height, + Object->Object = SXGUICrBaseWndEx(Object->Name, CaptionElement, + GClientRect.left,GClientRect.top,Width,Height, 0,0,CreateSolidBrush(RGB(200,200,200)), 0,CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER, - SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob); + SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob); } //} @@ -1332,9 +1280,9 @@ void LoadFile(const char* path) strcmp(Object->SysClassName,TRACKBAR_CLASS) != 0 && strcmp(Object->SysClassName,TOOLBARCLASSNAME) != 0 && strcmp(Object->SysClassName,PROGRESS_CLASS) != 0 && - strcmp(Object->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(Object->SXClassName,"SXGUIBaseWnd") != 0 && - strcmp(Object->SXClassName,"SXGUIButton") != 0 + strcmp(Object->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(Object->SXClassName, "SXGUIBaseWnd") != 0 && + strcmp(Object->SXClassName, "SXGUIButton") != 0 ) { sprintf(FontName, "%s", tmpconfig->getKey(sectname, "FontName")); @@ -1342,7 +1290,7 @@ void LoadFile(const char* path) //���� ������ ������ ����� ������ �� ���������� ��������� ����� if(FontName[0] == 0) { - Object->Object->SetFont(0); + Object->Object->setHFont(0); } else { @@ -1354,7 +1302,7 @@ void LoadFile(const char* path) sscanf(tmpconfig->getKey(sectname, "Underline"), "%d", &Underline); sscanf(tmpconfig->getKey(sectname, "StrikeOut"), "%d", &StrikeOut); - Object->Object->SetFont(FontName,HeightFont,WidthFont,WeightFont,Italic,Underline,StrikeOut); + Object->Object->setFont(FontName,HeightFont,WidthFont,WeightFont,Italic,Underline,StrikeOut); } } //} @@ -1366,22 +1314,22 @@ void LoadFile(const char* path) //{ if( strcmp(Object->SysClassName,UPDOWN_CLASS) != 0 && - strcmp(Object->SXClassName,"SXGUIButton") != 0 && + strcmp(Object->SXClassName, "SXGUIButton") != 0 && strcmp(Object->SysClassName,TRACKBAR_CLASS) != 0 && strcmp(Object->SysClassName,STATUSCLASSNAME) != 0 && strcmp(Object->SysClassName,PROGRESS_CLASS) != 0 && strcmp(Object->SysClassName,TOOLBARCLASSNAME) != 0 && - strcmp(Object->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(Object->SXClassName,"SXGUIBaseWnd") != 0 + strcmp(Object->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(Object->SXClassName, "SXGUIBaseWnd") != 0 ) { sscanf(tmpconfig->getKey(sectname, "ColorText"), "%d", &ColorText); sscanf(tmpconfig->getKey(sectname, "ColorTextBK"), "%d", &ColorTextBK); sscanf(tmpconfig->getKey(sectname, "TransparentTextBK"), "%d", &TransparentTextBK); - Object->Object->SetColorText(ColorText); - Object->Object->SetColorTextBk(ColorTextBK); - Object->Object->SetTransparentTextBk(TransparentTextBK); + Object->Object->setColorText(ColorText); + Object->Object->setColorTextBk(ColorTextBK); + Object->Object->setTransparentTextBk(TransparentTextBK); } //} @@ -1389,42 +1337,43 @@ void LoadFile(const char* path) //{ if( strcmp(Object->SysClassName,UPDOWN_CLASS) != 0 && - strcmp(Object->SXClassName,"SXGUIButton") != 0 && + strcmp(Object->SXClassName, "SXGUIButton") != 0 && strcmp(Object->SysClassName,TRACKBAR_CLASS) != 0 && strcmp(Object->SysClassName,STATUSCLASSNAME) != 0 && strcmp(Object->SysClassName,PROGRESS_CLASS) != 0 && strcmp(Object->SysClassName,TOOLBARCLASSNAME) != 0 && - strcmp(Object->SXClassName,"SXGUIButtonImg") + strcmp(Object->SXClassName, "SXGUIButtonImg") ) { sscanf(tmpconfig->getKey(sectname, "ColorBK"), "%d", &ColorBK); - Object->Object->SetColorBrush(ColorBK); + Object->Object->setColorBrush(ColorBK); } //} BOOL HintVisible; sscanf(tmpconfig->getKey(sectname, "HintVisible"), "%d", &HintVisible); - Object->Object->ShowHint(HintVisible); + Object->Object->setShowHint(HintVisible); char HintText[1024]; HintText[0] = 0; sprintf(HintText, "%s", tmpconfig->getKey(sectname, "HintText")); - Object->Object->SetHintText(HintText); + if (strlen(HintText) > 0) + Object->Object->setHintText(HintText); BOOL Visible; sscanf(tmpconfig->getKey(sectname, "Visible"), "%d", &Visible); - Object->Object->Visible(Visible); + Object->Object->setVisible(Visible); BOOL Enable; sscanf(tmpconfig->getKey(sectname, "Enable"), "%d", &Enable); - Object->Object->Enable(Enable); + Object->Object->setEnable(Enable); - if(strcmp(Object->SXClassName,"SXGUIButtonImg") == 0) + if(strcmp(Object->SXClassName, "SXGUIButtonImg") == 0) { char PathForImg[1024]; PathForImg[0] = 0; sprintf(PathForImg, "%s", tmpconfig->getKey(sectname, "PathForImg")); ISXGUIButtonImg* tmpImgButton = dynamic_cast<ISXGUIButtonImg*>(Object->Object); - tmpImgButton->ReInitImage(PathForImg); + tmpImgButton->reInitImage(PathForImg); } SXMainWndElem::CountCreateNewElem++; @@ -1432,58 +1381,58 @@ void LoadFile(const char* path) SXMainWndElem::CreateElements.push_back(Object); //����������� ������� ���������� ��������� ��������� SXMainWndElem::NumSourceElements[CountObject]++; - InLog("%s%s%s%s%s","Created element sx_class [",Object->SXClassName,"], sys_class [",Object->SysClassName,"]"); + InLog("%s%s%s%s%s", "Created element sx_class [",Object->SXClassName, "], sys_class [",Object->SysClassName, "]"); //����� ��������� ����� ������ � list box //������������ � �������� ������ ���������� ����� ���������� �������� char tmpAddItem[256]; - sprintf(tmpAddItem,"%s%s%s%s%s",Object->Name, " - ",Object->SXClassName," : ",Object->SysClassName); - SXMainWndElem::ListBoxAllElements->AddItem(tmpAddItem); + sprintf(tmpAddItem, "%s%s%s%s%s",Object->Name, " - ",Object->SXClassName, " : ",Object->SysClassName); + SXMainWndElem::ListBoxAllElements->addItem(tmpAddItem); - int countitem = SXMainWndElem::ListBoxAllElements->GetCountItem(); - SXMainWndElem::ListBoxAllElements->SetItemData(SXMainWndElem::ListBoxAllElements->GetCountItem()-1,(LPARAM)SXMainWndElem::CreateElements.size()-1); - SXMainWndElem::ListBoxAllElements->SetSel(SXMainWndElem::NumActiveElement); + int countitem = SXMainWndElem::ListBoxAllElements->getItemCount(); + SXMainWndElem::ListBoxAllElements->setItemData(SXMainWndElem::ListBoxAllElements->getItemCount() - 1, (LPARAM)SXMainWndElem::CreateElements.size() - 1); + SXMainWndElem::ListBoxAllElements->setSel(SXMainWndElem::NumActiveElement); - InLog("%s","Parameters ParamWnd overwritten, serial number of elements writed (userdata32)"); + InLog("%s", "Parameters ParamWnd overwritten, serial number of elements writed (userdata32)"); } for(int e=0;e<SXMainWndElem::CreateElements.size();e++) { - InvalidateRect(SXMainWndElem::CreateElements[e]->Object->GetHWND(),0,1); + InvalidateRect(SXMainWndElem::CreateElements[e]->Object->getHWND(),0,1); } - InvalidateRect(SXMainWndElem::JobMainWnd->GetHWND(),0,TRUE); + InvalidateRect(SXMainWndElem::JobMainWnd->getHWND(),0,TRUE); } void CreateNew(bool reestablish) { - InLog("%s","start to delete all and start a new project ..."); + InLog("%s", "start to delete all and start a new project ..."); SXMainWndElem::NumActiveElement = -1; int size = SXMainWndElem::CreateElements.size(); for(int i=0;i<size;i++) { - InLog("%s%s%s","Deletion of object [",SXMainWndElem::CreateElements[0]->Name,"] ..."); + InLog("%s%s%s", "Deletion of object [",SXMainWndElem::CreateElements[0]->Name, "] ..."); SXMainWndElem::CountDeleteElem++; - SXMainWndElem::ListBoxAllElements->DeleteItem(0); + SXMainWndElem::ListBoxAllElements->deleteItem(0); delete SXMainWndElem::CreateElements[0]->Object; SXMainWndElem::CreateElements.erase(0); - InLog("%s","Deleting of object completed"); + InLog("%s", "Deleting of object completed"); } - InLog("%s","Clearing is completed, a new project is ready!"); + InLog("%s", "Clearing is completed, a new project is ready!"); if(reestablish) { RECT wrect; SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); - SXMainWndElem::JobMainWnd->SetText("JobWindow"); + SXMainWndElem::JobMainWnd->setText("JobWindow"); RECT rc;// = {100,250,wrect.right - 456,wrect.bottom-350}; rc.left = 100; rc.top = 250; rc.right = rc.left + (wrect.right - 456); rc.bottom = rc.top + (wrect.bottom - 350); - SXMainWndElem::JobMainWnd->SetClientRect(&rc,true); + SXMainWndElem::JobMainWnd->setClientRect(&rc,true); } //������� ��� ������ ������ SXMainWndElem::IsCreatedEl = SXMainWndElem::IsLoadedEl = false; @@ -1493,7 +1442,7 @@ void CallCreateNew() { if(SXMainWndElem::IsLoadedEl || SXMainWndElem::IsCreatedEl) { - if(MessageBox(0,"Now all will be deleted! \n�� ������������� ������ ��� ������� � ������ ����� ������?","��������!",MB_YESNO | MB_ICONWARNING | MB_TASKMODAL) == IDYES) + if(MessageBox(0, "Now all will be deleted! \n�� ������������� ������ ��� ������� � ������ ����� ������?", "��������!",MB_YESNO | MB_ICONWARNING | MB_TASKMODAL) == IDYES) CreateNew(true); } else @@ -1503,105 +1452,105 @@ void CallCreateNew() void OutputInFile(const char* path,const char* name_space,bool in_ns,bool constructors,bool destructors,bool comments,bool include) { FILE* file = 0; - file = fopen(path,"w"); + file = fopen(path, "w"); char NameSpacePP[256]; NameSpacePP[0] = 0; - if(include) + /*if(include) { if(comments) - fprintf(file,"//include the header file and the lib file\n"); - fprintf(file,"#include <SXGUIWinApi\\sxgui.h>\n#pragma comment(lib, \"SXGUIWinApi.lib\")\n\n"); - } + fprintf(file, "//include the header file and the lib file\n"); + fprintf(file, "#include <SXGUIWinApi\\sxgui.h>\n#pragma comment(lib, \"SXGUIWinApi.lib\")\n\n"); + }*/ - if(destructors) + /*if(destructors) { if(comments) - fprintf(file,"//the marco definition for simple release the memory\n"); - fprintf(file,"#define mem_delete(p) if(p) {delete (p);(p) = NULL;}\n"); - } + fprintf(file, "//the marco definition for simple release the memory\n"); + fprintf(file, "#define mem_delete(p) if(p) {delete (p);(p) = NULL;}\n"); + }*/ if(in_ns) { - sprintf(NameSpacePP,"%s%s",name_space,"::"); + sprintf(NameSpacePP, "%s%s",name_space, "::"); } if(in_ns) { if(comments) - fprintf(file,"%s","\n//the marco definition for simple release the memory"); - fprintf(file,"%s%s%s","\nnamespace ",name_space,"\n{\n"); + fprintf(file, "%s", "\n//the marco definition for simple release the memory"); + fprintf(file, "%s%s%s", "\nnamespace ",name_space, "\n{\n"); } char NameJobWnd[256]; - SXMainWndElem::JobMainWnd->GetText(NameJobWnd,256); + SXMainWndElem::JobMainWnd->getText(NameJobWnd,256); for(int i=0;i<strlen(NameJobWnd);i++) { if(NameJobWnd[i] == ' ') NameJobWnd[i] = '_'; } - fprintf(file,"%sI%s%s%s%s",(in_ns ? "\t" : ""),"SXGUIBaseWnd","* ",SXMainWndElem::NameJobWnd,";\n"); + fprintf(file, "%sI%s *%s%s",(in_ns ? "\t" : ""), "SXGUIBaseWnd",SXMainWndElem::NameJobWnd, ";\n"); for(int i=0;i<SXMainWndElem::CreateElements.size();i++) { - fprintf(file,"%sI%s%s%s%s",(in_ns ? "\t" : ""),SXMainWndElem::CreateElements[i]->SXClassName,"* ",SXMainWndElem::CreateElements[i]->Name,";\n"); + fprintf(file, "%sI%s *%s%s",(in_ns ? "\t" : ""),SXMainWndElem::CreateElements[i]->SXClassName,SXMainWndElem::CreateElements[i]->Name, ";\n"); } if(constructors) { if(comments) - fprintf(file,"%s%s%s","\n",(in_ns ? "\t" : ""),"//function for initialize all the elements"); - fprintf(file,"%s%s%s","\n",(in_ns ? "\t" : ""),"void InitAllElements();\n"); + fprintf(file, "%s%s%s", "\n",(in_ns ? "\t" : ""), "//function for initialize all the elements"); + fprintf(file, "%s%s%s", "\n",(in_ns ? "\t" : ""), "void InitAllElements();\n"); } if(destructors) { if(comments) - fprintf(file,"%s%s%s","\n",(in_ns ? "\t" : ""),"//function for delete all the elements"); - fprintf(file,"%s%s%s","\n",(in_ns ? "\t" : ""),"void DeleteAllElements();\n"); + fprintf(file, "%s%s%s", "\n",(in_ns ? "\t" : ""), "//function for delete all the elements"); + fprintf(file, "%s%s%s", "\n",(in_ns ? "\t" : ""), "void DeleteAllElements();\n"); } if(in_ns) - fprintf(file,"%s","\n};\n"); + fprintf(file, "%s", "\n};\n"); - fprintf(file,"%s","\n"); + fprintf(file, "%s", "\n"); if(constructors) { - fprintf(file,"%s%s%s%s","void ",(in_ns ? name_space : ""),(in_ns ? "::" : ""),"InitAllElements()\n{\n"); + fprintf(file, "%s%s%s%s", "void ",(in_ns ? name_space : ""),(in_ns ? "::" : ""), "InitAllElements()\n{\n"); RECT GClientRect; long Width,Height; - fprintf(file,"\t%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd," = SXGUICrBaseWnd("); - SXMainWndElem::JobMainWnd->GetClientRect(&GClientRect); + fprintf(file, "\t%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, " = SXGUICrBaseWndEx("); + SXMainWndElem::JobMainWnd->getClientRect(&GClientRect); Width = GClientRect.right - GClientRect.left; Height = GClientRect.bottom - GClientRect.top; - fprintf(file,"%s%s%s","\"",NameJobWnd,"\","); - fprintf(file,"%s%s%s","\"",NameJobWnd,"\","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,","); + fprintf(file, "%s%s%s", "\"",NameJobWnd, "\", "); + fprintf(file, "%s%s%s", "\"",NameJobWnd, "\", "); + //fprintf(file, "%d%s",0, ", "); + //fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ", "); ISXGUIBaseWnd* tmpwnd = dynamic_cast<ISXGUIBaseWnd*>(SXMainWndElem::JobMainWnd); DWORD SXColorBK; - SXColorBK = tmpwnd->GetColorBrush(); - fprintf(file, "%s%d%s%d%s%d%s", "CreateSolidBrush(RGB(", GetRValue(SXColorBK), ",", GetGValue(SXColorBK), ",", GetBValue(SXColorBK), ")),"); //CreateSolidBrush(RGB(200,200,200)) + SXColorBK = tmpwnd->getColorBrush(); + fprintf(file, "%s%d%s%d%s%d%s", "CreateSolidBrush(RGB(", GetRValue(SXColorBK), ", ", GetGValue(SXColorBK), ", ", GetBValue(SXColorBK), ")), "); //CreateSolidBrush(RGB(200,200,200)) - fprintf(file,"%d%s",0,","); - fprintf(file,"%s%s","CS_HREDRAW | CS_VREDRAW,WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION",","); - fprintf(file,"%s%s","0",","); - fprintf(file,"%s","WndProcAllDefault);\n"); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%s%s", "CS_HREDRAW | CS_VREDRAW,WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION", ", "); + fprintf(file, "%s%s", "0", ", "); + fprintf(file, "%s", "WndProcAllDefault);\n"); - fprintf(file, "\tSXGUIBaseHandlers::InitHandlerMsg(%s%s);\n\n", NameSpacePP, SXMainWndElem::NameJobWnd); + fprintf(file, "\tgui_func::base_handlers::InitHandlerMsg(%s%s);\n\n", NameSpacePP, SXMainWndElem::NameJobWnd); char CaptionElement[256]; for(int i=0;i<SXMainWndElem::CreateElements.size();i++) @@ -1613,365 +1562,365 @@ void OutputInFile(const char* path,const char* name_space,bool in_ns,bool constr strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TRACKBAR_CLASS) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName, STATUSCLASSNAME) != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,PROGRESS_CLASS) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIComboBox") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIComboBox") != 0 && strcmp(SXMainWndElem::CreateElements[i]->SysClassName,TOOLBARCLASSNAME) != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIListBox") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIListBox") != 0 && strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIListView") != 0 ) { //char* tmpstr = 0; //tmpstr = SXMainWndElem::CreateElements[i]->SysClassName; ISXGUITextual* textual = dynamic_cast<ISXGUITextual*>(SXMainWndElem::CreateElements[i]->Object); - textual->GetText(CaptionElement,256); + textual->getText(CaptionElement,256); } - fprintf(file,"%s%s%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name," = SXGUICr",SXMainWndElem::CreateElements[i]->SXClassName+5,"("); + fprintf(file, "%s%s%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, " = SXGUICr",SXMainWndElem::CreateElements[i]->SXClassName+5, "("); - SXMainWndElem::CreateElements[i]->Object->GetClientRect(&GClientRect); + SXMainWndElem::CreateElements[i]->Object->getClientRect(&GClientRect); Width = GClientRect.right - GClientRect.left; Height = GClientRect.bottom - GClientRect.top; - if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButton") == 0) + if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButton") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); + fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "SXGUI_BUTTON_IMAGE_NONE, "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") == 0) { ISXGUIButtonImg* tmpButtonImg = dynamic_cast<ISXGUIButtonImg*>(SXMainWndElem::CreateElements[i]->Object); char path[1024]; - tmpButtonImg->GetPathForImg(path); - fprintf(file,"%s%s%s","\"",path,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s","RGB(0,0,0)",","); - fprintf(file,"%s%s","RGB(100,100,100)",","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,");\n"); - - fprintf(file,"%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->SetColorFrame(100,100,100);\n"); - fprintf(file,"%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->SetEnableActive(true);\n"); - fprintf(file,"%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->SetEnable(true);\n"); + tmpButtonImg->getPathForImg(path); + fprintf(file, "%s%s%s", "\"",path, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s", "RGB(0,0,0)", ", "); + fprintf(file, "%s%s", "RGB(100,100,100)", ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ");\n"); + + fprintf(file, "%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setColorFrame(100,100,100);\n"); + fprintf(file, "%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->seActive(true);\n"); + fprintf(file, "%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setEnable(true);\n"); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIEdit") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIEdit") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); + fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); - //Object->Object = new SXGUIEdit(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + //Object->Object = new SXGUIEdit(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUICheckBox") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUICheckBox") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%s%s","true",");\n"); - //Object->Object = new SXGUICheckBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0,true); + fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%s%s", "true", ");\n"); + //Object->Object = new SXGUICheckBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0,true); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIComboBox") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIComboBox") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUIComboBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + //fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUIComboBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIGroupBox") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIGroupBox") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUIGroupBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUIGroupBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIListBox") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIListBox") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%s%s","true",");\n"); - //Object->Object = new SXGUIListBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0,true); - //SendMessage(Object->Object->GetHWND(),LB_SETITEMHEIGHT,0,1); + //fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%s%s", "true", ");\n"); + //Object->Object = new SXGUIListBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0,true); + //SendMessage(Object->Object->getHWND(),LB_SETITEMHEIGHT,0,1); } else if (strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIListView") == 0) { - fprintf(file, "%s%s%s", "\"", CaptionElement, "\","); - fprintf(file, "%d%s", GClientRect.left, ","); - fprintf(file, "%d%s", GClientRect.top, ","); - fprintf(file, "%d%s", Width, ","); - fprintf(file, "%d%s", Height, ","); - fprintf(file, "%s%s%s", NameSpacePP, SXMainWndElem::NameJobWnd, "->GetHWND(),"); - fprintf(file, "%d%s", 0, ","); + //fprintf(file, "%s%s%s", "\"", CaptionElement, "\", "); + fprintf(file, "%d%s", GClientRect.left, ", "); + fprintf(file, "%d%s", GClientRect.top, ", "); + fprintf(file, "%d%s", Width, ", "); + fprintf(file, "%d%s", Height, ", "); + fprintf(file, "%s%s%s", NameSpacePP, SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s", 0, ", "); fprintf(file, "%d%s", 0, ");\n"); - //Object->Object = new SXGUIListBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0,true); - //SendMessage(Object->Object->GetHWND(),LB_SETITEMHEIGHT,0,1); + //Object->Object = new SXGUIListBox(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0,true); + //SendMessage(Object->Object->getHWND(),LB_SETITEMHEIGHT,0,1); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIMemo") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIMemo") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUIMemo(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUIMemo(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIProgressBar") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIProgressBar") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%s%s","true",","); - fprintf(file,"%s%s","true",");\n"); - //Object->Object = new SXGUIProgressBar(GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0,true,true); + //fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%s%s", "true", ", "); + fprintf(file, "%s%s", "true", ");\n"); + //Object->Object = new SXGUIProgressBar(GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0,true,true); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIRadioButton") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIRadioButton") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUIRadioButton(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUIRadioButton(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIStatic") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIStatic") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUIStatic(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUIStatic(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUITrackBar") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUITrackBar") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUITrackBar(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + //fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUITrackBar(Object->Name,GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIStatusBar") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIStatusBar") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUIStatusBar(Object->Name,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + //fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUIStatusBar(Object->Name,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIToolBar") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIToolBar") == 0) { - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUIToolBar(Object->Name,GClientRect.left,GClientRect.top,Width,Height,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0); + //fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUIToolBar(Object->Name,GClientRect.left,GClientRect.top,Width,Height,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIUpDown") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIUpDown") == 0) { - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,");\n"); - //Object->Object = new SXGUIUpDown(GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob,0,0,0); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ");\n"); + //Object->Object = new SXGUIUpDown(GClientRect.left,GClientRect.top,Width,Height,SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob,0,0,0); } - else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIBaseWnd") == 0) + else if(strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIBaseWnd") == 0) { - fprintf(file,"%s%s%s","\"",SXMainWndElem::CreateElements[i]->Name,"\","); - fprintf(file,"%s%s%s","\"",CaptionElement,"\","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",GClientRect.left,","); - fprintf(file,"%d%s",GClientRect.top,","); - fprintf(file,"%d%s",Width,","); - fprintf(file,"%d%s",Height,","); - fprintf(file,"%d%s",0,","); - fprintf(file,"%d%s",0,","); + fprintf(file, "%s%s%s", "\"",SXMainWndElem::CreateElements[i]->Name, "\", "); + fprintf(file, "%s%s%s", "\"",CaptionElement, "\", "); + //fprintf(file, "%d%s",0, ", "); + //fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",GClientRect.left, ", "); + fprintf(file, "%d%s",GClientRect.top, ", "); + fprintf(file, "%d%s",Width, ", "); + fprintf(file, "%d%s",Height, ", "); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%d%s",0, ", "); ISXGUIBaseWnd* tmpwnd = dynamic_cast<ISXGUIBaseWnd*>(SXMainWndElem::CreateElements[i]->Object); - DWORD SXColorBK = tmpwnd->GetColorBrush(); - fprintf(file, "%s%d%s%d%s%d%s", "CreateSolidBrush(RGB(", GetRValue(SXColorBK), ",", GetGValue(SXColorBK), ",", GetBValue(SXColorBK), ")),"); //CreateSolidBrush(RGB(200,200,200)) + DWORD SXColorBK = tmpwnd->getColorBrush(); + fprintf(file, "%s%d%s%d%s%d%s", "CreateSolidBrush(RGB(", GetRValue(SXColorBK), ", ", GetGValue(SXColorBK), ", ", GetBValue(SXColorBK), ")), "); //CreateSolidBrush(RGB(200,200,200)) - fprintf(file,"%d%s",0,","); - fprintf(file,"%s%s","CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER",","); - fprintf(file,"%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd,"->GetHWND(),"); - fprintf(file,"%d%s",0,");\n"); + fprintf(file, "%d%s",0, ", "); + fprintf(file, "%s%s", "CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER", ", "); + fprintf(file, "%s%s%s",NameSpacePP,SXMainWndElem::NameJobWnd, "->getHWND(), "); + fprintf(file, "%d%s",0, ");\n"); /*Object->Object = new SXGUIBaseWnd(Object->Name,Object->Name,0, 0,GClientRect.left,GClientRect.top,Width,Height, 0,0,CreateSolidBrush(RGB(200,200,200)), 0,CS_HREDRAW | CS_VREDRAW,WS_CHILD | WS_VISIBLE | WS_BORDER, - SXMainWndElem::JobMainWnd->GetHWND(),WndProcChildJob);*/ + SXMainWndElem::JobMainWnd->getHWND(),WndProcChildJob);*/ } if( - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIUpDown") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUITrackBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIToolBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIProgressBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIBaseWnd") != 0 + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIUpDown") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUITrackBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIToolBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIProgressBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIBaseWnd") != 0 ) { - HFONT hfont = SXMainWndElem::CreateElements[i]->Object->GetFont(); + HFONT hfont = SXMainWndElem::CreateElements[i]->Object->getHFont(); if(hfont != 0) { LOGFONT LogFont; ZeroMemory(&LogFont,sizeof(&LogFont)); GetObject(hfont, sizeof(LogFont), &LogFont); - fprintf(file,"%s%s%s%s%s%s%d%s%d%s%d%s%d%s%d%s%d%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->SetFont(\"",LogFont.lfFaceName,"\",",LogFont.lfHeight,",",LogFont.lfWidth,",",LogFont.lfWeight,",",LogFont.lfItalic,",",LogFont.lfUnderline,",",LogFont.lfStrikeOut,");\n"); + fprintf(file, "%s%s%s%s%s%s%d%s%d%s%d%s%d%s%d%s%d%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setFont(\"",LogFont.lfFaceName, "\", ",LogFont.lfHeight, ", ",LogFont.lfWidth, ", ",LogFont.lfWeight, ", ",LogFont.lfItalic, ", ",LogFont.lfUnderline, ", ",LogFont.lfStrikeOut, ");\n"); } } if( - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIUpDown") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButton") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUITrackBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIStatusBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIProgressBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIToolBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIBaseWnd") != 0 + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIUpDown") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButton") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUITrackBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIStatusBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIProgressBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIToolBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIBaseWnd") != 0 ) { - DWORD SXColorText = SXMainWndElem::CreateElements[i]->Object->GetColorText(); - DWORD SXColorTextBK = SXMainWndElem::CreateElements[i]->Object->GetColorTextBk(); + DWORD SXColorText = SXMainWndElem::CreateElements[i]->Object->getColorText(); + DWORD SXColorTextBK = SXMainWndElem::CreateElements[i]->Object->getColorTextBk(); - bool TransparentTextBK = SXMainWndElem::CreateElements[i]->Object->GetTransparentTextBk(); + bool TransparentTextBK = SXMainWndElem::CreateElements[i]->Object->getTransparentTextBk(); - fprintf(file, "%s%s%s%s%d%s%d%s%d%s", "\t", NameSpacePP, SXMainWndElem::CreateElements[i]->Name, "->SetColorText(", GetRValue(SXColorText), ",", GetGValue(SXColorText), ",", GetBValue(SXColorText), ");\n"); - fprintf(file, "%s%s%s%s%d%s%d%s%d%s", "\t", NameSpacePP, SXMainWndElem::CreateElements[i]->Name, "->SetColorTextBk(", GetRValue(SXColorTextBK), ",", GetGValue(SXColorTextBK), ",", GetBValue(SXColorTextBK), ");\n"); - fprintf(file,"%s%s%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->SetTransparentTextBk(",(TransparentTextBK ? "true" : "false"),");\n"); + fprintf(file, "%s%s%s%s%d%s%d%s%d%s", "\t", NameSpacePP, SXMainWndElem::CreateElements[i]->Name, "->setColorText(RGB(", GetRValue(SXColorText), ", ", GetGValue(SXColorText), ", ", GetBValue(SXColorText), "));\n"); + fprintf(file, "%s%s%s%s%d%s%d%s%d%s", "\t", NameSpacePP, SXMainWndElem::CreateElements[i]->Name, "->setColorTextBk(RGB(", GetRValue(SXColorTextBK), ", ", GetGValue(SXColorTextBK), ", ", GetBValue(SXColorTextBK), "));\n"); + fprintf(file, "%s%s%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setTransparentTextBk(",(TransparentTextBK ? "true" : "false"), ");\n"); } //���������� ������ ��� //{ if( - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIUpDown") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButton") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUITrackBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIStatusBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIProgressBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIToolBar") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIButtonImg") != 0 && - strcmp(SXMainWndElem::CreateElements[i]->SXClassName,"SXGUIBaseWnd") != 0 + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIUpDown") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButton") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUITrackBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIStatusBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIProgressBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIToolBar") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIButtonImg") != 0 && + strcmp(SXMainWndElem::CreateElements[i]->SXClassName, "SXGUIBaseWnd") != 0 ) { - DWORD SXColorBrush = SXMainWndElem::CreateElements[i]->Object->GetColorBrush(); - fprintf(file, "%s%s%s%s%d%s%d%s%d%s", "\t", NameSpacePP, SXMainWndElem::CreateElements[i]->Name, "->SetColorBrush(", GetRValue(SXColorBrush), ",", GetGValue(SXColorBrush), ",", GetBValue(SXColorBrush), ");\n"); + DWORD SXColorBrush = SXMainWndElem::CreateElements[i]->Object->getColorBrush(); + fprintf(file, "%s%s%s%s%d%s%d%s%d%s", "\t", NameSpacePP, SXMainWndElem::CreateElements[i]->Name, "->setColorBrush(RGB(", GetRValue(SXColorBrush), ", ", GetGValue(SXColorBrush), ", ", GetBValue(SXColorBrush), "));\n"); } //} //{ - if(SXMainWndElem::CreateElements[i]->Object->ShowHint()) + if(SXMainWndElem::CreateElements[i]->Object->getShowHint()) { - fprintf(file,"%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->ShowHint(true);\n"); - char HintText[1024]; - HintText[0] = 0; - SXMainWndElem::CreateElements[i]->Object->GetHintText(HintText); - fprintf(file,"%s%s%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->SetHintText(",HintText,");\n"); + fprintf(file, "%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setShowHint(true);\n"); + /*char HintText[1024]; + HintText[0] = 0;*/ + const char *HintText = SXMainWndElem::CreateElements[i]->Object->getHintText(); + fprintf(file, "%s%s%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setHintText(",HintText, ");\n"); } else { - char HintText[1024]; - HintText[0] = 0; - SXMainWndElem::CreateElements[i]->Object->GetHintText(HintText); + /*char HintText[1024]; + HintText[0] = 0;*/ + const char *HintText = SXMainWndElem::CreateElements[i]->Object->getHintText(); if(HintText[0] != 0) { - fprintf(file,"%s%s%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->SetHintText(",HintText,");\n"); - fprintf(file,"%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->ShowHint(false);\n"); + fprintf(file, "%s%s%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setHintText(",HintText, ");\n"); + fprintf(file, "%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setShowHint(false);\n"); } } //} - if(!SXMainWndElem::CreateElements[i]->Object->Visible()) + if(!SXMainWndElem::CreateElements[i]->Object->getVisible()) { - fprintf(file,"%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->Visible(false);\n"); + fprintf(file, "%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->set(false);\n"); } - if(!SXMainWndElem::CreateElements[i]->Object->Enable()) + if(!SXMainWndElem::CreateElements[i]->Object->getEnable()) { - fprintf(file,"%s%s%s%s","\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,"->Enable(false);\n"); + fprintf(file, "%s%s%s%s", "\t",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, "->setEnable(false);\n"); } } - fprintf(file,"%s","}\n"); + fprintf(file, "%s", "}\n"); } if(destructors) { - fprintf(file,"%s%s%s","void ",NameSpacePP,"DeleteAllElements()\n{\n"); + fprintf(file, "%s%s%s", "void ",NameSpacePP, "DeleteAllElements()\n{\n"); for(int i=0;i<SXMainWndElem::CreateElements.size();i++) { - fprintf(file,"%s%s%s%s%s","\t","mem_delete(",NameSpacePP,SXMainWndElem::CreateElements[i]->Name,");\n"); + fprintf(file, "%s%s%s%s%s", "\t", "mem_delete(",NameSpacePP,SXMainWndElem::CreateElements[i]->Name, ");\n"); } fprintf(file, "%s%s%s%s%s", "\t", "mem_delete(", NameSpacePP, SXMainWndElem::NameJobWnd, ");\n"); - fprintf(file,"%s","}\n"); + fprintf(file, "%s", "}\n"); } fclose(file); diff --git a/source/sxwincreator/sx_param_wnd_data.h b/source/sxwincreator/sx_param_wnd_data.h new file mode 100644 index 0000000000000000000000000000000000000000..df3f58800f0874d9370fac5c25c5f16194a5a3eb --- /dev/null +++ b/source/sxwincreator/sx_param_wnd_data.h @@ -0,0 +1,76 @@ + +#ifndef __PARAM_WND_DATA_H +#define __PARAM_WND_DATA_H + +#include <windows.h> +#include <SXGUIWinApi/sxgui.h> +#include "sxwincreator.h" + +namespace SXUpdateParam +{ + //��������� ���������� ��������� �������� + void PosSize(); // ������� � �������� (x,y width,height) + void Caption(); + void VarName(); + void Enable(); + void Visible(); + void VisibleHint(); + void HintText(); + void ColorText(); + void ColorTextBK(); + void ColorBK(); + void TransparentTextBk(); + void ParentFont(); + void Font(); + void MenuWindow(); + + void UpdateAll(); + + void SetPosX(); + void SetPosY(); + void SetWidth(); + void SetHeight(); + void SetVisible(); + void SetEnable(); + void SetCaption(); + void SetVarName(); + void SetVisibleHint(); + void SetHintText(); + void SetColorText(); + void SetColorTextBK(); + void SetColorBK(); + void SetTransparentTextBk(); + void SetParentFont(); + void SetFont(); + void SetImgButton(); + void SetMenuWindow(); + + void LockPosSizeBlock(); + void LockFontBlock(); + void LockColorBlock(); + void LockColorTextBlock(); + void LockImgButton(); + + void UnLockPosSizeBlock(); + void UnLockFontBlock(); + void UnLockColorBlock(); + void UnLockColorTextBlock(); + void UnlockAll(); + void UnLockImgButton(); + + void SetDefaultValue(); +} + +void SaveFile(const char* path); + +void LoadFile(const char* path); + + + +void CreateNew(bool reestablish); + +void CallCreateNew(); + +void OutputInFile(const char* path, const char* name_space, bool in_ns, bool constructors, bool destructors, bool comments, bool include); + +#endif \ No newline at end of file diff --git a/source/sxwincreator/sxwincreator.cpp b/source/sxwincreator/sxwincreator.cpp index 7bef348d710c1f1cca9ae34b1f56301a5424a645..c4acbc4a5a1865ad582e54761be53fd0140d8e67 100644 --- a/source/sxwincreator/sxwincreator.cpp +++ b/source/sxwincreator/sxwincreator.cpp @@ -1,52 +1,6 @@ -#define SX_EXE -//����������� � ������� �������� ���� -//��� ������� ������� ��� ��� �� ������ ���� ������������ lduttonup -//���� ������� ������ �� ��� � ����� -#include <windows.h> -#include <gdefines.h> - -#include <Shlwapi.h> -#include <Shellapi.h> -#pragma comment(lib, "Shlwapi.lib") -#pragma comment(lib, "Comctl32.lib") - -#if defined(_DEBUG) -#pragma comment(lib, "sxcore_d.lib") -#else -#pragma comment(lib, "sxcore.lib") -#endif -#include <core/sxcore.h> - - -#if defined(_DEBUG) -#pragma comment(lib, "sxguiwinapi_d.lib") -#else -#pragma comment(lib, "sxguiwinapi.lib") -#endif -#include <SXGUIWinApi/sxgui.h> - -#include <common/Array.h> -#include <SXWinCreator/resource.h> - - -#define SX_SAFE_DELETE_A -#define SX_SAFE_DELETE - -#define SX_WINCREATOR_COUNT_ELEMENT 17 - -#define SX_WINCREATOR_STAT_CUR_TEXT "Statistic for cursor:" -#define SX_WINCREATOR_STAT_CUR_G "desktop:\t" -#define SX_WINCREATOR_STAT_CUR_PARENT "parent:\t\t" -#define SX_WINCREATOR_STAT_CUR_CLIENT "element:\t" - -#define SX_WINCREATOR_STAT_ALL_ELEM_TEXT "Statistic for all elements:" -#define SX_WINCREATOR_STAT_ALL_ELEM_COUNT_CREATE "Create:\t" -#define SX_WINCREATOR_STAT_ALL_ELEM_COUNT_DELETE "Delete:\t" -#define SX_WINCREATOR_STAT_ALL_ELEM_COUNT_CURRENT "Current:\t" - -#define SXWINCREATORVERSION "0.9.0" +#include "sxwincreator.h" namespace SXEngine { @@ -54,20 +8,6 @@ namespace SXEngine HINSTANCE Hinstance = 0; }; -struct SXElement -{ - ISXGUIButtonImg* Object; - char Name[256]; -}; - -struct SXCreateElement -{ - SXCreateElement(){ Object = 0; Name[0] = SysClassName[0] = SXClassName[0] = 0; } - ISXGUIComponent* Object; - char Name[256]; - char SysClassName[64]; - char SXClassName[64]; -}; namespace SXMainWndElem { @@ -225,9 +165,9 @@ namespace SXMainWndElem //������� ���������� ��������� int CountCurrentElem = 0; - ISXGUIMenu* MainMenu; + ISXGUIMenuWindow* MainMenu; - ISXGUIMenu* MenuWindow; + ISXGUIMenuWindow* MenuWindow; HCURSOR CurRePos, CurSW, CurSE, CurE, CurS, CurNS, CurWE; @@ -244,10 +184,6 @@ namespace SXMainWndElem bool IsLoadedEl; }; -#include <sxwincreator\about_sxwincreator.cpp> -#include <sxwincreator\windowoutput.cpp> -#include <sxwincreator\sx_param_wnd_data.cpp> - void InLog(const char* format, ...) { va_list va; @@ -258,17 +194,27 @@ void InLog(const char* format, ...) if (SXMainWndElem::ListBoxLog) { - SXMainWndElem::ListBoxLog->AddItem(buf); - SXMainWndElem::ListBoxLog->ScrollLine(SXGUI_SCROLL_TYPE_VERT, SXGUI_SCROLL_DIR_DOWN, SXMainWndElem::ListBoxLog->GetCountItem()); + SXMainWndElem::ListBoxLog->addItem(buf); + gui_func::scrollbar::ScrollLine(SXMainWndElem::ListBoxLog, SXGUI_SCROLL_TYPE_V, SXGUI_SCROLL_DIR_DOWN, SXMainWndElem::ListBoxLog->getItemCount()); } } +void CreateCursor() +{ + SXMainWndElem::CurSE = LoadCursor(0, IDC_SIZENWSE); + SXMainWndElem::CurSW = LoadCursor(0, IDC_SIZENESW); + SXMainWndElem::CurRePos = LoadCursor(0, IDC_SIZEALL); + + SXMainWndElem::CurNS = LoadCursor(0, IDC_SIZENS); + SXMainWndElem::CurWE = LoadCursor(0, IDC_SIZEWE); +} + bool Render() { RECT rect_main_wnd; - GetClientRect(SXMainWndElem::MainWnd->GetHWND(), &rect_main_wnd); + GetClientRect(SXMainWndElem::MainWnd->getHWND(), &rect_main_wnd); - GetClientRect(SXMainWndElem::MainWnd->GetHWND(), SXMainWndElem::MainWndOldRect); + GetClientRect(SXMainWndElem::MainWnd->getHWND(), SXMainWndElem::MainWndOldRect); //���� ������ ������ delete � ���� �������� ������� �� ������� ��� //� ������ ���������� ����� ��������� �������� -1 @@ -276,11 +222,11 @@ bool Render() { InLog("%s%s%s", "Deletion of the elements [", SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Name, "] ..."); SXMainWndElem::CountDeleteElem++; - SXMainWndElem::ListBoxAllElements->DeleteItem(SXMainWndElem::NumActiveElement); - for (int i = SXMainWndElem::NumActiveElement; i<SXMainWndElem::ListBoxAllElements->GetCountItem(); i++) + SXMainWndElem::ListBoxAllElements->deleteItem(SXMainWndElem::NumActiveElement); + for (int i = SXMainWndElem::NumActiveElement; i<SXMainWndElem::ListBoxAllElements->getItemCount(); i++) { - int ud = SXMainWndElem::ListBoxAllElements->GetItemData(i); - SXMainWndElem::ListBoxAllElements->SetItemData(i, (LPARAM)(ud - 1)); + int ud = SXMainWndElem::ListBoxAllElements->getItemData(i); + SXMainWndElem::ListBoxAllElements->setItemData(i, (LPARAM)(ud - 1)); } if (strcmp(SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->SXClassName, "SXGUIBaseWnd") == 0) { @@ -306,34 +252,34 @@ bool Render() //SXMainWndElem::StaticStatisticMouseGlobal->GetText(CurPos,256); sprintf(CurPos, "%s%d%s%d", SX_WINCREATOR_STAT_CUR_G, global_pos_cursor.x, " | ", global_pos_cursor.y); //InLog("%s",CurPos); - SXMainWndElem::StaticStatisticMouseGlobal->SetText(CurPos); - MapWindowPoints(0, SXMainWndElem::JobMainWnd->GetHWND(), &global_pos_cursor, 1); + SXMainWndElem::StaticStatisticMouseGlobal->setText(CurPos); + MapWindowPoints(0, SXMainWndElem::JobMainWnd->getHWND(), &global_pos_cursor, 1); sprintf(CurPos, "%s%d%s%d", SX_WINCREATOR_STAT_CUR_PARENT, global_pos_cursor.x, " | ", global_pos_cursor.y); - SXMainWndElem::StaticStatisticMouseParent->SetText(CurPos); + SXMainWndElem::StaticStatisticMouseParent->setText(CurPos); if (SXMainWndElem::NumActiveElement != -1) { - MapWindowPoints(SXMainWndElem::JobMainWnd->GetHWND(), SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->GetHWND(), &global_pos_cursor, 1); + MapWindowPoints(SXMainWndElem::JobMainWnd->getHWND(), SXMainWndElem::CreateElements[SXMainWndElem::NumActiveElement]->Object->getHWND(), &global_pos_cursor, 1); sprintf(CurPos, "%s%d%s%d", SX_WINCREATOR_STAT_CUR_CLIENT, global_pos_cursor.x, " | ", global_pos_cursor.y); - SXMainWndElem::StaticStatisticMouseClient->SetText(CurPos); + SXMainWndElem::StaticStatisticMouseClient->setText(CurPos); } else { sprintf(CurPos, "%s%d%s%d", SX_WINCREATOR_STAT_CUR_CLIENT, -1, " | ", -1); - SXMainWndElem::StaticStatisticMouseClient->SetText(CurPos); + SXMainWndElem::StaticStatisticMouseClient->setText(CurPos); } //SXMainWndElem::GlobalCurPos = global_pos_cursor; //} char ElemStat[256]; sprintf(ElemStat, "%s%d", SX_WINCREATOR_STAT_ALL_ELEM_COUNT_CREATE, SXMainWndElem::CountCreateNewElem); - SXMainWndElem::StaticStatisticElemCreate->SetText(ElemStat); + SXMainWndElem::StaticStatisticElemCreate->setText(ElemStat); sprintf(ElemStat, "%s%d", SX_WINCREATOR_STAT_ALL_ELEM_COUNT_DELETE, SXMainWndElem::CountDeleteElem); - SXMainWndElem::StaticStatisticElemDelete->SetText(ElemStat); + SXMainWndElem::StaticStatisticElemDelete->setText(ElemStat); SXMainWndElem::CountCurrentElem = SXMainWndElem::CreateElements.size(); sprintf(ElemStat, "%s%d", SX_WINCREATOR_STAT_ALL_ELEM_COUNT_CURRENT, SXMainWndElem::CountCurrentElem); - SXMainWndElem::StaticStatisticElemCurrent->SetText(ElemStat); + SXMainWndElem::StaticStatisticElemCurrent->setText(ElemStat); //����� ���� ���� �� �������� ���� @@ -371,9 +317,6 @@ bool Render() }; -#include <sxwincreator\callbacks.cpp> -#include <sxwincreator\create_current_gui.cpp> - int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE prevInstance, PSTR cmdLine, int showCmd) { SXEngine::Hinstance = hinstance; @@ -384,476 +327,450 @@ int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE prevInstance, PSTR cmdLine, in CreateCursor(); - SXGUIRegClass::RegButtonImg(); - SXGUIRegClass::RegGroupBox(); - - INITCOMMONCONTROLSEX icex; - - icex.dwSize = sizeof(INITCOMMONCONTROLSEX); - icex.dwICC = ICC_BAR_CLASSES; - InitCommonControlsEx(&icex); + SXGUIinit(); RECT wrect; SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0); - SXMainWndElem::MainWnd = SXGUICrBaseWnd( - "SkyX Windows Creator", "SkyX Windows Creator", 0, - 0, + SXMainWndElem::MainWnd = SXGUICrBaseWndEx( + "SkyX Windows Creator", "SkyX Windows Creator", wrect.left, wrect.top, wrect.right, 150, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_DLGFRAME | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); + SXMainWndElem::MainWnd->setVisible(true); + gui_func::base_handlers::InitHandlerMsg(SXMainWndElem::MainWnd); + SXMainWndElem::MainWnd->addHandler(ComMenuId, WM_COMMAND); + SXMainWndElem::MainWnd->addHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true); - SXGUIBaseHandlers::InitHandlerMsg(SXMainWndElem::MainWnd); - SXMainWndElem::MainWnd->AddHandler(ComMenuId, WM_COMMAND); - SXMainWndElem::MainWnd->AddHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true); - - SXMainWndElem::MainWnd->MinSizeX = wrect.right; - SXMainWndElem::MainWnd->MinSizeY = 150; + SXMainWndElem::MainWnd->setMixSize(wrect.right, 150); - SXMainWndElem::MainWnd->BFSizingChangeLeft = true; - SXMainWndElem::MainWnd->BFSizingChangeTop = true; + SXMainWndElem::MainWnd->setStretchSides(true, true, true, true); - SXMainWndElem::MainWnd->BFSizingChangeRight = true; - SXMainWndElem::MainWnd->BFSizingChangeBottom = true; + SXMainWndElem::MainMenu = SXGUICrMenuWindowEx(IDR_MENU1); + SXMainWndElem::MainMenu->setToWindow(SXMainWndElem::MainWnd->getHWND()); - SXMainWndElem::MainMenu = SXGUICrMenuEx(IDR_MENU1); - SXMainWndElem::MainMenu->SetToWindow(SXMainWndElem::MainWnd->GetHWND()); + SXMainWndElem::MenuWindow = SXGUICrMenuWindowEx(IDR_MENU2); - SXMainWndElem::MenuWindow = SXGUICrMenuEx(IDR_MENU2); - - SXMainWndElem::ParamWnd = SXGUICrBaseWnd( - "ParamWnd", "ParamWnd", 0, - 0, wrect.right - 256, wrect.top + 160, 256, wrect.bottom - 160, + SXMainWndElem::ParamWnd = SXGUICrBaseWndEx( + "ParamWnd", "ParamWnd", + wrect.right - 256, wrect.top + 160, 256, wrect.bottom - 160, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), WS_EX_TOOLWINDOW, CS_HREDRAW | CS_VREDRAW, WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_OVERLAPPED, 0, WndProcAllDefault); + SXMainWndElem::ParamWnd->setVisible(true); + gui_func::base_handlers::InitHandlerMsg(SXMainWndElem::ParamWnd); + SXMainWndElem::ParamWnd->addHandler(MinimuzeWinInsteadClose, WM_CLOSE, 0, 0, 0, 0, true); + SXMainWndElem::ParamWnd->addHandler(CallWmCommand, WM_COMMAND, 0, 0, 0, 0, true); - SXGUIBaseHandlers::InitHandlerMsg(SXMainWndElem::ParamWnd); - SXMainWndElem::ParamWnd->AddHandler(MinimuzeWinInsteadClose, WM_CLOSE, 0, 0, 0, 0, true); - SXMainWndElem::ParamWnd->AddHandler(CallWmCommand, WM_COMMAND, 0, 0, 0, 0, true); - - SXMainWndElem::ListBoxAllElements = SXGUICrListBox("ListBoxAllElements", 5, 5, 240, 150, SXMainWndElem::ParamWnd->GetHWND(), 0, 0, false); - SXMainWndElem::ListBoxAllElements->AddHandler(ListBoxAllElementsDBLClick, WM_LBUTTONDBLCLK); + SXMainWndElem::ListBoxAllElements = SXGUICrListBox(5, 5, 240, 150, SXMainWndElem::ParamWnd->getHWND(), 0, 0, false); + SXMainWndElem::ListBoxAllElements->addHandler(ListBoxAllElementsDBLClick, WM_LBUTTONDBLCLK); RECT rect_main_wnd; - GetClientRect(SXMainWndElem::MainWnd->GetHWND(), &rect_main_wnd); + GetClientRect(SXMainWndElem::MainWnd->getHWND(), &rect_main_wnd); SXMainWndElem::MainWndOldRect = new RECT; - GetClientRect(SXMainWndElem::MainWnd->GetHWND(), SXMainWndElem::MainWndOldRect); + GetClientRect(SXMainWndElem::MainWnd->getHWND(), SXMainWndElem::MainWndOldRect); - SXMainWndElem::SettingsPanel = SXGUICrToolBar(0, 0, SXMainWndElem::MainWndOldRect->right, 26, SXMainWndElem::MainWnd->GetHWND(), 0, 123); - SXMainWndElem::SettingsPanel->GAlign.top = true; - SXMainWndElem::SettingsPanel->GAlign.left = true; - SXMainWndElem::SettingsPanel->GAlign.bottom = false; - SXMainWndElem::SettingsPanel->GAlign.right = true; + SXMainWndElem::SettingsPanel = SXGUICrToolBar(0, 0, SXMainWndElem::MainWndOldRect->right, 26, SXMainWndElem::MainWnd->getHWND(), 0, 123); + SXMainWndElem::SettingsPanel->setFollowParentSides(true, false, true, true); - ISXGUIButtonImg* ImgNew = SXGUICrButtonImgRes(IDB_BITMAP1, 3, 1, 20, 20, RGB(255, 0, 110), RGB(220, 220, 220), SXMainWndElem::SettingsPanel->GetHWND(), 0, 0); - ImgNew->InitCallBack(); - ImgNew->AddHandler(CallImgNew, WM_LBUTTONUP); + ISXGUIButtonImg* ImgNew = SXGUICrButtonImgRes(IDB_BITMAP1, 3, 1, 20, 20, RGB(255, 0, 110), RGB(220, 220, 220), SXMainWndElem::SettingsPanel->getHWND(), 0, 0); + ImgNew->initCallBack(); + ImgNew->addHandler(CallImgNew, WM_LBUTTONUP); //ImgNew->ShowHint(true); - //ImgNew->SetHintText(SXMainWndElem::NameElements[i]); + //ImgNew->setHintText(SXMainWndElem::NameElements[i]); - ISXGUIButtonImg* ImgLoad = SXGUICrButtonImgRes(IDB_BITMAP2, 30, 1, 20, 20, RGB(255, 0, 110), RGB(220, 220, 220), SXMainWndElem::SettingsPanel->GetHWND(), 0, 0); - ImgLoad->InitCallBack(); - ImgLoad->AddHandler(CallImgLoad, WM_LBUTTONUP); + ISXGUIButtonImg* ImgLoad = SXGUICrButtonImgRes(IDB_BITMAP2, 30, 1, 20, 20, RGB(255, 0, 110), RGB(220, 220, 220), SXMainWndElem::SettingsPanel->getHWND(), 0, 0); + ImgLoad->initCallBack(); + ImgLoad->addHandler(CallImgLoad, WM_LBUTTONUP); //ImgNew->ShowHint(true); - //ImgNew->SetHintText(SXMainWndElem::NameElements[i]); + //ImgNew->setHintText(SXMainWndElem::NameElements[i]); - ISXGUIButtonImg* ImgSave = SXGUICrButtonImgRes(IDB_BITMAP4, 57, 1, 20, 20, RGB(255, 0, 110), RGB(220, 220, 220), SXMainWndElem::SettingsPanel->GetHWND(), 0, 0); - ImgSave->InitCallBack(); - ImgSave->AddHandler(CallImgSave, WM_LBUTTONUP); + ISXGUIButtonImg* ImgSave = SXGUICrButtonImgRes(IDB_BITMAP4, 57, 1, 20, 20, RGB(255, 0, 110), RGB(220, 220, 220), SXMainWndElem::SettingsPanel->getHWND(), 0, 0); + ImgSave->initCallBack(); + ImgSave->addHandler(CallImgSave, WM_LBUTTONUP); //ImgNew->ShowHint(true); - //ImgNew->SetHintText(SXMainWndElem::NameElements[i]); + //ImgNew->setHintText(SXMainWndElem::NameElements[i]); - ISXGUIButtonImg* ImgBuild = SXGUICrButtonImgRes(IDB_BITMAP3, 84, 1, 20, 20, RGB(255, 0, 110), RGB(220, 220, 220), SXMainWndElem::SettingsPanel->GetHWND(), 0, 0); - ImgBuild->InitCallBack(); - ImgBuild->AddHandler(CallImgBuild, WM_LBUTTONUP); + ISXGUIButtonImg* ImgBuild = SXGUICrButtonImgRes(IDB_BITMAP3, 84, 1, 20, 20, RGB(255, 0, 110), RGB(220, 220, 220), SXMainWndElem::SettingsPanel->getHWND(), 0, 0); + ImgBuild->initCallBack(); + ImgBuild->addHandler(CallImgBuild, WM_LBUTTONUP); //ImgNew->ShowHint(true); - //ImgNew->SetHintText(SXMainWndElem::NameElements[i]); + //ImgNew->setHintText(SXMainWndElem::NameElements[i]); - SXMainWndElem::ToolsPanel = SXGUICrToolBar(0, 25, SXMainWndElem::MainWndOldRect->right, 31, SXMainWndElem::MainWnd->GetHWND(), 0, 123); - SXMainWndElem::ToolsPanel->GAlign.top = true; - SXMainWndElem::ToolsPanel->GAlign.left = true; - SXMainWndElem::ToolsPanel->GAlign.bottom = false; - SXMainWndElem::ToolsPanel->GAlign.right = true; + SXMainWndElem::ToolsPanel = SXGUICrToolBar(0, 25, SXMainWndElem::MainWndOldRect->right, 31, SXMainWndElem::MainWnd->getHWND(), 0, 123); + SXMainWndElem::ToolsPanel->setFollowParentSides(true, false, true, true); int tmpX, tmpY, tmpAddition; tmpX = 30; tmpY = 1; tmpAddition = 27; - SXMainWndElem::ButtonArrow = SXGUICrButtonImgRes(IDB_BITMAP5, 3, tmpY, 24, 24, RGB(0, 0, 0), RGB(0, 0, 0), SXMainWndElem::ToolsPanel->GetHWND(), 0, 0); - SXMainWndElem::ButtonArrow->SetColorFrame(100, 100, 100); - SXMainWndElem::ButtonArrow->InitCallBack(); + SXMainWndElem::ButtonArrow = SXGUICrButtonImgRes(IDB_BITMAP5, 3, tmpY, 24, 24, RGB(0, 0, 0), RGB(0, 0, 0), SXMainWndElem::ToolsPanel->getHWND(), 0, 0); + SXMainWndElem::ButtonArrow->setColorFrame(RGB(100, 100, 100)); + SXMainWndElem::ButtonArrow->initCallBack(); - SXMainWndElem::ButtonArrow->GAlign.top = true; - SXMainWndElem::ButtonArrow->GAlign.left = true; - SXMainWndElem::ButtonArrow->GAlign.bottom = false; - SXMainWndElem::ButtonArrow->GAlign.right = false; + SXMainWndElem::ButtonArrow->setFollowParentSides(true, false, false, true); - SXMainWndElem::ButtonArrow->SetEnableActive(true); - SXMainWndElem::ButtonArrow->SetParentGroup(true); + SXMainWndElem::ButtonArrow->setActive(true); + SXMainWndElem::ButtonArrow->setParentGroup(true); for (int i = 0; i<SX_WINCREATOR_COUNT_ELEMENT; i++) { sprintf(SXMainWndElem::Elements[i].Name, "%s", SXMainWndElem::NameElements[i]); - SXMainWndElem::Elements[i].Object = SXGUICrButtonImgRes(SXMainWndElem::ArrNumResource[i], tmpX, tmpY, 24, 24, RGB(0, 0, 0), RGB(0, 0, 0), SXMainWndElem::ToolsPanel->GetHWND(), 0, 0); - - SXMainWndElem::Elements[i].Object->InitCallBack(); + SXMainWndElem::Elements[i].Object = SXGUICrButtonImgRes(SXMainWndElem::ArrNumResource[i], tmpX, tmpY, 24, 24, RGB(0, 0, 0), RGB(0, 0, 0), SXMainWndElem::ToolsPanel->getHWND(), 0, 0); - SXMainWndElem::Elements[i].Object->SetColorFrame(100, 100, 100); - SXMainWndElem::Elements[i].Object->GAlign.top = true; - SXMainWndElem::Elements[i].Object->GAlign.left = true; - SXMainWndElem::Elements[i].Object->GAlign.bottom = false; - SXMainWndElem::Elements[i].Object->GAlign.right = false; + SXMainWndElem::Elements[i].Object->initCallBack(); - ISXGUIButtonImg* tmptmp = dynamic_cast<ISXGUIButtonImg*>(SXMainWndElem::Elements[i].Object); - tmptmp->GAlign.top; + SXMainWndElem::Elements[i].Object->setColorFrame(RGB(100, 100, 100)); + SXMainWndElem::Elements[i].Object->setFollowParentSides(true, false, false, true); - SXMainWndElem::Elements[i].Object->ShowHint(true); - SXMainWndElem::Elements[i].Object->SetHintText(SXMainWndElem::NameElements[i]); + SXMainWndElem::Elements[i].Object->setShowHint(true); + SXMainWndElem::Elements[i].Object->setHintText(SXMainWndElem::NameElements[i]); - SXMainWndElem::Elements[i].Object->SetEnableActive(true); - SXMainWndElem::Elements[i].Object->SetParentGroup(true); + SXMainWndElem::Elements[i].Object->setActive(true); + SXMainWndElem::Elements[i].Object->setParentGroup(true); tmpX += tmpAddition; } sprintf(SXMainWndElem::NameJobWnd, "%s", "JobWindow"); - SXMainWndElem::JobMainWnd = SXGUICrBaseWnd( - SXMainWndElem::NameJobWnd, SXMainWndElem::NameJobWnd, 0, - 0, 100, 250, wrect.right - 456, wrect.bottom - 350, + SXMainWndElem::JobMainWnd = SXGUICrBaseWndEx( + SXMainWndElem::NameJobWnd, SXMainWndElem::NameJobWnd, + 100, 250, wrect.right - 456, wrect.bottom - 350, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault); - SXGUIBaseHandlers::InitHandlerMsg(SXMainWndElem::JobMainWnd); - SXMainWndElem::JobMainWnd->AddHandler(AddElement, WM_LBUTTONUP); - SXMainWndElem::JobMainWnd->AddHandler(MouseMove, WM_MOUSEMOVE); - SXMainWndElem::JobMainWnd->AddHandler(RButtonUp, WM_RBUTTONUP); - SXMainWndElem::JobMainWnd->AddHandler(MinimuzeWinInsteadClose, WM_CLOSE, 0, 0, 0, 0, true); + SXMainWndElem::JobMainWnd->setVisible(true); + gui_func::base_handlers::InitHandlerMsg(SXMainWndElem::JobMainWnd); + SXMainWndElem::JobMainWnd->addHandler(AddElement, WM_LBUTTONUP); + SXMainWndElem::JobMainWnd->addHandler(MouseMove, WM_MOUSEMOVE); + SXMainWndElem::JobMainWnd->addHandler(RButtonUp, WM_RBUTTONUP); + SXMainWndElem::JobMainWnd->addHandler(MinimuzeWinInsteadClose, WM_CLOSE, 0, 0, 0, 0, true); - //ISXGUIButton* tmpbutton = SXGUICrButton("NameElem", 100, 100, 100, 20, 0, SXMainWndElem::JobMainWnd->GetHWND(), WndProcChildJob, 0); - //int cerr = SetWindowLong(tmpbutton->GetHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIButton*>(tmpbutton)); - //SXMainWndElem::JobMainWnd->AddHandler(LButtonDown,WM_LBUTTONDOWN); - //SXMainWndElem::JobMainWnd->AddHandler(ActivateAllWindows,WM_ACTIVATE/*,0,false,0,false,true*/); + //ISXGUIButton* tmpbutton = SXGUICrButton("NameElem", 100, 100, 100, 20, 0, SXMainWndElem::JobMainWnd->getHWND(), WndProcChildJob, 0); + //int cerr = SetWindowLong(tmpbutton->getHWND(), GWL_USERDATA, (LONG)dynamic_cast<ISXGUIButton*>(tmpbutton)); + //SXMainWndElem::JobMainWnd->addHandler(LButtonDown,WM_LBUTTONDOWN); + //SXMainWndElem::JobMainWnd->addHandler(ActivateAllWindows,WM_ACTIVATE/*,0,false,0,false,true*/); //��������� ���������� ������� - SXMainWndElem::StaticStatisticMouseText = SXGUICrStatic(SX_WINCREATOR_STAT_CUR_TEXT, 10, 73, 110, 15, SXMainWndElem::MainWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticStatisticMouseText->SetColorBrush(220, 220, 220); - SXMainWndElem::StaticStatisticMouseText->SetFont(0, 14, 0, 0, 0, 0, 0); - SXMainWndElem::StaticStatisticMouseGlobal = SXGUICrStatic("", 120, 58, 150, 15, SXMainWndElem::MainWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticStatisticMouseGlobal->SetColorBrush(220, 220, 220); - SXMainWndElem::StaticStatisticMouseGlobal->SetFont(0, 14, 0, 0, 0, 0, 0); - SXMainWndElem::StaticStatisticMouseParent = SXGUICrStatic("", 120, 73, 150, 15, SXMainWndElem::MainWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticStatisticMouseParent->SetColorBrush(220, 220, 220); - SXMainWndElem::StaticStatisticMouseParent->SetFont(0, 14, 0, 0, 0, 0, 0); - SXMainWndElem::StaticStatisticMouseClient = SXGUICrStatic("", 120, 88, 150, 15, SXMainWndElem::MainWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticStatisticMouseClient->SetColorBrush(220, 220, 220); - SXMainWndElem::StaticStatisticMouseClient->SetFont(0, 14, 0, 0, 0, 0, 0); + SXMainWndElem::StaticStatisticMouseText = SXGUICrStatic(SX_WINCREATOR_STAT_CUR_TEXT, 10, 73, 110, 15, SXMainWndElem::MainWnd->getHWND(), 0, 0); + SXMainWndElem::StaticStatisticMouseText->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::StaticStatisticMouseText->setFont(0, 14, 0, 0, 0, 0, 0); + SXMainWndElem::StaticStatisticMouseGlobal = SXGUICrStatic("", 120, 58, 150, 15, SXMainWndElem::MainWnd->getHWND(), 0, 0); + SXMainWndElem::StaticStatisticMouseGlobal->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::StaticStatisticMouseGlobal->setFont(0, 14, 0, 0, 0, 0, 0); + SXMainWndElem::StaticStatisticMouseParent = SXGUICrStatic("", 120, 73, 150, 15, SXMainWndElem::MainWnd->getHWND(), 0, 0); + SXMainWndElem::StaticStatisticMouseParent->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::StaticStatisticMouseParent->setFont(0, 14, 0, 0, 0, 0, 0); + SXMainWndElem::StaticStatisticMouseClient = SXGUICrStatic("", 120, 88, 150, 15, SXMainWndElem::MainWnd->getHWND(), 0, 0); + SXMainWndElem::StaticStatisticMouseClient->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::StaticStatisticMouseClient->setFont(0, 14, 0, 0, 0, 0, 0); //��������� ���������� ��������� - SXMainWndElem::StaticStatisticElemText = SXGUICrStatic(SX_WINCREATOR_STAT_ALL_ELEM_TEXT, 280, 73, 130, 15, SXMainWndElem::MainWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticStatisticElemText->SetColorBrush(220, 220, 220); - SXMainWndElem::StaticStatisticElemText->SetFont(0, 14, 0, 0, 0, 0, 0); - SXMainWndElem::StaticStatisticElemCreate = SXGUICrStatic("", 410, 58, 250, 15, SXMainWndElem::MainWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticStatisticElemCreate->SetColorBrush(220, 220, 220); - SXMainWndElem::StaticStatisticElemCreate->SetFont(0, 14, 0, 0, 0, 0, 0); - SXMainWndElem::StaticStatisticElemDelete = SXGUICrStatic("", 410, 73, 250, 15, SXMainWndElem::MainWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticStatisticElemDelete->SetColorBrush(220, 220, 220); - SXMainWndElem::StaticStatisticElemDelete->SetFont(0, 14, 0, 0, 0, 0, 0); - SXMainWndElem::StaticStatisticElemCurrent = SXGUICrStatic("", 410, 88, 250, 15, SXMainWndElem::MainWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticStatisticElemCurrent->SetColorBrush(220, 220, 220); - SXMainWndElem::StaticStatisticElemCurrent->SetFont(0, 14, 0, 0, 0, 0, 0); + SXMainWndElem::StaticStatisticElemText = SXGUICrStatic(SX_WINCREATOR_STAT_ALL_ELEM_TEXT, 280, 73, 130, 15, SXMainWndElem::MainWnd->getHWND(), 0, 0); + SXMainWndElem::StaticStatisticElemText->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::StaticStatisticElemText->setFont(0, 14, 0, 0, 0, 0, 0); + SXMainWndElem::StaticStatisticElemCreate = SXGUICrStatic("", 410, 58, 250, 15, SXMainWndElem::MainWnd->getHWND(), 0, 0); + SXMainWndElem::StaticStatisticElemCreate->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::StaticStatisticElemCreate->setFont(0, 14, 0, 0, 0, 0, 0); + SXMainWndElem::StaticStatisticElemDelete = SXGUICrStatic("", 410, 73, 250, 15, SXMainWndElem::MainWnd->getHWND(), 0, 0); + SXMainWndElem::StaticStatisticElemDelete->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::StaticStatisticElemDelete->setFont(0, 14, 0, 0, 0, 0, 0); + SXMainWndElem::StaticStatisticElemCurrent = SXGUICrStatic("", 410, 88, 250, 15, SXMainWndElem::MainWnd->getHWND(), 0, 0); + SXMainWndElem::StaticStatisticElemCurrent->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::StaticStatisticElemCurrent->setFont(0, 14, 0, 0, 0, 0, 0); int tmpPosX = 5; int tmpPosY = 160; //��������� �������� ��� ����������� ���������� - SXMainWndElem::StaticParamPosX = SXGUICrStatic("PosX:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamPosX->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamPosX = SXGUICrStatic("PosX:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamPosX->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamPosX->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamPosX = SXGUICrEdit("PosX:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamPosX = SXGUICrEdit("PosX:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamPosX->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamPosX->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamPosX->AddHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamPosX->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamPosX->addHandler(InputInfoEdit, WM_KEYDOWN); tmpPosY += 20; - SXMainWndElem::StaticParamPosY = SXGUICrStatic("PosY:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamPosY->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamPosY = SXGUICrStatic("PosY:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamPosY->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamPosY->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamPosY = SXGUICrEdit("PosY:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamPosY = SXGUICrEdit("PosY:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamPosY->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamPosY->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamPosY->AddHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamPosY->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamPosY->addHandler(InputInfoEdit, WM_KEYDOWN); tmpPosY += 20; - SXMainWndElem::StaticParamWidth = SXGUICrStatic("Width:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamWidth->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamWidth = SXGUICrStatic("Width:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamWidth->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamWidth->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamWidth = SXGUICrEdit("Width:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamWidth = SXGUICrEdit("Width:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamWidth->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamWidth->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamWidth->AddHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamWidth->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamWidth->addHandler(InputInfoEdit, WM_KEYDOWN); tmpPosY += 20; - SXMainWndElem::StaticParamHeight = SXGUICrStatic("Height:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamHeight->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamHeight = SXGUICrStatic("Height:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamHeight->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamHeight->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamHeight = SXGUICrEdit("Height:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamHeight = SXGUICrEdit("Height:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamHeight->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamHeight->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamHeight->AddHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamHeight->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamHeight->addHandler(InputInfoEdit, WM_KEYDOWN); tmpPosY += 20; - SXMainWndElem::StaticParamCaption = SXGUICrStatic("Caption:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamCaption->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamCaption = SXGUICrStatic("Caption:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamCaption->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamCaption->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamCaption = SXGUICrEdit("Caption:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamCaption = SXGUICrEdit("Caption:", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamCaption->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamCaption->AddHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamCaption->addHandler(InputInfoEdit, WM_KEYDOWN); tmpPosY += 20; - SXMainWndElem::StaticParamVarName = SXGUICrStatic("Variable name:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamVarName->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamVarName = SXGUICrStatic("Variable name:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamVarName->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamCaption->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamVarName = SXGUICrEdit("name", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamVarName = SXGUICrEdit("name", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamCaption->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamVarName->AddHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamVarName->addHandler(InputInfoEdit, WM_KEYDOWN); tmpPosY += 20; - SXMainWndElem::StaticParamColorText = SXGUICrStatic("Color text:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamColorText->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamColorText = SXGUICrStatic("Color text:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamColorText->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamColorText->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorTextR = SXGUICrEdit("0", 90, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorTextR = SXGUICrEdit("0", 90, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorTextR->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorTextR->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorTextR->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextR->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorTextR->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextR->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorTextR->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorTextR->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextR->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorTextR->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextR->addHandler(InputToEditColor, WM_KEYUP); - SXMainWndElem::EditParamColorTextG = SXGUICrEdit("0", 145, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorTextG = SXGUICrEdit("0", 145, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorTextG->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorTextG->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorTextG->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextG->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorTextG->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextG->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorTextG->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorTextG->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextG->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorTextG->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextG->addHandler(InputToEditColor, WM_KEYUP); - SXMainWndElem::EditParamColorTextB = SXGUICrEdit("0", 200, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorTextB = SXGUICrEdit("0", 200, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorTextB->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorTextB->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorTextB->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextB->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorTextB->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextB->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorTextB->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorTextB->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextB->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorTextB->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextB->addHandler(InputToEditColor, WM_KEYUP); tmpPosY += 20; - SXMainWndElem::StaticParamColorBKText = SXGUICrStatic("Color bk text:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamColorBKText->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamColorBKText = SXGUICrStatic("Color bk text:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamColorBKText->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamColorBKText->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorTextBKR = SXGUICrEdit("0", 90, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorTextBKR = SXGUICrEdit("0", 90, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorTextBKR->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorTextBKR->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorTextBKR->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextBKR->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorTextBKR->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextBKR->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorTextBKR->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorTextBKR->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextBKR->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorTextBKR->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextBKR->addHandler(InputToEditColor, WM_KEYUP); - SXMainWndElem::EditParamColorTextBKG = SXGUICrEdit("0", 145, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorTextBKG = SXGUICrEdit("0", 145, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorTextBKG->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorTextBKG->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorTextBKG->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextBKG->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorTextBKG->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextBKG->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorTextBKG->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorTextBKG->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextBKG->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorTextBKG->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextBKG->addHandler(InputToEditColor, WM_KEYUP); - SXMainWndElem::EditParamColorTextBKB = SXGUICrEdit("0", 200, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorTextBKB = SXGUICrEdit("0", 200, tmpPosY, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorTextBKB->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorTextBKB->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorTextBKB->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextBKB->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorTextBKB->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorTextBKB->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorTextBKB->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorTextBKB->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextBKB->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorTextBKB->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorTextBKB->addHandler(InputToEditColor, WM_KEYUP); tmpPosY += 20; - SXMainWndElem::StaticParamTransparentText = SXGUICrStatic("Alpha bk text:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamTransparentText->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamTransparentText = SXGUICrStatic("Alpha bk text:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamTransparentText->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamTransparentText->Font(0,15,0,0,0,0); - SXMainWndElem::ComboBoxParamTransparentText = SXGUICrComboBox("ComboBoxParamTransparentText", 90, tmpPosY - 2, 155, 70, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::ComboBoxParamTransparentText = SXGUICrComboBox(90, tmpPosY - 2, 155, 70, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::ComboBoxParamTransparentText->Font(0,15,0,0,0,0); - SendMessage(SXMainWndElem::ComboBoxParamTransparentText->GetHWND(), CB_SETITEMHEIGHT, -1, 14); - SXMainWndElem::ComboBoxParamTransparentText->AddItem("true"); - SXMainWndElem::ComboBoxParamTransparentText->AddItem("false"); - SXMainWndElem::ComboBoxParamTransparentText->SetSel(1); - //SXMainWndElem::ComboBoxParamTransparentText->AddHandler(InputInfoComboBox,WM_LBUTTONUP); - SXMainWndElem::ComboBoxParamTransparentText->AddHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SendMessage(SXMainWndElem::ComboBoxParamTransparentText->getHWND(), CB_SETITEMHEIGHT, -1, 14); + SXMainWndElem::ComboBoxParamTransparentText->addItem("true"); + SXMainWndElem::ComboBoxParamTransparentText->addItem("false"); + SXMainWndElem::ComboBoxParamTransparentText->setSel(1); + //SXMainWndElem::ComboBoxParamTransparentText->addHandler(InputInfoComboBox,WM_LBUTTONUP); + SXMainWndElem::ComboBoxParamTransparentText->addHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); tmpPosY += 20; - SXMainWndElem::StaticParamColorBK = SXGUICrStatic("Color bk:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamColorBK->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamColorBK = SXGUICrStatic("Color bk:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamColorBK->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamColorBK->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorBKR = SXGUICrEdit("0", 90, tmpPosY + 1, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorBKR = SXGUICrEdit("0", 90, tmpPosY + 1, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorBKR->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorBKR->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorBKR->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorBKR->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorBKR->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorBKR->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorBKR->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorBKR->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorBKR->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorBKR->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorBKR->addHandler(InputToEditColor, WM_KEYUP); - SXMainWndElem::EditParamColorBKG = SXGUICrEdit("0", 145, tmpPosY + 1, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorBKG = SXGUICrEdit("0", 145, tmpPosY + 1, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorBKG->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorBKG->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorBKG->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorBKG->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorBKG->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorBKG->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorBKG->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorBKG->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorBKG->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorBKG->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorBKG->addHandler(InputToEditColor, WM_KEYUP); - SXMainWndElem::EditParamColorBKB = SXGUICrEdit("0", 200, tmpPosY + 1, 45, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamColorBKB = SXGUICrEdit("0", 200, tmpPosY + 1, 45, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamColorBKB->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamColorBKB->ModifyStyle(ES_NUMBER, 0); - SXMainWndElem::EditParamColorBKB->AddHandler(InputInfoEdit, WM_KEYDOWN); - SXMainWndElem::EditParamColorBKB->AddHandler(InitColorText, WM_LBUTTONDBLCLK); - SXMainWndElem::EditParamColorBKB->AddHandler(InputToEditColor, WM_KEYDOWN); - SXMainWndElem::EditParamColorBKB->AddHandler(InputToEditColor, WM_KEYUP); + SXMainWndElem::EditParamColorBKB->modifyStyle(ES_NUMBER, 0); + SXMainWndElem::EditParamColorBKB->addHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamColorBKB->addHandler(InitColorText, WM_LBUTTONDBLCLK); + SXMainWndElem::EditParamColorBKB->addHandler(InputToEditColor, WM_KEYDOWN); + SXMainWndElem::EditParamColorBKB->addHandler(InputToEditColor, WM_KEYUP); tmpPosY += 20; - SXMainWndElem::StaticParamFont = SXGUICrStatic("Font:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamFont->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamFont = SXGUICrStatic("Font:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamFont->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamFont->Font(0,15,0,0,0,0); - SXMainWndElem::ButtonParamSelectFont = SXGUICrButton("View font", 90, tmpPosY, 155, 15, SXGUI_BUTTON_IMAGE_NONE, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::ButtonParamSelectFont = SXGUICrButton("View font", 90, tmpPosY, 155, 15, SXGUI_BUTTON_IMAGE_NONE, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::ButtonParamSelectFont->Font(0,13,0,0,0,0); - SXMainWndElem::ButtonParamSelectFont->AddHandler(InitFont, WM_LBUTTONUP); + SXMainWndElem::ButtonParamSelectFont->addHandler(InitFont, WM_LBUTTONUP); tmpPosY += 20; - SXMainWndElem::StaticParamFontParent = SXGUICrStatic("Regulation Font:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamFontParent->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamFontParent = SXGUICrStatic("Regulation Font:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamFontParent->setColorBrush(RGB(220, 220, 220)); - SXMainWndElem::ComboBoxParamParentFont = SXGUICrComboBox("Parent", 90, tmpPosY - 1, 155, 70, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SendMessage(SXMainWndElem::ComboBoxParamParentFont->GetHWND(), CB_SETITEMHEIGHT, -1, 15); - SXMainWndElem::ComboBoxParamParentFont->AddItem("Parent"); - SXMainWndElem::ComboBoxParamParentFont->AddItem("Default gui"); - SXMainWndElem::ComboBoxParamParentFont->AddItem("User selected"); - SXMainWndElem::ComboBoxParamParentFont->SetSel(1); - SXMainWndElem::ComboBoxParamParentFont->AddHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMainWndElem::ComboBoxParamParentFont = SXGUICrComboBox(90, tmpPosY - 1, 155, 70, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SendMessage(SXMainWndElem::ComboBoxParamParentFont->getHWND(), CB_SETITEMHEIGHT, -1, 15); + SXMainWndElem::ComboBoxParamParentFont->addItem("Parent"); + SXMainWndElem::ComboBoxParamParentFont->addItem("Default gui"); + SXMainWndElem::ComboBoxParamParentFont->addItem("User selected"); + SXMainWndElem::ComboBoxParamParentFont->setSel(1); + SXMainWndElem::ComboBoxParamParentFont->addHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); tmpPosY += 20; - SXMainWndElem::StaticParamHintText = SXGUICrStatic("Hint text:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamHintText->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamHintText = SXGUICrStatic("Hint text:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamHintText->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamHintText->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamHintText = SXGUICrEdit("", 90, tmpPosY + 2, 155, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::EditParamHintText = SXGUICrEdit("", 90, tmpPosY + 2, 155, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::EditParamHintText->Font(0,15,0,0,0,0); - SXMainWndElem::EditParamHintText->AddHandler(InputInfoEdit, WM_KEYDOWN); + SXMainWndElem::EditParamHintText->addHandler(InputInfoEdit, WM_KEYDOWN); tmpPosY += 20; - SXMainWndElem::StaticParamHintVisible = SXGUICrStatic("Hint visible:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamHintVisible->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamHintVisible = SXGUICrStatic("Hint visible:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamHintVisible->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamHintVisible->Font(0,15,0,0,0,0); - SXMainWndElem::ComboBoxParamHintVisible = SXGUICrComboBox("ComboBoxParamHintVisible", 90, tmpPosY, 155, 70, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::ComboBoxParamHintVisible = SXGUICrComboBox(90, tmpPosY, 155, 70, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::ComboBoxParamHintVisible->Font(0,15,0,0,0,0); - SendMessage(SXMainWndElem::ComboBoxParamHintVisible->GetHWND(), CB_SETITEMHEIGHT, -1, 15); - SXMainWndElem::ComboBoxParamHintVisible->AddItem("true"); - SXMainWndElem::ComboBoxParamHintVisible->AddItem("false"); - SXMainWndElem::ComboBoxParamHintVisible->SetSel(1); - SXMainWndElem::ComboBoxParamHintVisible->AddHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SendMessage(SXMainWndElem::ComboBoxParamHintVisible->getHWND(), CB_SETITEMHEIGHT, -1, 15); + SXMainWndElem::ComboBoxParamHintVisible->addItem("true"); + SXMainWndElem::ComboBoxParamHintVisible->addItem("false"); + SXMainWndElem::ComboBoxParamHintVisible->setSel(1); + SXMainWndElem::ComboBoxParamHintVisible->addHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); tmpPosY += 20; - SXMainWndElem::StaticParamVisible = SXGUICrStatic("Visible:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamVisible->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamVisible = SXGUICrStatic("Visible:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamVisible->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamVisible->Font(0,15,0,0,0,0); - SXMainWndElem::ComboBoxParamVisible = SXGUICrComboBox("ComboBoxParamVisible", 90, tmpPosY, 155, 70, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::ComboBoxParamVisible = SXGUICrComboBox(90, tmpPosY, 155, 70, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::ComboBoxParamVisible->Font(0,15,0,0,0,0); - SendMessage(SXMainWndElem::ComboBoxParamVisible->GetHWND(), CB_SETITEMHEIGHT, -1, 15); - SXMainWndElem::ComboBoxParamVisible->AddItem("true"); - SXMainWndElem::ComboBoxParamVisible->AddItem("false"); - SXMainWndElem::ComboBoxParamVisible->SetSel(0); - SXMainWndElem::ComboBoxParamVisible->AddHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SendMessage(SXMainWndElem::ComboBoxParamVisible->getHWND(), CB_SETITEMHEIGHT, -1, 15); + SXMainWndElem::ComboBoxParamVisible->addItem("true"); + SXMainWndElem::ComboBoxParamVisible->addItem("false"); + SXMainWndElem::ComboBoxParamVisible->setSel(0); + SXMainWndElem::ComboBoxParamVisible->addHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); tmpPosY += 20; - SXMainWndElem::StaticParamEnabled = SXGUICrStatic("Enabled:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamEnabled->SetColorBrush(220, 220, 220); + SXMainWndElem::StaticParamEnabled = SXGUICrStatic("Enabled:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamEnabled->setColorBrush(RGB(220, 220, 220)); //SXMainWndElem::StaticParamEnabled->Font(0,15,0,0,0,0); - SXMainWndElem::ComboBoxParamEnabled = SXGUICrComboBox("ComboBoxParamEnabled", 90, tmpPosY, 155, 70, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); + SXMainWndElem::ComboBoxParamEnabled = SXGUICrComboBox(90, tmpPosY, 155, 70, SXMainWndElem::ParamWnd->getHWND(), 0, 0); //SXMainWndElem::ComboBoxParamEnabled->Font(0,15,0,0,0,0); - SXMainWndElem::ComboBoxParamEnabled->AddItem("true"); - SXMainWndElem::ComboBoxParamEnabled->AddItem("false"); - SXMainWndElem::ComboBoxParamEnabled->SetSel(0); - SXMainWndElem::ComboBoxParamEnabled->AddHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); + SXMainWndElem::ComboBoxParamEnabled->addItem("true"); + SXMainWndElem::ComboBoxParamEnabled->addItem("false"); + SXMainWndElem::ComboBoxParamEnabled->setSel(0); + SXMainWndElem::ComboBoxParamEnabled->addHandler(InputInfoComboBox, WM_KEYDOWN, VK_RETURN, 1, 0, 0, 0); tmpPosY += 20; - SXMainWndElem::StaticParamImgBLoadImg = SXGUICrStatic("Image:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamImgBLoadImg->SetColorBrush(220, 220, 220); - SXMainWndElem::ButtomParamImgBLoadImg = SXGUICrButton("LoadImg", 90, tmpPosY, 155, 15, SXGUI_BUTTON_IMAGE_NONE, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::ButtomParamImgBLoadImg->AddHandler(InitImageForButtonImg, WM_LBUTTONUP); + SXMainWndElem::StaticParamImgBLoadImg = SXGUICrStatic("Image:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamImgBLoadImg->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::ButtomParamImgBLoadImg = SXGUICrButton("LoadImg", 90, tmpPosY, 155, 15, SXGUI_BUTTON_IMAGE_NONE, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::ButtomParamImgBLoadImg->addHandler(InitImageForButtonImg, WM_LBUTTONUP); tmpPosY += 20; - SXMainWndElem::StaticParamWinMenu = SXGUICrStatic("Menu window:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0); - SXMainWndElem::StaticParamWinMenu->SetColorBrush(220, 220, 220); - SXMainWndElem::CheckBoxParamWinMenu = SXGUICrCheckBox("Enable", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->GetHWND(), 0, 0, false); - SXMainWndElem::CheckBoxParamWinMenu->SetColorBrush(220, 220, 220); - //SXMainWndElem::CheckBoxParamWinMenu->AddHandler(InitWindowMenu,WM_LBUTTONUP); + SXMainWndElem::StaticParamWinMenu = SXGUICrStatic("Menu window:", 5, tmpPosY, 80, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0); + SXMainWndElem::StaticParamWinMenu->setColorBrush(RGB(220, 220, 220)); + SXMainWndElem::CheckBoxParamWinMenu = SXGUICrCheckBox("Enable", 90, tmpPosY, 155, 15, SXMainWndElem::ParamWnd->getHWND(), 0, 0, false); + SXMainWndElem::CheckBoxParamWinMenu->setColorBrush(RGB(220, 220, 220)); + //SXMainWndElem::CheckBoxParamWinMenu->addHandler(InitWindowMenu,WM_LBUTTONUP); - SXMainWndElem::WndLog = SXGUICrBaseWnd( - "WndLog", "WndLog", 0, - 0, 0, wrect.bottom - 220, 500, 220, + SXMainWndElem::WndLog = SXGUICrBaseWndEx( + "WndLog", "WndLog", + 0, wrect.bottom - 220, 500, 220, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), WS_EX_TOOLWINDOW, CS_HREDRAW | CS_VREDRAW, WS_CAPTION | WS_MINIMIZEBOX | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_OVERLAPPED, 0, WndProcAllDefault); - SXMainWndElem::WndLog->AddHandler(MinimuzeWinInsteadClose, WM_CLOSE, 0, 0, 0, 0, true); + SXMainWndElem::WndLog->setVisible(true); + SXMainWndElem::WndLog->addHandler(MinimuzeWinInsteadClose, WM_CLOSE, 0, 0, 0, 0, true); RECT crWndLog; - GetClientRect(SXMainWndElem::WndLog->GetHWND(), &crWndLog); - SXMainWndElem::ListBoxLog = SXGUICrListBox("ListBoxLog", crWndLog.left, crWndLog.top, crWndLog.right, crWndLog.bottom, SXMainWndElem::WndLog->GetHWND(), 0, 0, false); + GetClientRect(SXMainWndElem::WndLog->getHWND(), &crWndLog); + SXMainWndElem::ListBoxLog = SXGUICrListBox( crWndLog.left, crWndLog.top, crWndLog.right, crWndLog.bottom, SXMainWndElem::WndLog->getHWND(), 0, 0, false); //SXMainWndElem::ListBoxLog->Font(0,14,0,0,0,0); InLog("%s", "Log created, run cycle ..."); - //SXMainWndElem::JobMainWnd->GetHWND(); + //SXMainWndElem::JobMainWnd->getHWND(); - SXMainWndElem::ArrMainWnd[0] = SXMainWndElem::MainWnd->GetHWND(); - SXMainWndElem::ArrMainWnd[1] = SXMainWndElem::JobMainWnd->GetHWND(); - SXMainWndElem::ArrMainWnd[2] = SXMainWndElem::ParamWnd->GetHWND(); - SXMainWndElem::ArrMainWnd[3] = SXMainWndElem::WndLog->GetHWND(); + SXMainWndElem::ArrMainWnd[0] = SXMainWndElem::MainWnd->getHWND(); + SXMainWndElem::ArrMainWnd[1] = SXMainWndElem::JobMainWnd->getHWND(); + SXMainWndElem::ArrMainWnd[2] = SXMainWndElem::ParamWnd->getHWND(); + SXMainWndElem::ArrMainWnd[3] = SXMainWndElem::WndLog->getHWND(); SXNameSapce::InitAllElements(); - SXNameSapce::OutputGUIInFile->Visible(false); + SXNameSapce::OutputGUIInFile->setVisible(false); AboutSXWinCreator::InitAllElements(); - AboutSXWinCreator::JobWindow->Visible(false); + AboutSXWinCreator::JobWindow->setVisible(false); MSG msg; ZeroMemory(&msg, sizeof(MSG)); diff --git a/source/sxwincreator/sxwincreator.h b/source/sxwincreator/sxwincreator.h new file mode 100644 index 0000000000000000000000000000000000000000..38a5b421fbcf83ba348df0d8daaa293793cb94b4 --- /dev/null +++ b/source/sxwincreator/sxwincreator.h @@ -0,0 +1,221 @@ + +#ifndef __SXWINCREATOR_H +#define __SXWINCREATOR_H + +//����������� � ������� �������� ���� +//��� ������� ������� ��� ��� �� ������ ���� ������������ lduttonup +//���� ������� ������ �� ��� � ����� + +#include <windows.h> +#include <gdefines.h> + +#include <Shlwapi.h> +#include <Shellapi.h> +#pragma comment(lib, "Shlwapi.lib") +#pragma comment(lib, "Comctl32.lib") + +#if defined(_DEBUG) +#pragma comment(lib, "sxcore_d.lib") +#else +#pragma comment(lib, "sxcore.lib") +#endif +#include <core/sxcore.h> + + +#if defined(_DEBUG) +#pragma comment(lib, "sxguiwinapi_d.lib") +#else +#pragma comment(lib, "sxguiwinapi.lib") +#endif +#include <SXGUIWinApi/sxgui.h> + +#include <common/Array.h> +#include <SXWinCreator/resource.h> + +#include <sxwincreator\about_sxwincreator.h> +#include <sxwincreator\windowoutput.h> +#include <sxwincreator\sx_param_wnd_data.h> +#include <sxwincreator\callbacks.h> + + +#define SX_WINCREATOR_COUNT_ELEMENT 17 + +#define SX_WINCREATOR_STAT_CUR_TEXT "Statistic for cursor:" +#define SX_WINCREATOR_STAT_CUR_G "desktop:\t" +#define SX_WINCREATOR_STAT_CUR_PARENT "parent:\t\t" +#define SX_WINCREATOR_STAT_CUR_CLIENT "element:\t" + +#define SX_WINCREATOR_STAT_ALL_ELEM_TEXT "Statistic for all elements:" +#define SX_WINCREATOR_STAT_ALL_ELEM_COUNT_CREATE "Create:\t" +#define SX_WINCREATOR_STAT_ALL_ELEM_COUNT_DELETE "Delete:\t" +#define SX_WINCREATOR_STAT_ALL_ELEM_COUNT_CURRENT "Current:\t" + +#define SXWINCREATORVERSION "0.9.0" + +namespace SXEngine +{ + extern HWND Hwnd; + extern HINSTANCE Hinstance; +}; + +struct SXElement +{ + ISXGUIButtonImg* Object; + char Name[256]; +}; + +struct SXCreateElement +{ + SXCreateElement(){ Object = 0; Name[0] = SysClassName[0] = SXClassName[0] = 0; } + ISXGUIComponent* Object; + char Name[256]; + char SysClassName[64]; + char SXClassName[64]; +}; + +namespace SXMainWndElem +{ + extern HWND ArrMainWnd[4]; + //������� ���� + extern ISXGUIBaseWnd* MainWnd; + extern ISXGUIBaseWnd* WndLog; + extern ISXGUIListBox* ListBoxLog; + extern ISXGUIBaseWnd* ParamWnd; + extern ISXGUIListBox* ListBoxAllElements; + + extern ISXGUIButtonImg* ButtonArrow; + + extern ISXGUIStatic* StaticParamImgBLoadImg; + extern ISXGUIButton* ButtomParamImgBLoadImg; + + extern ISXGUIStatic* StaticParamWinMenu; + extern ISXGUICheckBox* CheckBoxParamWinMenu; + + extern ISXGUIStatic* StaticParamPosX; + extern ISXGUIStatic* StaticParamPosY; + extern ISXGUIStatic* StaticParamWidth; + extern ISXGUIStatic* StaticParamHeight; + + extern ISXGUIEdit* EditParamPosX; + extern ISXGUIEdit* EditParamPosY; + extern ISXGUIEdit* EditParamWidth; + extern ISXGUIEdit* EditParamHeight; + + + extern ISXGUIStatic* StaticParamCaption; + extern ISXGUIEdit* EditParamCaption; + + extern ISXGUIStatic* StaticParamVarName; + extern ISXGUIEdit* EditParamVarName; + + + extern ISXGUIStatic* StaticParamColorText; + extern ISXGUIStatic* StaticParamColorBK; + extern ISXGUIStatic* StaticParamColorBKText; + extern ISXGUIStatic* StaticParamTransparentText; + + extern ISXGUIEdit* EditParamColorTextR; + extern ISXGUIEdit* EditParamColorTextG; + extern ISXGUIEdit* EditParamColorTextB; + + + extern ISXGUIEdit* EditParamColorTextBKR; + extern ISXGUIEdit* EditParamColorTextBKG; + extern ISXGUIEdit* EditParamColorTextBKB; + + + extern ISXGUIEdit* EditParamColorBKR; + extern ISXGUIEdit* EditParamColorBKG; + extern ISXGUIEdit* EditParamColorBKB; + + + extern ISXGUIComboBox* ComboBoxParamTransparentText; + + + extern ISXGUIStatic* StaticParamFont; + extern ISXGUIStatic* StaticParamFontParent; + extern ISXGUIComboBox* ComboBoxParamParentFont; + extern ISXGUIButton* ButtonParamSelectFont; + + extern ISXGUIStatic* StaticParamHintText; + extern ISXGUIEdit* EditParamHintText; + + extern ISXGUIStatic* StaticParamHintVisible; + extern ISXGUIComboBox* ComboBoxParamHintVisible; + + + extern ISXGUIStatic* StaticParamVisible; + extern ISXGUIComboBox* ComboBoxParamVisible; + + extern ISXGUIStatic* StaticParamEnabled; + extern ISXGUIComboBox* ComboBoxParamEnabled; + //SXGUIComboBox* ComboBoxParamEnabled = 0; + + extern RECT* MainWndOldRect; + + extern ISXGUIToolBar* SettingsPanel; + extern ISXGUIToolBar* ToolsPanel; + + //����� ���� ����������� ������� ����� ������� + extern char* NameElements[]; + extern DWORD ArrNumResource[]; + //���������� ����� ������������ �������� + //����� ��� ����� + extern int NumSourceElements[SX_WINCREATOR_COUNT_ELEMENT]; + extern Array<SXCreateElement*> CreateElements; + //������ ������ � ������������ �������� ����������� ��������� + extern SXElement Elements[SX_WINCREATOR_COUNT_ELEMENT]; + + //������ ���� ��������� ��������� + //Array<SXElement*> tmparr; + //Array<SXCreateElement*> CreateElements; + + //���������� ����� ��������� ��������, ���� -1 ������ ������ �� �������� + extern int NumActiveElement; + + //������� ��� ���������� + extern ISXGUIStatic* StaticStatisticMouseText; + extern ISXGUIStatic* StaticStatisticMouseGlobal; + extern ISXGUIStatic* StaticStatisticMouseParent; + extern ISXGUIStatic* StaticStatisticMouseClient; + + extern ISXGUIStatic* StaticStatisticElemText; + extern ISXGUIStatic* StaticStatisticElemCreate; + extern ISXGUIStatic* StaticStatisticElemDelete; + extern ISXGUIStatic* StaticStatisticElemCurrent; + + //���������� ��������� ��������� + extern int CountCreateNewElem; + //���������� ��������� ��������� + extern int CountDeleteElem; + //������� ���������� ��������� + extern int CountCurrentElem; + + extern ISXGUIMenuWindow* MainMenu; + + extern ISXGUIMenuWindow* MenuWindow; + + extern HCURSOR CurRePos, CurSW, CurSE, CurE, CurS, CurNS, CurWE; + + // + extern ISXGUIBaseWnd* JobMainWnd; + extern char NameJobWnd[256]; + + extern POINT GlobalCurPos; + + //����� �� ����������� ����������� ����������� + //������� �� ���� ����� ��� ��� ������ ������ + extern bool IsCreatedEl; + //���������� ���� �� ���� ������ + extern bool IsLoadedEl; +}; + +//########################################################################## + +void InLog(const char* format, ...); + +void CreateCursor(); + +bool Render(); + +#endif \ No newline at end of file