mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 08:39:57 -04:00
Redraw the in-game menu with the game's own interface textures, and bring in the launcher's save import and faster builds.
In-game menu: the settings window, its tabs, rows, buttons and cursor, the performance overlay and the Preparing shaders box are drawn with the game's interface textures where the RomFS holds them (runtime/ui/menu_skin.cpp, perf_panel.cpp; plain shapes until they are decoded). Restart joins Continue and Quit, each behind a confirmation; VSync is an on/off switch; DLSS is listed only on NVIDIA GPUs; the menu sounds are quieter; Picture shape is gone and the setting descriptions are shorter; edge cases of input, layout and fonts are fixed. tools/menu_preview.py draws the menu without the game. Launcher: Import Saves takes a save from the game folder's saves/ folder or one the player picks; downloads fall back to Windows' own certificate check when Python's refuses a server; updates are faster; the title bar is drawn in the window and Navi is every icon. tools/make_game.py builds with CLANG64's clang where the launcher installed it, packs the RomFS beside the lift and the compile, takes a prebuilt runtime, and compiles the game's resources without cmd.exe, so a user folder with a space in its name builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <shellapi.h>
|
||||
#include <shlobj.h>
|
||||
#include <shobjidl.h>
|
||||
#include <propsys.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
@@ -15,6 +16,12 @@
|
||||
#define PATHN 1024
|
||||
#define APP_NAME L"NX2navi"
|
||||
#define UNINSTALL_KEY L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\NX2navi"
|
||||
/* The launcher window's taskbar identity (launcher/winsys.py app_id): a shortcut that carries it is the one the
|
||||
taskbar groups and pins the window under, with the shortcut's icon. */
|
||||
#define APP_USER_MODEL_ID L"NX2navi.Launcher"
|
||||
static const PROPERTYKEY NX_PKEY_AppUserModel_ID = {
|
||||
{0x9F4C2855, 0x9F79, 0x4B39, {0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3}}, 5};
|
||||
static const IID NX_IID_IPropertyStore = {0x886d8eeb, 0x8cf2, 0x4446, {0x8d, 0x02, 0xcd, 0xba, 0x1d, 0xbd, 0xcf, 0x99}};
|
||||
|
||||
static inline void exe_dir(wchar_t *out, size_t n)
|
||||
{
|
||||
@@ -105,6 +112,16 @@ static inline int make_shortcut(const wchar_t *lnk, const wchar_t *target, const
|
||||
IShellLinkW_SetWorkingDirectory(sl, workdir);
|
||||
IShellLinkW_SetIconLocation(sl, target, 0);
|
||||
IShellLinkW_SetDescription(sl, desc);
|
||||
IPropertyStore *ps = NULL;
|
||||
if (SUCCEEDED(IShellLinkW_QueryInterface(sl, &NX_IID_IPropertyStore, (void **)&ps))) {
|
||||
PROPVARIANT pv;
|
||||
memset(&pv, 0, sizeof pv);
|
||||
pv.vt = VT_LPWSTR;
|
||||
pv.pwszVal = (LPWSTR)APP_USER_MODEL_ID;
|
||||
IPropertyStore_SetValue(ps, &NX_PKEY_AppUserModel_ID, &pv);
|
||||
IPropertyStore_Commit(ps);
|
||||
IPropertyStore_Release(ps);
|
||||
}
|
||||
if (SUCCEEDED(IShellLinkW_QueryInterface(sl, &IID_IPersistFile, (void **)&pf))) {
|
||||
ok = SUCCEEDED(IPersistFile_Save(pf, lnk, TRUE));
|
||||
IPersistFile_Release(pf);
|
||||
|
||||
Reference in New Issue
Block a user