Files
bsnes/ui/general/main-window.cpp
Tim Allen afdb3c4d20 Update to release v000r07.
byuu says:

Changelog:
- fixed sprite Vflip check
- fixed up window rendering (well, mostly, works great in Megaman II but
  not so great in Makaitoushi SaGa)
- added MBC2, MBC5 (already had MBC0, MBC1)
- removed reset, hooked up power cycle and Vsync toggle
- some other stuff

Makaitoushi SaGa locks on the main menu after some graphical glitches on
the title screen, damn.
Shin Megami Tensei - Devichil Black Book locks up immediately, hitting
HALT opcodes all the time, damn again.

Megaman II should be fully playable now.
Contra 3 is really close, but goes crazy on the turtle boss fight.
2011-01-03 15:28:36 +11:00

55 lines
1.5 KiB
C++
Executable File

MainWindow mainWindow;
void MainWindow::create() {
Window::create(128, 128, 160 * 2, 144 * 2, { GameBoy::Info::Name, " v", GameBoy::Info::Version });
setDefaultFont(application.proportionalFont);
setFont(application.proportionalFontBold);
system.create(*this, "System");
systemLoadCartridge.create(system, "Load Cartridge ...");
systemSeparator1.create(system);
systemPower.create(system, "Power Cycle");
settings.create(*this, "Settings");
settingsVideoSync.create(settings, "Synchronize Video");
settingsVideoSync.setChecked(true);
tools.create(*this, "Tools");
//tools.setEnabled(false);
help.create(*this, "Help");
helpAbout.create(help, "About ...");
viewport.create(*this, 0, 0, 160 * 2, 144 * 2);
setMenuVisible(true);
setStatusVisible(true);
onClose = []() {
application.quit = true;
return false;
};
systemLoadCartridge.onTick = []() {
string filename = OS::fileOpen(mainWindow, "Game Boy cartridges\t*.gb,*.gbc", "/media/sdb1/root/gameboy_images/");
if(filename != "") utility.loadCartridge(filename);
};
systemPower.onTick = []() {
if(GameBoy::cartridge.loaded()) GameBoy::system.power();
};
settingsVideoSync.onTick = []() {
video.set(Video::Synchronize, mainWindow.settingsVideoSync.checked());
};
helpAbout.onTick = []() {
MessageWindow::information(mainWindow, {
"bgameboy\n\n",
"Version: ", GameBoy::Info::Version, "\n",
"Author: byuu\n",
"Homepage: http://byuu.org/"
});
};
}