mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-26 14:03:01 +00:00
Move menu options and debug options to 'misc'
This commit is contained in:
parent
5c9dcdeffd
commit
1ac7032606
5 changed files with 71 additions and 38 deletions
|
@ -49,6 +49,7 @@
|
||||||
#include "djui_panel_player.h"
|
#include "djui_panel_player.h"
|
||||||
#include "djui_panel_playerlist.h"
|
#include "djui_panel_playerlist.h"
|
||||||
#include "djui_panel_modlist.h"
|
#include "djui_panel_modlist.h"
|
||||||
|
#include "djui_panel_misc.h"
|
||||||
#include "djui_panel_camera.h"
|
#include "djui_panel_camera.h"
|
||||||
#include "djui_panel_controls.h"
|
#include "djui_panel_controls.h"
|
||||||
#include "djui_panel_controls_n64.h"
|
#include "djui_panel_controls_n64.h"
|
||||||
|
|
|
@ -34,6 +34,7 @@ void djui_panel_main_menu_create(struct DjuiBase* caller) {
|
||||||
djui_base_set_size(&selectionbox1->base, 1.0f, 32);
|
djui_base_set_size(&selectionbox1->base, 1.0f, 32);
|
||||||
djui_base_set_enabled(&selectionbox1->base, !configMenuRandom);
|
djui_base_set_enabled(&selectionbox1->base, !configMenuRandom);
|
||||||
sLevelBox = selectionbox1;
|
sLevelBox = selectionbox1;
|
||||||
|
defaultBase = &selectionbox1->base;
|
||||||
|
|
||||||
struct DjuiCheckbox* checkbox1 = djui_checkbox_create(&body->base, "Use Stage Music", &configMenuSound);
|
struct DjuiCheckbox* checkbox1 = djui_checkbox_create(&body->base, "Use Stage Music", &configMenuSound);
|
||||||
djui_base_set_size_type(&checkbox1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
djui_base_set_size_type(&checkbox1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
|
|
63
src/pc/djui/djui_panel_misc.c
Normal file
63
src/pc/djui/djui_panel_misc.c
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
#include "djui.h"
|
||||||
|
#include "src/pc/utils/misc.h"
|
||||||
|
#include "src/pc/configfile.h"
|
||||||
|
|
||||||
|
#ifdef DEVELOPMENT
|
||||||
|
void djui_panel_options_debug_create(struct DjuiBase* caller) {
|
||||||
|
f32 bodyHeight = 32 * 4 + 64 * 1 + 16 * 1;
|
||||||
|
|
||||||
|
struct DjuiBase* defaultBase = NULL;
|
||||||
|
struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\D\\#1be700\\E\\#00b3ff\\B\\#ffef00\\U\\#ff0800\\G");
|
||||||
|
struct DjuiFlowLayout* body = (struct DjuiFlowLayout*)djui_three_panel_get_body(panel);
|
||||||
|
|
||||||
|
{
|
||||||
|
struct DjuiCheckbox* checkbox1 = djui_checkbox_create(&body->base, "Disable Development Pause", &configDisableDevPause);
|
||||||
|
djui_base_set_size_type(&checkbox1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
|
djui_base_set_size(&checkbox1->base, 1.0f, 32);
|
||||||
|
defaultBase = &checkbox1->base;
|
||||||
|
|
||||||
|
struct DjuiButton* button2 = djui_button_create(&body->base, "Back");
|
||||||
|
djui_base_set_size_type(&button2->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
|
djui_base_set_size(&button2->base, 1.0f, 64);
|
||||||
|
djui_button_set_style(button2, 1);
|
||||||
|
djui_interactable_hook_click(&button2->base, djui_panel_menu_back);
|
||||||
|
}
|
||||||
|
|
||||||
|
djui_panel_add(caller, &panel->base, defaultBase);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void djui_panel_misc_create(struct DjuiBase* caller) {
|
||||||
|
#ifdef DEVELOPMENT
|
||||||
|
f32 bodyHeight = 64 * 3 + 16 * 2;
|
||||||
|
#else
|
||||||
|
f32 bodyHeight = 64 * 2 + 16 * 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct DjuiBase* defaultBase = NULL;
|
||||||
|
struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\M\\#1be700\\I\\#00b3ff\\S\\#ffef00\\C");
|
||||||
|
struct DjuiFlowLayout* body = (struct DjuiFlowLayout*)djui_three_panel_get_body(panel);
|
||||||
|
|
||||||
|
{
|
||||||
|
struct DjuiButton* button1 = djui_button_create(&body->base, "Menu Options");
|
||||||
|
djui_base_set_size_type(&button1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
|
djui_base_set_size(&button1->base, 1.0f, 64);
|
||||||
|
djui_interactable_hook_click(&button1->base, djui_panel_main_menu_create);
|
||||||
|
defaultBase = &button1->base;
|
||||||
|
|
||||||
|
#ifdef DEVELOPMENT
|
||||||
|
struct DjuiButton* button2 = djui_button_create(&body->base, "Debug");
|
||||||
|
djui_base_set_size_type(&button2->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
|
djui_base_set_size(&button2->base, 1.0f, 64);
|
||||||
|
djui_interactable_hook_click(&button2->base, djui_panel_options_debug_create);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct DjuiButton* button3 = djui_button_create(&body->base, "Back");
|
||||||
|
djui_base_set_size_type(&button3->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
|
djui_base_set_size(&button3->base, 1.0f, 64);
|
||||||
|
djui_button_set_style(button3, 1);
|
||||||
|
djui_interactable_hook_click(&button3->base, djui_panel_menu_back);
|
||||||
|
}
|
||||||
|
|
||||||
|
djui_panel_add(caller, &panel->base, defaultBase);
|
||||||
|
}
|
4
src/pc/djui/djui_panel_misc.h
Normal file
4
src/pc/djui/djui_panel_misc.h
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "djui.h"
|
||||||
|
|
||||||
|
void djui_panel_misc_create(struct DjuiBase* caller);
|
|
@ -6,36 +6,9 @@ void djui_panel_options_back(struct DjuiBase* caller) {
|
||||||
configfile_save(configfile_name());
|
configfile_save(configfile_name());
|
||||||
djui_panel_menu_back(caller);
|
djui_panel_menu_back(caller);
|
||||||
}
|
}
|
||||||
#ifdef DEVELOPMENT
|
|
||||||
void djui_panel_options_debug_create(struct DjuiBase* caller) {
|
|
||||||
f32 bodyHeight = 32 * 4 + 64 * 1 + 16 * 1;
|
|
||||||
|
|
||||||
struct DjuiBase* defaultBase = NULL;
|
|
||||||
struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\D\\#1be700\\E\\#00b3ff\\B\\#ffef00\\U\\#ff0800\\G");
|
|
||||||
struct DjuiFlowLayout* body = (struct DjuiFlowLayout*)djui_three_panel_get_body(panel);
|
|
||||||
|
|
||||||
{
|
|
||||||
struct DjuiCheckbox* checkbox1 = djui_checkbox_create(&body->base, "Disable Development Pause", &configDisableDevPause);
|
|
||||||
djui_base_set_size_type(&checkbox1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
|
||||||
djui_base_set_size(&checkbox1->base, 1.0f, 32);
|
|
||||||
|
|
||||||
struct DjuiButton* button2 = djui_button_create(&body->base, "Back");
|
|
||||||
djui_base_set_size_type(&button2->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
|
||||||
djui_base_set_size(&button2->base, 1.0f, 64);
|
|
||||||
djui_button_set_style(button2, 1);
|
|
||||||
djui_interactable_hook_click(&button2->base, djui_panel_menu_back);
|
|
||||||
}
|
|
||||||
|
|
||||||
djui_panel_add(caller, &panel->base, defaultBase);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void djui_panel_options_create(struct DjuiBase* caller) {
|
void djui_panel_options_create(struct DjuiBase* caller) {
|
||||||
#ifdef DEVELOPMENT
|
|
||||||
f32 bodyHeight = 64 * 8 + 16 * 7;
|
|
||||||
#else
|
|
||||||
f32 bodyHeight = 64 * 7 + 16 * 6;
|
f32 bodyHeight = 64 * 7 + 16 * 6;
|
||||||
#endif
|
|
||||||
|
|
||||||
struct DjuiBase* defaultBase = NULL;
|
struct DjuiBase* defaultBase = NULL;
|
||||||
struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\O\\#1be700\\P\\#00b3ff\\T\\#ffef00\\I\\#ff0800\\O\\#1be700\\N\\#00b3ff\\S");
|
struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\O\\#1be700\\P\\#00b3ff\\T\\#ffef00\\I\\#ff0800\\O\\#1be700\\N\\#00b3ff\\S");
|
||||||
|
@ -70,25 +43,16 @@ void djui_panel_options_create(struct DjuiBase* caller) {
|
||||||
djui_base_set_size(&button5->base, 1.0f, 64);
|
djui_base_set_size(&button5->base, 1.0f, 64);
|
||||||
djui_interactable_hook_click(&button5->base, djui_panel_sound_create);
|
djui_interactable_hook_click(&button5->base, djui_panel_sound_create);
|
||||||
|
|
||||||
#ifdef DEVELOPMENT
|
struct DjuiButton* button6 = djui_button_create(&body->base, "Misc");
|
||||||
struct DjuiButton* button6 = djui_button_create(&body->base, "Debug");
|
|
||||||
djui_base_set_size_type(&button6->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
djui_base_set_size_type(&button6->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
djui_base_set_size(&button6->base, 1.0f, 64);
|
djui_base_set_size(&button6->base, 1.0f, 64);
|
||||||
djui_interactable_hook_click(&button6->base, djui_panel_options_debug_create);
|
djui_interactable_hook_click(&button6->base, djui_panel_misc_create);
|
||||||
#endif
|
|
||||||
|
|
||||||
struct DjuiButton* button8 = djui_button_create(&body->base, "Menu Options");
|
|
||||||
djui_base_set_size_type(&button8->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
|
||||||
djui_base_set_size(&button8->base, 1.0f, 64);
|
|
||||||
djui_interactable_hook_click(&button8->base, djui_panel_main_menu_create);
|
|
||||||
|
|
||||||
struct DjuiButton* button7 = djui_button_create(&body->base, "Back");
|
struct DjuiButton* button7 = djui_button_create(&body->base, "Back");
|
||||||
djui_base_set_size_type(&button7->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
djui_base_set_size_type(&button7->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
djui_base_set_size(&button7->base, 1.0f, 64);
|
djui_base_set_size(&button7->base, 1.0f, 64);
|
||||||
djui_button_set_style(button7, 1);
|
djui_button_set_style(button7, 1);
|
||||||
djui_interactable_hook_click(&button7->base, djui_panel_options_back);
|
djui_interactable_hook_click(&button7->base, djui_panel_options_back);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
djui_panel_add(caller, &panel->base, defaultBase);
|
djui_panel_add(caller, &panel->base, defaultBase);
|
||||||
|
|
Loading…
Reference in a new issue