mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Add a slider test to the internals tab in system info. It's not quite working right...
This commit is contained in:
1 parent
ab3e5c11eb
commit
f8475e50b1
4 files changed
+7
-5
No files matched your search
@@ -368,7 +368,7 @@ void SliderPopupScreen::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
sliderValue_ = 0;
|
||||
|
||||
LinearLayout *vert = parent->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(UI::Margins(10, 10))));
|
||||
slider_ = new Slider(&sliderValue_, minValue_, maxValue_, new LinearLayoutParams(UI::Margins(10, 10)));
|
||||
slider_ = new Slider(&sliderValue_, minValue_, maxValue_, 1, new LinearLayoutParams(UI::Margins(10, 10)));
|
||||
slider_->OnChange.Handle(this, &SliderPopupScreen::OnSliderChange);
|
||||
slider_->RestrictChoices(fixedChoices_, numFixedChoices_);
|
||||
vert->Add(slider_);
|
||||
|
||||
+1
-4
@@ -610,10 +610,7 @@ private:
|
||||
|
||||
class Slider : public Clickable {
|
||||
public:
|
||||
Slider(int *value, int minValue, int maxValue, LayoutParams *layoutParams = 0)
|
||||
: Clickable(layoutParams), value_(value), showPercent_(false), minValue_(minValue), maxValue_(maxValue), paddingLeft_(5), paddingRight_(70), step_(1), repeat_(-1) {}
|
||||
|
||||
Slider(int *value, int minValue, int maxValue, int step = 1, LayoutParams *layoutParams = 0)
|
||||
Slider(int *value, int minValue, int maxValue, int step = 1, LayoutParams *layoutParams = nullptr)
|
||||
: Clickable(layoutParams), value_(value), showPercent_(false), minValue_(minValue), maxValue_(maxValue), paddingLeft_(5), paddingRight_(70), repeat_(-1) {
|
||||
step_ = step <= 0 ? 1 : step;
|
||||
}
|
||||
|
||||
@@ -948,6 +948,9 @@ void SystemInfoScreen::CreateInternalsTab(UI::ViewGroup *internals) {
|
||||
internals->Add(new InfoItem(si->T("Texture count"), StringFromFormat("%d", text->GetStringCacheSize())));
|
||||
internals->Add(new InfoItem(si->T("Data size"), NiceSizeFormat(text->GetCacheDataSize())));
|
||||
|
||||
internals->Add(new ItemHeader(si->T("Slider test")));
|
||||
internals->Add(new Slider(&testSliderValue_, 0, 100, 1, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)));
|
||||
|
||||
internals->Add(new ItemHeader(si->T("Notification tests")));
|
||||
internals->Add(new Choice(si->T("Error")))->OnClick.Add([&](UI::EventParams &) {
|
||||
std::string str = "Error " + CodepointToUTF8(0x1F41B) + CodepointToUTF8(0x1F41C) + CodepointToUTF8(0x1F914);
|
||||
|
||||
@@ -121,6 +121,8 @@ private:
|
||||
void CreateInternalsTab(UI::ViewGroup *internals);
|
||||
void CreateOpenGLExtsTab(UI::LinearLayout *gpuExtensions);
|
||||
void CreateVulkanExtsTab(UI::LinearLayout *gpuExtensions);
|
||||
|
||||
int testSliderValue_ = 0;
|
||||
};
|
||||
|
||||
class GPIGPOScreen : public PopupScreen {
|
||||
|
||||
Reference in new issue
Block a user