mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 16:17:06 +02:00
In the skater's item grids (Apparel, Accessories, Board, Gestures) F favorites the highlighted item, - (or Ctrl+F) opens a search box that filters as you type, and X steps a filter (All, Favorites, Mods, Game items). Favorites sit right after the worn item, carry the game's star where the tile shows its rarity icon, and are kept in ReSkate.favorites.json beside Skate.exe. The grids stay the game's own: their tile rows are reordered and filtered through the native model functions, as the music screen's Mods shelf does. Nothing is hooked for it and no file of the game or of a mod is changed. See contrib/native-item-browser.md for how it works and what is not tried yet. This is the Item Favorites mod done natively, so it no longer needs a DLL loaded through a custom script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.6 KiB
C++
37 lines
1.6 KiB
C++
#pragma once
|
|
#include "item_browser_order.h"
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
// Favorites, search and filters for the skater's item grids (Apparel, Accessories, Board, Tattoos,
|
|
// Gestures, Appearance). The grids stay the game's own: their tile rows are reordered and filtered in
|
|
// place, the way the music screen's Mods shelf filters playlist tiles (contrib/native-music-ui.md).
|
|
namespace dingosdk::overlay { struct ItemBrowserHost; }
|
|
namespace dingosdk::item_browser {
|
|
// What the overlay draws: read every presented frame (thread-safe, cheap).
|
|
struct View {
|
|
bool open{}; // an item grid has the focus
|
|
std::string search;
|
|
Filter filter{};
|
|
unsigned shown{}, total{}, favorites{}; // of the grid that has the focus
|
|
std::string focused_title;
|
|
bool focused_favorite{};
|
|
};
|
|
View view();
|
|
// Requests from the keys, the overlay and the console; applied on the client thread.
|
|
void toggle_focused_favorite() noexcept;
|
|
void set_search(std::string text);
|
|
void set_filter(Filter filter) noexcept;
|
|
void cycle_filter() noexcept;
|
|
// The table the overlay's search bar and keys use (process lifetime).
|
|
const overlay::ItemBrowserHost* overlay_host() noexcept;
|
|
// Console research aids; their answers go to the log.
|
|
void request_status() noexcept;
|
|
void request_poke(std::string arguments);
|
|
|
|
// Client thread, from the customization update, with the profile's native mutex held.
|
|
void update(std::uintptr_t base) noexcept;
|
|
void before_level_transition(unsigned next, std::uintptr_t base) noexcept;
|
|
} // namespace dingosdk::item_browser
|