mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-26 21:00:50 -04:00
add repo button + geode repo to internal representation
This commit is contained in:
parent
021b5f4ad3
commit
e4a63d428f
3 changed files with 17 additions and 10 deletions
loader/src
|
@ -159,7 +159,9 @@ void InternalLoader::platformMessageBox(const char* title, const char* info) {
|
|||
|
||||
void InternalLoader::setupPlatformConsole() {
|
||||
ghc::filesystem::path(getpwuid(getuid())->pw_dir);
|
||||
freopen(ghc::filesystem::path(utils::file::geodeRoot() / "geode_log.txt").string().c_str(),"w",stdout);
|
||||
freopen(ghc::filesystem::path(
|
||||
utils::file::geodeRoot() / "geode_log.txt"
|
||||
).string().c_str(),"w",stdout);
|
||||
InternalLoader::
|
||||
m_platformConsoleReady = true;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ static ModInfo getInternalModInfo() {
|
|||
info.m_description = "The mod loader";
|
||||
info.m_details = LOADER_ABOUT_MD;
|
||||
info.m_version = LOADER_VERSION;
|
||||
info.m_repository = "https://github.com/geode-sdk/geode";
|
||||
info.m_supportsDisabling = false;
|
||||
info.m_spritesheets = {
|
||||
"geode.loader/LogoSheet",
|
||||
|
|
|
@ -214,16 +214,20 @@ bool ModInfoLayer::init(ModObject* obj, ModListView* list) {
|
|||
);
|
||||
}
|
||||
|
||||
auto devSpr = ButtonSprite::create(
|
||||
"Dev Options", "bigFont.fnt", "GJ_button_05.png", .6f
|
||||
);
|
||||
devSpr->setScale(.5f);
|
||||
if (m_mod->getModInfo().m_repository.size()) {
|
||||
auto repoSpr = CCSprite::createWithSpriteFrameName("github.png"_spr);
|
||||
|
||||
auto devBtn = CCMenuItemSpriteExtra::create(
|
||||
devSpr, this, nullptr
|
||||
);
|
||||
devBtn->setPosition(size.width / 2 - 50.f, -size.height / 2 + 25.f);
|
||||
m_buttonMenu->addChild(devBtn);
|
||||
auto repoBtn = CCMenuItemSpriteExtra::create(
|
||||
repoSpr, this, makeMenuSelector([this](CCObject*) {
|
||||
web::openLinkInBrowser(m_mod->getModInfo().m_repository);
|
||||
})
|
||||
);
|
||||
repoBtn->setPosition(
|
||||
size.width / 2 - 25.f,
|
||||
-size.height / 2 + 25.f
|
||||
);
|
||||
m_buttonMenu->addChild(repoBtn);
|
||||
}
|
||||
|
||||
|
||||
auto enableBtnSpr = ButtonSprite::create(
|
||||
|
|
Loading…
Add table
Reference in a new issue