this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added options for tab size

+32
+31
src/studio/screens/mainmenu.c
··· 195 195 }; 196 196 197 197 #if defined(BUILD_EDITORS) 198 + static s32 optionTabSizeGet(void* data) 199 + { 200 + StudioMainMenu* main = data; 201 + s32 tsize = main->options->tabSize; 202 + 203 + s32 ret = 0; 204 + tsize /= 2; 205 + while(tsize != 0) { 206 + ret++; 207 + tsize /= 2; 208 + } 209 + 210 + return ret; 211 + } 212 + 213 + static void optionTabSizeSet(void* data, s32 pos) 214 + { 215 + s32 tsize = 1; 216 + for (s32 i = 0; i < pos; i++) 217 + tsize *= 2; 218 + StudioMainMenu* main = data; 219 + main->options->tabSize = tsize; 220 + } 221 + 222 + static MenuOption TabSizeOption = 223 + { 224 + OPTION_VALUES({"1", "2", "4", "8"}), 225 + optionTabSizeGet, 226 + optionTabSizeSet, 227 + }; 198 228 199 229 static s32 optionKeybindModeGet(void* data) 200 230 { ··· 307 337 308 338 static const MenuItem EditorMenu[] = 309 339 { 340 + {"TAB SIZE", NULL, &TabSizeOption, "Indentation is your friend"}, 310 341 {"KEYBIND MODE", NULL, &KeybindModeOption, "For the cool kids only"}, 311 342 {""}, 312 343 {"BACK", showOptionsMenu, .back = true},
+1
src/studio/system.h
··· 138 138 #if defined(BUILD_EDITORS) 139 139 enum KeybindMode keybindMode; 140 140 bool devmode; 141 + s32 tabSize; 141 142 #endif 142 143 } options; 143 144