EDIT MODE Cycling Style options bug / feature

So, when going through EDIT MODE with a font that does not have a PRE_ON sound, I am noticing a discrepancy in the setting options for Style Settings.

When I rotate through all the options, in EDIT_STYLE_SETTINGS, going clockwise, it goes:


SWING OPTIONS
EMITTER SIZE
OFF OPTIONS
STYLE OPTIONS
STYLE OPTIONS 2 … etc

But rotating counter clockwise, i get the following in reverse order:


SWING OPTIONS
EMITTER SIZE
OFF OPTIONS
PREON SIZE
STYLE OPTIONS
STYLE OPTIONS 2 … etc

I think the relevant code is in Saber_fett263_buttons.h line 3991 - 4005 ish

      case MENU_STYLE_SETTING_SUB:
        for (int i = 0; i < (int)NELEM(int_arg_menu_); i++) {
          arg_dial_ += direction;
          if (direction > 0) {
            // Detect preon.wav for setting preview (cannot be shown without so skip over)
            if (!SFX_preon && (int_arg_menu_[arg_dial_] == PREON_OPTION_ARG || int_arg_menu_[arg_dial_] == PREON_SIZE_ARG)) arg_dial_ = 0;
            if (arg_dial_ > (int)NELEM(int_arg_menu_) - 1) arg_dial_ = 0;
          } else {
            // Detect preon.wav for setting preview (cannot be shown without so skip over)            
            if (!SFX_preon && (int_arg_menu_[arg_dial_] == PREON_OPTION_ARG || int_arg_menu_[arg_dial_] == PREON_SIZE_ARG)) arg_dial_ = NELEM(int_arg_menu_) - 3;
            if (arg_dial_ < 0) arg_dial_ = NELEM(int_arg_menu_) - 1;
          }
          set_num_ = int_arg_menu_[arg_dial_];
          if (style_parser.UsesArgument(current_preset_.GetStyle(blade_num_), set_num_ + 2)) break;
        }

On a related note about cylcing options, I have a feature request.

When cycling the available settings for each option, is it possible to make the options loop back around when they reach the end?
Let’s say we have 15 “Style Options” available in the style under STYLE_OPTION_ARG, when cycling through, it gets to OPTION 16, which is the same as OPTION 0, and 17 is the same as 2, etc…
Can it be made to know how many options there are, and cycle loop back to OPTION 0 when it reaches the end?

Similarly, Is it possible to make it cycle backwards too? ATM when you try to rotate backwards past 0 it says “MINIMUM SETTING”, if it knew the max count, it could loop back to OPTION 15 instead?

I have a style with 15-20 options in some of the settings. :3

Edit Mode’s menu only let’s you set arguments contained in the style and/or supported by the preset, it skips arguments not in the current style you’re editing.
Since preon effects rely on preon.wav existing they will not be selectable (or run) in fonts without the sound.

The menu doesn’t “know” how many options are in a style so there’s no way to consistently go around, it allows for 0 ~ 32768 so we only go forward from 0 to prevent odd behavior when you have options with remainders. You can go backwards to 0, but can’t go backwards from 0 as 32768 won’t always be the last option.

Yes, I know.

On a font that is missing preon.wav files, it should skip both PREON_OPTION and PREON_SIZE, yes?

Cycling Clockwise, it skips both.
Cycling counter-clockwise, it only skips PREON_OPTION, it doesn’t skip PREON_SIZE.

My Style code only uses PREON_SIZE in it’s PREON_OPTIONS.

On a related note, i’m not getting any verbal sound numbers when cycling INITION_TIME, IGNITION_DELAY, RETRATION_TIME, or RETRACTION_DELAY, should it say the setting? the only thing I can get it to say is “AUTO” or “MINIMUM SETTING” at what appears to be the minimum setting.

For IGNITION_TIME/RETRACTION_TIME, I’m able to cycle backwards repeatedly, and each time the blade does SetInOut() and says Auto, even after it’s reached it’s minimum setting.

It should skip both, looking at the code it should be working as expected, might have to do a little testing but not sure when I’ll have time.

No, you should visually “see” the ignition or retraction timing. Because we’re showing the animation it “shows” you the timing rather than saying it.

For Ignition and Retraction Times if you set to “0” you are using Auto Timing (WavLen) function, so it let’s you know that rather than a fixed time you are now in “Auto” timing. You can’t go below 0 (or around from 0), so repeatedly going down from 0 is just “Auto”.

Yea, going “backwards” counter clockwise doesn’t skip PREON_SIZE.

Ok, that makes sense for ignition/retraction time/delay.

I’m still trying to figure out where/how to use IGNITION_OPTION2_ARG in my styles, and noticed it says the setting numbers. So I was just curious the Time/Delays were supposed to as well.

This is intended for BEND function, it’s handled in my OS7 library already :wink:

Yea, I’ve seen a couple examples of it in TrInOutHelper<> so far. Seems interesting.

Ok, so, silly question about the BendTimePow thing…

I’m using your style library OS7 phase 1 website tool, i was playing with the settings, on the slider for time bending. How do i reset the slider to the default setting (no bend), or Do you know what numbers feed into BendTimePow to make it not bend any?

EDIT: I was able to reset it by Refreshing the whole page, but that reset all the options too :-/

Ok, I don’t seem to be able to plug BendTimePowInvX<> into some places that use template classes.
Namely: Percentage<>

	Percentage<
			BendTimePowInvX<
				IgnitionTime<300>,
				Mult<
					IntArg<IGNITION_OPTION2_ARG,10992>,
					Int<98304>
				>
			>,
			66
		>

And StrobeL<>

	StrobeL<
		RgbArg<IGNITION_COLOR_ARG, Rgb<127, 127, 0>>,
		Int<100>, 
		BendTimePowInvX<
			IgnitionTime<300>,
			Mult<
				IntArg<IGNITION_OPTION2_ARG,10992>,
				Int<98304>
			>
		>
	>

Scale<> and Mult<> don’t like it either. :-/

both these function’s templates say they take a function class for where i’m trying to use BendTimePowInvX… Hmmm

BendTimePowInvX and friends only work if they are the direct descendants of a transition. They aren’t real functions, they just tell the transition to do time differently.

10922 is “No Bend” in library styles. I will see about displaying the slider value in a future update.

Weird, because normally it’s 32768

The style code multiplies by 3 to reach 98304 for power of 3.

I’m adding a way for the menu to know this in OS8.x btw… :slight_smile:

PS: Don’t read the code, that way madness lies…

3 Likes

<3

I’m looking forward to trying it.