Disable darkening background, also allow to over saturate up to 2

This commit is contained in:
iota97 authored and Henrik Rydgård committed 2022-02-18 14:24:46 +01:00
1 parent ce2995f952
commit 3f505f760c
3 files changed
+19 -3

No files matched your search

+2 -1
View File
@@ -328,7 +328,7 @@ void PopupScreen::CreateViews() {
root_->Add(box_);
box_->SetBG(dc.theme->popupStyle.background);
box_->SetHasDropShadow(true);
box_->SetHasDropShadow(hasDropShadow_);
// Since we scale a bit, make the dropshadow bleed past the edges.
box_->SetDropShadowExpand(std::max(dp_xres, dp_yres));
@@ -530,6 +530,7 @@ EventReturn PopupSliderChoiceFloat::HandleClick(EventParams &e) {
SliderFloatPopupScreen *popupScreen = new SliderFloatPopupScreen(value_, minValue_, maxValue_, ChopTitle(text_), step_, units_, liveUpdate_);
popupScreen->OnChange.Handle(this, &PopupSliderChoiceFloat::HandleChange);
popupScreen->SetHasDropShadow(hasDropShadow_);
if (e.v)
popupScreen->SetPopupOrigin(e.v);
screenManager_->push(popupScreen);
+9
View File
@@ -83,6 +83,8 @@ public:
void SetPopupOrigin(const UI::View *view);
void SetPopupOffset(float y);
void SetHasDropShadow(bool has) { hasDropShadow_ = has; }
protected:
virtual bool FillVertical() const { return false; }
virtual UI::Size PopupWidth() const { return 550; }
@@ -111,6 +113,8 @@ private:
bool hasPopupOrigin_ = false;
Point popupOrigin_;
float offsetY_ = 0.0f;
bool hasDropShadow_ = true;
};
class ListPopupScreen : public PopupScreen {
@@ -393,6 +397,10 @@ public:
void SetLiveUpdate(bool update) {
liveUpdate_ = update;
}
void SetHasDropShadow(bool has) {
hasDropShadow_ = has;
}
Event OnChange;
protected:
@@ -411,6 +419,7 @@ private:
ScreenManager *screenManager_;
bool restoreFocus_;
bool liveUpdate_ = false;
bool hasDropShadow_ = true;
};
class PopupTextInputChoice: public AbstractChoiceWithValueDisplay {
+8 -2
View File
@@ -892,8 +892,14 @@ void GameSettingsScreen::CreateViews() {
return UI::EVENT_CONTINUE;
});
systemSettings->Add(new PopupSliderChoiceFloat(&g_Config.fUITint, 0.0, 1.0, n->T("Color Tint"), 0.01f, screenManager()))->SetLiveUpdate(true);
systemSettings->Add(new PopupSliderChoiceFloat(&g_Config.fUISaturation, 0.0, 1.0, n->T("Color Saturation"), 0.01f, screenManager()))->SetLiveUpdate(true);
PopupSliderChoiceFloat *tint = new PopupSliderChoiceFloat(&g_Config.fUITint, 0.0, 1.0, n->T("Color Tint"), 0.01f, screenManager());
tint->SetHasDropShadow(false);
tint->SetLiveUpdate(true);
systemSettings->Add(tint);
PopupSliderChoiceFloat *saturation = new PopupSliderChoiceFloat(&g_Config.fUISaturation, 0.0, 2.0, n->T("Color Saturation"), 0.01f, screenManager());
saturation->SetHasDropShadow(false);
saturation->SetLiveUpdate(true);
systemSettings->Add(saturation);
static const char *backgroundAnimations[] = { "No animation", "Floating symbols", "Recent games", "Waves", "Moving background" };
systemSettings->Add(new PopupMultiChoice(&g_Config.iBackgroundAnimation, sy->T("UI background animation"), backgroundAnimations, 0, ARRAY_SIZE(backgroundAnimations), sy->GetName(), screenManager()));