mirror of
https://github.com/Lorenzooone/cc3dsfs.git
synced 2026-12-05 15:35:12 -06:00
Start Implement inc/dec menu options
This commit is contained in:
@@ -8,8 +8,8 @@ PARMenu::~PARMenu() {
|
||||
}
|
||||
|
||||
void PARMenu::class_setup() {
|
||||
this->num_elements_per_screen = 5;
|
||||
this->min_elements_text_scaling_factor = num_elements_per_screen + 2;
|
||||
this->num_options_per_screen = 5;
|
||||
this->min_elements_text_scaling_factor = num_options_per_screen + 2;
|
||||
this->width_factor_menu = 16;
|
||||
this->width_divisor_menu = 9;
|
||||
this->base_height_factor_menu = 12;
|
||||
@@ -36,8 +36,8 @@ void PARMenu::reset_output_option() {
|
||||
this->selected_index = PAR_MENU_NO_ACTION;
|
||||
}
|
||||
|
||||
void PARMenu::set_output_option(int index) {
|
||||
if(index == -1)
|
||||
void PARMenu::set_output_option(int index, int action) {
|
||||
if(index == BACK_X_OUTPUT_OPTION)
|
||||
this->selected_index = PAR_MENU_BACK;
|
||||
else
|
||||
this->selected_index = index;
|
||||
@@ -47,7 +47,7 @@ int PARMenu::get_num_options() {
|
||||
return (*this->possible_pars).size();
|
||||
}
|
||||
|
||||
std::string PARMenu::get_string_option(int index) {
|
||||
std::string PARMenu::get_string_option(int index, int action) {
|
||||
return (*this->possible_pars)[index]->name;
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ void PARMenu::prepare(float menu_scaling_factor, int view_size_x, int view_size_
|
||||
int num_pages = this->get_num_pages();
|
||||
if(this->future_data.page >= num_pages)
|
||||
this->future_data.page = num_pages - 1;
|
||||
int start = this->future_data.page * this->num_elements_per_screen;
|
||||
for(int i = 0; i < this->num_elements_per_screen; i++) {
|
||||
int index = i + this->elements_start_id;
|
||||
int start = this->future_data.page * this->num_options_per_screen;
|
||||
for(int i = 0; i < this->num_options_per_screen + 1; i++) {
|
||||
int index = (i * this->single_option_multiplier) + this->elements_start_id;
|
||||
if(!this->future_enabled_labels[index])
|
||||
continue;
|
||||
int par_index = start + i;
|
||||
|
||||
Reference in New Issue
Block a user