summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/CDPositionPropertyEditor.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/scape/CDPositionPropertyEditor.java')
-rw-r--r--NET/worlds/scape/CDPositionPropertyEditor.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/NET/worlds/scape/CDPositionPropertyEditor.java b/NET/worlds/scape/CDPositionPropertyEditor.java
new file mode 100644
index 0000000..1fe5453
--- /dev/null
+++ b/NET/worlds/scape/CDPositionPropertyEditor.java
@@ -0,0 +1,42 @@
+package NET.worlds.scape;
+
+import NET.worlds.console.Console;
+import NET.worlds.console.PolledDialog;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.Vector;
+
+public class CDPositionPropertyEditor extends PropEditor {
+ private boolean ending;
+
+ private CDPositionPropertyEditor(Property property, boolean ending) {
+ super(property);
+ this.ending = ending;
+ }
+
+ @Override
+ public PolledDialog edit(EditTile parent, String title) {
+ CDTrackInfo trackInfo = null;
+
+ try {
+ trackInfo = CDPlayerAction.getTrackList(0);
+ } catch (IOException var9) {
+ }
+
+ Vector trackList = new Vector();
+ if (trackInfo != null) {
+ for (int i = 0; i < trackInfo.getNumTracks(); i++) {
+ int frames = this.ending ? trackInfo.getEndFrames(i) : trackInfo.getStartFrames(i);
+ String type = this.ending ? Console.message("End") : Console.message("Start");
+ Object[] arguments = new Object[]{new String("" + frames), new String(type), new String("" + (i + 1))};
+ trackList.addElement(MessageFormat.format(Console.message("of-track"), arguments));
+ }
+ }
+
+ return new CDPositionEditorDialog(parent, title, this.property, trackList);
+ }
+
+ public static Property make(Property property, boolean ending) {
+ return property.setEditor(new CDPositionPropertyEditor(property, ending));
+ }
+}