mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
rarch_setting - start implementing ui_type
This commit is contained in:
parent
2bab38e857
commit
9c8c889477
@ -6241,6 +6241,7 @@ static bool setting_append_list(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_video_rotation;
|
||||
@ -6267,7 +6268,7 @@ static bool setting_append_list(
|
||||
START_SUB_GROUP(
|
||||
list,
|
||||
list_info,
|
||||
"Synchronization",
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_AUDIO_SYNC),
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
@ -6775,7 +6776,7 @@ static bool setting_append_list(
|
||||
START_SUB_GROUP(
|
||||
list,
|
||||
list_info,
|
||||
"Synchronization",
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_AUDIO_SYNC),
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
|
@ -1798,7 +1798,8 @@ bool CONFIG_BOOL(
|
||||
|
||||
if (!settings_list_append(list, list_info))
|
||||
return false;
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_CHECKBOX;
|
||||
if (flags != SD_FLAG_NONE)
|
||||
settings_data_list_current_add_flags(list, list_info, flags);
|
||||
|
||||
@ -1859,6 +1860,7 @@ bool CONFIG_UINT_ALT(
|
||||
if (!(settings_list_append(list, list_info)))
|
||||
return false;
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_SPINBOX;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1885,6 +1887,7 @@ bool CONFIG_UINT(
|
||||
if (!(settings_list_append(list, list_info)))
|
||||
return false;
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_SPINBOX;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx);
|
||||
@ -1977,6 +1980,7 @@ bool CONFIG_PATH(
|
||||
if (!(settings_list_append(list, list_info)))
|
||||
return false;
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_FILE_SELECTOR;
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
||||
#ifdef HAVE_MENU
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx);
|
||||
@ -2071,6 +2075,7 @@ bool CONFIG_STRING_OPTIONS(
|
||||
return false;
|
||||
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_STRING_COMBOBOX;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx);
|
||||
|
@ -46,6 +46,28 @@ enum setting_type
|
||||
ST_END_SUB_GROUP
|
||||
};
|
||||
|
||||
enum ui_setting_type
|
||||
{
|
||||
ST_UI_TYPE_NONE = 0,
|
||||
ST_UI_TYPE_CHECKBOX,
|
||||
ST_UI_TYPE_UINT_COLOR_BUTTON,
|
||||
ST_UI_TYPE_UINT_SPINBOX,
|
||||
ST_UI_TYPE_UINT_COMBOBOX,
|
||||
ST_UI_TYPE_UINT_RADIO_BUTTONS,
|
||||
ST_UI_TYPE_FLOAT_COLOR_BUTTON,
|
||||
ST_UI_TYPE_FLOAT_SPINBOX,
|
||||
ST_UI_TYPE_FLOAT_SLIDER_AND_SPINBOX,
|
||||
ST_UI_TYPE_SIZE_SPINBOX,
|
||||
ST_UI_TYPE_BIND_BUTTON,
|
||||
ST_UI_TYPE_DIRECTORY_SELECTOR,
|
||||
ST_UI_TYPE_FILE_SELECTOR,
|
||||
ST_UI_TYPE_FONT_SELECTOR,
|
||||
ST_UI_TYPE_STRING_COMBOBOX,
|
||||
ST_UI_TYPE_STRING_LINE_EDIT,
|
||||
ST_UI_TYPE_PASSWORD_LINE_EDIT,
|
||||
ST_UI_TYPE_LAST
|
||||
};
|
||||
|
||||
enum setting_flags
|
||||
{
|
||||
SD_FLAG_NONE = 0,
|
||||
@ -91,6 +113,7 @@ struct rarch_setting_group_info
|
||||
|
||||
struct rarch_setting
|
||||
{
|
||||
enum ui_setting_type ui_type;
|
||||
enum setting_type browser_selection_type;
|
||||
enum msg_hash_enums enum_idx;
|
||||
enum msg_hash_enums enum_value_idx;
|
||||
|
@ -32,7 +32,7 @@ QWidget *AudioPage::widget()
|
||||
|
||||
SettingsGroup *outputGroup = new SettingsGroup("Output");
|
||||
SettingsGroup *resamplerGroup = new SettingsGroup("Resampler");
|
||||
SettingsGroup *syncGroup = new SettingsGroup("Synchronization");
|
||||
SettingsGroup *syncGroup = new SettingsGroup(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_AUDIO_SYNC));
|
||||
SettingsGroup *dspGroup = new SettingsGroup("DSP plugin");
|
||||
SettingsGroup *volumeGroup = new SettingsGroup("Volume");
|
||||
|
||||
|
@ -130,7 +130,7 @@ QWidget *VideoPage::widget()
|
||||
{
|
||||
CheckableSettingsGroup *hardSyncGroup = new CheckableSettingsGroup(hardSyncSetting);
|
||||
|
||||
hardSyncGroup->addUIntSpinBox(MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES);
|
||||
hardSyncGroup->addUIntSpinBox(hardSyncSetting->enum_idx);
|
||||
|
||||
syncGroup->addRow(hardSyncGroup);
|
||||
}
|
||||
@ -238,9 +238,7 @@ void AspectRatioGroup::paintEvent(QPaintEvent *event)
|
||||
m_radioButton->setChecked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_comboBox->blockSignals(true);
|
||||
}
|
||||
|
||||
SettingsGroup::paintEvent(event);
|
||||
}
|
||||
@ -293,10 +291,10 @@ QWidget *CrtSwitchresPage::widget()
|
||||
void VideoPage::onResolutionComboIndexChanged(const QString &text)
|
||||
{
|
||||
char str[100];
|
||||
char *pch = NULL;
|
||||
const char *path = text.toUtf8().constData();
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
char *pch = NULL;
|
||||
const char *path = text.toUtf8().constData();
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
unsigned refreshrate = 0;
|
||||
|
||||
snprintf(str, sizeof(str), "%s", path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user