mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-10-04 23:51:47 +02:00
byuu says: higan changelog: - generates title displayed in emulator window by asking the core - core builds title solely from "information/title" ... if it's not there, you don't get a title at all - sub-system load menu is gone ... since there are multiple revisions of the SGB, this never really worked well anyway - to load an SGB, BS-X or ST cartridge, load the base cartridge first - "File->Load Game" moved to "Load->Import Game" ... may cause a bit of confusion to new users, but I don't like having a single-item menu, we'll just have to explain it to new users - browser window redone to look like ananke - home button here goes to ~/Emulation rather than just ~ like ananke, since this is the home of game folders - game folder icon is now the executable icon for the Tango theme (orange diamond), meant to represent a complete game rather than a game file or archive ananke changelog: - outputs GBC games to "Game Boy Color/" instead of "Game Boy/" - adds the file basename to "information/title" Known issues: - using ananke to load a GB game trips the Super Famicom SGB mode and fails (need to make the full-path auto-detection ignore non-bootable systems) - need to dump and test some BS-X media before releasing - ananke lacks BS-X Satellaview cartridge support - v092 isn't going to let you retarget the ananke/higan game folder path of ~/Emulation, you will have to wait for a future version if that bothers you so greatly [Later, after the v092 release, byuu posted this additional changelog: - kill laevateinn - add title() - add bootable, remove load - combine file, library - combine [][][] paths - fix SFC subtype handling XML->BML - update file browser to use buttons - update file browser keyboard handling - update system XML->BML - fix sufami turbo hashing - remove Cartridge::manifest ]
71 lines
1.9 KiB
C++
Executable File
71 lines
1.9 KiB
C++
Executable File
bool pWidget::enabled() {
|
|
return IsWindowEnabled(hwnd);
|
|
}
|
|
|
|
bool pWidget::focused() {
|
|
return GetFocus() == hwnd;
|
|
}
|
|
|
|
Geometry pWidget::minimumGeometry() {
|
|
return {0, 0, 0, 0};
|
|
}
|
|
|
|
void pWidget::setEnabled(bool enabled) {
|
|
if(widget.state.abstract) enabled = false;
|
|
if(sizable.state.layout && sizable.state.layout->enabled() == false) enabled = false;
|
|
EnableWindow(hwnd, enabled);
|
|
}
|
|
|
|
void pWidget::setFocused() {
|
|
SetFocus(hwnd);
|
|
}
|
|
|
|
void pWidget::setFont(const string &font) {
|
|
if(hfont) DeleteObject(hfont);
|
|
hfont = pFont::create(font);
|
|
SendMessage(hwnd, WM_SETFONT, (WPARAM)hfont, 0);
|
|
}
|
|
|
|
void pWidget::setGeometry(const Geometry &geometry) {
|
|
SetWindowPos(hwnd, NULL, geometry.x, geometry.y, geometry.width, geometry.height, SWP_NOZORDER);
|
|
}
|
|
|
|
void pWidget::setVisible(bool visible) {
|
|
if(widget.state.abstract) visible = false;
|
|
if(sizable.state.layout && sizable.state.layout->visible() == false) visible = false;
|
|
ShowWindow(hwnd, visible ? SW_SHOWNORMAL : SW_HIDE);
|
|
}
|
|
|
|
void pWidget::constructor() {
|
|
hfont = pFont::create("Tahoma, 8");
|
|
if(widget.state.abstract) {
|
|
hwnd = CreateWindow(L"phoenix_label", L"", WS_CHILD, 0, 0, 0, 0, parentWindow->p.hwnd, (HMENU)id, GetModuleHandle(0), 0);
|
|
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)&widget);
|
|
}
|
|
}
|
|
|
|
void pWidget::destructor() {
|
|
if(widget.state.abstract) {
|
|
DestroyWindow(hwnd);
|
|
}
|
|
}
|
|
|
|
void pWidget::orphan() {
|
|
destructor();
|
|
constructor();
|
|
}
|
|
|
|
void pWidget::setDefaultFont() {
|
|
string description = widget.state.font;
|
|
if(description == "") description = "Tahoma, 8";
|
|
hfont = pFont::create(description);
|
|
SendMessage(hwnd, WM_SETFONT, (WPARAM)hfont, 0);
|
|
}
|
|
|
|
//calling Widget::setParent destroys widget and re-creates it:
|
|
//need to re-apply visiblity and enabled status; called by each subclassed setParent() function
|
|
void pWidget::synchronize() {
|
|
widget.setEnabled(widget.enabled());
|
|
widget.setVisible(widget.visible());
|
|
}
|