From ab9e1281ca1ccb3e5d01eb24934f81c1072114f2 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Thu, 12 Sep 2019 21:14:10 -0400 Subject: [PATCH] Four new presets + sort option. --- ObjEditor.java | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 108 insertions(+), 10 deletions(-) diff --git a/ObjEditor.java b/ObjEditor.java index 4f82f20..d6747b4 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -799,6 +799,8 @@ // SendInfo(" delay: " + sel.delay + newline, "regular"); // live, hide, ... //?? SendInfo(" Orig: " + maxima + newline, "regular"); + if (sel.GetTextures().pigmentdata != null) + si.SendInfo(" EMBEDDED ", "regular"); si.SendInfo((debug ? " Texture: " : " ") + sel.GetTextures(), "bold"); // SendInfo((debug ? " Material: " : " ") + sel.material + newline, "regular"); if (sel instanceof cMesh) @@ -1169,6 +1171,7 @@ JCheckBox selectableCB; JCheckBox hideCB; JCheckBox link2masterCB; + JCheckBox sortCB; JCheckBox markCB; JCheckBox randomCB; JCheckBox speedupCB; @@ -1412,11 +1415,14 @@ rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); rewindCB.setToolTipText("Rewind animation"); + sortCB = AddCheckBox(setupPanel2, "Sort", copy.sort); + sortCB.setToolTipText("Display from back to front"); + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); link2masterCB = AddCheckBox(setupPanel2, GetSupportText(), copy.link2master); - link2masterCB.setToolTipText("Attach to support"); + link2masterCB.setToolTipText("Link to support"); if (Globals.ADVANCED) { @@ -1847,6 +1853,28 @@ cButton fullsceneButton; + fullscenePanel.add(fullsceneButton = GetButton("fullscenes/alsace.png", !Globals.NIMBUSLAF)); + fullsceneButton.setToolTipText("Alsace!"); + fullsceneButton.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/Alsace.gfd", new iCallBack() + { + + public void Callback(Object obj) + { + LoadIt(obj); + } + + public void DragGesture() + { + } + }); + } + }); + fullscenePanel.add(fullsceneButton = GetButton("fullscenes/london.png", !Globals.NIMBUSLAF)); fullsceneButton.setToolTipText("Old London!"); fullsceneButton.addActionListener(new ActionListener() @@ -1854,7 +1882,7 @@ @Override public void actionPerformed(ActionEvent e) { - /*Object3D readobj =*/ ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/oldlondon.gfd", new iCallBack() + ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/oldlondon.gfd", new iCallBack() { public void Callback(Object obj) @@ -1869,6 +1897,8 @@ } }); + fullscenePanel.Return(); + fullscenePanel.add(fullsceneButton = GetButton("fullscenes/venice.png", !Globals.NIMBUSLAF)); fullsceneButton.setToolTipText("Venice!"); fullsceneButton.addActionListener(new ActionListener() @@ -1876,7 +1906,29 @@ @Override public void actionPerformed(ActionEvent e) { - /*Object3D readobj =*/ ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/Venice.gfd", new iCallBack() + ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/Venice.gfd", new iCallBack() + { + + public void Callback(Object obj) + { + LoadIt(obj); + } + + public void DragGesture() + { + } + }); + } + }); + + fullscenePanel.add(fullsceneButton = GetButton("fullscenes/viking.png", !Globals.NIMBUSLAF)); + fullsceneButton.setToolTipText("Viking Village!"); + fullsceneButton.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/VikingVillage.gfd", new iCallBack() { public void Callback(Object obj) @@ -1892,12 +1944,53 @@ }); fullscenePanel.Return(); - fullscenePanel.add(new cGridBag()); - fullscenePanel.add(new cGridBag()); + + fullscenePanel.add(fullsceneButton = GetButton("fullscenes/yvoire.png", !Globals.NIMBUSLAF)); + fullsceneButton.setToolTipText("Yvoire!"); + fullsceneButton.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/Yvoire.gfd", new iCallBack() + { + + public void Callback(Object obj) + { + LoadIt(obj); + } + + public void DragGesture() + { + } + }); + } + }); + + fullscenePanel.add(fullsceneButton = GetButton("fullscenes/skullcove.png", !Globals.NIMBUSLAF)); + fullsceneButton.setToolTipText("Skull Cove Island!"); + fullsceneButton.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/SkullCoveIsland.gfd", new iCallBack() + { + + public void Callback(Object obj) + { + LoadIt(obj); + } + + public void DragGesture() + { + } + }); + } + }); + fullscenePanel.Return(); - fullscenePanel.add(new cGridBag()); - fullscenePanel.add(new cGridBag()); - fullscenePanel.Return(); + fullscenePanel.add(new cGridBag()); fullscenePanel.add(new cGridBag()); fullscenePanel.Return(); @@ -4196,6 +4289,11 @@ copy.Touch(); // display list issue objEditor.refreshContents(true); // To show item colors return; + } else if (event.getSource() == sortCB) + { + copy.sort ^= true; + objEditor.refreshContents(); + return; } else if (event.getSource() == link2masterCB) { copy.link2master ^= true; @@ -4959,7 +5057,7 @@ void ImportGFD() { FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); - browser.show(); + browser.setVisible(true); String filename = browser.getFile(); if (filename != null && filename.length() > 0) { @@ -5934,7 +6032,7 @@ { try { - url = new java.net.URL("file://" + fullname); + url = new java.net.URL("file:///" + fullname); } catch (Exception e2) { e2.printStackTrace(); -- Gitblit v1.6.2