Wrapped up tuxpaint side of complexity tool

Need to work more on N-Point Perspective tools.
(Also need to add configuration UI to `tuxpaint-config`)
This commit is contained in:
Bill Kendrick 2023-12-29 16:43:51 -08:00
parent 864084482a
commit 24d84731ff
4 changed files with 27 additions and 6 deletions

View file

@ -111,6 +111,7 @@ altprintnever, MULTI(alt_print_command_default)
autosave, POSBOOL(autosave_on_quit)
buttondistinction, NEGBOOL(no_button_distinction)
colorfile, MULTI(colorfile)
complexity, MULTI(complexity)
complexshapes, NEGBOOL(simple_shapes)
copying, IMM(copying)
currentlocalefont, NEGBOOL(all_locale_fonts)

View file

@ -12,6 +12,7 @@ struct cfginfo
const char *altprintcommand;
const char *autosave_on_quit;
const char *colorfile;
const char *complexity;
const char *datadir;
const char *disable_label;
const char *disable_brushspacing;

View file

@ -28370,6 +28370,21 @@ static void setup_config(char *argv[])
stamp_size_override = 10;
}
}
if (tmpcfg.complexity)
{
/* FIXME: Could maybe iterate the array of MAGIC_COMPLEXITY_LEVEL_NAMES[],
but just hard-coding for now -bjk 2023.12.29 */
if (!strcmp(tmpcfg.complexity, "novice")) {
magic_complexity_level = MAGIC_COMPLEXITY_NOVICE;
} else if (!strcmp(tmpcfg.complexity, "beginner")) {
magic_complexity_level = MAGIC_COMPLEXITY_BEGINNER;
} else if (!strcmp(tmpcfg.complexity, "advanced")) {
magic_complexity_level = MAGIC_COMPLEXITY_ADVANCED;
} else {
fprintf(stderr, "Ignoring unknown 'complexity' value \"%s\"\n", tmpcfg.complexity);
}
}
/* FIXME: make this dynamic (accelerometer or OLPC XO-1 rotation button) */
if (tmpcfg.rotate_orientation)
rotate_orientation = !strcmp(tmpcfg.rotate_orientation, "portrait"); /* alternative is "landscape" */