Commit 0d3e3f30 authored by Byurrrer's avatar Byurrrer

Отцентрировал редакторы

parent 02fa43e7
......@@ -113,10 +113,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\source\sxleveleditor\light_callback.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\source\sxleveleditor\model_callback.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
......
......@@ -30,9 +30,6 @@
<ClCompile Include="..\..\..\source\sxleveleditor\level_editor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sxleveleditor\light_callback.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sxleveleditor\model_callback.cpp">
<Filter>Source Files</Filter>
</ClCompile>
......
......@@ -89,6 +89,21 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\source\sxparticleseditor\callback_common.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\callback_list.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\callback_tabs.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\particles_editor.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\particles_editor_op.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\sxparticleseditor.cpp" />
</ItemGroup>
<ItemGroup>
......
......@@ -18,6 +18,21 @@
<ClCompile Include="..\..\..\source\sxparticleseditor\sxparticleseditor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\callback_tabs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\particles_editor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\particles_editor_op.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\callback_common.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sxparticleseditor\callback_list.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\source\sxparticleseditor\resource.h">
......
......@@ -1058,13 +1058,26 @@ Editor * Editor::m_pEditor;
void Editor::InitUI()
{
MainWindow = SXGUICrBaseWnd("MainWindow", "MainWindow", 0, 0, 256, 199, 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);
RECT wrect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0);
int cx = (wrect.right - MAINWIN_SIZE_X) / 2;
int cy = (wrect.bottom - MAINWIN_SIZE_Y) / 2;
if (cx < 0)
cx = 0;
if (cy < 0)
cy = 0;
MainWindow = SXGUICrBaseWnd("SXAnimEditor", "SXAnimEditor", 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);
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);
......
#ifndef Editor_H
#define Editor_H
#define MAINWIN_SIZE_X 1320
#define MAINWIN_SIZE_Y 730
#define EDITOR_REG_TREE "SOFTWARE\\DogmaNet\\SkyXEngine\\Editor"
#define EDITOR_REG_KEY_GSDIR "gs_dir"
......
#define SX_LE_MMENU_WEATHER_BEGIN_ID 50001
#define MAINWIN_SIZE_X 820
#define MAINWIN_SIZE_Y 690
namespace SXLevelEditor
{
ISXGUIBaseWnd* JobWindow;
......@@ -258,15 +261,20 @@ void SXLevelEditor::InitAllElements()
icex.dwICC = ICC_LISTVIEW_CLASSES;
InitCommonControlsEx(&icex);
SXLevelEditor::JobWindow = SXGUICrBaseWnd("JobWindow","SX Level editor",0,0,0,20,820,690,0,0,CreateSolidBrush(RGB(220,220,220)),0,CS_HREDRAW | CS_VREDRAW,WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION,0,WndProcAllDefault);
RECT wrect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0);
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 = 820;
SXLevelEditor::JobWindow->MinSizeY = 690;
SXLevelEditor::JobWindow->MinSizeX = MAINWIN_SIZE_X;
SXLevelEditor::JobWindow->MinSizeY = MAINWIN_SIZE_Y;
SXLevelEditor::MainMenu = SXGUICrMenuEx(IDR_MENU1);
SXLevelEditor::MainMenu->SetToWindow(SXLevelEditor::JobWindow->GetHWND());
......
#define MAINWIN_SIZE_X 645
#define MAINWIN_SIZE_Y 700
#include <sxmaterialeditor/shaders_kit.cpp>
#include <sxmaterialeditor/paraml_kit.cpp>
......@@ -185,7 +188,12 @@ namespace SXMaterialEditor
void SXMaterialEditor::InitAllElements()
{
SXMaterialEditor::JobWindow = SXGUICrBaseWnd("SXMaterialEditor", "SXMaterialEditor", 0, 0, 366, 18, 645, 700, 0, 0, CreateSolidBrush(RGB(220, 220, 220)), 0, CS_HREDRAW | CS_VREDRAW, WS_DLGFRAME | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION, 0, WndProcAllDefault);
RECT wrect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0);
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);
......
......@@ -479,7 +479,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin
SML_LigthsCreatePoint(
&float3(110,110,-110),
LIGHTS_GLOBAL_MAX_POWER,
LIGHTS_GLOBAL_STD_RADIUS,
&float3(1,1,1),
true,
......
#define MAINWIN_SIZE_X 820
#define MAINWIN_SIZE_Y 675
namespace SXParticlesEditor
{
ISXGUIBaseWnd* JobWindow;
......@@ -301,12 +304,17 @@ namespace SXParticlesEditor
void SXParticlesEditor::InitAllElements()
{
SXParticlesEditor::JobWindow = SXGUICrBaseWnd("JobWindow","SXParticlesEditor",0,0,247,54,820,675,0,0,CreateSolidBrush(RGB(220,220,220)),0,CS_HREDRAW | CS_VREDRAW,WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION,0,WndProcAllDefault);
RECT wrect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &wrect, 0);
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->MinSizeX = 820;
SXParticlesEditor::JobWindow->MinSizeY = 675;
SXParticlesEditor::JobWindow->MinSizeX = MAINWIN_SIZE_X;
SXParticlesEditor::JobWindow->MinSizeY = MAINWIN_SIZE_Y;
SXParticlesEditor::JobWindow->AddHandler(ComMenuId, WM_COMMAND);
SXParticlesEditor::JobWindow->AddHandler(TrueExit, WM_CLOSE, 0, 0, 0, 0, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment