MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / DrawSettingInfoSetting

Method DrawSettingInfoSetting

pcsx2/ImGui/FullscreenUI_Settings.cpp:1597–1645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1595}
1596
1597void FullscreenUI::DrawSettingInfoSetting(SettingsInterface* bsi, const char* section, const char* key, const SettingInfo& si,
1598 const char* translation_ctx)
1599{
1600 SmallString title;
1601 title.format(ICON_FA_GEAR " {}", Host::TranslateToStringView(translation_ctx, si.display_name));
1602 switch (si.type)
1603 {
1604 case SettingInfo::Type::Boolean:
1605 DrawToggleSetting(bsi, title.c_str(), si.description, section, key, si.BooleanDefaultValue(), true, false);
1606 break;
1607
1608 case SettingInfo::Type::Integer:
1609 DrawIntRangeSetting(bsi, title.c_str(), si.description, section, key, si.IntegerDefaultValue(), si.IntegerMinValue(),
1610 si.IntegerMaxValue(), si.format, true);
1611 break;
1612
1613 case SettingInfo::Type::IntegerList:
1614 DrawIntListSetting(
1615 bsi, title.c_str(), si.description, section, key, si.IntegerDefaultValue(), si.options, 0, true, si.IntegerMinValue());
1616 break;
1617
1618 case SettingInfo::Type::Float:
1619 DrawFloatSpinBoxSetting(bsi, title.c_str(), si.description, section, key, si.FloatDefaultValue(), si.FloatMinValue(),
1620 si.FloatMaxValue(), si.FloatStepValue(), si.multiplier, si.format, true);
1621 break;
1622
1623 case SettingInfo::Type::StringList:
1624 {
1625 if (si.get_options)
1626 {
1627 DrawStringListSetting(bsi, title.c_str(), si.description, section, key, si.StringDefaultValue(), si.get_options, true);
1628 }
1629 else
1630 {
1631 DrawStringListSetting(
1632 bsi, title.c_str(), si.description, section, key, si.StringDefaultValue(), si.options, si.options, 0, false, true,
1633 LAYOUT_MENU_BUTTON_HEIGHT, g_large_font, g_medium_font, translation_ctx);
1634 }
1635 }
1636 break;
1637
1638 case SettingInfo::Type::Path:
1639 DrawPathSetting(bsi, title.c_str(), section, key, si.StringDefaultValue(), true);
1640 break;
1641
1642 default:
1643 break;
1644 }
1645}
1646
1647void FullscreenUI::SwitchToSettings()
1648{

Callers

nothing calls this directly

Calls 11

BooleanDefaultValueMethod · 0.80
IntegerDefaultValueMethod · 0.80
IntegerMinValueMethod · 0.80
IntegerMaxValueMethod · 0.80
FloatDefaultValueMethod · 0.80
FloatMinValueMethod · 0.80
FloatMaxValueMethod · 0.80
FloatStepValueMethod · 0.80
StringDefaultValueMethod · 0.80
formatMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected