mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-06-09 20:51:05 -04:00
[Enhancement] Allow Non-unique Character Selections (#638)
* Update PortMenu.cpp * Update menus.c
This commit is contained in:
+5
-2
@@ -1547,8 +1547,11 @@ GLOBAL_ASM("asm/non_matchings/menus/main_menu_act.s")
|
||||
* hovered character at grid position `gridId`
|
||||
*/
|
||||
bool is_character_spot_free(s32 gridId) {
|
||||
s32 i;
|
||||
for (i = 0; i < ARRAY_COUNT(gCharacterGridSelections); i++) {
|
||||
if (CVarGetInteger("gUniqueCharacterSelections", true) == false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < ARRAY_COUNT(gCharacterGridSelections); i++) {
|
||||
if (gridId == gCharacterGridSelections[i]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,13 @@ void PortMenu::AddRulesets() {
|
||||
// AddWidget(path, "Number of Laps", WIDGET_CVAR_SLIDER_INT)
|
||||
// .CVar("gNumLaps")
|
||||
// .Options(UIWidgets::IntSliderOptions().Min().Max(20).Step(1).DefaultValue(3));
|
||||
|
||||
AddWidget(path, "Unique Character Selections", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar("gUniqueCharacterSelections")
|
||||
.Options(CheckboxOptions()
|
||||
.Tooltip(
|
||||
"Prevents players from selecting the same character")
|
||||
.DefaultValue(true)
|
||||
);
|
||||
AddWidget(path, "No Itemboxes", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar("gDisableItemboxes")
|
||||
.Options(CheckboxOptions().Tooltip(
|
||||
|
||||
Reference in New Issue
Block a user