Woaw, thanks a lot for your speed and efficiency !
It works exactly as I wanted, thanks again !!!
I added a checkbox to control if it imports in vertical mode or not.
It seems to work, here are the modifications I made :
Code:
----[ FIND ]---
// fixed duration text and checkbox
pal.animPnl.fixedDurationText = pal.animPnl.add("statictext", [10,120,pal.animPnl.startText.bounds.left-5,135], "Fixed Duration:");
pal.animPnl.fixedDurationCheckBox = pal.animPnl.add("checkbox", [pal.animPnl.startText.bounds.left, 120, pal.animPnl.startText.bounds.left +20, 135], "");
pal.animPnl.fixedDurationCheckBox.onClick = onFixedDurationCheckBoxClick;
pal.animPnl.durationText = pal.animPnl.add("edittext", [pal.animPnl.fixedDurationCheckBox.bounds.right+5,118,pal.animPnl.fixedDurationCheckBox.bounds.right+40,135], "0.5");
pal.animPnl.secondsText = pal.animPnl.add("statictext", [pal.animPnl.durationText.bounds.right+5,120,pal.animPnl.durationText.bounds.right+200,135], "seconds from Start to End");
pal.animPnl.durationText.visible = false;
pal.animPnl.secondsText.visible = false;
pal.animPnl.durationText.onChange = onDurationTextChange;
---[ AFTER, ADD ]---
// Vertical Text ?
pal.animPnl.verticalText = pal.animPnl.add("statictext", [200,95,pal.animPnl.startText.bounds.left-5+200,110], "Vertical Text ?");
pal.animPnl.verticalCheckBox = pal.animPnl.add("checkbox", [pal.animPnl.startText.bounds.left+190, 95, pal.animPnl.startText.bounds.left +210, 110], "");
Code:
---[ FIND ]---
// if this is the trails preset
else if (presetArray[presetIndex][presetProps][0] == "Trails")
{
if (presetArray[presetIndex][presetProps][1] == 1)
palette.animPnl.trailsCheckBox.value = true;
else
palette.animPnl.trailsCheckBox.value = false;
}
---[ AFTER, ADD ]---
// if this is the vertical text preset
else if (presetArray[presetIndex][presetProps][0] == "Vertical")
{
if (presetArray[presetIndex][presetProps][1] == 1)
palette.animPnl.verticalCheckBox.value = true;
else
palette.animPnl.verticalCheckBox.value = false;
}
Code:
---[ FIND ]---
// add the trails section to the preset
tempString = '["Trails",';
if (palette.animPnl.trailsCheckBox.value == true)
tempString += '1],';
else
tempString += '0],';
presetString[presetString.length] = tempString;
---[ AFTER, ADD ]---
// add the vertical section to the preset
tempString = '["Vertical",';
if (palette.animPnl.verticalCheckBox.value == true)
tempString += '1],';
else
tempString += '0],';
presetString[presetString.length] = tempString;
Code:
---[ FIND ]---
// proceed if any text was found
if (finalText != "")
{
currentWord = "";
--[ AFTER, ADD ]---
// this section adds a line return after each character to make vertical text if vertical text is required
if (palette.animPnl.verticalCheckBox.value == true)
{
var tempText = "";
for (var z = 0; z < finalText.length ; z++)
{
tempText += finalText.charAt(z) + "\r";
}
finalText = tempText;
}