summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/CDPositionPropertyEditor.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-12 22:33:32 -0800
committerFuwn <[email protected]>2026-02-12 22:33:32 -0800
commitc7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch)
treedf9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/scape/CDPositionPropertyEditor.java
downloadworldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz
worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip
Initial commit
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));
+ }
+}