mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
forget the empty template XD added delete demo function
This commit is contained in:
parent
c822d13109
commit
100e18d232
|
|
@ -217,6 +217,7 @@
|
|||
profile = "GuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "deleteDemoRecord();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
|
|||
|
|
@ -134,3 +134,19 @@ function demoPlaybackComplete()
|
|||
|
||||
Canvas.pushDialog(RecordingsDlg);
|
||||
}
|
||||
|
||||
function deleteDemoRecord()
|
||||
{
|
||||
%sel = RecordingsDlgList.getSelectedId();
|
||||
%rowText = RecordingsDlgList.getRowTextById(%sel);
|
||||
%file = $currentMod @ "/recordings/" @ getField(%rowText, 0) @ ".rec";
|
||||
|
||||
if(!isfile(%file))
|
||||
{
|
||||
RecordingsDlgList.removeRowById(%sel);
|
||||
return;
|
||||
}
|
||||
|
||||
RecordingsDlgList.removeRowById(%sel);
|
||||
fileDelete(%file);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue