Project64: Redo the about window
This commit is contained in:
parent
23563db02f
commit
4354ff8b26
|
@ -48,6 +48,7 @@
|
||||||
</Manifest>
|
</Manifest>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="UserInterface\About.cpp" />
|
||||||
<ClCompile Include="UserInterface\Debugger\CPULog.cpp" />
|
<ClCompile Include="UserInterface\Debugger\CPULog.cpp" />
|
||||||
<ClCompile Include="UserInterface\Debugger\Debugger-CPULogView.cpp" />
|
<ClCompile Include="UserInterface\Debugger\Debugger-CPULogView.cpp" />
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
|
@ -119,6 +120,7 @@
|
||||||
<ClCompile Include="UserInterface\WTLControls\wtl-BitmapPicture.cpp" />
|
<ClCompile Include="UserInterface\WTLControls\wtl-BitmapPicture.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="UserInterface\About.h" />
|
||||||
<ClInclude Include="UserInterface\Debugger\CPULog.h" />
|
<ClInclude Include="UserInterface\Debugger\CPULog.h" />
|
||||||
<ClInclude Include="UserInterface\Debugger\Debugger-CPULogView.h" />
|
<ClInclude Include="UserInterface\Debugger\Debugger-CPULogView.h" />
|
||||||
<ClInclude Include="N64System.h" />
|
<ClInclude Include="N64System.h" />
|
||||||
|
|
|
@ -249,6 +249,9 @@
|
||||||
<ClCompile Include="UserInterface\ProjectSupport.cpp">
|
<ClCompile Include="UserInterface\ProjectSupport.cpp">
|
||||||
<Filter>Source Files\User Interface Source</Filter>
|
<Filter>Source Files\User Interface Source</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="UserInterface\About.cpp">
|
||||||
|
<Filter>Source Files\User Interface Source</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="UserInterface\resource.h">
|
<ClInclude Include="UserInterface\resource.h">
|
||||||
|
@ -482,6 +485,9 @@
|
||||||
<ClInclude Include="UserInterface\ProjectSupport.h">
|
<ClInclude Include="UserInterface\ProjectSupport.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="UserInterface\About.h">
|
||||||
|
<Filter>Header Files\User Interface Headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="res\divider.cur">
|
<None Include="res\divider.cur">
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
#include <stdafx.h>
|
||||||
|
#include <Project64\UserInterface\About.h>
|
||||||
|
|
||||||
|
CAboutDlg::CAboutDlg(CProjectSupport & Support) :
|
||||||
|
m_Support(Support)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CAboutDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & bHandled)
|
||||||
|
{
|
||||||
|
m_Logo.SubclassWindow(GetDlgItem(IDC_BMP_LOGO));
|
||||||
|
m_Logo.SetBitmap(MAKEINTRESOURCE(IDB_ABOUT_LOGO));
|
||||||
|
|
||||||
|
stdstr AboutMsg;
|
||||||
|
if (m_Support.Validated() && strlen(m_Support.Name()) > 0)
|
||||||
|
{
|
||||||
|
AboutMsg += stdstr_f("Thank you %s for the support!\n\n", m_Support.Name());
|
||||||
|
}
|
||||||
|
AboutMsg += "Project64 is a completely free and open-source emulator for the Nintendo 64 and 64DD written in C++.\n\nCapable of playing your favorite N64 games on your PC with high definition graphics, excellent compatibility, save states, built - in cheat codes, and more.";
|
||||||
|
|
||||||
|
CDC hDC = GetDC();
|
||||||
|
float DPIScale = hDC.GetDeviceCaps(LOGPIXELSX) / 96.0f;
|
||||||
|
LOGFONT lf = { 0 };
|
||||||
|
CFontHandle(GetDlgItem(IDC_VERSION).GetFont()).GetLogFont(&lf);
|
||||||
|
lf.lfHeight = (int)(16 * DPIScale);
|
||||||
|
m_TextFont.CreateFontIndirect(&lf);
|
||||||
|
lf.lfHeight = (int)(18 * DPIScale);
|
||||||
|
lf.lfWeight += 200;
|
||||||
|
m_BoldFont.CreateFontIndirect(&lf);
|
||||||
|
|
||||||
|
SetWindowDetais(IDC_VERSION, IDC_BMP_LOGO, stdstr_f("Version: %s", VER_FILE_VERSION_STR).ToUTF16().c_str(), m_BoldFont);
|
||||||
|
SetWindowDetais(IDC_ABOUT_PROJECT, IDC_VERSION, AboutMsg.ToUTF16().c_str(), m_TextFont);
|
||||||
|
SetWindowDetais(IDC_THANKS_CORE, IDC_ABOUT_PROJECT, L"Special Thanks to previous core members:", m_BoldFont);
|
||||||
|
SetWindowDetais(IDC_CORE_THANK_LIST, IDC_THANKS_CORE, L"Jabo, Smiff, Gent", m_TextFont);
|
||||||
|
SetWindowDetais(IDC_THANKYOU, IDC_CORE_THANK_LIST, L"Thanks also goes to:", m_BoldFont);
|
||||||
|
SetWindowDetais(IDC_THANKYOU_LIST, IDC_THANKYOU, L"Jahra!n, Witten, RadeonUser, Azimer, Shygoo, Frank, LuigiBlood, Theboy181, Gonetz, BlueToonYoshi, Kimbjo, Melchior, Retroben", m_TextFont);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CAboutDlg::SetWindowDetais(int nIDDlgItem, int nAboveIDDlgItem, const wchar_t * Text, const HFONT &font)
|
||||||
|
{
|
||||||
|
CWindow Wnd = GetDlgItem(nIDDlgItem);
|
||||||
|
Wnd.SetWindowText(Text);
|
||||||
|
Wnd.SetFont(font);
|
||||||
|
|
||||||
|
CDC hDC = GetDC();
|
||||||
|
float DPIScale = hDC.GetDeviceCaps(LOGPIXELSX) / 96.0f;
|
||||||
|
hDC.SelectFont(font);
|
||||||
|
|
||||||
|
CRect rcWin;
|
||||||
|
Wnd.GetWindowRect(&rcWin);
|
||||||
|
::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rcWin, 2);
|
||||||
|
if (hDC.DrawText(Text, -1, &rcWin, DT_LEFT | DT_CALCRECT | DT_WORDBREAK | DT_NOCLIP) > 0)
|
||||||
|
{
|
||||||
|
Wnd.SetWindowPos(NULL, 0, 0, rcWin.Width(), rcWin.Height(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
CWindow AboveWnd = GetDlgItem(nAboveIDDlgItem);
|
||||||
|
AboveWnd.GetWindowRect(&rcWin);
|
||||||
|
::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rcWin, 2);
|
||||||
|
LONG Top = rcWin.bottom + (8 * DPIScale);
|
||||||
|
|
||||||
|
Wnd.GetWindowRect(&rcWin);
|
||||||
|
::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rcWin, 2);
|
||||||
|
Wnd.SetWindowPos(NULL, rcWin.left, Top, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOOWNERZORDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT CAboutDlg::OnColorStatic(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||||
|
{
|
||||||
|
HDC hdcStatic = (HDC)wParam;
|
||||||
|
SetTextColor(hdcStatic, RGB(0, 0, 0));
|
||||||
|
SetBkMode(hdcStatic, TRANSPARENT);
|
||||||
|
return (LONG)(LRESULT)((HBRUSH)GetStockObject(NULL_BRUSH));
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CAboutDlg::OnEraseBackground(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||||
|
{
|
||||||
|
static HPEN outline = CreatePen(PS_SOLID, 1, 0x00FFFFFF);
|
||||||
|
static HBRUSH fill = CreateSolidBrush(0x00FFFFFF);
|
||||||
|
SelectObject((HDC)wParam, outline);
|
||||||
|
SelectObject((HDC)wParam, fill);
|
||||||
|
|
||||||
|
RECT rect;
|
||||||
|
GetClientRect(&rect);
|
||||||
|
|
||||||
|
Rectangle((HDC)wParam, rect.left, rect.top, rect.right, rect.bottom);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT CAboutDlg::OnOkCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & bHandled)
|
||||||
|
{
|
||||||
|
EndDialog(0);
|
||||||
|
return TRUE;
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* *
|
||||||
|
* Project64 - A Nintendo 64 emulator. *
|
||||||
|
* http://www.pj64-emu.com/ *
|
||||||
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
||||||
|
* *
|
||||||
|
* License: *
|
||||||
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
||||||
|
* *
|
||||||
|
****************************************************************************/
|
||||||
|
#pragma once
|
||||||
|
#include <Project64\UserInterface\WTLControls\wtl-BitmapPicture.h>
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
class CAboutDlg :
|
||||||
|
public CDialogImpl<CAboutDlg>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BEGIN_MSG_MAP_EX(CAboutDlg)
|
||||||
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||||
|
MESSAGE_HANDLER(WM_CTLCOLORSTATIC, OnColorStatic)
|
||||||
|
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground)
|
||||||
|
COMMAND_ID_HANDLER(IDOK, OnOkCmd)
|
||||||
|
COMMAND_ID_HANDLER(IDCANCEL, OnOkCmd)
|
||||||
|
END_MSG_MAP()
|
||||||
|
|
||||||
|
enum { IDD = IDD_About };
|
||||||
|
|
||||||
|
CAboutDlg(CProjectSupport & Support);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CAboutDlg(void);
|
||||||
|
CAboutDlg(const CAboutDlg&);
|
||||||
|
CAboutDlg& operator=(const CAboutDlg&);
|
||||||
|
|
||||||
|
void SetWindowDetais(int nIDDlgItem, int nAboveIDDlgItem, const wchar_t * Text, const HFONT &font);
|
||||||
|
|
||||||
|
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & bHandled);
|
||||||
|
LRESULT OnColorStatic(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & bHandled);
|
||||||
|
LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & bHandled);
|
||||||
|
LRESULT OnOkCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & bHandled);
|
||||||
|
|
||||||
|
CProjectSupport & m_Support;
|
||||||
|
CBitmapPicture m_Logo;
|
||||||
|
CFont m_BoldFont;
|
||||||
|
CFont m_TextFont;
|
||||||
|
};
|
|
@ -4,10 +4,10 @@
|
||||||
#include "Debugger/ScriptSystem.h"
|
#include "Debugger/ScriptSystem.h"
|
||||||
#include "DiscordRPC.h"
|
#include "DiscordRPC.h"
|
||||||
#include <Project64-core/N64System/N64DiskClass.h>
|
#include <Project64-core/N64System/N64DiskClass.h>
|
||||||
|
#include <Project64\UserInterface\About.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
|
|
||||||
|
|
||||||
CMainMenu::CMainMenu(CMainGui * hMainWindow) :
|
CMainMenu::CMainMenu(CMainGui * hMainWindow) :
|
||||||
CBaseMenu(),
|
CBaseMenu(),
|
||||||
m_ResetAccelerators(true),
|
m_ResetAccelerators(true),
|
||||||
|
@ -576,7 +576,7 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
|
||||||
case ID_HELP_SUPPORT_PROJECT64: OnSupportProject64(hWnd); break;
|
case ID_HELP_SUPPORT_PROJECT64: OnSupportProject64(hWnd); break;
|
||||||
case ID_HELP_DISCORD: ShellExecute(NULL, L"open", L"https://discord.gg/Cg3zquF", NULL, NULL, SW_SHOWMAXIMIZED); break;
|
case ID_HELP_DISCORD: ShellExecute(NULL, L"open", L"https://discord.gg/Cg3zquF", NULL, NULL, SW_SHOWMAXIMIZED); break;
|
||||||
case ID_HELP_WEBSITE: ShellExecute(NULL, L"open", L"http://www.pj64-emu.com", NULL, NULL, SW_SHOWMAXIMIZED); break;
|
case ID_HELP_WEBSITE: ShellExecute(NULL, L"open", L"http://www.pj64-emu.com", NULL, NULL, SW_SHOWMAXIMIZED); break;
|
||||||
case ID_HELP_ABOUT: m_Gui->AboutBox(); break;
|
case ID_HELP_ABOUT: CAboutDlg(m_Gui->Support()).DoModal(); break;
|
||||||
default:
|
default:
|
||||||
if (MenuID >= ID_RECENT_ROM_START && MenuID < ID_RECENT_ROM_END)
|
if (MenuID >= ID_RECENT_ROM_START && MenuID < ID_RECENT_ROM_END)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "RomInformationClass.h"
|
#include "RomInformationClass.h"
|
||||||
|
#include <Project64\UserInterface\About.h>
|
||||||
|
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
||||||
|
@ -20,11 +21,8 @@ void EnterLogOptions(HWND hwndOwner);
|
||||||
|
|
||||||
#pragma comment(lib, "Comctl32.lib")
|
#pragma comment(lib, "Comctl32.lib")
|
||||||
|
|
||||||
DWORD CALLBACK AboutBoxProc(HWND WndHandle, DWORD uMsg, DWORD wParam, DWORD lParam);
|
|
||||||
LRESULT CALLBACK MainGui_Proc(HWND WndHandle, DWORD uMsg, DWORD wParam, DWORD lParam);
|
LRESULT CALLBACK MainGui_Proc(HWND WndHandle, DWORD uMsg, DWORD wParam, DWORD lParam);
|
||||||
|
|
||||||
extern BOOL set_about_field(HWND hDlg, int nIDDlgItem, const wchar_t * config_string, const wchar_t * language_string);
|
|
||||||
|
|
||||||
CMainGui::CMainGui(bool bMainWindow, const char * WindowTitle) :
|
CMainGui::CMainGui(bool bMainWindow, const char * WindowTitle) :
|
||||||
CRomBrowser(m_hMainWindow, m_hStatusWnd),
|
CRomBrowser(m_hMainWindow, m_hStatusWnd),
|
||||||
m_ThreadId(GetCurrentThreadId()),
|
m_ThreadId(GetCurrentThreadId()),
|
||||||
|
@ -317,11 +315,6 @@ void * CMainGui::GetModuleInstance(void) const
|
||||||
return GetModuleHandle(NULL);
|
return GetModuleHandle(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainGui::AboutBox(void)
|
|
||||||
{
|
|
||||||
DialogBoxParamW(GetModuleHandle(NULL), MAKEINTRESOURCEW(IDD_About), m_hMainWindow, (DLGPROC)AboutBoxProc, (LPARAM)this);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CMainGui::ResetPluginsInUiThread(CPlugins * plugins, CN64System * System)
|
bool CMainGui::ResetPluginsInUiThread(CPlugins * plugins, CN64System * System)
|
||||||
{
|
{
|
||||||
RESET_PLUGIN info;
|
RESET_PLUGIN info;
|
||||||
|
@ -1095,137 +1088,4 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
||||||
return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD CALLBACK AboutBoxProc(HWND hWnd, DWORD uMsg, DWORD wParam, DWORD /*lParam*/)
|
|
||||||
{
|
|
||||||
CMainGui * Gui = NULL;
|
|
||||||
static HBITMAP hbmpBackgroundTop = NULL;
|
|
||||||
static HFONT hPageHeadingFont = NULL;
|
|
||||||
static HFONT hTextFont = NULL;
|
|
||||||
static HFONT hAuthorFont = NULL;
|
|
||||||
|
|
||||||
switch (uMsg) {
|
|
||||||
case WM_INITDIALOG:
|
|
||||||
{
|
|
||||||
//Title
|
|
||||||
SetWindowTextW(hWnd, wGS(PLUG_ABOUT).c_str());
|
|
||||||
|
|
||||||
// Get Windows DPI Scale
|
|
||||||
float DPIScale = Gui->DPIScale(hWnd);
|
|
||||||
|
|
||||||
// Use the size of the image
|
|
||||||
hbmpBackgroundTop = LoadBitmap(GetModuleHandle(NULL), DPIScale <= 1.0f ? MAKEINTRESOURCE(IDB_ABOUT_LOGO) : MAKEINTRESOURCE(IDB_ABOUT_LOGO_HDPI));
|
|
||||||
BITMAP bmTL;
|
|
||||||
GetObject(hbmpBackgroundTop, sizeof(BITMAP), &bmTL);
|
|
||||||
|
|
||||||
hTextFont = ::CreateFont((int)(18 * DPIScale), 0, 0, 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Arial");
|
|
||||||
hAuthorFont = ::CreateFont((int)(18 * DPIScale), 0, 0, 0, FW_BOLD, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Arial");
|
|
||||||
|
|
||||||
hPageHeadingFont = ::CreateFont((int)(24 * DPIScale), 0, 0, 0, FW_BOLD, 0, FALSE, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Arial Bold");
|
|
||||||
|
|
||||||
SendDlgItemMessage(hWnd, IDC_VERSION, WM_SETFONT, (WPARAM)hTextFont, TRUE);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_TEAM, WM_SETFONT, (WPARAM)hPageHeadingFont, TRUE);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_THANKS, WM_SETFONT, (WPARAM)hPageHeadingFont, TRUE);
|
|
||||||
|
|
||||||
SendDlgItemMessage(hWnd, IDC_ZILMAR, WM_SETFONT, (WPARAM)hAuthorFont, TRUE);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_JABO, WM_SETFONT, (WPARAM)hAuthorFont, TRUE);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_SMIFF, WM_SETFONT, (WPARAM)hAuthorFont, TRUE);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_GENT, WM_SETFONT, (WPARAM)hAuthorFont, TRUE);
|
|
||||||
|
|
||||||
SendDlgItemMessage(hWnd, IDC_ZILMAR_DETAILS, WM_SETFONT, (WPARAM)hTextFont, TRUE);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_JABO_DETAILS, WM_SETFONT, (WPARAM)hTextFont, TRUE);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_SMIFF_DETAILS, WM_SETFONT, (WPARAM)hTextFont, TRUE);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_GENT_DETAILS, WM_SETFONT, (WPARAM)hTextFont, TRUE);
|
|
||||||
|
|
||||||
SendDlgItemMessage(hWnd, IDC_THANK_LIST, WM_SETFONT, (WPARAM)hTextFont, TRUE);
|
|
||||||
|
|
||||||
stdstr_f VersionDisplay("Version: %s", VER_FILE_VERSION_STR);
|
|
||||||
SetWindowText(GetDlgItem(hWnd, IDC_VERSION), VersionDisplay.ToUTF16().c_str());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case WM_CTLCOLORSTATIC:
|
|
||||||
{
|
|
||||||
HDC hdcStatic = (HDC)wParam;
|
|
||||||
SetTextColor(hdcStatic, RGB(0, 0, 0));
|
|
||||||
SetBkMode(hdcStatic, TRANSPARENT);
|
|
||||||
return (LONG)(LRESULT)((HBRUSH)GetStockObject(NULL_BRUSH));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case WM_ERASEBKGND:
|
|
||||||
{
|
|
||||||
HPEN outline;
|
|
||||||
HBRUSH fill;
|
|
||||||
RECT rect;
|
|
||||||
|
|
||||||
outline = CreatePen(PS_SOLID, 1, 0x00FFFFFF);
|
|
||||||
fill = CreateSolidBrush(0x00FFFFFF);
|
|
||||||
SelectObject((HDC)wParam, outline);
|
|
||||||
SelectObject((HDC)wParam, fill);
|
|
||||||
|
|
||||||
GetClientRect(hWnd, &rect);
|
|
||||||
|
|
||||||
Rectangle((HDC)wParam, rect.left, rect.top, rect.right, rect.bottom);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case WM_PAINT:
|
|
||||||
{
|
|
||||||
PAINTSTRUCT ps;
|
|
||||||
|
|
||||||
if (BeginPaint(hWnd, &ps))
|
|
||||||
{
|
|
||||||
RECT rcClient;
|
|
||||||
GetClientRect(hWnd, &rcClient);
|
|
||||||
|
|
||||||
BITMAP bmTL_top;
|
|
||||||
GetObject(hbmpBackgroundTop, sizeof(BITMAP), &bmTL_top);
|
|
||||||
|
|
||||||
HDC memdc = CreateCompatibleDC(ps.hdc);
|
|
||||||
HGDIOBJ save = SelectObject(memdc, hbmpBackgroundTop);
|
|
||||||
SetStretchBltMode(ps.hdc, HALFTONE);
|
|
||||||
StretchBlt(ps.hdc, 0, 0, rcClient.right, (int)(bmTL_top.bmHeight * rcClient.right/bmTL_top.bmWidth), memdc, 0, 0, bmTL_top.bmWidth, bmTL_top.bmHeight, SRCCOPY);
|
|
||||||
SelectObject(memdc, save);
|
|
||||||
DeleteDC(memdc);
|
|
||||||
|
|
||||||
EndPaint(hWnd, &ps);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case WM_COMMAND:
|
|
||||||
switch (LOWORD(wParam))
|
|
||||||
{
|
|
||||||
case IDOK:
|
|
||||||
case IDCANCEL:
|
|
||||||
if (hbmpBackgroundTop)
|
|
||||||
{
|
|
||||||
DeleteObject(hbmpBackgroundTop);
|
|
||||||
}
|
|
||||||
if (hTextFont)
|
|
||||||
{
|
|
||||||
::DeleteObject(hTextFont);
|
|
||||||
}
|
|
||||||
if (hPageHeadingFont)
|
|
||||||
{
|
|
||||||
::DeleteObject(hPageHeadingFont);
|
|
||||||
}
|
|
||||||
if (hAuthorFont)
|
|
||||||
{
|
|
||||||
::DeleteObject(hAuthorFont);
|
|
||||||
}
|
|
||||||
//ReleaseCapture();
|
|
||||||
EndDialog(hWnd, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL set_about_field(HWND hDlg, int nIDDlgItem, const wchar_t * config_string, const wchar_t * language_string)
|
|
||||||
{
|
|
||||||
wchar_t temp_string[200];
|
|
||||||
|
|
||||||
swprintf(temp_string, sizeof(temp_string) / sizeof(temp_string[0]), L"%s: %s", config_string, language_string);
|
|
||||||
return SetDlgItemTextW(hDlg, nIDDlgItem, temp_string);
|
|
||||||
}
|
|
|
@ -72,7 +72,6 @@ public:
|
||||||
|
|
||||||
void SetStatusText(int Panel, const wchar_t * Text);
|
void SetStatusText(int Panel, const wchar_t * Text);
|
||||||
void ShowStatusBar(bool ShowBar);
|
void ShowStatusBar(bool ShowBar);
|
||||||
void AboutBox(void);
|
|
||||||
|
|
||||||
bool ResetPluginsInUiThread(CPlugins * plugins, CN64System * System);
|
bool ResetPluginsInUiThread(CPlugins * plugins, CN64System * System);
|
||||||
|
|
||||||
|
@ -102,7 +101,6 @@ private:
|
||||||
void SetWindowCaption(const wchar_t * Caption);
|
void SetWindowCaption(const wchar_t * Caption);
|
||||||
void ShowRomBrowser(void);
|
void ShowRomBrowser(void);
|
||||||
|
|
||||||
friend DWORD CALLBACK AboutBoxProc(HWND, DWORD, DWORD, DWORD);
|
|
||||||
static LRESULT CALLBACK MainGui_Proc(HWND, DWORD, DWORD, DWORD);
|
static LRESULT CALLBACK MainGui_Proc(HWND, DWORD, DWORD, DWORD);
|
||||||
|
|
||||||
friend void RomBowserEnabledChanged(CMainGui * Gui);
|
friend void RomBowserEnabledChanged(CMainGui * Gui);
|
||||||
|
|
|
@ -25,6 +25,7 @@ public:
|
||||||
bool ShowSuppotWindow();
|
bool ShowSuppotWindow();
|
||||||
|
|
||||||
inline uint32_t RunCount() const { return m_SupportInfo.RunCount; }
|
inline uint32_t RunCount() const { return m_SupportInfo.RunCount; }
|
||||||
|
inline const char * Name(void) const { return m_SupportInfo.Name; }
|
||||||
inline const char * MachineID(void) const { return m_SupportInfo.MachineID; }
|
inline const char * MachineID(void) const { return m_SupportInfo.MachineID; }
|
||||||
inline bool Validated(void) const { return m_SupportInfo.Validated; }
|
inline bool Validated(void) const { return m_SupportInfo.Validated; }
|
||||||
|
|
||||||
|
|
|
@ -365,22 +365,17 @@ BEGIN
|
||||||
CONTROL ".usa",IDC_USA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,134,37,10
|
CONTROL ".usa",IDC_USA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,134,37,10
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_About DIALOGEX 0, 0, 233, 265
|
IDD_About DIALOGEX 0, 0, 247, 265
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Core Project64 Team:",IDC_TEAM,15,87,168,17
|
CONTROL "",IDC_BMP_LOGO,"Static",SS_BLACKFRAME,15,0,232,74
|
||||||
LTEXT "Zilmar",IDC_ZILMAR,15,108,49,11
|
LTEXT "Special Thanks to previous core members:",IDC_THANKS_CORE,10,169,231,8
|
||||||
LTEXT "founder. Core and application programmer. Web site.",IDC_ZILMAR_DETAILS,69,107,151,24
|
LTEXT "Jabo, Smiff, Gent",IDC_CORE_THANK_LIST,10,186,231,8
|
||||||
LTEXT "Jabo",IDC_JABO,15,133,49,11
|
LTEXT "Version: 1.7.0.x",IDC_VERSION,10,79,231,11,SS_NOTIFY
|
||||||
LTEXT "video, audio and input plugin programmer",IDC_JABO_DETAILS,69,133,151,24
|
LTEXT "About Project64",IDC_ABOUT_PROJECT,10,92,231,17
|
||||||
LTEXT "Smiff",IDC_SMIFF,15,159,49,11
|
LTEXT "Thanks also goes to:",IDC_THANKYOU,10,217,231,8
|
||||||
LTEXT "bug tracking, testing, suggestions, rdb.",IDC_SMIFF_DETAILS,69,159,151,24
|
LTEXT "List of people to thank",IDC_THANKYOU_LIST,10,234,231,27
|
||||||
LTEXT "Gent",IDC_GENT,15,188,49,11
|
|
||||||
LTEXT "cheat database, testing, end user support",IDC_GENT_DETAILS,69,188,151,24
|
|
||||||
LTEXT "Thanks also goes to:",IDC_THANKS,16,214,168,17
|
|
||||||
LTEXT "Jahra!n, Witten, RadeonUser, Trotterwatch, Pixi",IDC_THANK_LIST,17,231,203,27
|
|
||||||
LTEXT "Version: 1.7.0.x",IDC_VERSION,15,72,169,11,SS_NOTIFY
|
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_Logging_General DIALOGEX 0, 0, 200, 154
|
IDD_Logging_General DIALOGEX 0, 0, 200, 154
|
||||||
|
@ -537,21 +532,6 @@ BEGIN
|
||||||
CONTROL "Unknown encoding",IDC_CHK_UNKENCODING,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,276,78,71,9
|
CONTROL "Unknown encoding",IDC_CHK_UNKENCODING,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,276,78,71,9
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_About_UserInfo DIALOGEX 0, 0, 186, 97
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Dialog"
|
|
||||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,61,76,50,14
|
|
||||||
GROUPBOX "Static",IDC_STATIC,7,3,172,68
|
|
||||||
LTEXT "Static",IDC_LABEL1,15,17,45,10
|
|
||||||
EDITTEXT IDC_INFO1,69,15,104,15,ES_AUTOHSCROLL | ES_READONLY
|
|
||||||
LTEXT "Static",IDC_LABEL2,15,36,45,10
|
|
||||||
EDITTEXT IDC_INFO2,69,33,104,15,ES_AUTOHSCROLL | ES_READONLY
|
|
||||||
LTEXT "Static",IDC_LABEL3,15,53,45,10
|
|
||||||
EDITTEXT IDC_INFO3,69,51,104,15,ES_AUTOHSCROLL | ES_READONLY
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_Settings_Config DIALOGEX 0, 0, 357, 217
|
IDD_Settings_Config DIALOGEX 0, 0, 357, 217
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Dialog"
|
CAPTION "Dialog"
|
||||||
|
@ -1530,6 +1510,7 @@ BEGIN
|
||||||
|
|
||||||
IDD_About, DIALOG
|
IDD_About, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
|
RIGHTMARGIN, 233
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_Logging_General, DIALOG
|
IDD_Logging_General, DIALOG
|
||||||
|
@ -1588,14 +1569,6 @@ BEGIN
|
||||||
BOTTOMMARGIN, 256
|
BOTTOMMARGIN, 256
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_About_UserInfo, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 179
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 90
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_Settings_Config, DIALOG
|
IDD_Settings_Config, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
|
@ -1886,8 +1859,6 @@ IDB_LISTITEMS BITMAP "Bitmaps\\ListItems.bmp"
|
||||||
|
|
||||||
IDB_ABOUT_LOGO BITMAP "Bitmaps\\AboutScreenLogo.bmp"
|
IDB_ABOUT_LOGO BITMAP "Bitmaps\\AboutScreenLogo.bmp"
|
||||||
|
|
||||||
IDB_ABOUT_LOGO_HDPI BITMAP "Bitmaps\\AboutScreenLogoHDPI.bmp"
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -2210,7 +2181,7 @@ BEGIN
|
||||||
0
|
0
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_About_Ini AFX_DIALOG_LAYOUT
|
IDD_ABOUT_INI AFX_DIALOG_LAYOUT
|
||||||
BEGIN
|
BEGIN
|
||||||
0
|
0
|
||||||
END
|
END
|
||||||
|
@ -2235,6 +2206,11 @@ BEGIN
|
||||||
0
|
0
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_About AFX_DIALOG_LAYOUT
|
||||||
|
BEGIN
|
||||||
|
0
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|
|
@ -32,9 +32,7 @@
|
||||||
#define IDD_Cheats_Add 138
|
#define IDD_Cheats_Add 138
|
||||||
#define IDD_Settings_ShellInt 139
|
#define IDD_Settings_ShellInt 139
|
||||||
#define IDD_Settings_RomBrowser 140
|
#define IDD_Settings_RomBrowser 140
|
||||||
#define IDD_About_UserInfo 141
|
|
||||||
#define IDB_ABOUT_LOGO 143
|
#define IDB_ABOUT_LOGO 143
|
||||||
#define IDB_ABOUT_LOGO_HDPI 144
|
|
||||||
#define IDD_Settings_General 144
|
#define IDD_Settings_General 144
|
||||||
#define IDD_Settings_Accelerator 145
|
#define IDD_Settings_Accelerator 145
|
||||||
#define IDD_Settings_Config 149
|
#define IDD_Settings_Config 149
|
||||||
|
@ -208,6 +206,7 @@
|
||||||
#define IDC_TEAM 1070
|
#define IDC_TEAM 1070
|
||||||
#define IDC_AUTO_DIR 1071
|
#define IDC_AUTO_DIR 1071
|
||||||
#define IDC_ZILMAR_DETAILS 1071
|
#define IDC_ZILMAR_DETAILS 1071
|
||||||
|
#define IDC_ABOUT_PROJECT 1071
|
||||||
#define IDC_AUTO_DEFAULT 1072
|
#define IDC_AUTO_DEFAULT 1072
|
||||||
#define IDC_JABO_DETAILS 1072
|
#define IDC_JABO_DETAILS 1072
|
||||||
#define IDC_SELECT_AUTO_DIR 1073
|
#define IDC_SELECT_AUTO_DIR 1073
|
||||||
|
@ -224,18 +223,17 @@
|
||||||
#define IDC_GENT 1078
|
#define IDC_GENT 1078
|
||||||
#define IDC_SNAP_DIR 1079
|
#define IDC_SNAP_DIR 1079
|
||||||
#define IDC_THANKS 1079
|
#define IDC_THANKS 1079
|
||||||
|
#define IDC_THANKS_CORE 1079
|
||||||
#define IDC_SNAP_DEFAULT 1080
|
#define IDC_SNAP_DEFAULT 1080
|
||||||
#define IDC_THANK_LIST 1080
|
#define IDC_THANK_LIST 1080
|
||||||
|
#define IDC_CORE_THANK_LIST 1080
|
||||||
#define IDC_SELECT_SNAP_DIR 1081
|
#define IDC_SELECT_SNAP_DIR 1081
|
||||||
#define IDC_INFO1 1081
|
#define IDC_THANKYOU 1081
|
||||||
#define IDC_INFO2 1082
|
#define IDC_THANK_LIST2 1082
|
||||||
#define IDC_INFO3 1083
|
#define IDC_THANKYOU_LIST 1082
|
||||||
#define IDC_START_ON_ROM_OPEN 1084
|
#define IDC_START_ON_ROM_OPEN 1084
|
||||||
#define IDC_LABEL1 1084
|
|
||||||
#define IDC_BMP_LOGO 1084
|
#define IDC_BMP_LOGO 1084
|
||||||
#define IDC_BLOCK_LINKING 1085
|
#define IDC_BLOCK_LINKING 1085
|
||||||
#define IDC_LABEL2 1085
|
|
||||||
#define IDC_LABEL3 1086
|
|
||||||
#define IDC_RDRAM_SIZE 1087
|
#define IDC_RDRAM_SIZE 1087
|
||||||
#define IDC_VERSION 1087
|
#define IDC_VERSION 1087
|
||||||
#define IDC_CPU_TYPE 1088
|
#define IDC_CPU_TYPE 1088
|
||||||
|
@ -918,7 +916,7 @@
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 221
|
#define _APS_NEXT_RESOURCE_VALUE 222
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40121
|
#define _APS_NEXT_COMMAND_VALUE 40121
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1578
|
#define _APS_NEXT_CONTROL_VALUE 1578
|
||||||
#define _APS_NEXT_SYMED_VALUE 102
|
#define _APS_NEXT_SYMED_VALUE 102
|
||||||
|
|
Loading…
Reference in New Issue