2019-01-01 23:52:08 +00:00
|
|
|
#if defined(Hiro_AboutDialog)
|
|
|
|
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
auto AboutDialog::setAlignment(Alignment alignment) -> type& {
|
|
|
|
state.alignment = alignment;
|
|
|
|
state.relativeTo = {};
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto AboutDialog::setAlignment(sWindow relativeTo, Alignment alignment) -> type& {
|
|
|
|
state.alignment = alignment;
|
|
|
|
state.relativeTo = relativeTo;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2020-02-23 11:23:25 +00:00
|
|
|
auto AboutDialog::setCopyright(const string& copyright) -> type& {
|
|
|
|
state.copyright = copyright;
|
2019-01-01 23:52:08 +00:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto AboutDialog::setDescription(const string& description) -> type& {
|
|
|
|
state.description = description;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto AboutDialog::setLicense(const string& license) -> type& {
|
|
|
|
state.license = license;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto AboutDialog::setLogo(const image& logo) -> type& {
|
|
|
|
state.logo = logo;
|
|
|
|
state.logo.transform();
|
|
|
|
state.logo.alphaBlend(0xfffff0);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto AboutDialog::setName(const string& name) -> type& {
|
|
|
|
state.name = name;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto AboutDialog::setVersion(const string& version) -> type& {
|
|
|
|
state.version = version;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto AboutDialog::setWebsite(const string& website) -> type& {
|
|
|
|
state.website = website;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto AboutDialog::show() -> void {
|
|
|
|
Window window;
|
|
|
|
window.onClose([&] { window.setModal(false); });
|
|
|
|
|
|
|
|
VerticalLayout layout{&window};
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
layout.setPadding(5_sx, 5_sy);
|
2019-01-01 23:52:08 +00:00
|
|
|
|
|
|
|
Label nameLabel{&layout, Size{~0, 0}};
|
|
|
|
nameLabel.setCollapsible();
|
|
|
|
nameLabel.setAlignment(0.5);
|
|
|
|
nameLabel.setForegroundColor({0, 0, 0});
|
|
|
|
nameLabel.setFont(Font().setFamily("Georgia").setBold().setSize(36.0));
|
|
|
|
nameLabel.setText(state.name ? state.name : Application::name());
|
2019-07-17 12:11:46 +00:00
|
|
|
nameLabel.setVisible((bool)state.name && !(bool)state.logo);
|
2019-01-01 23:52:08 +00:00
|
|
|
|
2020-02-23 11:23:25 +00:00
|
|
|
Canvas logoCanvas{&layout, Size{~0, 0}, 5_sy};
|
2019-01-01 23:52:08 +00:00
|
|
|
logoCanvas.setCollapsible();
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
if(state.logo) {
|
|
|
|
image logo{state.logo};
|
|
|
|
logo.scale(sx(logo.width()), sy(logo.height()));
|
|
|
|
logoCanvas.setIcon(logo);
|
|
|
|
} else {
|
|
|
|
logoCanvas.setVisible(false);
|
|
|
|
}
|
2019-01-01 23:52:08 +00:00
|
|
|
|
|
|
|
Label descriptionLabel{&layout, Size{~0, 0}};
|
|
|
|
descriptionLabel.setCollapsible();
|
|
|
|
descriptionLabel.setAlignment(0.5);
|
|
|
|
descriptionLabel.setForegroundColor({0, 0, 0});
|
|
|
|
descriptionLabel.setText(state.description);
|
|
|
|
if(!state.description) descriptionLabel.setVisible(false);
|
|
|
|
|
|
|
|
HorizontalLayout versionLayout{&layout, Size{~0, 0}, 0};
|
|
|
|
versionLayout.setCollapsible();
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
Label versionLabel{&versionLayout, Size{~0, 0}, 3_sx};
|
2019-01-01 23:52:08 +00:00
|
|
|
versionLabel.setAlignment(1.0);
|
|
|
|
versionLabel.setFont(Font().setBold());
|
|
|
|
versionLabel.setForegroundColor({0, 0, 0});
|
|
|
|
versionLabel.setText("Version:");
|
|
|
|
Label versionValue{&versionLayout, Size{~0, 0}};
|
|
|
|
versionValue.setAlignment(0.0);
|
|
|
|
versionValue.setFont(Font().setBold());
|
|
|
|
versionValue.setForegroundColor({0, 0, 0});
|
|
|
|
versionValue.setText(state.version);
|
|
|
|
if(!state.version) versionLayout.setVisible(false);
|
|
|
|
|
2020-02-23 11:23:25 +00:00
|
|
|
HorizontalLayout copyrightLayout{&layout, Size{~0, 0}, 0};
|
|
|
|
copyrightLayout.setCollapsible();
|
|
|
|
Label copyrightLabel{©rightLayout, Size{~0, 0}, 3_sx};
|
|
|
|
copyrightLabel.setAlignment(1.0);
|
|
|
|
copyrightLabel.setFont(Font().setBold());
|
|
|
|
copyrightLabel.setForegroundColor({0, 0, 0});
|
|
|
|
copyrightLabel.setText("Copyright:");
|
|
|
|
Label copyrightValue{©rightLayout, Size{~0, 0}};
|
|
|
|
copyrightValue.setAlignment(0.0);
|
|
|
|
copyrightValue.setFont(Font().setBold());
|
|
|
|
copyrightValue.setForegroundColor({0, 0, 0});
|
|
|
|
copyrightValue.setText(state.copyright);
|
|
|
|
if(!state.copyright) copyrightLayout.setVisible(false);
|
2019-01-01 23:52:08 +00:00
|
|
|
|
|
|
|
HorizontalLayout licenseLayout{&layout, Size{~0, 0}, 0};
|
|
|
|
licenseLayout.setCollapsible();
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
Label licenseLabel{&licenseLayout, Size{~0, 0}, 3_sx};
|
2019-01-01 23:52:08 +00:00
|
|
|
licenseLabel.setAlignment(1.0);
|
|
|
|
licenseLabel.setFont(Font().setBold());
|
|
|
|
licenseLabel.setForegroundColor({0, 0, 0});
|
|
|
|
licenseLabel.setText("License:");
|
|
|
|
Label licenseValue{&licenseLayout, Size{~0, 0}};
|
|
|
|
licenseValue.setAlignment(0.0);
|
|
|
|
licenseValue.setFont(Font().setBold());
|
|
|
|
licenseValue.setForegroundColor({0, 0, 0});
|
|
|
|
licenseValue.setText(state.license);
|
|
|
|
if(!state.license) licenseLayout.setVisible(false);
|
|
|
|
|
|
|
|
HorizontalLayout websiteLayout{&layout, Size{~0, 0}, 0};
|
|
|
|
websiteLayout.setCollapsible();
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
Label websiteLabel{&websiteLayout, Size{~0, 0}, 3_sx};
|
2019-01-01 23:52:08 +00:00
|
|
|
websiteLabel.setAlignment(1.0);
|
|
|
|
websiteLabel.setFont(Font().setBold());
|
|
|
|
websiteLabel.setForegroundColor({0, 0, 0});
|
|
|
|
websiteLabel.setText("Website:");
|
2019-07-07 09:44:09 +00:00
|
|
|
//add a layout for the website value to fill 50% of the window,
|
|
|
|
HorizontalLayout websiteValueLayout{&websiteLayout, Size{~0, 0}};
|
|
|
|
//so that the label is only as long as its text content,
|
|
|
|
Label websiteValue{&websiteValueLayout, Size{0, 0}};
|
2019-01-01 23:52:08 +00:00
|
|
|
websiteValue.setAlignment(0.0);
|
|
|
|
websiteValue.setFont(Font().setBold());
|
|
|
|
websiteValue.setForegroundColor({0, 0, 240});
|
2019-07-26 15:52:29 +00:00
|
|
|
auto website = state.website;
|
|
|
|
if(0); //remove protocol prefix from displayed label:
|
|
|
|
else if(website.beginsWith("http://" )) website.trimLeft("http://" , 1L);
|
|
|
|
else if(website.beginsWith("https://")) website.trimLeft("https://", 1L);
|
|
|
|
websiteValue.setText(website);
|
2019-07-07 09:44:09 +00:00
|
|
|
//so that the hand cursor is only visible when overing over the link.
|
|
|
|
websiteValue.setMouseCursor(MouseCursor::Hand);
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
websiteValue.onMouseRelease([&](auto button) {
|
2019-01-01 23:52:08 +00:00
|
|
|
if(button == Mouse::Button::Left) invoke(state.website);
|
|
|
|
});
|
|
|
|
if(!state.website) websiteLayout.setVisible(false);
|
|
|
|
|
|
|
|
window.setTitle({"About ", state.name ? state.name : Application::name(), " ..."});
|
|
|
|
window.setBackgroundColor({255, 255, 240});
|
2020-02-23 11:23:25 +00:00
|
|
|
window.setSize({max(320_sx, layout.minimumSize().width()), layout.minimumSize().height()});
|
2019-01-01 23:52:08 +00:00
|
|
|
window.setResizable(false);
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
window.setAlignment(state.relativeTo, state.alignment);
|
2019-01-01 23:52:08 +00:00
|
|
|
window.setDismissable();
|
|
|
|
window.setVisible();
|
|
|
|
window.setModal();
|
2019-07-26 15:52:29 +00:00
|
|
|
window.setVisible(false);
|
2019-01-01 23:52:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|