mirror of
https://github.com/geode-sdk/geode.git
synced 2025-07-29 15:40:06 -04:00
add openSupportPopup
This commit is contained in:
parent
b241c1ccda
commit
438252f946
3 changed files with 13 additions and 1 deletions
loader
|
@ -16,6 +16,10 @@ namespace geode {
|
|||
* Open the issue report popup for a mod
|
||||
*/
|
||||
GEODE_DLL void openIssueReportPopup(Mod* mod);
|
||||
/**
|
||||
* Open the support popup for a mod
|
||||
*/
|
||||
GEODE_DLL void openSupportPopup(Mod* mod);
|
||||
/**
|
||||
* Open the store page for a mod (if it exists)
|
||||
*/
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace geode {
|
|||
* FLAlertLayer with support for Markdown. See MDTextArea
|
||||
* for details on what features of MD are supported.
|
||||
*/
|
||||
class MDPopup :
|
||||
class GEODE_DLL MDPopup :
|
||||
public Popup<
|
||||
std::string const&, std::string const&, char const*, char const*,
|
||||
utils::MiniFunction<void(bool)>> {
|
||||
|
|
|
@ -42,6 +42,14 @@ void geode::openIssueReportPopup(Mod* mod) {
|
|||
}
|
||||
}
|
||||
|
||||
void geode::openSupportPopup(Mod* mod) {
|
||||
MDPopup::create(
|
||||
"Support " + mod->getMetadata().getName(),
|
||||
mod->getMetadata().getSupportInfo().value(),
|
||||
"OK"
|
||||
)->show();
|
||||
}
|
||||
|
||||
void geode::openInfoPopup(Mod* mod) {
|
||||
LocalModInfoPopup::create(mod, nullptr)->show();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue