mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Add defaults for all int-slider settings too
This commit is contained in:
@@ -143,14 +143,14 @@ std::string PopupMultiChoice::ValueText() const {
|
||||
return valueText_;
|
||||
}
|
||||
|
||||
PopupSliderChoice::PopupSliderChoice(int *value, int minValue, int maxValue, const std::string &text, ScreenManager *screenManager, const std::string &units, LayoutParams *layoutParams)
|
||||
: AbstractChoiceWithValueDisplay(text, layoutParams), value_(value), minValue_(minValue), maxValue_(maxValue), step_(1), units_(units), screenManager_(screenManager) {
|
||||
PopupSliderChoice::PopupSliderChoice(int *value, int minValue, int maxValue, int defaultValue, const std::string &text, ScreenManager *screenManager, const std::string &units, LayoutParams *layoutParams)
|
||||
: AbstractChoiceWithValueDisplay(text, layoutParams), value_(value), minValue_(minValue), maxValue_(maxValue), defaultValue_(defaultValue), step_(1), units_(units), screenManager_(screenManager) {
|
||||
fmt_ = "%i";
|
||||
OnClick.Handle(this, &PopupSliderChoice::HandleClick);
|
||||
}
|
||||
|
||||
PopupSliderChoice::PopupSliderChoice(int *value, int minValue, int maxValue, const std::string &text, int step, ScreenManager *screenManager, const std::string &units, LayoutParams *layoutParams)
|
||||
: AbstractChoiceWithValueDisplay(text, layoutParams), value_(value), minValue_(minValue), maxValue_(maxValue), step_(step), units_(units), screenManager_(screenManager) {
|
||||
PopupSliderChoice::PopupSliderChoice(int *value, int minValue, int maxValue, int defaultValue, const std::string &text, int step, ScreenManager *screenManager, const std::string &units, LayoutParams *layoutParams)
|
||||
: AbstractChoiceWithValueDisplay(text, layoutParams), value_(value), minValue_(minValue), maxValue_(maxValue), defaultValue_(defaultValue), step_(step), units_(units), screenManager_(screenManager) {
|
||||
fmt_ = "%i";
|
||||
OnClick.Handle(this, &PopupSliderChoice::HandleClick);
|
||||
}
|
||||
@@ -170,7 +170,7 @@ PopupSliderChoiceFloat::PopupSliderChoiceFloat(float *value, float minValue, flo
|
||||
EventReturn PopupSliderChoice::HandleClick(EventParams &e) {
|
||||
restoreFocus_ = HasFocus();
|
||||
|
||||
SliderPopupScreen *popupScreen = new SliderPopupScreen(value_, minValue_, maxValue_, ChopTitle(text_), step_, units_);
|
||||
SliderPopupScreen *popupScreen = new SliderPopupScreen(value_, minValue_, maxValue_, defaultValue_, ChopTitle(text_), step_, units_);
|
||||
if (!negativeLabel_.empty())
|
||||
popupScreen->SetNegativeDisable(negativeLabel_);
|
||||
popupScreen->OnChange.Handle(this, &PopupSliderChoice::HandleChange);
|
||||
@@ -244,9 +244,7 @@ EventReturn SliderPopupScreen::OnDecrease(EventParams ¶ms) {
|
||||
sliderValue_ -= step_;
|
||||
slider_->Clamp();
|
||||
changing_ = true;
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", sliderValue_);
|
||||
edit_->SetText(temp);
|
||||
UpdateTextBox();
|
||||
changing_ = false;
|
||||
disabled_ = false;
|
||||
return EVENT_DONE;
|
||||
@@ -259,9 +257,7 @@ EventReturn SliderPopupScreen::OnIncrease(EventParams ¶ms) {
|
||||
sliderValue_ += step_;
|
||||
slider_->Clamp();
|
||||
changing_ = true;
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", sliderValue_);
|
||||
edit_->SetText(temp);
|
||||
UpdateTextBox();
|
||||
changing_ = false;
|
||||
disabled_ = false;
|
||||
return EVENT_DONE;
|
||||
@@ -269,9 +265,7 @@ EventReturn SliderPopupScreen::OnIncrease(EventParams ¶ms) {
|
||||
|
||||
EventReturn SliderPopupScreen::OnSliderChange(EventParams ¶ms) {
|
||||
changing_ = true;
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", sliderValue_);
|
||||
edit_->SetText(temp);
|
||||
UpdateTextBox();
|
||||
changing_ = false;
|
||||
disabled_ = false;
|
||||
return EVENT_DONE;
|
||||
@@ -286,9 +280,16 @@ EventReturn SliderPopupScreen::OnTextChange(EventParams ¶ms) {
|
||||
return EVENT_DONE;
|
||||
}
|
||||
|
||||
void SliderPopupScreen::UpdateTextBox() {
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", sliderValue_);
|
||||
edit_->SetText(temp);
|
||||
}
|
||||
|
||||
void SliderPopupScreen::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
using namespace UI;
|
||||
UIContext &dc = *screenManager()->getUIContext();
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
|
||||
sliderValue_ = *value_;
|
||||
if (disabled_ && sliderValue_ < 0)
|
||||
@@ -302,18 +303,29 @@ void SliderPopupScreen::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
lin->Add(new Button(" - "))->OnClick.Handle(this, &SliderPopupScreen::OnDecrease);
|
||||
lin->Add(new Button(" + "))->OnClick.Handle(this, &SliderPopupScreen::OnIncrease);
|
||||
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", sliderValue_);
|
||||
edit_ = new TextEdit(temp, Title(), "", new LinearLayoutParams(10.0f));
|
||||
edit_ = new TextEdit("", Title(), "", new LinearLayoutParams(1.0f));
|
||||
edit_->SetMaxLen(16);
|
||||
edit_->SetTextColor(dc.theme->itemStyle.fgColor);
|
||||
edit_->SetTextAlign(FLAG_DYNAMIC_ASCII);
|
||||
edit_->OnTextChange.Handle(this, &SliderPopupScreen::OnTextChange);
|
||||
changing_ = true;
|
||||
UpdateTextBox();
|
||||
changing_ = false;
|
||||
lin->Add(edit_);
|
||||
|
||||
if (!units_.empty())
|
||||
lin->Add(new TextView(units_, new LinearLayoutParams(10.0f)))->SetTextColor(dc.theme->itemStyle.fgColor);
|
||||
lin->Add(new TextView(units_))->SetTextColor(dc.theme->itemStyle.fgColor);
|
||||
|
||||
if (defaultValue_ != NO_DEFAULT_FLOAT) {
|
||||
//LinearLayout *lin2 = vert->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(UI::Margins(10, 10))));
|
||||
lin->Add(new Button(di->T("Reset")))->OnClick.Add([=](UI::EventParams &) {
|
||||
sliderValue_ = defaultValue_;
|
||||
changing_ = true;
|
||||
UpdateTextBox();
|
||||
changing_ = false;
|
||||
return UI::EVENT_DONE;
|
||||
});
|
||||
}
|
||||
|
||||
if (!negativeLabel_.empty())
|
||||
vert->Add(new CheckBox(&disabled_, negativeLabel_));
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace UI {
|
||||
|
||||
static const float NO_DEFAULT_FLOAT = -1000000.0f;
|
||||
static const int NO_DEFAULT_INT = -1000000;
|
||||
|
||||
class ListPopupScreen : public PopupScreen {
|
||||
public:
|
||||
@@ -66,8 +67,8 @@ private:
|
||||
|
||||
class SliderPopupScreen : public PopupScreen {
|
||||
public:
|
||||
SliderPopupScreen(int *value, int minValue, int maxValue, const std::string &title, int step = 1, const std::string &units = "")
|
||||
: PopupScreen(title, "OK", "Cancel"), units_(units), value_(value), minValue_(minValue), maxValue_(maxValue), step_(step) {}
|
||||
SliderPopupScreen(int *value, int minValue, int maxValue, int defaultValue, const std::string &title, int step = 1, const std::string &units = "")
|
||||
: PopupScreen(title, "OK", "Cancel"), units_(units), value_(value), minValue_(minValue), maxValue_(maxValue), defaultValue_(defaultValue), step_(step) {}
|
||||
void CreatePopupContents(ViewGroup *parent) override;
|
||||
|
||||
void SetNegativeDisable(const std::string &str) {
|
||||
@@ -85,6 +86,7 @@ private:
|
||||
EventReturn OnTextChange(EventParams ¶ms);
|
||||
EventReturn OnSliderChange(EventParams ¶ms);
|
||||
void OnCompleted(DialogResult result) override;
|
||||
void UpdateTextBox();
|
||||
Slider *slider_ = nullptr;
|
||||
UI::TextEdit *edit_ = nullptr;
|
||||
std::string units_;
|
||||
@@ -93,6 +95,7 @@ private:
|
||||
int sliderValue_ = 0;
|
||||
int minValue_;
|
||||
int maxValue_;
|
||||
int defaultValue_;
|
||||
int step_;
|
||||
bool changing_ = false;
|
||||
bool disabled_ = false;
|
||||
@@ -275,8 +278,8 @@ private:
|
||||
|
||||
class PopupSliderChoice : public AbstractChoiceWithValueDisplay {
|
||||
public:
|
||||
PopupSliderChoice(int *value, int minValue, int maxValue, const std::string &text, ScreenManager *screenManager, const std::string &units = "", LayoutParams *layoutParams = 0);
|
||||
PopupSliderChoice(int *value, int minValue, int maxValue, const std::string &text, int step, ScreenManager *screenManager, const std::string &units = "", LayoutParams *layoutParams = 0);
|
||||
PopupSliderChoice(int *value, int minValue, int maxValue, int defaultValue, const std::string &text, ScreenManager *screenManager, const std::string &units = "", LayoutParams *layoutParams = 0);
|
||||
PopupSliderChoice(int *value, int minValue, int maxValue, int defaultValue, const std::string &text, int step, ScreenManager *screenManager, const std::string &units = "", LayoutParams *layoutParams = 0);
|
||||
|
||||
void SetFormat(const char *fmt) {
|
||||
fmt_ = fmt;
|
||||
@@ -300,6 +303,7 @@ private:
|
||||
int *value_;
|
||||
int minValue_;
|
||||
int maxValue_;
|
||||
int defaultValue_;
|
||||
int step_;
|
||||
const char *fmt_;
|
||||
std::string zeroLabel_;
|
||||
|
||||
@@ -109,7 +109,7 @@ void CwCheatScreen::CreateViews() {
|
||||
leftColumn->Add(new Choice(cw->T("Edit Cheat File")))->OnClick.Handle(this, &CwCheatScreen::OnEditCheatFile);
|
||||
#endif
|
||||
leftColumn->Add(new Choice(di->T("Disable All")))->OnClick.Handle(this, &CwCheatScreen::OnDisableAll);
|
||||
leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshRate, 1, 1000, cw->T("Refresh Rate"), 1, screenManager()));
|
||||
leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshRate, 1, 1000, 77, cw->T("Refresh Rate"), 1, screenManager()));
|
||||
|
||||
rightScroll_ = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 0.5f));
|
||||
rightScroll_->SetTag("CwCheats");
|
||||
|
||||
@@ -411,18 +411,18 @@ void GameSettingsScreen::CreateGraphicsSettings(UI::ViewGroup *graphicsSettings)
|
||||
frameSkipAuto_ = graphicsSettings->Add(new CheckBox(&g_Config.bAutoFrameSkip, gr->T("Auto FrameSkip")));
|
||||
frameSkipAuto_->OnClick.Handle(this, &GameSettingsScreen::OnAutoFrameskip);
|
||||
|
||||
PopupSliderChoice *altSpeed1 = graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent1_, 0, 1000, gr->T("Alternative Speed", "Alternative speed"), 5, screenManager(), gr->T("%, 0:unlimited")));
|
||||
PopupSliderChoice *altSpeed1 = graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent1_, 0, 1000, NO_DEFAULT_INT, gr->T("Alternative Speed", "Alternative speed"), 5, screenManager(), gr->T("%, 0:unlimited")));
|
||||
altSpeed1->SetFormat("%i%%");
|
||||
altSpeed1->SetZeroLabel(gr->T("Unlimited"));
|
||||
altSpeed1->SetNegativeDisable(gr->T("Disabled"));
|
||||
|
||||
PopupSliderChoice *altSpeed2 = graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent2_, 0, 1000, gr->T("Alternative Speed 2", "Alternative speed 2 (in %, 0 = unlimited)"), 5, screenManager(), gr->T("%, 0:unlimited")));
|
||||
PopupSliderChoice *altSpeed2 = graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent2_, 0, 1000, NO_DEFAULT_INT, gr->T("Alternative Speed 2", "Alternative speed 2 (in %, 0 = unlimited)"), 5, screenManager(), gr->T("%, 0:unlimited")));
|
||||
altSpeed2->SetFormat("%i%%");
|
||||
altSpeed2->SetZeroLabel(gr->T("Unlimited"));
|
||||
altSpeed2->SetNegativeDisable(gr->T("Disabled"));
|
||||
|
||||
if (analogSpeedMapped_) {
|
||||
PopupSliderChoice *analogSpeed = graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercentAnalog_, 1, 1000, gr->T("Analog Alternative Speed", "Analog alternative speed (in %)"), 5, screenManager(), gr->T("%")));
|
||||
PopupSliderChoice *analogSpeed = graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercentAnalog_, 1, 1000, NO_DEFAULT_INT, gr->T("Analog Alternative Speed", "Analog alternative speed (in %)"), 5, screenManager(), gr->T("%")));
|
||||
altSpeed2->SetFormat("%i%%");
|
||||
}
|
||||
|
||||
@@ -578,11 +578,11 @@ void GameSettingsScreen::CreateGraphicsSettings(UI::ViewGroup *graphicsSettings)
|
||||
if (showCardboardSettings) {
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Cardboard VR Settings", "Cardboard VR Settings")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bEnableCardboardVR, gr->T("Enable Cardboard VR", "Enable Cardboard VR")));
|
||||
PopupSliderChoice *cardboardScreenSize = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardScreenSize, 30, 150, gr->T("Cardboard Screen Size", "Screen Size (in % of the viewport)"), 1, screenManager(), gr->T("% of viewport")));
|
||||
PopupSliderChoice *cardboardScreenSize = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardScreenSize, 30, 150, 50, gr->T("Cardboard Screen Size", "Screen Size (in % of the viewport)"), 1, screenManager(), gr->T("% of viewport")));
|
||||
cardboardScreenSize->SetEnabledPtr(&g_Config.bEnableCardboardVR);
|
||||
PopupSliderChoice *cardboardXShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardXShift, -150, 150, gr->T("Cardboard Screen X Shift", "X Shift (in % of the void)"), 1, screenManager(), gr->T("% of the void")));
|
||||
PopupSliderChoice *cardboardXShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardXShift, -150, 150, 0, gr->T("Cardboard Screen X Shift", "X Shift (in % of the void)"), 1, screenManager(), gr->T("% of the void")));
|
||||
cardboardXShift->SetEnabledPtr(&g_Config.bEnableCardboardVR);
|
||||
PopupSliderChoice *cardboardYShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardYShift, -100, 100, gr->T("Cardboard Screen Y Shift", "Y Shift (in % of the void)"), 1, screenManager(), gr->T("% of the void")));
|
||||
PopupSliderChoice *cardboardYShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardYShift, -100, 100, 0, gr->T("Cardboard Screen Y Shift", "Y Shift (in % of the void)"), 1, screenManager(), gr->T("% of the void")));
|
||||
cardboardYShift->SetEnabledPtr(&g_Config.bEnableCardboardVR);
|
||||
}
|
||||
|
||||
@@ -619,16 +619,16 @@ void GameSettingsScreen::CreateAudioSettings(UI::ViewGroup *audioSettings) {
|
||||
|
||||
audioSettings->Add(new ItemHeader(ms->T("Audio")));
|
||||
CheckBox *enableSound = audioSettings->Add(new CheckBox(&g_Config.bEnableSound,a->T("Enable Sound")));
|
||||
PopupSliderChoice *volume = audioSettings->Add(new PopupSliderChoice(&g_Config.iGlobalVolume, VOLUME_OFF, VOLUME_FULL, a->T("Global volume"), screenManager()));
|
||||
PopupSliderChoice *volume = audioSettings->Add(new PopupSliderChoice(&g_Config.iGlobalVolume, VOLUME_OFF, VOLUME_FULL, VOLUME_FULL, a->T("Global volume"), screenManager()));
|
||||
volume->SetEnabledPtr(&g_Config.bEnableSound);
|
||||
volume->SetZeroLabel(a->T("Mute"));
|
||||
|
||||
PopupSliderChoice *altVolume = audioSettings->Add(new PopupSliderChoice(&g_Config.iAltSpeedVolume, VOLUME_OFF, VOLUME_FULL, a->T("Alternate speed volume"), screenManager()));
|
||||
PopupSliderChoice *altVolume = audioSettings->Add(new PopupSliderChoice(&g_Config.iAltSpeedVolume, VOLUME_OFF, VOLUME_FULL, NO_DEFAULT_INT, a->T("Alternate speed volume"), screenManager()));
|
||||
altVolume->SetEnabledPtr(&g_Config.bEnableSound);
|
||||
altVolume->SetZeroLabel(a->T("Mute"));
|
||||
altVolume->SetNegativeDisable(a->T("Use global volume"));
|
||||
|
||||
PopupSliderChoice *reverbVolume = audioSettings->Add(new PopupSliderChoice(&g_Config.iReverbVolume, VOLUME_OFF, 2 * VOLUME_FULL, a->T("Reverb volume"), screenManager()));
|
||||
PopupSliderChoice *reverbVolume = audioSettings->Add(new PopupSliderChoice(&g_Config.iReverbVolume, VOLUME_OFF, 2 * VOLUME_FULL, VOLUME_FULL, a->T("Reverb volume"), screenManager()));
|
||||
reverbVolume->SetEnabledPtr(&g_Config.bEnableSound);
|
||||
reverbVolume->SetZeroLabel(a->T("Disabled"));
|
||||
|
||||
@@ -717,10 +717,10 @@ void GameSettingsScreen::CreateControlsSettings(UI::ViewGroup *controlsSettings)
|
||||
View *style = controlsSettings->Add(new PopupMultiChoice(&g_Config.iTouchButtonStyle, co->T("Button style"), touchControlStyles, 0, ARRAY_SIZE(touchControlStyles), co->GetName(), screenManager()));
|
||||
style->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
|
||||
PopupSliderChoice *opacity = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 0, 100, co->T("Button Opacity"), screenManager(), "%"));
|
||||
PopupSliderChoice *opacity = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 0, 100, 65, co->T("Button Opacity"), screenManager(), "%"));
|
||||
opacity->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
opacity->SetFormat("%i%%");
|
||||
PopupSliderChoice *autoHide = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonHideSeconds, 0, 300, co->T("Auto-hide buttons after seconds"), screenManager(), co->T("seconds, 0 : off")));
|
||||
PopupSliderChoice *autoHide = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonHideSeconds, 0, 300, 20, co->T("Auto-hide buttons after seconds"), screenManager(), co->T("seconds, 0 : off")));
|
||||
autoHide->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
autoHide->SetFormat("%is");
|
||||
autoHide->SetZeroLabel(co->T("Off"));
|
||||
@@ -866,8 +866,8 @@ void GameSettingsScreen::CreateNetworkingSettings(UI::ViewGroup *networkingSetti
|
||||
#endif
|
||||
|
||||
networkingSettings->Add(new ItemHeader(n->T("Misc", "Misc (default = compatibility)")));
|
||||
networkingSettings->Add(new PopupSliderChoice(&g_Config.iPortOffset, 0, 60000, n->T("Port offset", "Port offset (0 = PSP compatibility)"), 100, screenManager()));
|
||||
networkingSettings->Add(new PopupSliderChoice(&g_Config.iMinTimeout, 0, 15000, n->T("Minimum Timeout", "Minimum Timeout (override in ms, 0 = default)"), 50, screenManager()));
|
||||
networkingSettings->Add(new PopupSliderChoice(&g_Config.iPortOffset, 0, 60000, 10000, n->T("Port offset", "Port offset (0 = PSP compatibility)"), 100, screenManager()));
|
||||
networkingSettings->Add(new PopupSliderChoice(&g_Config.iMinTimeout, 0, 15000, 0, n->T("Minimum Timeout", "Minimum Timeout (override in ms, 0 = default)"), 50, screenManager()));
|
||||
networkingSettings->Add(new CheckBox(&g_Config.bForcedFirstConnect, n->T("Forced First Connect", "Forced First Connect (faster Connect)")));
|
||||
}
|
||||
|
||||
@@ -1031,7 +1031,7 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
|
||||
}
|
||||
#endif
|
||||
systemSettings->Add(new CheckBox(&g_Config.bMemStickInserted, sy->T("Memory Stick inserted")));
|
||||
UI::PopupSliderChoice *sizeChoice = systemSettings->Add(new PopupSliderChoice(&g_Config.iMemStickSizeGB, 1, 32, sy->T("Memory Stick size", "Memory Stick size"), screenManager(), "GB"));
|
||||
UI::PopupSliderChoice *sizeChoice = systemSettings->Add(new PopupSliderChoice(&g_Config.iMemStickSizeGB, 1, 32, 16, sy->T("Memory Stick size", "Memory Stick size"), screenManager(), "GB"));
|
||||
sizeChoice->SetFormat("%d GB");
|
||||
|
||||
systemSettings->Add(new ItemHeader(sy->T("Help the PPSSPP team")));
|
||||
@@ -1050,13 +1050,13 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
|
||||
static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays" };
|
||||
View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), sy->GetName(), screenManager()));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, sy->T("Force real clock sync (slower, less lag)")))->SetDisabledPtr(&g_Config.bAutoFrameSkip);
|
||||
PopupSliderChoice *lockedMhz = systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, sy->T("Change CPU Clock", "Change CPU Clock (unstable)"), screenManager(), sy->T("MHz, 0:default")));
|
||||
PopupSliderChoice *lockedMhz = systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, 0, sy->T("Change CPU Clock", "Change CPU Clock (unstable)"), screenManager(), sy->T("MHz, 0:default")));
|
||||
lockedMhz->OnChange.Add([&](UI::EventParams &) {
|
||||
enableReportsCheckbox_->SetEnabled(Reporting::IsSupported());
|
||||
return UI::EVENT_CONTINUE;
|
||||
});
|
||||
lockedMhz->SetZeroLabel(sy->T("Auto"));
|
||||
PopupSliderChoice *rewindInterval = systemSettings->Add(new PopupSliderChoice(&g_Config.iRewindSnapshotInterval, 0, 60, sy->T("Rewind Snapshot Interval"), screenManager(), sy->T("seconds, 0:off")));
|
||||
PopupSliderChoice *rewindInterval = systemSettings->Add(new PopupSliderChoice(&g_Config.iRewindSnapshotInterval, 0, 60, 0, sy->T("Rewind Snapshot Interval"), screenManager(), sy->T("seconds, 0:off")));
|
||||
rewindInterval->SetZeroLabel(sy->T("Off"));
|
||||
|
||||
systemSettings->Add(new ItemHeader(sy->T("General")));
|
||||
|
||||
@@ -612,7 +612,7 @@ void RemoteISOSettingsScreen::CreateViews() {
|
||||
remoteisoSettings->Add(remoteServer);
|
||||
remoteServer->SetEnabledPtr(&g_Config.bRemoteISOManual);
|
||||
|
||||
PopupSliderChoice *remotePort = remoteisoSettings->Add(new PopupSliderChoice(&g_Config.iLastRemoteISOPort, 0, 65535, ri->T("Remote Port", "Remote Port"), 100, screenManager()));
|
||||
PopupSliderChoice *remotePort = remoteisoSettings->Add(new PopupSliderChoice(&g_Config.iLastRemoteISOPort, 0, 65535, 0, ri->T("Remote Port", "Remote Port"), 100, screenManager()));
|
||||
remotePort->SetEnabledPtr(&g_Config.bRemoteISOManual);
|
||||
|
||||
UI::Choice *remoteSubdir;
|
||||
@@ -630,7 +630,7 @@ void RemoteISOSettingsScreen::CreateViews() {
|
||||
remoteisoSettings->Add(remoteSubdir);
|
||||
remoteSubdir->SetEnabledPtr(&g_Config.bRemoteISOManual);
|
||||
|
||||
PopupSliderChoice *portChoice = new PopupSliderChoice(&g_Config.iRemoteISOPort, 0, 65535, ri->T("Local Server Port", "Local Server Port"), 100, screenManager());
|
||||
PopupSliderChoice *portChoice = new PopupSliderChoice(&g_Config.iRemoteISOPort, 0, 65535, 0, ri->T("Local Server Port", "Local Server Port"), 100, screenManager());
|
||||
remoteisoSettings->Add(portChoice);
|
||||
portChoice->SetDisabledPtr(&serverRunning_);
|
||||
remoteisoSettings->Add(new Spacer(25.0));
|
||||
|
||||
@@ -124,8 +124,8 @@ void TiltAnalogSettingsScreen::CreateViews() {
|
||||
if (g_Config.iTiltInputType == 1) {
|
||||
settings->Add(new PopupSliderChoiceFloat(&g_Config.fTiltAnalogDeadzoneRadius, 0.0f, 0.8f, 0.0f, co->T("Deadzone radius"), 0.01f, screenManager(), "/ 1.0"))->SetEnabledFunc(enabledFunc);
|
||||
}
|
||||
settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityX, 0, 100, co->T("Tilt Sensitivity along X axis"), screenManager(), "%"))->SetEnabledFunc(enabledFunc);
|
||||
settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityY, 0, 100, co->T("Tilt Sensitivity along Y axis"), screenManager(), "%"))->SetEnabledFunc(enabledFunc);
|
||||
settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityX, 0, 100, 60, co->T("Tilt Sensitivity along X axis"), screenManager(), "%"))->SetEnabledFunc(enabledFunc);
|
||||
settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityY, 0, 100, 60, co->T("Tilt Sensitivity along Y axis"), screenManager(), "%"))->SetEnabledFunc(enabledFunc);
|
||||
|
||||
settings->Add(new ItemHeader(co->T("Invert Axes")));
|
||||
settings->Add(new CheckBox(&g_Config.bInvertTiltX, co->T("Invert Tilt along X axis")))->SetEnabledFunc(enabledFunc);
|
||||
|
||||
@@ -636,7 +636,7 @@ void TouchControlLayoutScreen::CreateViews() {
|
||||
mode_->OnChoice.Handle(this, &TouchControlLayoutScreen::OnMode);
|
||||
|
||||
CheckBox *snap = new CheckBox(&g_Config.bTouchSnapToGrid, di->T("Snap"));
|
||||
PopupSliderChoice *gridSize = new PopupSliderChoice(&g_Config.iTouchSnapGridSize, 2, 256, di->T("Grid"), screenManager(), "");
|
||||
PopupSliderChoice *gridSize = new PopupSliderChoice(&g_Config.iTouchSnapGridSize, 2, 256, 64, di->T("Grid"), screenManager(), "");
|
||||
gridSize->SetEnabledPtr(&g_Config.bTouchSnapToGrid);
|
||||
|
||||
leftColumn->Add(mode_);
|
||||
|
||||
Reference in New Issue
Block a user