new tabs idea

This commit is contained in:
HJfod 2024-02-29 22:35:33 +02:00
parent 78fe601066
commit 5e8306ac65
3 changed files with 8 additions and 2 deletions

View file

@ -204,6 +204,11 @@ ModListSource* ModListSource::get(ModListSourceType type) {
return inst; return inst;
} break; } break;
case ModListSourceType::Updates: {
static auto inst = Ref(ModListSource::create({}));
return inst;
} break;
case ModListSourceType::Featured: { case ModListSourceType::Featured: {
static auto inst = Ref(ModListSource::create({ static auto inst = Ref(ModListSource::create({
.get = +[](server::ModsQuery&& query) { .get = +[](server::ModsQuery&& query) {

View file

@ -9,6 +9,7 @@ using namespace geode::prelude;
enum class ModListSourceType { enum class ModListSourceType {
Installed, Installed,
Updates,
Featured, Featured,
Trending, Trending,
ModPacks, ModPacks,

View file

@ -87,10 +87,10 @@ bool ModsLayer::init() {
for (auto item : std::initializer_list<std::tuple<const char*, const char*, ModListSourceType>> { for (auto item : std::initializer_list<std::tuple<const char*, const char*, ModListSourceType>> {
{ "download.png"_spr, "Installed", ModListSourceType::Installed }, { "download.png"_spr, "Installed", ModListSourceType::Installed },
{ "GJ_bigStar_noShadow_001.png", "Featured", ModListSourceType::Featured }, { "GJ_timeIcon_001.png", "Updates", ModListSourceType::Updates },
{ "globe.png"_spr, "Download", ModListSourceType::All },
{ "GJ_sTrendingIcon_001.png", "Trending", ModListSourceType::Trending }, { "GJ_sTrendingIcon_001.png", "Trending", ModListSourceType::Trending },
{ "gj_folderBtn_001.png", "Mod Packs", ModListSourceType::ModPacks }, { "gj_folderBtn_001.png", "Mod Packs", ModListSourceType::ModPacks },
{ "globe.png"_spr, "All Mods", ModListSourceType::All },
}) { }) {
const CCSize itemSize { 100, 35 }; const CCSize itemSize { 100, 35 };
const CCSize iconSize { 18, 18 }; const CCSize iconSize { 18, 18 };