mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-18 09:04:12 +02:00
Imgui integration began switching dialogs over to new system, work in progress!
This commit is contained in:
@@ -34,6 +34,17 @@
|
||||
* main -- Initial startup routine (preps library systems). *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
// jmarshall - imgui
|
||||
#include "imgui.h"
|
||||
#include "examples/imgui_impl_win32.h"
|
||||
#include "examples/imgui_impl_dx9.h"
|
||||
|
||||
#include <d3d9.h>
|
||||
extern LPDIRECT3DDEVICE9 globald3d9Device;
|
||||
// jmarshall end
|
||||
|
||||
|
||||
#include "function.h"
|
||||
#include <conio.h>
|
||||
#include <io.h>
|
||||
@@ -551,6 +562,23 @@ int PASCAL WinMain ( HINSTANCE instance , HINSTANCE , char * command_line , int
|
||||
video_success = TRUE;
|
||||
}
|
||||
}
|
||||
// jmarshall
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
|
||||
|
||||
// Setup Dear ImGui style
|
||||
ImGui::StyleColorsDark();
|
||||
//ImGui::StyleColorsClassic();
|
||||
|
||||
// Setup Platform/Renderer bindings
|
||||
ImGui_ImplWin32_Init(MainWindow);
|
||||
ImGui_ImplDX9_Init(globald3d9Device);
|
||||
|
||||
io.Fonts->AddFontFromFileTTF("code/fonts/Roboto-Medium.ttf", 16.0f);
|
||||
// jmarshall end
|
||||
|
||||
if (!video_success) {
|
||||
MessageBox(MainWindow, TEXT_VIDEO_ERROR, TEXT_SHORT_TITLE, MB_ICONEXCLAMATION|MB_OK);
|
||||
|
||||
Reference in New Issue
Block a user