mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 14:42:33 +01:00
byuu says: Changelog (since the last open beta): - icarus is now included. icarus is used to import game files/archives into game paks (folders) - SNES: mid-scanline BGMODE changes now emulated correctly (used only by atx2.smc Anthrox Demo) - GBA: fixed a CPU bug that was causing dozens of games to have distorted audio - GBA: fixed default FlashROM ID; should allow much higher compatibility - GBA: now using Cydrak's new, much improved, GBA color emulation filter (still a work-in-progress) - re-added command-line loading support for game paks (not for game files/archives, sorry!) - Qt port now compiles and runs again (may be a little buggy; Windows/GTK+ ports preferred) - SNES performance profile now compiles and runs again - much more
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#if defined(Hiro_HorizontalScrollBar)
|
|
|
|
namespace hiro {
|
|
|
|
auto pHorizontalScrollBar::construct() -> void {
|
|
qtWidget = qtHorizontalScrollBar = new QtHorizontalScrollBar(*this);
|
|
qtHorizontalScrollBar->setRange(0, 100);
|
|
qtHorizontalScrollBar->setPageStep(101 >> 3);
|
|
qtHorizontalScrollBar->connect(qtHorizontalScrollBar, SIGNAL(valueChanged(int)), SLOT(onChange()));
|
|
|
|
pWidget::construct();
|
|
_setState();
|
|
}
|
|
|
|
auto pHorizontalScrollBar::destruct() -> void {
|
|
delete qtHorizontalScrollBar;
|
|
qtWidget = qtHorizontalScrollBar = nullptr;
|
|
}
|
|
|
|
auto pHorizontalScrollBar::minimumSize() const -> Size {
|
|
return {0, 15};
|
|
}
|
|
|
|
auto pHorizontalScrollBar::setLength(unsigned length) -> void {
|
|
_setState();
|
|
}
|
|
|
|
auto pHorizontalScrollBar::setPosition(unsigned position) -> void {
|
|
_setState();
|
|
}
|
|
|
|
auto pHorizontalScrollBar::_setState() -> void {
|
|
signed length = state().length + (state().length == 0);
|
|
qtHorizontalScrollBar->setRange(0, length - 1);
|
|
qtHorizontalScrollBar->setPageStep(length >> 3);
|
|
qtHorizontalScrollBar->setValue(state().position);
|
|
}
|
|
|
|
auto QtHorizontalScrollBar::onChange() -> void {
|
|
p.state().position = value();
|
|
p.self().doChange();
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|