mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 11:49:59 -04:00
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>
37 lines
2.4 KiB
C
37 lines
2.4 KiB
C
// The settings menu's art from the game's own interface textures (ui/menu_art.cpp).
|
|
#pragma once
|
|
#include "imgui.h"
|
|
|
|
typedef enum {
|
|
MENU_ART_FRAME_DECO, // a frame with ornamented corners
|
|
MENU_ART_GUIDE_BAR, // the control guide's bar
|
|
MENU_ART_WINDOW_BASE, // a rounded window base
|
|
// the layers of the save menu's Load and Cancel button, in drawing order; white masks except for the grain
|
|
MENU_ART_BTN_RIM, // a soft line along the button's edge, reaching outside it
|
|
MENU_ART_BTN_FILL, // the button's shape
|
|
MENU_ART_BTN_GRAIN, // the mottling: light at the edge, dark and speckled in the middle
|
|
MENU_ART_BTN_EDGE, // the light edge
|
|
MENU_ART_BTN_LINE, // the inset line, a diamond and a curl at alternate corners
|
|
MENU_ART_CURSOR_GLOW, // the options cursor's soft glow
|
|
MENU_ART_CURSOR_LINE, // the options cursor's white frame (skin_art_prepare cuts it out of the texture)
|
|
MENU_ART_PANEL_FILL, // a dark brown panel
|
|
MENU_ART_DIVIDER, // the options menu's divider ornament
|
|
MENU_ART_DIVIDER_LINE, // the line beside the ornament, ending in a dot
|
|
MENU_ART_TAB_SELECT, // the plate of the selected category in the game's menu header
|
|
MENU_ART_COUNT
|
|
} MenuArt;
|
|
|
|
extern "C" void menu_art_start(void); // decodes the textures on a worker, once
|
|
// The texture for the menu's draw lists and its size in pixels; 0 while it is not there (still decoding, or absent).
|
|
// Window thread: the first call for an art uploads it.
|
|
extern "C" int menu_art(MenuArt id, ImTextureID *tex, float *w, float *h);
|
|
extern "C" void menu_art_release(void); // before ImGui's Vulkan back end shuts down
|
|
// Draws an art stretched over [a, b] with a tint; 0 (nothing drawn) while it is not there.
|
|
extern "C" int menu_art_draw(ImDrawList *dl, MenuArt id, ImVec2 a, ImVec2 b, ImU32 tint);
|
|
// Draws an art as nine pieces: corners `corner` pixels on screen from the outer `frac` of the texture, edges stretched,
|
|
// the middle too when fill.
|
|
extern "C" int menu_art_draw9(ImDrawList *dl, MenuArt id, ImVec2 a, ImVec2 b, float corner, float frac, ImU32 tint, int fill);
|
|
// The same with the texture turned half a turn (turned 1): a top-left corner piece drawn at the bottom right.
|
|
extern "C" int menu_art_draw9_turned(ImDrawList *dl, MenuArt id, ImVec2 a, ImVec2 b, float corner, float frac, ImU32 tint, int fill,
|
|
int turned);
|