Skip to content

Commit

Permalink
stuff, like dot
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheemsandfriends committed Jan 15, 2025
1 parent 9f8d1a3 commit 70c6f8a
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BetterTextureAtlas.jsfl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function _main()
bakedFilters = dataAdd[4] == "true";
bakedTweens = dataAdd[5] == "true";

var fileuri = xPan.saveBox;
var fileuri = xPan.saveBox.split("/").join("\\");
if (doc.path != null)
{
var docarr = doc.path.split("\\");
Expand Down
21 changes: 20 additions & 1 deletion bta_src/BTADialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@
<script>
eval(FLfile.read(fl.configURI+"Commands/bta_src/"+"xmlScripts/DialogXML"+".sjs"));

function test()
{
// fl.trace(fl.xmlui.set("ResSld", "123"));
fl.trace(fl.xmlui.get("test"));
}



</script>

<property id="test"/>

<radiogroup id="radioGroup" groupbox="true">

<grid>
Expand Down Expand Up @@ -192,13 +202,19 @@
<column/>
<column/>
<column/>
<column/>
<column/>
</columns>
<rows>
<row>
<label value="Export Path" control="saveBox" />
</row>
<row>
<choosefile size="40" value="$FILEURI" required="true" pathtype="absolute" id="saveBox" type="save" />
<textbox id="saveBox" value="$FILEURI" />
<button align="center" label="Examine" oncommand="getPath();" width="$BWI"/>


<!-- <choosefile size="40" value="$FILEURI" required="true" pathtype="absolute" id="saveBox" type="save" /> -->
<spacer/>
<label value=" "/>
<label value=" "/>
Expand Down Expand Up @@ -232,5 +248,8 @@
</row>
</rows>
</grid>

<!-- <flash src="$CONFIGDIRCommands\bta_src\folder stuff.swf" width="65" height="43"></flash> -->


</dialog>
Binary file added bta_src/folder stuff.swf
Binary file not shown.
2 changes: 1 addition & 1 deletion bta_src/save.scr
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function xmlData(symbols)

var buttonWidth = 0;
if (parseInt(version[0]) >= 20)
buttonWidth = 50;
buttonWidth = 45;

data = data.split("$BWI").join(buttonWidth);

Expand Down
Binary file added bta_src/testButton.swf
Binary file not shown.
Binary file modified bta_src/warningBTA.swf
Binary file not shown.
32 changes: 32 additions & 0 deletions bta_src/xmlScripts/DialogXML.sjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,38 @@ function algorithmSet()
algorithmSel();
}

function getPath()
{
var uri = null;
if (SaveData.version[0] > 12)
uri = fl.browseForFileURL("save", "Select destiny path", "(*.)", "");
else
{
uri = fl.browseForFileURL("save", "Select destiny path", {}, "|TEXT[*.||", "|*.||");
}

if (uri != null)
{
fl.xmlui.set("saveBox", formatPath(uri.substring(0, uri.length - 2)))
}
}

function formatPath(path)
{
// All good here im gonna assume
if (path.split("file:///").length < 1) {
return path;
}

path = path.substring(8);
var actP = path.charAt(0) + ":";
path = path.substring(2);

actP += path;

return actP;
}

fl.runScript(fl.configURI + "Commands/bta_src/save.scr", "theme");

function imgFormatSet()
Expand Down

0 comments on commit 70c6f8a

Please sign in to comment.