Skip to content

Commit 1980eba

Browse files
committed
Default xrWeatherEditor theme changed to VS2015 Light
Compiler warnings fixes
1 parent 235f697 commit 1980eba

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

src/editors/xrWeatherEditor/ide_impl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,13 @@ void ide_impl::on_idle_end()
5151
}
5252

5353
bool ide_impl::idle() const { return (m_in_idle); }
54+
#ifdef XR_X64
55+
HWND ide_impl::main_handle() { return ((HWND)m_window->Handle.ToInt64()); }
56+
HWND ide_impl::view_handle() { return ((HWND)m_window->view().draw_handle().ToInt64()); }
57+
#else
5458
HWND ide_impl::main_handle() { return ((HWND)m_window->Handle.ToInt32()); }
5559
HWND ide_impl::view_handle() { return ((HWND)m_window->view().draw_handle().ToInt32()); }
60+
#endif
5661
void ide_impl::run() { Application::Run(m_window); }
5762
void ide_impl::on_load_finished()
5863
{

src/editors/xrWeatherEditor/window_ide.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ void window_ide::custom_init(XRay::Editor::engine_base* engine)
2727
m_weather = gcnew window_weather(this);
2828
m_weather_editor = gcnew window_weather_editor(this, m_engine);
2929

30+
EditorDock->Theme = EditorTheme;
31+
3032
load_on_create();
3133

3234
ResumeLayout();

src/editors/xrWeatherEditor/window_ide.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public ref class window_ide : public System::Windows::Forms::Form
7070
}
7171

7272
private: WeifenLuo::WinFormsUI::Docking::DockPanel^ EditorDock;
73+
private: WeifenLuo::WinFormsUI::Docking::VS2015LightTheme^ EditorTheme;
7374

7475
private:
7576
/// <summary>
@@ -85,6 +86,7 @@ private: WeifenLuo::WinFormsUI::Docking::DockPanel^ EditorDock;
8586
void InitializeComponent(void)
8687
{
8788
this->EditorDock = (gcnew WeifenLuo::WinFormsUI::Docking::DockPanel());
89+
this->EditorTheme = (gcnew WeifenLuo::WinFormsUI::Docking::VS2015LightTheme());
8890
this->SuspendLayout();
8991
this->EditorDock->Dock = System::Windows::Forms::DockStyle::Fill;
9092
this->EditorDock->DocumentStyle = WeifenLuo::WinFormsUI::Docking::DocumentStyle::DockingSdi;

src/editors/xrWeatherEditor/window_view.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,11 @@ System::Void window_view::ViewPanel_MouseClick(Object ^ sender, MouseEventArgs ^
256256
if (!color)
257257
return;
258258

259+
#ifdef XR_X64
260+
HDC dc = GetWindowDC((HWND)ViewPanel->Handle.ToInt64());
261+
#else
259262
HDC dc = GetWindowDC((HWND)ViewPanel->Handle.ToInt32());
263+
#endif
260264
u32 pixel_color = GetPixel(dc, e->Location.X, e->Location.Y);
261265
XRay::Editor::color value;
262266
value.r = float((pixel_color & 0x000000ff) >> 0) / 255.f;
@@ -279,7 +283,11 @@ void window_view::pick_color_cursor(bool value)
279283
ViewPanel->Cursor = gcnew System::Windows::Forms::Cursor(
280284
(System::IntPtr)LoadCursor((HINSTANCE)System::Runtime::InteropServices::Marshal::GetHINSTANCE(
281285
System::Reflection::Assembly::GetExecutingAssembly()->GetModules()[0])
286+
#ifdef XR_X64
287+
.ToInt64(),
288+
#else
282289
.ToInt32(),
290+
#endif
283291
MAKEINTRESOURCE(IDC_CURSOR1)));
284292
}
285293

src/editors/xrWeatherEditor/xrWeatherEditor.vcxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@
144144
<Reference Include="WeifenLuo.WinFormsUI.Docking">
145145
<HintPath>..\..\..\sdk\binaries\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
146146
</Reference>
147+
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015">
148+
<HintPath>..\..\..\sdk\binaries\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
149+
</Reference>
147150
</ItemGroup>
148151
<ItemGroup>
149152
<ClCompile Include="AssemblyInfo.cpp" />

0 commit comments

Comments
 (0)