mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-18 01:03:32 +02:00
Switched imgui over to SDL implementation, dialog input works.
This commit is contained in:
@@ -2539,6 +2539,8 @@ void Go_Editor(bool flag)
|
||||
*/
|
||||
if (flag) {
|
||||
AudMix_SetMusicState(false); // jmarshall: disable music if we are in editor mode
|
||||
Hide_Mouse();
|
||||
ShowCursor(TRUE);
|
||||
Debug_Map = true;
|
||||
Debug_Unshroud = true;
|
||||
|
||||
@@ -2570,6 +2572,9 @@ void Go_Editor(bool flag)
|
||||
|
||||
} else {
|
||||
AudMix_SetMusicState(true); // jmarshall: enable music if we are going back into editor mode.
|
||||
Show_Mouse();
|
||||
ShowCursor(FALSE);
|
||||
|
||||
/*
|
||||
** Go into normal game mode
|
||||
*/
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
<ClCompile Include="..\ddraw\ddrawwrapper\DirectDrawSurfaceWrapper.cpp" />
|
||||
<ClCompile Include="..\ddraw\ddrawwrapper\DirectDrawWrapper.cpp" />
|
||||
<ClCompile Include="..\external\imgui\examples\imgui_impl_dx9.cpp" />
|
||||
<ClCompile Include="..\external\imgui\examples\imgui_impl_win32.cpp" />
|
||||
<ClCompile Include="..\external\imgui\examples\imgui_impl_sdl.cpp" />
|
||||
<ClCompile Include="..\external\imgui\imgui.cpp" />
|
||||
<ClCompile Include="..\external\imgui\imgui_draw.cpp" />
|
||||
<ClCompile Include="..\external\imgui\imgui_widgets.cpp" />
|
||||
@@ -488,7 +488,7 @@
|
||||
<ClInclude Include="..\ddraw\ddrawwrapper\DirectDrawWrapper.h" />
|
||||
<ClInclude Include="..\ddraw\ddrawwrapper\resource.h" />
|
||||
<ClInclude Include="..\external\imgui\examples\imgui_impl_dx9.h" />
|
||||
<ClInclude Include="..\external\imgui\examples\imgui_impl_win32.h" />
|
||||
<ClInclude Include="..\external\imgui\examples\imgui_impl_sdl.h" />
|
||||
<ClInclude Include="..\external\imgui\imconfig.h" />
|
||||
<ClInclude Include="..\external\imgui\imgui.h" />
|
||||
<ClInclude Include="..\external\imgui\imgui_internal.h" />
|
||||
|
||||
@@ -951,9 +951,6 @@
|
||||
<ClCompile Include="..\external\imgui\examples\imgui_impl_dx9.cpp">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\external\imgui\examples\imgui_impl_win32.cpp">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\external\imgui\imgui.cpp">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClCompile>
|
||||
@@ -963,6 +960,9 @@
|
||||
<ClCompile Include="..\external\imgui\imgui_widgets.cpp">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\external\imgui\examples\imgui_impl_sdl.cpp">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ABSTRACT.H">
|
||||
@@ -1865,9 +1865,6 @@
|
||||
<ClInclude Include="..\external\imgui\examples\imgui_impl_dx9.h">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\external\imgui\examples\imgui_impl_win32.h">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\external\imgui\imconfig.h">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClInclude>
|
||||
@@ -1886,6 +1883,9 @@
|
||||
<ClInclude Include="..\external\imgui\imstb_truetype.h">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\external\imgui\examples\imgui_impl_sdl.h">
|
||||
<Filter>Source Files\imgui</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="COORDA.ASM">
|
||||
|
||||
@@ -37,11 +37,12 @@
|
||||
|
||||
// jmarshall - imgui
|
||||
#include "imgui.h"
|
||||
#include "examples/imgui_impl_win32.h"
|
||||
#include "examples/imgui_impl_sdl.h"
|
||||
#include "examples/imgui_impl_dx9.h"
|
||||
|
||||
#include <d3d9.h>
|
||||
extern LPDIRECT3DDEVICE9 globald3d9Device;
|
||||
extern SDL_Window* game_window;
|
||||
// jmarshall end
|
||||
|
||||
|
||||
@@ -574,7 +575,7 @@ int PASCAL WinMain ( HINSTANCE instance , HINSTANCE , char * command_line , int
|
||||
//ImGui::StyleColorsClassic();
|
||||
|
||||
// Setup Platform/Renderer bindings
|
||||
ImGui_ImplWin32_Init(MainWindow);
|
||||
ImGui_ImplSDL2_InitForD3D(game_window);
|
||||
ImGui_ImplDX9_Init(globald3d9Device);
|
||||
|
||||
io.Fonts->AddFontFromFileTTF("code/fonts/Roboto-Medium.ttf", 16.0f);
|
||||
|
||||
@@ -318,6 +318,10 @@ void WWMouseClass::Hide_Mouse()
|
||||
|
||||
void WWMouseClass::Low_Show_Mouse(int x, int y)
|
||||
{
|
||||
extern bool Debug_Map;
|
||||
if (Debug_Map)
|
||||
return;
|
||||
|
||||
//
|
||||
// If the mouse is completely visible then draw it at its current
|
||||
// position.
|
||||
|
||||
@@ -41,9 +41,11 @@
|
||||
* Focus_Loss -- this function is called when a library function detects focus loss *
|
||||
* Memory_Error_Handler -- Handle a possibly fatal failure to allocate memory *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
#include "imgui.h"
|
||||
#include "examples/imgui_impl_sdl.h"
|
||||
#include "function.h"
|
||||
|
||||
|
||||
#ifdef WINSOCK_IPX
|
||||
#include "WSProto.h"
|
||||
#else //WINSOCK_IPX
|
||||
@@ -755,6 +757,9 @@ void WWSDL_ProcessEvents(KeyNumType& key, int& flags) {
|
||||
Keyboard->Put_Element(event.key.keysym.sym);
|
||||
break;
|
||||
}
|
||||
|
||||
if (Debug_Map)
|
||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||
}
|
||||
|
||||
if (!leftMouseProcessed && numFramesLMouse != 0)
|
||||
|
||||
Reference in New Issue
Block a user