mirror of
https://github.com/OpenTrespasser/JurassicParkTrespasser.git
synced 2024-12-24 17:41:56 +00:00
Compare commits
27 Commits
17d1060a27
...
223881eae3
Author | SHA1 | Date | |
---|---|---|---|
|
223881eae3 | ||
|
e24bb62b5b | ||
|
62f3947931 | ||
|
80b8977f73 | ||
|
6c5fdd665e | ||
|
bbe72506c2 | ||
|
8c8f17f171 | ||
|
48b6b6c90d | ||
|
10923b14f8 | ||
|
a11a6ac711 | ||
|
9e5227af5e | ||
|
fee7df9701 | ||
|
39f64dc697 | ||
|
2591beeee1 | ||
|
410cc17e0f | ||
|
50901fd256 | ||
|
8347b2c66e | ||
|
bbd5e83c87 | ||
|
0497f93130 | ||
|
6117334a64 | ||
|
c3b01fc54a | ||
|
b5e1fe531e | ||
|
a29d29911c | ||
|
fbe473067e | ||
|
25a6277599 | ||
|
51ad6fd46a | ||
|
d502b39700 |
@ -286,6 +286,8 @@ CProfileStat psCluts/*("Cluts", &proProfile.psMain)*/;
|
||||
{
|
||||
Assert(ppal);
|
||||
Assert(pmat);
|
||||
if (!ppal)
|
||||
return nullptr;
|
||||
|
||||
//
|
||||
// Search for palette & material in the array.
|
||||
|
@ -10,6 +10,19 @@ WindowMode GetWindowModeConfigured()
|
||||
return static_cast<WindowMode>(selection);
|
||||
}
|
||||
|
||||
void SetWindowModeConfigured(WindowMode mode)
|
||||
{
|
||||
int value = static_cast<int>(mode);
|
||||
if (value >= 0 && value <= static_cast<int>(WindowMode::EXCLUSIVE))
|
||||
SetRegValue("WindowMode", value);
|
||||
}
|
||||
|
||||
WindowMode GetWindowModeActive()
|
||||
{
|
||||
static WindowMode active = GetWindowModeConfigured();
|
||||
return active;
|
||||
}
|
||||
|
||||
int GetSystemBitDepth(HWND wnd)
|
||||
{
|
||||
return GetSystemBitDepth(GetDC(wnd));
|
||||
|
@ -10,6 +10,8 @@ enum class WindowMode {
|
||||
};
|
||||
|
||||
WindowMode GetWindowModeConfigured();
|
||||
void SetWindowModeConfigured(WindowMode mode);
|
||||
WindowMode GetWindowModeActive();
|
||||
|
||||
int GetSystemBitDepth(HWND wnd);
|
||||
int GetSystemBitDepth(HDC dc);
|
||||
|
@ -126,7 +126,6 @@ namespace Video
|
||||
//
|
||||
void EnumerateDisplayModes
|
||||
(
|
||||
bool b_highres = true // Enables the enumeration of screen modes higher than 640x480.
|
||||
);
|
||||
//
|
||||
// Enumerates screen resolutions, and stores the results in 'ascrmdList.'
|
||||
|
@ -334,11 +334,11 @@ private:
|
||||
Assert(bWithin(i_buffers, 1, 3));
|
||||
|
||||
iBuffers = i_buffers;
|
||||
bFullScreen = i_bits != 0 && GetWindowModeConfigured() != WindowMode::FRAMED;
|
||||
bFullScreen = i_bits != 0 && GetWindowModeActive() != WindowMode::FRAMED;
|
||||
iWidthFront = i_width;
|
||||
iHeightFront = i_height;
|
||||
|
||||
if (i_bits && GetWindowModeConfigured() == WindowMode::EXCLUSIVE)
|
||||
if (i_bits && GetWindowModeActive() == WindowMode::EXCLUSIVE)
|
||||
{
|
||||
// Go fullscreen. We need to call 2 DD functions to do this.
|
||||
DirectDraw::err = DirectDraw::pdd4->SetCooperativeLevel(hwnd,
|
||||
@ -1321,7 +1321,7 @@ rptr<CRaster> prasReadBMP(const char* str_bitmap_name, bool b_vid)
|
||||
// Return to Windows screen if necessary.
|
||||
if (DirectDraw::pdd4)
|
||||
{
|
||||
if (GetWindowModeConfigured() == WindowMode::EXCLUSIVE)
|
||||
if (GetWindowModeActive() == WindowMode::EXCLUSIVE)
|
||||
DirectDraw::err = DirectDraw::pdd4->RestoreDisplayMode();
|
||||
DirectDraw::err = DirectDraw::pdd4->SetCooperativeLevel(0, DDSCL_NORMAL);
|
||||
}
|
||||
@ -1735,7 +1735,7 @@ rptr<CRaster> prasReadBMP(const char* str_bitmap_name, bool b_vid)
|
||||
//******************************************************************************************
|
||||
bool CRasterWin::CPriv::bConstructD3D(HWND hwnd, int i_width, int i_height, int i_bits, bool force16Bit)
|
||||
{
|
||||
if (GetWindowModeConfigured() == WindowMode::EXCLUSIVE)
|
||||
if (GetWindowModeActive() == WindowMode::EXCLUSIVE)
|
||||
return bConstructD3DExclusive(hwnd, i_width, i_height, i_bits);
|
||||
else
|
||||
return bConstructD3DWindowed(hwnd, i_width, i_height, i_bits, force16Bit);
|
||||
|
@ -81,7 +81,6 @@ namespace Video
|
||||
int iTotalVideoMemory;
|
||||
SScreenMode ascrmdList[iMAX_MODES];
|
||||
int iModes;
|
||||
bool bEnumHighResolutions = true;
|
||||
|
||||
//
|
||||
// Functions needed by CInitVideo.
|
||||
@ -98,10 +97,6 @@ namespace Video
|
||||
//
|
||||
//**********************************
|
||||
{
|
||||
// We now only support 16-bit rendering.
|
||||
if (i_bits != 16)
|
||||
return;
|
||||
|
||||
// Search list to see if already there.
|
||||
for (int i = 0; i < iModes; i++)
|
||||
{
|
||||
@ -136,10 +131,6 @@ namespace Video
|
||||
//
|
||||
//**********************************
|
||||
{
|
||||
if (!bEnumHighResolutions)
|
||||
if (pddsd->dwWidth > 800)
|
||||
return DDENUMRET_OK;
|
||||
|
||||
// Suppress resolutions if required.
|
||||
if (bSuppress512x384 && pddsd->dwWidth == 512)
|
||||
return DDENUMRET_OK;
|
||||
@ -179,7 +170,7 @@ namespace Video
|
||||
|
||||
//******************************************************************************************
|
||||
//
|
||||
void EnumerateDisplayModes(bool b_highres)
|
||||
void EnumerateDisplayModes()
|
||||
//
|
||||
// Generate the list of available display modes. Store it sorted in ascrmdList.
|
||||
//
|
||||
@ -194,7 +185,6 @@ namespace Video
|
||||
//**********************************
|
||||
{
|
||||
CDDSize<DDCAPS> ddcaps_hw, ddcaps_sw;
|
||||
bEnumHighResolutions = b_highres;
|
||||
EVideoCard evc;
|
||||
|
||||
// Get the video card type.
|
||||
|
@ -216,16 +216,8 @@ static HRESULT CALLBACK EnumDisplayMode
|
||||
assert(pddsd);
|
||||
assert(pv_context);
|
||||
|
||||
// If the mode is not 16 bits, ignore it.
|
||||
if (pddsd->ddpfPixelFormat.dwRGBBitCount != 16)
|
||||
return DDENUMRET_OK;
|
||||
|
||||
// Suppress resolutions if required.
|
||||
if (bSuppress512 && pddsd->dwWidth == 512)
|
||||
return DDENUMRET_OK;
|
||||
|
||||
// Do not enumerate screen resolutions higher than 640x480.
|
||||
if (pddsd->dwWidth > 800)
|
||||
// Do not enumerate screen resolutions lower than 640x480.
|
||||
if (pddsd->dwWidth < 640 || pddsd->dwHeight < 480)
|
||||
return DDENUMRET_OK;
|
||||
|
||||
// Get the next available element.
|
||||
|
@ -1440,6 +1440,15 @@ BOOL CUIListbox::SetFont(HFONT hfont)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CUIListbox::ScrollToActive()
|
||||
{
|
||||
if (m_iCurrSel != -1 && m_iCurrSel < m_vInfo.size())
|
||||
{
|
||||
m_iTop = m_iCurrSel;
|
||||
m_bUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CUIListbox::InitSurface()
|
||||
{
|
||||
int iWidth;
|
||||
|
@ -271,6 +271,8 @@ public:
|
||||
virtual BOOL GetFontSize() { return m_bFontSize;}
|
||||
virtual void SetFontSize(BOOL bFontSize) { m_bFontSize = bFontSize; m_bUpdate = TRUE;}
|
||||
|
||||
void ScrollToActive();
|
||||
|
||||
private:
|
||||
std::vector<CUILISTBOXINFO> m_vInfo;
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "../Lib/Sys/RegInit.hpp"
|
||||
#include "DDDevice.hpp"
|
||||
#include "Lib/Std/MemLimits.hpp"
|
||||
#include "Lib/View/DisplayMode.hpp"
|
||||
|
||||
|
||||
//
|
||||
@ -92,6 +93,7 @@ BOOL CConfigureWnd::OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
|
||||
|
||||
m_hwndResolutions = GetDlgItem(m_hwnd, IDC_COMBO_RESOLUTION);
|
||||
m_hwndTextureSizes = GetDlgItem(m_hwnd, IDC_COMBO_TEXTURESIZE);
|
||||
m_hwndWindowModes = GetDlgItem(m_hwnd, IDC_COMBO_WINDOWMODE);
|
||||
m_hwndList = GetDlgItem(m_hwnd, IDC_LIST_CARD);
|
||||
|
||||
InitializeCardSelection();
|
||||
@ -245,6 +247,16 @@ void CConfigureWnd::InitializeTextureSizes()
|
||||
ComboBox_SetCurSel(m_hwndTextureSizes, i_sel);
|
||||
}
|
||||
|
||||
void CConfigureWnd::InitializeWindowModes()
|
||||
{
|
||||
ComboBox_ResetContent(m_hwndWindowModes);
|
||||
ComboBox_AddString(m_hwndWindowModes, "Window");
|
||||
ComboBox_AddString(m_hwndWindowModes, "Borderless Window");
|
||||
ComboBox_AddString(m_hwndWindowModes, "Exclusive Fullscreen");
|
||||
|
||||
int selected = static_cast<int>(GetWindowModeConfigured()) - 1;
|
||||
ComboBox_SetCurSel(m_hwndWindowModes, selected);
|
||||
}
|
||||
|
||||
void CConfigureWnd::InitializeCardSelection()
|
||||
{
|
||||
@ -338,6 +350,7 @@ void CConfigureWnd::OnSelchangeListCard()
|
||||
// Set up the resolution combo box.
|
||||
InitializeResolutions();
|
||||
InitializeTextureSizes();
|
||||
InitializeWindowModes();
|
||||
|
||||
// Set up dither check box.
|
||||
CheckDlgButton(m_hwnd, IDC_CHECK_DITHER, (bGetDither()) ? (BST_CHECKED) : (BST_UNCHECKED));
|
||||
@ -410,12 +423,15 @@ void CConfigureWnd::OnOK()
|
||||
// Set the dither flag.
|
||||
SetDither(IsDlgButtonChecked(m_hwnd, IDC_CHECK_DITHER));
|
||||
|
||||
int selectedWindowMode = ComboBox_GetCurSel(m_hwndWindowModes);
|
||||
SetWindowModeConfigured(static_cast<WindowMode>(selectedWindowMode + 1));
|
||||
|
||||
// Close the registry and exit.
|
||||
CMultiDlg::OnOK();
|
||||
|
||||
// Remove the device enumeration object.
|
||||
delete penumdevDevices;
|
||||
penumdevDevices = 0;
|
||||
penumdevDevices = nullptr;
|
||||
|
||||
//exit(0);
|
||||
}
|
||||
@ -755,6 +771,7 @@ void CRenderWnd::SelectCurrentResolution()
|
||||
}
|
||||
|
||||
plistbox->SetCurrSel(i);
|
||||
plistbox->ScrollToActive();
|
||||
}
|
||||
|
||||
|
||||
|
@ -455,7 +455,7 @@ int DoWinMain(HINSTANCE hInstance,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( !IsDisplayConfigurationValid( GetSystemBitDepth(g_hwnd), bGetD3D(), GetWindowModeConfigured()))
|
||||
if ( !IsDisplayConfigurationValid( GetSystemBitDepth(g_hwnd), bGetD3D(), GetWindowModeActive()))
|
||||
{
|
||||
if (MsgDlg(g_hwnd,
|
||||
MB_YESNOCANCEL | MB_SETFOREGROUND,
|
||||
@ -538,6 +538,14 @@ DoRestartWithRenderDlg:
|
||||
dlg.MultiDialogBox(g_hInst, MAKEINTRESOURCE(IDD_INITIALIZATION), g_hwnd);
|
||||
g_pMainWnd->m_bRelaunch = true;
|
||||
bVideoCardChosen = true;
|
||||
|
||||
int windowWidth = 0;
|
||||
int windowHeight = 0;
|
||||
if (bGetDimensions(windowWidth, windowHeight))
|
||||
{
|
||||
SetWindowPos(g_hwnd, NULL, -1, -1, windowWidth, windowHeight,
|
||||
SWP_NOMOVE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
}
|
||||
}
|
||||
|
||||
EnableMenuItem(GetSystemMenu(g_hwnd, FALSE),
|
||||
@ -623,7 +631,7 @@ DoRestartWithRenderDlg:
|
||||
}
|
||||
}
|
||||
|
||||
Video::EnumerateDisplayModes(false);
|
||||
Video::EnumerateDisplayModes();
|
||||
|
||||
//
|
||||
// If safe mode is not active, set some defaults that depend on the CPU speed.
|
||||
@ -912,7 +920,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
bGetDimensions(windowWidth, windowHeight);
|
||||
|
||||
DWORD style = WS_VISIBLE | WS_POPUP | WS_SYSMENU;
|
||||
if (GetWindowModeConfigured() == WindowMode::FRAMED)
|
||||
if (GetWindowModeActive() == WindowMode::FRAMED)
|
||||
style |= WS_OVERLAPPEDWINDOW;
|
||||
|
||||
if (!CreateWindowEx(0,
|
||||
|
@ -78,6 +78,7 @@ public:
|
||||
void OnPaint(HWND hwnd);
|
||||
void OnTimer(HWND hwnd, UINT id);
|
||||
void OnSysCommand(HWND hwnd, UINT cmd, int x, int y);
|
||||
void OnWindowPosChanged(HWND hwnd, LPWINDOWPOS pos);
|
||||
|
||||
void GameLoop();
|
||||
void CopyrightScreen();
|
||||
@ -105,10 +106,12 @@ private:
|
||||
HWND m_hwndD3DDriver;
|
||||
HWND m_hwndList;
|
||||
HWND m_hwndTextureSizes;
|
||||
HWND m_hwndWindowModes;
|
||||
|
||||
void InitializeCardSelection();
|
||||
void InitializeResolutions();
|
||||
void InitializeTextureSizes();
|
||||
void InitializeWindowModes();
|
||||
void OnSelchangeListCard();
|
||||
};
|
||||
|
||||
|
@ -170,7 +170,7 @@ void CMainWnd::OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
|
||||
|
||||
void CMainWnd::OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
|
||||
{
|
||||
CUIWnd * puiwnd;
|
||||
CUIWnd* puiwnd = nullptr;
|
||||
|
||||
if (vk == VK_SNAPSHOT)
|
||||
{
|
||||
@ -180,6 +180,7 @@ void CMainWnd::OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pUIMgr)
|
||||
puiwnd = m_pUIMgr->GetActiveUIWnd();
|
||||
if (puiwnd && !puiwnd->m_bExitWnd)
|
||||
{
|
||||
@ -191,8 +192,9 @@ void CMainWnd::OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
|
||||
|
||||
void CMainWnd::OnChar(HWND hwnd, TCHAR ch, int cRepeat)
|
||||
{
|
||||
CUIWnd * puiwnd;
|
||||
CUIWnd* puiwnd = nullptr;
|
||||
|
||||
if (m_pUIMgr)
|
||||
puiwnd = m_pUIMgr->GetActiveUIWnd();
|
||||
if (puiwnd && !puiwnd->m_bExitWnd)
|
||||
{
|
||||
@ -336,6 +338,15 @@ void CMainWnd::OnSysCommand(HWND hwnd, UINT cmd, int x, int y)
|
||||
}
|
||||
}
|
||||
|
||||
void CMainWnd::OnWindowPosChanged(HWND hwnd, LPWINDOWPOS pos)
|
||||
{
|
||||
if (!m_pUIMgr)
|
||||
return;
|
||||
|
||||
auto* puiwnd = m_pUIMgr->GetActiveUIWnd();
|
||||
if (puiwnd)
|
||||
puiwnd->OnWindowPosChanged();
|
||||
}
|
||||
|
||||
|
||||
void CMainWnd::SendActivate(BOOL fActivate, DWORD dwThreadId)
|
||||
@ -420,7 +431,7 @@ void CMainWnd::OnActivateApp(HWND hwnd, BOOL fActivate, DWORD dwThreadId)
|
||||
|
||||
m_pUIMgr->m_bPause = FALSE;
|
||||
|
||||
if (prasMainScreen && GetWindowModeConfigured() == WindowMode::EXCLUSIVE)
|
||||
if (prasMainScreen && GetWindowModeActive() == WindowMode::EXCLUSIVE)
|
||||
{
|
||||
SetRect(&rc,
|
||||
0,
|
||||
@ -743,6 +754,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
|
||||
HANDLE_MSG(hwnd, WM_MBUTTONDOWN, g_pMainWnd->OnMButtonDown);
|
||||
HANDLE_MSG(hwnd, WM_TIMER, g_pMainWnd->OnTimer);
|
||||
HANDLE_MSG(hwnd, WM_SYSCOMMAND, g_pMainWnd->OnSysCommand);
|
||||
HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGED, g_pMainWnd->OnWindowPosChanged);
|
||||
}
|
||||
|
||||
return DefWindowProc(hwnd, uiMsg, wParam, lParam);
|
||||
|
@ -80,6 +80,7 @@
|
||||
#define IDC_COMBO_TEXTURESIZE 1005
|
||||
#define IDC_STATIC_SIZES 1006
|
||||
#define IDC_COMBO_D3D 1006
|
||||
#define IDC_COMBO_WINDOWMODE 1006
|
||||
#define IDC_STATIC_BOX 1007
|
||||
#define IDC_D3D 1008
|
||||
#define IDC_LIST_CARD 1008
|
||||
@ -132,7 +133,7 @@
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 122
|
||||
#define _APS_NEXT_RESOURCE_VALUE 123
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1039
|
||||
#define _APS_NEXT_SYMED_VALUE 105
|
||||
|
@ -948,7 +948,7 @@ void SetupGameScreen()
|
||||
|
||||
bGetDimensions(iWindowWidth, iWindowHeight);
|
||||
|
||||
if (GetWindowModeConfigured() == WindowMode::FRAMED)
|
||||
if (GetWindowModeActive() == WindowMode::FRAMED)
|
||||
{
|
||||
POINT clientsize = GetCurrentClientSize();
|
||||
iClientWidth = clientsize.x;
|
||||
|
@ -70,7 +70,7 @@ IDB_DEF_PAL BITMAP DISCARDABLE "res\\smallPal.bmp"
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_INITIALIZATION DIALOG DISCARDABLE 0, 0, 272, 185
|
||||
IDD_INITIALIZATION DIALOG DISCARDABLE 0, 0, 292, 225
|
||||
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Trespasser 3D Video Driver Setup"
|
||||
@ -78,31 +78,34 @@ FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LISTBOX IDC_LIST_CARD,16,24,142,52,LBS_NOINTEGRALHEIGHT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_RESOLUTION,184,24,72,78,CBS_DROPDOWNLIST |
|
||||
COMBOBOX IDC_COMBO_RESOLUTION,184,24,85,78,CBS_DROPDOWNLIST |
|
||||
CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "OK",IDOK,7,131,48,18
|
||||
PUSHBUTTON "Cancel",IDCANCEL,63,131,48,18
|
||||
GROUPBOX "Screen Resolution",IDC_STATIC,176,8,88,36
|
||||
DEFPUSHBUTTON "OK",IDOK,7,165,48,18
|
||||
PUSHBUTTON "Cancel",IDCANCEL,63,165,48,18
|
||||
GROUPBOX "Screen Resolution",IDC_STATIC,176,8,103,36
|
||||
LTEXT "Unknown",IDC_STATIC_D3D,77,93,78,15
|
||||
GROUPBOX "Select 3D Video Driver",IDC_STATIC,5,8,163,113
|
||||
LTEXT "Error",IDC_STATIC_VIDEODRIVER,77,83,78,8
|
||||
RTEXT "3D Driver Name:",IDC_STATIC,17,83,56,8
|
||||
RTEXT "Description:",IDC_STATIC,33,92,40,8
|
||||
GROUPBOX "Features",IDC_STATIC,176,88,88,65
|
||||
GROUPBOX "Features",IDC_STATIC,176,128,103,65
|
||||
CONTROL "Hardware Water",IDC_CHECK_HARDWAREWATER,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,184,100,68,10
|
||||
COMBOBOX IDC_COMBO_TEXTURESIZE,184,64,72,78,CBS_DROPDOWN |
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,184,140,68,10
|
||||
COMBOBOX IDC_COMBO_TEXTURESIZE,184,64,85,78,CBS_DROPDOWN |
|
||||
CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Texture Resolution",IDC_STATIC,176,48,88,36
|
||||
PUSHBUTTON "Help",IDHELP,119,131,48,18
|
||||
GROUPBOX "Texture Resolution",IDC_STATIC,176,48,103,36
|
||||
PUSHBUTTON "Help",IDHELP,119,165,48,18
|
||||
CONTROL "Triple Buffer",IDC_CHECK_TRIPLEBUFFER,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,184,112,54,10
|
||||
CTEXT "For notes on maximizing performance on hardware, click on the 'Help' button and view the hardware section in the 'Readme.txt' file.",
|
||||
IDC_STATIC,8,160,253,17
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,184,152,54,10
|
||||
CTEXT "Applying changes to window mode requires a game restart.",
|
||||
IDC_STATIC,7,200,268,17
|
||||
CONTROL "Dither",IDC_CHECK_DITHER,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,184,124,35,10
|
||||
WS_TABSTOP,184,164,35,10
|
||||
CONTROL "Page Manager",IDC_CHECK_PAGEMANAGED,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,184,136,63,10
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,184,176,63,10
|
||||
GROUPBOX "Window Mode",IDC_STATIC,176,88,103,36
|
||||
COMBOBOX IDC_COMBO_WINDOWMODE,184,104,85,78,CBS_DROPDOWN |
|
||||
CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_DXERROR DIALOG DISCARDABLE 0, 0, 252, 101
|
||||
@ -132,9 +135,9 @@ BEGIN
|
||||
IDD_INITIALIZATION, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 265
|
||||
RIGHTMARGIN, 285
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 178
|
||||
BOTTOMMARGIN, 218
|
||||
END
|
||||
|
||||
IDD_DXERROR, DIALOG
|
||||
|
@ -1083,6 +1083,10 @@ void COptionsWnd::UIButtonUp(CUIButton * pbutton)
|
||||
if (dlg.m_dwExitValue != 0)
|
||||
{
|
||||
EndUIWnd(dlg.m_dwExitValue);
|
||||
if (dlg.m_dwExitValue == 2)
|
||||
{
|
||||
g_CTPassGlobals.ResetScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -569,6 +569,18 @@ void CUIWnd::ResizeScreen(int iWidth, int iHeight)
|
||||
}
|
||||
|
||||
|
||||
void CUIWnd::OnWindowPosChanged()
|
||||
{
|
||||
if (!m_pUIMgr)
|
||||
return;
|
||||
for (auto* wnd : m_pUIMgr->m_vUIWnd)
|
||||
{
|
||||
if (wnd)
|
||||
CenterUIWindow(wnd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CUIWnd::DrawIntoSurface(LPBYTE pbDst,
|
||||
int iDstWidth,
|
||||
int iDstHeight,
|
||||
|
@ -151,6 +151,7 @@ public:
|
||||
virtual void OnTimer(UINT uiID);
|
||||
virtual void OnPaint(HWND hwnd);
|
||||
virtual BOOL OnEraseBkgnd(HWND hwnd, HDC hdc);
|
||||
virtual void OnWindowPosChanged();
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user