-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow script actions to use window for parameter selection #176
base: master
Are you sure you want to change the base?
Conversation
$CC21=btnEditorPresetValues:MenuButton | ||
$CC22=lblActionDescription:XNALabel | ||
$CC23=panelActionDescription:EditorPanel | ||
$CC24=btnEditorPresetValuesWindow:EditorButton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$CC21=btnEditorPresetValues:MenuButton | |
$CC22=lblActionDescription:XNALabel | |
$CC23=panelActionDescription:EditorPanel | |
$CC24=btnEditorPresetValuesWindow:EditorButton | |
$CC21=btnEditorPresetValues:MenuButton | |
$CC22=btnEditorPresetValuesWindow:EditorButton | |
$CC23=lblActionDescription:XNALabel | |
$CC24=panelActionDescription:EditorPanel |
Since this exists visually in the same space as btnEditorPresetValues
, and the [btnEditorPresetValuesWindow]
section has been placed under the [btnEditorPresetValues]
section, it would be logical for this to also be defined right below btnEditorPresetValues
in the list.
if (editedScript == null) | ||
return; | ||
|
||
if (lbActions.SelectedItem == null) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (editedScript == null) | |
return; | |
if (lbActions.SelectedItem == null) | |
return; | |
if (editedScript == null || lbActions.SelectedItem == null) | |
return; |
if (presetOption.Color != null) | ||
item.TextColor = (Color)presetOption.Color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (presetOption.Color != null) | |
item.TextColor = (Color)presetOption.Color; | |
if (presetOption.Color.HasValue) | |
item.TextColor = presetOption.Color.Value; |
Not really a complaint, I just prefer this syntax when working with nullable value types.
{ | ||
public int Value; | ||
public string Text; | ||
public Color? Color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, there is currently no way to actually assign this a value? The INI parsing code for preset options is unchanged.
public ScriptActionPresetOption() | ||
{ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm missing something, this constructor is never used, so it can be removed.
Pretty much what it says in the title, allows setting
UseWindowSelection
for script actions inScriptActions.ini
to use a selector window for the preset options (OptionN
) key. Particularly useful (and needed) for certain Phobos script actions that use a list of values that far exceeds what the context menu can show.A different button is displayed for opening the window on script actions that use it, from the one that opens the context menu.