Skip to content

Commit

Permalink
Default xrWeatherEditor theme changed to VS2015 Light
Browse files Browse the repository at this point in the history
Compiler warnings fixes
  • Loading branch information
Xottab-DUTY committed Feb 5, 2018
1 parent 235f697 commit 1980eba
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/editors/xrWeatherEditor/ide_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
2 changes: 2 additions & 0 deletions src/editors/xrWeatherEditor/window_ide.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/editors/xrWeatherEditor/window_ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
/// <summary>
Expand All @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions src/editors/xrWeatherEditor/window_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)));
}

Expand Down
3 changes: 3 additions & 0 deletions src/editors/xrWeatherEditor/xrWeatherEditor.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@
<Reference Include="WeifenLuo.WinFormsUI.Docking">
<HintPath>..\..\..\sdk\binaries\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
</Reference>
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015">
<HintPath>..\..\..\sdk\binaries\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="AssemblyInfo.cpp" />
Expand Down

0 comments on commit 1980eba

Please sign in to comment.