mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 22:52:34 +01:00
byuu says: I've added tool tips to hiro for Windows, GTK, and Qt. I'm unsure how to add them for Cocoa. I wasted am embarrassing ~14 hours implementing tool tips from scratch on Windows, because the `TOOLTIPS_CLASS` widget just absolutely refused to show up, no matter what I tried. As such, they're not quite 100% native, but I would really appreciate any patch submissions to help improve my implementation. I added tool tips to all of the confusing settings in bsnes. And of course, for those of you who don't like them, there's a configuration file setting to turn them off globally. I also improved Mega Drive handling of the Game Genie a bit, and restructured the way the Settings class works in bsnes. Starting now, I'm feature-freezing bsnes and higan. From this point forward: - polishing up and fixing bugs caused by the ruby/hiro changes - adding DRC to XAudio2, and maybe exclusive mode to WGL - correcting FEoEZ (English) to load and work again out of the box Once that's done, a final beta of bsnes will go out, I'll fix any reported bugs that I'm able to, and then v107 should be ready. This time with higan being functional, but marked as v107 beta. v108 will restore higan to production status again, alongside bsnes.
77 lines
2.3 KiB
C++
77 lines
2.3 KiB
C++
#if defined(Hiro_Application)
|
|
struct Application {
|
|
Application() = delete;
|
|
|
|
static auto doMain() -> void;
|
|
static auto font() -> Font;
|
|
static auto kill() -> void;
|
|
static auto locale() -> Locale&;
|
|
static auto modal() -> bool;
|
|
static auto name() -> string;
|
|
static auto onMain(const function<void ()>& callback = {}) -> void;
|
|
static auto run() -> void;
|
|
static auto scale() -> float;
|
|
static auto scale(float value) -> float;
|
|
static auto pendingEvents() -> bool;
|
|
static auto processEvents() -> void;
|
|
static auto quit() -> void;
|
|
static auto screenSaver() -> bool;
|
|
static auto setFont(const Font& font = {}) -> void;
|
|
static auto setName(const string& name = "") -> void;
|
|
static auto setScale(float scale = 1.0) -> void;
|
|
static auto setScreenSaver(bool screenSaver = true) -> void;
|
|
static auto setToolTips(bool toolTips = true) -> void;
|
|
static auto toolTips() -> bool;
|
|
static auto unscale(float value) -> float;
|
|
|
|
struct Windows {
|
|
static auto doModalChange(bool modal) -> void;
|
|
static auto onModalChange(const function<void (bool)>& callback = {}) -> void;
|
|
};
|
|
|
|
struct Cocoa {
|
|
static auto doAbout() -> void;
|
|
static auto doActivate() -> void;
|
|
static auto doPreferences() -> void;
|
|
static auto doQuit() -> void;
|
|
static auto onAbout(const function<void ()>& callback = {}) -> void;
|
|
static auto onActivate(const function<void ()>& callback = {}) -> void;
|
|
static auto onPreferences(const function<void ()>& callback = {}) -> void;
|
|
static auto onQuit(const function<void ()>& callback = {}) -> void;
|
|
};
|
|
|
|
struct Namespace : Locale::Namespace {
|
|
Namespace(const string& value) : Locale::Namespace(Application::locale(), value) {}
|
|
};
|
|
|
|
//private:
|
|
struct State {
|
|
Font font;
|
|
bool initialized = false;
|
|
Locale locale;
|
|
int modal = 0;
|
|
string name;
|
|
function<void ()> onMain;
|
|
bool quit = false;
|
|
float scale = 1.0;
|
|
bool screenSaver = true;
|
|
bool toolTips = true;
|
|
|
|
struct Windows {
|
|
function<void (bool)> onModalChange;
|
|
function<bool ()> onScreenSaver;
|
|
} windows;
|
|
|
|
struct Cocoa {
|
|
function<void ()> onAbout;
|
|
function<void ()> onActivate;
|
|
function<void ()> onPreferences;
|
|
function<void ()> onQuit;
|
|
} cocoa;
|
|
};
|
|
|
|
static auto initialize() -> void;
|
|
static auto state() -> State&;
|
|
};
|
|
#endif
|