Commit 6833aa2f authored by Byurrrer's avatar Byurrrer

изменил некоторые имена элементов интерфейса редактора материалов, поправил...

изменил некоторые имена элементов интерфейса редактора материалов, поправил баг в диалоге выбора файла когда после выбора родительское окно уходило на задний план, поправил баги в кэшировании шейдеров, исправил баг когда окно редактора материалов (и билда) могло уйти на задний план после открытия, теперь не должно
parent c676e336
......@@ -3,7 +3,7 @@
mtrl.h
Общие функции для материалов
*/
//! матрица для трансформации координат текстуры отражения (над водой)
static const half4x4 MatrixReflection =
{ 0.5, 0, 0, 0,
......
......@@ -550,6 +550,8 @@ bool DialogOwnSelectFileRun(char *szOutName, char *szOutPath, const char *szStar
}
}
SetForegroundWindow(hWndLock);
dialog_selfile::StaticInformationText->setText("");
if (hWndLock)
......
......@@ -75,6 +75,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin
SLevel_AmbientSndPlay();
SLevel_WeatherSndPlay();
SGCore_ShaderAllLoad();
SGCore_LoadTexAllLoad();
SetWindowPos(SGCore_GetHWND(), HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
int result = SkyXEngine_CycleMain();
SkyXEngine_Kill();
return result;
......
This diff is collapsed.
......@@ -139,15 +139,19 @@ uint32_t GetTimeShaderFileCache(const char *szPath);
//**************************************************************************
#define LOAD_SHADER_FAIL 0
#define LOAD_SHADER_COMPLETE 1
#define LOAD_SHADER_CACHE 2
//!
void LoadVertexShader(
int LoadVertexShader(
const char *szPath, //!<
CShaderVS *pShader, //!< CShaderVS
D3DXMACRO *aMacro = 0 //!<
);
//
void LoadPixelShader(
int LoadPixelShader(
const char *szPath, //!<
CShaderPS *pShader, //!< CShaderPS
D3DXMACRO *aMacro = 0 //!<
......@@ -239,6 +243,14 @@ protected:
//!
Array<CShaderInclude> m_aIncludes;
String getTextResultLoad(int iResult);
//! ,
void testDirCache();
//!
void testIncludeCache();
//!
void loadCacheInclude();
......
......@@ -315,6 +315,11 @@ SX_LIB_API const DEVMODE* SGCore_GetModes(int *pCount)
return &(g_aArrModes[0]);
}
SX_LIB_API HWND SGCore_GetHWND()
{
return g_oD3DAPP.hDeviceWindow;
}
SX_LIB_API void SGCore_AKill()
{
SG_PRECOND(_VOID);
......
......@@ -81,6 +81,9 @@ SX_LIB_API void SGCore_0Create(
bool isUnic = true //!< должна ли подсистема быть уникальной на основе имени
);
//! возвращает HWND окна рендера
SX_LIB_API HWND SGCore_GetHWND();
//! уничтожение либы
SX_LIB_API void SGCore_AKill();
......
......@@ -497,7 +497,7 @@ void SXMaterialEditor::InitAllElements()
SXMaterialEditor::pStaticShaders = SXGUICrStatic("Shaders:", 5, 515, 40, 15, SXMaterialEditor::pJobWindow->getHWND(), 0, 0);
SXMaterialEditor::pStaticShaders = SXGUICrStatic("Shaders:", 5, 515, 50, 15, SXMaterialEditor::pJobWindow->getHWND(), 0, 0);
SXMaterialEditor::pStaticShaders->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0);
SXMaterialEditor::pStaticShaders->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticShaders->setColorTextBk(RGB(255, 255, 255));
......@@ -926,7 +926,7 @@ void SXMaterialEditor::InitAllElements()
SXMaterialEditor::pStaticDoS->setColorTextBk(RGB(255, 255, 255));
SXMaterialEditor::pStaticDoS->setTransparentTextBk(true);
SXMaterialEditor::pStaticDoS->setColorBrush(RGB(220, 220, 220));
SXMaterialEditor::pStaticDoSW = SXGUICrStatic("W mat:",305,370,35,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDoSW = SXGUICrStatic("mW:",305,370,35,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDoSW->setFont("MS Shell Dlg",-11,0,400,0,0,0);
SXMaterialEditor::pStaticDoSW->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticDoSW->setColorTextBk(RGB(255, 255, 255));
......@@ -944,7 +944,7 @@ void SXMaterialEditor::InitAllElements()
SXMaterialEditor::pCheckBoxDoSWPS->setColorTextBk(RGB(255, 255, 255));
SXMaterialEditor::pCheckBoxDoSWPS->setTransparentTextBk(true);
SXMaterialEditor::pCheckBoxDoSWPS->setColorBrush(RGB(220, 220, 220));
SXMaterialEditor::pStaticDoSV = SXGUICrStatic("V mat:",305,390,35,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDoSV = SXGUICrStatic("mV:",305,390,35,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDoSV->setFont("MS Shell Dlg",-11,0,400,0,0,0);
SXMaterialEditor::pStaticDoSV->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticDoSV->setColorTextBk(RGB(255, 255, 255));
......@@ -956,7 +956,7 @@ void SXMaterialEditor::InitAllElements()
SXMaterialEditor::pCheckBoxDoSVPS->setColorTextBk(RGB(255, 255, 255));
SXMaterialEditor::pCheckBoxDoSVPS->setTransparentTextBk(true);
SXMaterialEditor::pCheckBoxDoSVPS->setColorBrush(RGB(220, 220, 220));
SXMaterialEditor::pStaticDosP = SXGUICrStatic("P mat:",305,410,35,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDosP = SXGUICrStatic("mP:",305,410,35,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDosP->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0);
SXMaterialEditor::pStaticDosP->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticDosP->setColorTextBk(RGB(255, 255, 255));
......@@ -974,19 +974,19 @@ void SXMaterialEditor::InitAllElements()
SXMaterialEditor::pCheckBoxDoSPPS->setColorTextBk(RGB(255, 255, 255));
SXMaterialEditor::pCheckBoxDoSPPS->setTransparentTextBk(true);
SXMaterialEditor::pCheckBoxDoSPPS->setColorBrush(RGB(220, 220, 220));
SXMaterialEditor::pStaticBoxDoSWV = SXGUICrStatic("WV mat:",410,370,45,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticBoxDoSWV = SXGUICrStatic("mWV:",410,370,45,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticBoxDoSWV->setFont("MS Shell Dlg",-11,0,400,0,0,0);
SXMaterialEditor::pStaticBoxDoSWV->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticBoxDoSWV->setColorTextBk(RGB(255, 255, 255));
SXMaterialEditor::pStaticBoxDoSWV->setTransparentTextBk(true);
SXMaterialEditor::pStaticBoxDoSWV->setColorBrush(RGB(220, 220, 220));
SXMaterialEditor::pStaticDoSWVP = SXGUICrStatic("WVP:",410,390,45,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDoSWVP = SXGUICrStatic("mWVP:",410,390,45,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDoSWVP->setFont("MS Shell Dlg",-11,0,400,0,0,0);
SXMaterialEditor::pStaticDoSWVP->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticDoSWVP->setColorTextBk(RGB(255, 255, 255));
SXMaterialEditor::pStaticDoSWVP->setTransparentTextBk(true);
SXMaterialEditor::pStaticDoSWVP->setColorBrush(RGB(220, 220, 220));
SXMaterialEditor::pStaticDoSCampos = SXGUICrStatic("Campos:",410,410,45,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDoSCampos = SXGUICrStatic("CamPos:",410,410,45,15,SXMaterialEditor::pJobWindow->getHWND(),0,0);
SXMaterialEditor::pStaticDoSCampos->setFont("MS Shell Dlg",-11,0,400,0,0,0);
SXMaterialEditor::pStaticDoSCampos->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticDoSCampos->setColorTextBk(RGB(255, 255, 255));
......@@ -1029,7 +1029,7 @@ void SXMaterialEditor::InitAllElements()
SXMaterialEditor::pCheckBoxDoSCamposPS->setTransparentTextBk(true);
SXMaterialEditor::pCheckBoxDoSCamposPS->setColorBrush(RGB(220, 220, 220));
SXMaterialEditor::pStaticDoSTimeDelta = SXGUICrStatic("count_td:", 525, 370, 45, 15, SXMaterialEditor::pJobWindow->getHWND(), 0, 0);
SXMaterialEditor::pStaticDoSTimeDelta = SXGUICrStatic("Time:", 525, 370, 45, 15, SXMaterialEditor::pJobWindow->getHWND(), 0, 0);
SXMaterialEditor::pStaticDoSTimeDelta->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0);
SXMaterialEditor::pStaticDoSTimeDelta->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticDoSTimeDelta->setColorTextBk(RGB(255, 255, 255));
......@@ -1051,7 +1051,7 @@ void SXMaterialEditor::InitAllElements()
SXMaterialEditor::pCheckBoxDoSTimeDeltaPS->setColorBrush(RGB(220, 220, 220));
SXMaterialEditor::pStaticDoSWinSize = SXGUICrStatic("win size:", 525, 390, 40, 15, SXMaterialEditor::pJobWindow->getHWND(), 0, 0);
SXMaterialEditor::pStaticDoSWinSize = SXGUICrStatic("WinSize:", 525, 390, 45, 15, SXMaterialEditor::pJobWindow->getHWND(), 0, 0);
SXMaterialEditor::pStaticDoSWinSize->setFont("MS Shell Dlg", -11, 0, 400, 0, 0, 0);
SXMaterialEditor::pStaticDoSWinSize->setColorText(RGB(0, 0, 0));
SXMaterialEditor::pStaticDoSWinSize->setColorTextBk(RGB(255, 255, 255));
......
......@@ -498,7 +498,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLin
SXMaterialEditor::idMat = SRender_SimModelGetIDMtl();
SkyXEngine_PreviewKill();
SXMaterialEditor::pJobWindow->setVisible(true);
SetWindowPos(SXMaterialEditor::pJobWindow->getHWND(), HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
int result = SkyXEngine_CycleMain();
SkyXEngine_Kill();
SXMaterialEditor::DeleteAllElements();
......
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