mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2025-03-03 07:47:21 +00:00

byuu says: New update. Most of the work today went into eliminating hiro::Image from all objects in all ports, replacing with nall::image. That took an eternity. Changelog: - fixed crashing bug when loading games [thanks endrift!!] - toggling "show status bar" option adjusts window geometry (not supposed to recenter the window, though) - button sizes improved; icon-only button icons no longer being cut off
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
#if defined(Hiro_StatusBar)
|
|
|
|
namespace hiro {
|
|
|
|
auto pStatusBar::construct() -> void {
|
|
}
|
|
|
|
auto pStatusBar::destruct() -> void {
|
|
}
|
|
|
|
auto pStatusBar::setEnabled(bool enabled) -> void {
|
|
@autoreleasepool {
|
|
if(auto parent = _parent()) {
|
|
[[parent->cocoaWindow statusBar] setEnabled:enabled];
|
|
}
|
|
}
|
|
}
|
|
|
|
auto pStatusBar::setFont(const Font& font) -> void {
|
|
@autoreleasepool {
|
|
if(auto parent = _parent()) {
|
|
[[parent->cocoaWindow statusBar] setFont:pFont::create(font)];
|
|
}
|
|
}
|
|
}
|
|
|
|
auto pStatusBar::setText(const string& text) -> void {
|
|
@autoreleasepool {
|
|
if(auto parent = _parent()) {
|
|
[[parent->cocoaWindow statusBar] setStringValue:[NSString stringWithUTF8String:state().text]];
|
|
}
|
|
}
|
|
}
|
|
|
|
auto pStatusBar::setVisible(bool visible) -> void {
|
|
@autoreleasepool {
|
|
if(auto parent = _parent()) {
|
|
[[parent->cocoaWindow statusBar] setHidden:!visible];
|
|
parent->setGeometry(parent->state().geometry);
|
|
}
|
|
}
|
|
}
|
|
|
|
auto pStatusBar::_parent() -> maybe<pWindow&> {
|
|
if(auto parent = self().parentWindow()) {
|
|
if(auto self = parent->self()) return *self;
|
|
}
|
|
return nothing;
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|