From 1980eba3e7eed018718461fbe228ada1c8dc5220 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Mon, 5 Feb 2018 19:27:39 +0500 Subject: [PATCH] Default xrWeatherEditor theme changed to VS2015 Light Compiler warnings fixes --- src/editors/xrWeatherEditor/ide_impl.cpp | 5 +++++ src/editors/xrWeatherEditor/window_ide.cpp | 2 ++ src/editors/xrWeatherEditor/window_ide.h | 2 ++ src/editors/xrWeatherEditor/window_view.cpp | 8 ++++++++ src/editors/xrWeatherEditor/xrWeatherEditor.vcxproj | 3 +++ 5 files changed, 20 insertions(+) diff --git a/src/editors/xrWeatherEditor/ide_impl.cpp b/src/editors/xrWeatherEditor/ide_impl.cpp index 1da38a0a430..3edf0375d96 100644 --- a/src/editors/xrWeatherEditor/ide_impl.cpp +++ b/src/editors/xrWeatherEditor/ide_impl.cpp @@ -51,8 +51,13 @@ void ide_impl::on_idle_end() } bool ide_impl::idle() const { return (m_in_idle); } +#ifdef XR_X64 +HWND ide_impl::main_handle() { return ((HWND)m_window->Handle.ToInt64()); } +HWND ide_impl::view_handle() { return ((HWND)m_window->view().draw_handle().ToInt64()); } +#else HWND ide_impl::main_handle() { return ((HWND)m_window->Handle.ToInt32()); } HWND ide_impl::view_handle() { return ((HWND)m_window->view().draw_handle().ToInt32()); } +#endif void ide_impl::run() { Application::Run(m_window); } void ide_impl::on_load_finished() { diff --git a/src/editors/xrWeatherEditor/window_ide.cpp b/src/editors/xrWeatherEditor/window_ide.cpp index 4f276fd6537..317d15a3b92 100644 --- a/src/editors/xrWeatherEditor/window_ide.cpp +++ b/src/editors/xrWeatherEditor/window_ide.cpp @@ -27,6 +27,8 @@ void window_ide::custom_init(XRay::Editor::engine_base* engine) m_weather = gcnew window_weather(this); m_weather_editor = gcnew window_weather_editor(this, m_engine); + EditorDock->Theme = EditorTheme; + load_on_create(); ResumeLayout(); diff --git a/src/editors/xrWeatherEditor/window_ide.h b/src/editors/xrWeatherEditor/window_ide.h index ba18c60544d..5562179480a 100644 --- a/src/editors/xrWeatherEditor/window_ide.h +++ b/src/editors/xrWeatherEditor/window_ide.h @@ -70,6 +70,7 @@ public ref class window_ide : public System::Windows::Forms::Form } private: WeifenLuo::WinFormsUI::Docking::DockPanel^ EditorDock; +private: WeifenLuo::WinFormsUI::Docking::VS2015LightTheme^ EditorTheme; private: /// @@ -85,6 +86,7 @@ private: WeifenLuo::WinFormsUI::Docking::DockPanel^ EditorDock; void InitializeComponent(void) { this->EditorDock = (gcnew WeifenLuo::WinFormsUI::Docking::DockPanel()); + this->EditorTheme = (gcnew WeifenLuo::WinFormsUI::Docking::VS2015LightTheme()); this->SuspendLayout(); this->EditorDock->Dock = System::Windows::Forms::DockStyle::Fill; this->EditorDock->DocumentStyle = WeifenLuo::WinFormsUI::Docking::DocumentStyle::DockingSdi; diff --git a/src/editors/xrWeatherEditor/window_view.cpp b/src/editors/xrWeatherEditor/window_view.cpp index c86f4176de3..933da57f3ae 100644 --- a/src/editors/xrWeatherEditor/window_view.cpp +++ b/src/editors/xrWeatherEditor/window_view.cpp @@ -256,7 +256,11 @@ System::Void window_view::ViewPanel_MouseClick(Object ^ sender, MouseEventArgs ^ if (!color) return; +#ifdef XR_X64 + HDC dc = GetWindowDC((HWND)ViewPanel->Handle.ToInt64()); +#else HDC dc = GetWindowDC((HWND)ViewPanel->Handle.ToInt32()); +#endif u32 pixel_color = GetPixel(dc, e->Location.X, e->Location.Y); XRay::Editor::color value; value.r = float((pixel_color & 0x000000ff) >> 0) / 255.f; @@ -279,7 +283,11 @@ void window_view::pick_color_cursor(bool value) ViewPanel->Cursor = gcnew System::Windows::Forms::Cursor( (System::IntPtr)LoadCursor((HINSTANCE)System::Runtime::InteropServices::Marshal::GetHINSTANCE( System::Reflection::Assembly::GetExecutingAssembly()->GetModules()[0]) +#ifdef XR_X64 + .ToInt64(), +#else .ToInt32(), +#endif MAKEINTRESOURCE(IDC_CURSOR1))); } diff --git a/src/editors/xrWeatherEditor/xrWeatherEditor.vcxproj b/src/editors/xrWeatherEditor/xrWeatherEditor.vcxproj index f239f71158a..6b508fa3719 100644 --- a/src/editors/xrWeatherEditor/xrWeatherEditor.vcxproj +++ b/src/editors/xrWeatherEditor/xrWeatherEditor.vcxproj @@ -144,6 +144,9 @@ ..\..\..\sdk\binaries\WeifenLuo.WinFormsUI.Docking.dll + + ..\..\..\sdk\binaries\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll +