Reform scenario editor menu -> command mapping so that the non-platform-dependent code doesn't need to know where the menuitem is
This commit is contained in:
@@ -20,6 +20,7 @@ void makeFrontWindow(sf::Window& win);
|
||||
void setWindowFloating(sf::Window& win, bool floating);
|
||||
|
||||
void init_fileio();
|
||||
void launchURL(std::string url);
|
||||
|
||||
fs::path nav_get_party();
|
||||
fs::path nav_put_party(fs::path def = "");
|
||||
|
@@ -145,6 +145,10 @@ void beep() {
|
||||
NSBeep();
|
||||
}
|
||||
|
||||
void launchURL(std::string url) {
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithCString:url.c_str() encoding:NSUTF8StringEncoding]]];
|
||||
}
|
||||
|
||||
int getMenubarHeight() {
|
||||
// Mac menubar isn't in the window, so we return 0 here.
|
||||
return 0;
|
||||
|
@@ -213,6 +213,10 @@ void beep() {
|
||||
MessageBeep(-1);
|
||||
}
|
||||
|
||||
void launchURL(std::string url) {
|
||||
ShellExecuteA(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
// TODO: Implement modal session.
|
||||
// It seems that Windows doesn't have anything similar to the Mac modal session, so I might have to somehow simulate it myself.
|
||||
void ModalSession::pumpEvents() {
|
||||
|
Reference in New Issue
Block a user