mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
(QT/UI) By default, a CONFIG_FLOAT setting becomes a 'spinbox' UI type.
If a range is specified, it becomes a 'slider and spinbox' UI type.
This commit is contained in:
parent
0feb657e29
commit
051c877c62
@ -2474,6 +2474,10 @@ void menu_settings_list_current_add_range(
|
||||
{
|
||||
unsigned idx = list_info->index - 1;
|
||||
|
||||
if ((*list)[idx].type == ST_FLOAT)
|
||||
(*list)[list_info->index - 1].ui_type
|
||||
= ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX;
|
||||
|
||||
(*list)[idx].min = min;
|
||||
(*list)[idx].step = step;
|
||||
(*list)[idx].max = max;
|
||||
|
@ -1950,7 +1950,7 @@ bool CONFIG_FLOAT(
|
||||
if (!(settings_list_append(list, list_info)))
|
||||
return false;
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX;
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_FLOAT_SPINBOX;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx);
|
||||
|
@ -27,17 +27,16 @@ QWidget *NotificationsPage::widget()
|
||||
{
|
||||
QWidget *widget = new QWidget;
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
|
||||
CheckableSettingsGroup *notificationsGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_VIDEO_FONT_ENABLE);
|
||||
CheckableSettingsGroup *bgGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE);
|
||||
|
||||
notificationsGroup->addCheckBox(MENU_ENUM_LABEL_FPS_SHOW);
|
||||
notificationsGroup->addCheckBox(MENU_ENUM_LABEL_FRAMECOUNT_SHOW);
|
||||
notificationsGroup->addCheckBox(MENU_ENUM_LABEL_MEMORY_SHOW);
|
||||
notificationsGroup->addFontSelector(MENU_ENUM_LABEL_VIDEO_FONT_PATH);
|
||||
notificationsGroup->addFloatSpinBox(MENU_ENUM_LABEL_VIDEO_FONT_SIZE);
|
||||
notificationsGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X);
|
||||
notificationsGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y);
|
||||
notificationsGroup->add(MENU_ENUM_LABEL_FPS_SHOW);
|
||||
notificationsGroup->add(MENU_ENUM_LABEL_FRAMECOUNT_SHOW);
|
||||
notificationsGroup->add(MENU_ENUM_LABEL_MEMORY_SHOW);
|
||||
notificationsGroup->add(MENU_ENUM_LABEL_VIDEO_FONT_PATH);
|
||||
notificationsGroup->add(MENU_ENUM_LABEL_VIDEO_FONT_SIZE);
|
||||
notificationsGroup->add(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X);
|
||||
notificationsGroup->add(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y);
|
||||
notificationsGroup->addRow("Notification Color: ", new FloatColorButton(
|
||||
MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_RED,
|
||||
MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_GREEN,
|
||||
@ -74,16 +73,16 @@ QWidget *OverlayPage::widget()
|
||||
CheckableSettingsGroup *overlayGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE);
|
||||
CheckableSettingsGroup *inputsGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS);
|
||||
|
||||
overlayGroup->addCheckBox(MENU_ENUM_LABEL_OVERLAY_AUTOLOAD_PREFERRED);
|
||||
overlayGroup->addCheckBox(MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU);
|
||||
overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_AUTOLOAD_PREFERRED);
|
||||
overlayGroup->add(MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU);
|
||||
|
||||
inputsGroup->addUIntSpinBox(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT);
|
||||
|
||||
overlayGroup->addRow(inputsGroup);
|
||||
|
||||
overlayGroup->addFileSelector(MENU_ENUM_LABEL_OVERLAY_PRESET);
|
||||
overlayGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_OVERLAY_OPACITY);
|
||||
overlayGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_OVERLAY_SCALE);
|
||||
overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_PRESET);
|
||||
overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_OPACITY);
|
||||
overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_SCALE);
|
||||
|
||||
layout->addWidget(overlayGroup);
|
||||
|
||||
|
@ -181,7 +181,7 @@ public:
|
||||
this->addFloatSliderAndSpinBox(enum_idx);
|
||||
break;
|
||||
case ST_UI_TYPE_SIZE_SPINBOX:
|
||||
this->addSizeSpinBox(enum_idx);
|
||||
/* TODO/FIXME */
|
||||
break;
|
||||
case ST_UI_TYPE_BIND_BUTTON:
|
||||
/* TODO/FIXME - Why is the returntype void here and bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user