2019-09-29 06:44:43 -05:00
|
|
|
function PostFXEditor::onDialogPush( %this )
|
|
|
|
|
{
|
|
|
|
|
//Apply the settings to the controls
|
|
|
|
|
postVerbose("% - PostFX Editor - Loading GUI.");
|
|
|
|
|
|
|
|
|
|
%this.refresh();
|
2019-12-03 00:09:18 -06:00
|
|
|
|
|
|
|
|
ESettingsWindowList.setSelectedById( 1 );
|
2019-09-29 06:44:43 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function PostFXEditor::refresh(%this)
|
|
|
|
|
{
|
2019-12-03 00:09:18 -06:00
|
|
|
PostEffectEditorList.clear();
|
|
|
|
|
|
2019-09-29 06:44:43 -05:00
|
|
|
%count = PostFXManager.Count();
|
|
|
|
|
for(%i=0; %i < %count; %i++)
|
|
|
|
|
{
|
|
|
|
|
%postEffect = PostFXManager.getKey(%i);
|
|
|
|
|
|
2019-12-03 00:09:18 -06:00
|
|
|
PostEffectEditorList.addRow( %i, %postEffect.getName() );
|
2019-09-29 06:44:43 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function PostFXEditor::apply(%this)
|
|
|
|
|
{
|
|
|
|
|
%count = PostFXManager.Count();
|
|
|
|
|
for(%i=0; %i < %count; %i++)
|
|
|
|
|
{
|
|
|
|
|
%postEffect = PostFXManager.getKey(%i);
|
|
|
|
|
|
|
|
|
|
if(isObject(%postEffect) && %postEffect.isMethod("applyFromPreset"))
|
|
|
|
|
{
|
|
|
|
|
%postEffect.applyFromPreset();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function PostFXEditor::revert(%this)
|
|
|
|
|
{
|
|
|
|
|
PostFXManager::loadPresetHandler($PostFXManager::currentPreset);
|
2019-12-03 00:09:18 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function PostEffectEditorList::onSelect( %this, %id, %text )
|
|
|
|
|
{
|
|
|
|
|
PostEffectEditorInspector.clearFields();
|
|
|
|
|
|
|
|
|
|
%postEffect = PostFXManager.getKey(%id);
|
|
|
|
|
|
|
|
|
|
if(isObject(%postEffect) && %postEffect.isMethod("populatePostFXSettings"))
|
|
|
|
|
{
|
|
|
|
|
%postEffect.populatePostFXSettings();
|
|
|
|
|
}
|
2019-09-29 06:44:43 -05:00
|
|
|
}
|