summaryrefslogtreecommitdiff
path: root/NET/worlds/console/DefaultConsole.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/console/DefaultConsole.java')
-rw-r--r--NET/worlds/console/DefaultConsole.java2842
1 files changed, 2842 insertions, 0 deletions
diff --git a/NET/worlds/console/DefaultConsole.java b/NET/worlds/console/DefaultConsole.java
new file mode 100644
index 0000000..cf40867
--- /dev/null
+++ b/NET/worlds/console/DefaultConsole.java
@@ -0,0 +1,2842 @@
+/* */ package NET.worlds.console;
+/* */
+/* */ import NET.worlds.core.ArchiveMaker;
+/* */ import NET.worlds.core.IniFile;
+/* */ import NET.worlds.core.Std;
+/* */ import NET.worlds.network.Galaxy;
+/* */ import NET.worlds.network.NetUpdate;
+/* */ import NET.worlds.network.RemoteFileConst;
+/* */ import NET.worlds.network.URL;
+/* */ import NET.worlds.network.WorldServer;
+/* */ import NET.worlds.scape.BooleanPropertyEditor;
+/* */ import NET.worlds.scape.CDAudio;
+/* */ import NET.worlds.scape.CDControl;
+/* */ import NET.worlds.scape.CDPlayerAction;
+/* */ import NET.worlds.scape.EquipAction;
+/* */ import NET.worlds.scape.FrameEvent;
+/* */ import NET.worlds.scape.MusicManager;
+/* */ import NET.worlds.scape.NoSuchPropertyException;
+/* */ import NET.worlds.scape.Pilot;
+/* */ import NET.worlds.scape.PosableShape;
+/* */ import NET.worlds.scape.Property;
+/* */ import NET.worlds.scape.RenderWare;
+/* */ import NET.worlds.scape.Restorer;
+/* */ import NET.worlds.scape.Saver;
+/* */ import NET.worlds.scape.SelectAvatarAction;
+/* */ import NET.worlds.scape.SendURLAction;
+/* */ import NET.worlds.scape.TeleportAction;
+/* */ import NET.worlds.scape.TooNewException;
+/* */ import NET.worlds.scape.URLPropertyEditor;
+/* */ import NET.worlds.scape.VehicleShape;
+/* */ import NET.worlds.scape.World;
+/* */ import java.awt.BorderLayout;
+/* */ import java.awt.CardLayout;
+/* */ import java.awt.CheckboxMenuItem;
+/* */ import java.awt.Color;
+/* */ import java.awt.Component;
+/* */ import java.awt.Container;
+/* */ import java.awt.Dimension;
+/* */ import java.awt.Event;
+/* */ import java.awt.FlowLayout;
+/* */ import java.awt.Font;
+/* */ import java.awt.FontMetrics;
+/* */ import java.awt.GridLayout;
+/* */ import java.awt.Label;
+/* */ import java.awt.Menu;
+/* */ import java.awt.MenuItem;
+/* */ import java.awt.Panel;
+/* */ import java.awt.Point;
+/* */ import java.awt.PopupMenu;
+/* */ import java.awt.Rectangle;
+/* */ import java.awt.TextField;
+/* */ import java.awt.Toolkit;
+/* */ import java.io.File;
+/* */ import java.io.FilenameFilter;
+/* */ import java.io.IOException;
+/* */ import java.io.PrintStream;
+/* */ import java.text.Collator;
+/* */ import java.text.DateFormat;
+/* */ import java.text.MessageFormat;
+/* */ import java.util.Date;
+/* */ import java.util.Locale;
+/* */ import java.util.MissingResourceException;
+/* */ import java.util.NoSuchElementException;
+/* */ import java.util.ResourceBundle;
+/* */ import java.util.StringTokenizer;
+/* */ import java.util.Vector;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class DefaultConsole
+/* */ extends Console
+/* */ implements DialogReceiver, ImageButtonsCallback, RemoteFileConst
+/* */ {
+/* */ MenuItem aboutItem;
+/* */ MenuItem statisticsItem;
+/* */ MenuItem upgradeItem;
+/* */ MenuItem channelItem;
+/* */ MenuItem infoItem;
+/* */ MenuItem sleepItem;
+/* */ MenuItem helpItem;
+/* */ MenuItem gettingStartedItem;
+/* */ MenuItem serverItem;
+/* */ MenuItem numVisItem;
+/* */ MenuItem checkAccountItem;
+/* */ MenuItem becomeVIPItem;
+/* */ MenuItem toggleVoiceChatItem;
+/* */ MenuItem chatItem;
+/* */ MenuItem shaperHelpItem;
+/* */ MenuItem inventoryItem;
+/* */ MenuItem checkInventoryItem;
+/* */ MenuItem bankItem;
+/* */ MenuItem ubuItem;
+/* */ MenuItem proxyServerItem;
+/* */ MenuItem musicManItem;
+/* */ MenuItem condenseItem;
+/* */ MenuItem expandItem;
+/* */ MenuItem i18nTest;
+/* */ MenuItem currentLang;
+/* */ Menu switchLang;
+/* 368 */ Vector<MenuItem> downItems = null;
+/* 369 */ Vector<MenuItem> langItems = null;
+/* 370 */ Vector<MenuItem> fontItems = null;
+/* */
+/* */ static final String LANGUAGES = "languages.lst";
+/* */
+/* */ static final String FONTS = "fonts.lst";
+/* 375 */ Vector<CheckboxMenuItem> viewItems = null; Vector<CheckboxMenuItem> camSpeedItems = null;
+/* */
+/* */ CheckboxMenuItem currentViewItem;
+/* */ CheckboxMenuItem currentCamSpeedItem;
+/* */ ImageButtons driveButton;
+/* */ ImageButtons quitButton;
+/* */ ImageButtons exploreButton;
+/* */ ImageButtons menuButtons;
+/* */ ImageButtons adCubeButton;
+/* 384 */ String defaultAd = IniFile.override().getIniString("defaultAd",
+/* 385 */ "home:adworlds.cmp");
+/* 386 */ AdPart ad = new AdPart(URL.make(this.defaultAd));
+/* */ ColorFiller adFiller;
+/* 388 */ ChatPart chat = new ChatPart();
+/* 389 */ RenderCanvas render = new RenderCanvas(this, new Dimension(560, 360));
+/* */ Panel renderAndUniverse;
+/* */ UniversePanel universe;
+/* */ CardLayout renderCard;
+/* */
+/* 394 */ public UniversePanel getUniversePanel() { return this.universe; }
+/* */
+/* */
+/* */
+/* 398 */ InventoryPart inventory = new InventoryPart();
+/* 399 */ WorldsMarkPart marks = new WorldsMarkPart();
+/* 400 */ FriendsListPart friends = new FriendsListPart();
+/* 401 */ ActionsPart actions = new ActionsPart();
+/* 402 */ MuteListPart mutes = new MuteListPart();
+/* 403 */ MapPart map = new MapPart();
+/* 404 */ SavedAvPart savedAvs = new SavedAvPart();
+/* 405 */ private static Font font = new Font(Console.message("ConsoleFont"),
+/* 406 */ 0, 12);
+/* 407 */ private static Font mfont = new Font(Console.message("MenuFont"),
+/* 408 */ 0, 12);
+/* */
+/* 410 */ private static int chatLines = IniFile.gamma().getIniInt("ChatLines", 6);
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 418 */ private static int maxWebSize = 540;
+/* */
+/* */ CDControl cdcontrol;
+/* */
+/* */ boolean playedCD;
+/* */
+/* */ MenuItem cdPlayerItem;
+/* */
+/* */ MenuItem volumeItem;
+/* */
+/* */ MenuItem graphicsItem;
+/* */ MenuItem nametagItem;
+/* */ MenuItem chatBoxItem;
+/* */ MenuItem broadcastToRoom;
+/* */ MenuItem broadcastToAll;
+/* */ MenuItem bootSomeone;
+/* */ CheckboxMenuItem orthographicViewItem;
+/* */ MenuItem recorderPlayItem;
+/* */ MenuItem recorderRecItem;
+/* */ MenuItem recorderStopItem;
+/* */ boolean universeMode;
+/* 439 */ private static final int[] menuButtonHeights = { 23, 21, 21, 21, 21, 21,
+/* 440 */ 25, -29 };
+/* */ private Vector<CameraView> viewNames;
+/* */ private Vector<CameraSpeed> speedNames;
+/* */
+/* */ public class CameraView {
+/* 445 */ public CameraView(String vn, int vid) { this.viewName = vn;
+/* 446 */ this.viewID = vid;
+/* */ }
+/* */
+/* */ public String viewName;
+/* */ public int viewID; }
+/* */
+/* */ public class CameraSpeed { public String speedName;
+/* */ public int speedID;
+/* */
+/* 455 */ public CameraSpeed(String sn, int sid) { this.speedName = sn;
+/* 456 */ this.speedID = sid;
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ private static final int HELP = 0;
+/* */
+/* */
+/* */
+/* */
+/* */ private static final int OPTIONS = 1;
+/* */
+/* */
+/* */
+/* */
+/* */ private static final int WORLDSMAIL = 2;
+/* */
+/* */
+/* */
+/* */ private static final int WORLDSMARK = 3;
+/* */
+/* */
+/* */
+/* */ private static final int LETS = 4;
+/* */
+/* */
+/* */
+/* */ private static final int ACTIONS = 5;
+/* */
+/* */
+/* */
+/* */ private static final int VIP = 6;
+/* */
+/* */
+/* */
+/* */ public void printLine(String msg)
+/* */ {
+/* 496 */ this.chat.println(msg);
+/* 497 */ super.printLine(msg);
+/* */ }
+/* */
+/* */ protected void printWhisperFrom(String from, String msg)
+/* */ {
+/* 502 */ WhisperManager.whisperManager().printFrom(from, msg);
+/* */ }
+/* */
+/* */ protected void printWhisperTo(String to, String msg)
+/* */ {
+/* 507 */ WhisperManager.whisperManager().printTo(to, msg);
+/* */ }
+/* */
+/* */ protected void startWhisperingTo(String to)
+/* */ {
+/* 512 */ WhisperManager.whisperManager().startTo(to);
+/* */ }
+/* */
+/* 515 */ static String loadingString = Console.message("Loading");
+/* 516 */ static String arrowKeyMsg = Console.message("Use-arrow-keys");
+/* 517 */ String statusMessage = arrowKeyMsg;
+/* */ String overrideMessage;
+/* 519 */ String lastStatus = "";
+/* 520 */ int lastUpdateTime = 0;
+/* 521 */ boolean wasTeleporting = false;
+/* */
+/* */ private int lastVMCheck;
+/* */ private int lastVMBigWarning;
+/* */ Component bottom;
+/* */ Component top;
+/* 527 */ Label status = new UnpaddedLabel("", 2);
+/* 528 */ Label yourName = new UnpaddedLabel("", 0);
+/* */
+/* */ public DefaultConsole()
+/* */ {
+/* 532 */ init();
+/* 533 */ loadViewNames();
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 539 */ this.speedNames = new Vector();
+/* 540 */ this.speedNames
+/* 541 */ .addElement(new CameraSpeed("Slow", 1));
+/* 542 */ this.speedNames.addElement(new CameraSpeed("Medium",
+/* 543 */ 2));
+/* 544 */ this.speedNames
+/* 545 */ .addElement(new CameraSpeed("Fast", 3));
+/* */ }
+/* */
+/* */ public void loadViewNames()
+/* */ {
+/* 550 */ this.viewNames = new Vector();
+/* 551 */ this.viewNames.addElement(new CameraView("First-person",
+/* 552 */ 1));
+/* 553 */ this.viewNames.addElement(new CameraView("Low-first-person",
+/* 554 */ 2));
+/* 555 */ this.viewNames.addElement(new CameraView("Waist", 3));
+/* 556 */ this.viewNames.addElement(new CameraView("Shoulder",
+/* 557 */ 4));
+/* 558 */ this.viewNames.addElement(new CameraView("Head", 5));
+/* 559 */ this.viewNames.addElement(new CameraView("Overhead",
+/* 560 */ 6));
+/* 561 */ this.viewNames
+/* 562 */ .addElement(new CameraView("Behind", 7));
+/* 563 */ this.viewNames.addElement(new CameraView("Wide-shot",
+/* 564 */ 8));
+/* */
+/* 566 */ if (Gamma.getShaper() != null) {
+/* 567 */ this.viewNames.addElement(new CameraView("Orthographic",
+/* 568 */ 9));
+/* */ }
+/* */ }
+/* */
+/* */ public void setOrthoEnabled(boolean in) {
+/* 573 */ if (this.orthographicViewItem != null) {
+/* 574 */ this.orthographicViewItem.setEnabled(in);
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void loadInit()
+/* */ {
+/* 584 */ super.loadInit();
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void removeUseArrowStatusMsg()
+/* */ {
+/* 593 */ if (this.statusMessage == arrowKeyMsg) {
+/* 594 */ this.statusMessage = "";
+/* */ }
+/* */ }
+/* */
+/* */ public void overrideStatusMsg(String msg) {
+/* 599 */ synchronized (this.status) {
+/* 600 */ this.overrideMessage = msg;
+/* 601 */ if (msg != null) {
+/* 602 */ this.status.setText(msg);
+/* */ } else {
+/* 604 */ this.status.setText(this.lastStatus);
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */ public String message(String Id, Locale currentLocale) {
+/* 610 */ Locale.setDefault(currentLocale);
+/* 611 */ Console.println(currentLocale.getDisplayName());
+/* */ try
+/* */ {
+/* 614 */ ResourceBundle messages = ResourceBundle.getBundle(
+/* 615 */ "MessagesBundle", currentLocale);
+/* 616 */ return messages.getString(Id);
+/* */ } catch (MissingResourceException e) {}
+/* 618 */ return "NO MESSAGE for " + Id;
+/* */ }
+/* */
+/* */
+/* */
+/* 623 */ static String[] lNames = lpList();
+/* 624 */ static int lLength = lNames.length;
+/* 625 */ static MenuItem[] lLangs = new MenuItem[lLength];
+/* 626 */ static Locale[] newLocale = new Locale[lLength];
+/* 627 */ static String[][] lCodes = new String[lLength][2];
+/* */
+/* */
+/* */
+/* 631 */ Vector<String> lList = new Vector();
+/* 632 */ Vector<String> sList = new Vector();
+/* 633 */ int[] lSizes = new int[10];
+/* 634 */ int dLength = dpList(this.lList, this.sList, this.lSizes);
+/* 635 */ MenuItem[] dLangs = this.dLength == 0 ? null : new MenuItem[this.dLength];
+/* 636 */ Locale[] newdLocale = this.dLength == 0 ? null : new Locale[this.dLength];
+/* */
+/* */
+/* 639 */ Vector<String> flList = new Vector();
+/* 640 */ Vector<String> fsList = new Vector();
+/* 641 */ int[] fSizes = new int[10];
+/* 642 */ int fLength = fpList(this.flList, this.fsList, this.fSizes);
+/* 643 */ MenuItem[] dFonts = this.fLength == 0 ? null : new MenuItem[this.fLength];
+/* 644 */ Locale[] newfLocale = this.fLength == 0 ? null : new Locale[this.fLength];
+/* */ static boolean wasDelta;
+/* */ static boolean doDrive;
+/* */ Panel mapPanel;
+/* */
+/* */ private void init()
+/* */ {
+/* 651 */ addPart(this.render);
+/* 652 */ addPart(this.chat);
+/* 653 */ addPart(this.inventory);
+/* 654 */ addPart(this.marks);
+/* 655 */ addPart(this.friends);
+/* 656 */ addPart(this.actions);
+/* 657 */ addPart(this.mutes);
+/* 658 */ addPart(this.ad);
+/* 659 */ addPart(this.map);
+/* 660 */ addPart(this.savedAvs);
+/* */
+/* */
+/* 663 */ Panel drivePanel = new Panel(new FlowLayout(1, 0, 0));
+/* */
+/* 665 */ String driveGif = IniFile.override().getIniString("driveGif",
+/* 666 */ "drive.gif");
+/* 667 */ addPart(this.driveButton = new ImageButtons(driveGif, 81, 19, this));
+/* 668 */ String quitGif = IniFile.override().getIniString("quitGif",
+/* 669 */ Console.message("quit.gif"));
+/* 670 */ addPart(this.quitButton = new ImageButtons(quitGif, 65, 19, this));
+/* 671 */ String exploreGif = IniFile.override().getIniString("exploreGif",
+/* 672 */ Console.message("explore.gif"));
+/* 673 */ addPart(this.exploreButton = new ImageButtons(exploreGif, 98, 22, this));
+/* 674 */ drivePanel.add(this.driveButton);
+/* 675 */ this.driveButton.setDownUpHandler(new ImageButtonsCallback()
+/* */ {
+/* */ public Object imageButtonsCallback(Component who, int which) {
+/* 678 */ if (which != -1) {
+/* 679 */ DefaultConsole.this.startDrive();
+/* */ }
+/* */ else
+/* */ {
+/* 683 */ DefaultConsole.this.driveButton.drawDown();
+/* */ }
+/* 685 */ return this;
+/* */ }
+/* */
+/* 688 */ });
+/* 689 */ Panel mid = new Panel();
+/* 690 */ mid.setLayout(new GridLayout(1, 3));
+/* 691 */ int bgR = IniFile.override().getIniInt("uiBackgroundRed", 49);
+/* 692 */ int bgG = IniFile.override().getIniInt("uiBackgroundGreen", 0);
+/* 693 */ int bgB = IniFile.override().getIniInt("uiBackgroundBlue", 255);
+/* 694 */ mid.setBackground(new Color(bgR, bgG, bgB));
+/* 695 */ mid.add(this.yourName);
+/* 696 */ mid.add(drivePanel);
+/* */
+/* */
+/* 699 */ mid.add(this.status);
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 725 */ this.chat.line.setBackground(Color.black);
+/* 726 */ this.chat.line.setForeground(Color.white);
+/* 727 */ this.chat.line.setFont(font);
+/* */
+/* 729 */ Panel chatter = new InsetPanel(new BorderLayout(0, 3), 0, 0, 3, 0);
+/* 730 */ chatter.add("North", mid);
+/* 731 */ chatter.add("Center", this.chat.listen.getComponent());
+/* 732 */ chatter.add("South", this.chat.line);
+/* */
+/* 734 */ this.chat.listen.setBackground(Color.black);
+/* 735 */ this.chat.listen.setForeground(Color.white);
+/* 736 */ this.chat.listen.setFont(font);
+/* */
+/* */
+/* 739 */ Panel p = new Panel(new BorderLayout());
+/* 740 */ Panel q = new Panel(new BorderLayout());
+/* */
+/* */
+/* */
+/* 744 */ Panel r = new Panel(new BorderLayout());
+/* 745 */ Panel s = new Panel(new BorderLayout());
+/* */
+/* 747 */ ColorFiller qBlue1 = new ColorFiller(65, 19);
+/* 748 */ qBlue1.setBackground(new Color(bgR, bgG, bgB));
+/* 749 */ r.add("West", this.quitButton);
+/* 750 */ r.add("East", qBlue1);
+/* */
+/* 752 */ int bgbR = IniFile.override().getIniInt("uiBackground2Red", 0);
+/* 753 */ int bgbG = IniFile.override().getIniInt("uiBackground2Green", 0);
+/* 754 */ int bgbB = IniFile.override().getIniInt("uiBackground2Blue", 0);
+/* 755 */ s.add("North", r);
+/* 756 */ s.add("Center", this.ad);
+/* 757 */ if (chatLines > 6) {
+/* 758 */ int h = chatLines *
+/* 759 */ this.chat.listen.getComponent()
+/* 760 */ .getFontMetrics(this.chat.listen.getFont())
+/* 761 */ .getHeight();
+/* */
+/* */
+/* 764 */ h -= 96;
+/* 765 */ if (h > 0) {
+/* 766 */ this.adFiller = new ColorFiller(130, h);
+/* 767 */ this.adFiller.setBackground(new Color(bgbR, bgbG, bgbB));
+/* */
+/* */
+/* 770 */ s.add("South", this.adFiller);
+/* */ }
+/* */ }
+/* */
+/* 774 */ p.add("West", s);
+/* */
+/* */
+/* 777 */ this.mapPanel = new Panel(new BorderLayout());
+/* */
+/* */
+/* 780 */ this.mapPanel.add("Center", this.map);
+/* 781 */ this.mapPanel.setBackground(Color.black);
+/* */
+/* 783 */ r = new Panel(new BorderLayout());
+/* 784 */ ColorFiller qBlue = new ColorFiller(60, 19);
+/* 785 */ qBlue.setBackground(new Color(bgR, bgG, bgB));
+/* 786 */ r.add("North", qBlue);
+/* */
+/* 788 */ ColorFiller qBlack = new ColorFiller(60, 3);
+/* */
+/* */
+/* */
+/* 792 */ qBlack.setBackground(new Color(bgbR, bgbG, bgbB));
+/* 793 */ r.add("South", qBlack);
+/* */
+/* 795 */ q = new Panel(new BorderLayout());
+/* 796 */ q.add("East", this.exploreButton);
+/* 797 */ q.add("West", r);
+/* 798 */ this.mapPanel.add("North", q);
+/* */
+/* 800 */ p.add("East", this.mapPanel);
+/* */
+/* 802 */ p.add("Center", chatter);
+/* */
+/* 804 */ this.bottom = p;
+/* */
+/* */
+/* 807 */ this.renderCard = new CardLayout();
+/* 808 */ this.renderAndUniverse = new Panel(this.renderCard);
+/* 809 */ this.renderAndUniverse.add("render", this.render);
+/* */
+/* 811 */ Panel p = new InsetPanel(new BorderLayout(), 3, 3, 0, 0);
+/* 812 */ p.add("Center", this.renderAndUniverse);
+/* */
+/* 814 */ int bgbR = IniFile.override().getIniInt("uiBackground3Red", 0);
+/* 815 */ int bgbG = IniFile.override().getIniInt("uiBackground3Green", 0);
+/* 816 */ int bgbB = IniFile.override().getIniInt("uiBackground3Blue", 0);
+/* 817 */ ColorFiller rtBlack = new ColorFiller(97, 1);
+/* 818 */ rtBlack.setBackground(new Color(bgbR, bgbG, bgbB));
+/* */
+/* 820 */ Panel rt = new Panel(new QuantizedStackedLayout(rtBlack));
+/* 821 */ String panelGif = IniFile.override().getIniString("rtPanel",
+/* 822 */ Console.message("rtpanel.gif"));
+/* */
+/* 824 */ addPart(this.menuButtons = new ImageButtons(panelGif, 97, menuButtonHeights,
+/* 825 */ this));
+/* */
+/* 827 */ rt.add(rtBlack);
+/* 828 */ rt.add(this.menuButtons);
+/* 829 */ rt.add(this.friends);
+/* 830 */ p.add("East", rt);
+/* 831 */ this.top = p;
+/* */ }
+/* */
+/* */
+/* */
+/* */ public void relayoutMap()
+/* */ {
+/* 838 */ this.mapPanel.invalidate();
+/* 839 */ this.mapPanel.validate();
+/* 840 */ this.mapPanel.doLayout();
+/* 841 */ this.mapPanel.repaint();
+/* */ }
+/* */
+/* */ public void startDrive() {
+/* 845 */ this.statusMessage = Console.message("Drag-mouse");
+/* 846 */ doDrive = true;
+/* 847 */ Window.makeJavaReleaseCapture();
+/* */ }
+/* */
+/* 850 */ private static String signIn = Console.message("Sign-In");
+/* 851 */ private static String signOut = Console.message("Sign-Out");
+/* 852 */ private static String signingIn = Console.message("Signing-In");
+/* 853 */ private static String noMultiUser = Console.message("Network");
+/* */
+/* */ public void setOnlineState(boolean enabled, boolean online)
+/* */ {
+/* 857 */ synchronized (this) {
+/* 858 */ if (this.serverItem != null) {
+/* 859 */ this.serverItem.setEnabled(enabled);
+/* 860 */ if (!enabled) {
+/* 861 */ Galaxy g = getGalaxy();
+/* 862 */ if ((g != null) && (!g.isAnonymous()))
+/* */ {
+/* */
+/* */
+/* */
+/* 867 */ this.serverItem.setLabel(signingIn);
+/* */ } else
+/* 869 */ this.serverItem.setLabel(noMultiUser);
+/* 870 */ } else if (online) {
+/* 871 */ this.serverItem.setLabel(signOut);
+/* */ } else {
+/* 873 */ this.serverItem.setLabel(signIn);
+/* */ }
+/* */ }
+/* */ } }
+/* */
+/* 878 */ private static String enable3D = Console.message("Enable3D");
+/* 879 */ private static String disable3D = Console.message("Disable3D");
+/* */
+/* */ private void handleNametagsItem() {
+/* 882 */ if (IniFile.gamma().getIniInt("SHOWNAMETAGS", 1) == 0) {
+/* 883 */ IniFile.gamma().setIniInt("SHOWNAMETAGS", 1);
+/* 884 */ this.nametagItem.setLabel(hideTags);
+/* */ } else {
+/* 886 */ IniFile.gamma().setIniInt("SHOWNAMETAGS", 0);
+/* 887 */ this.nametagItem.setLabel(showTags);
+/* */ }
+/* */
+/* 890 */ new OkCancelDialog(getFrame(), null, Console.message("Alert"), null,
+/* 891 */ Console.message("OK"), Console.message("Change-exit"), true);
+/* */ }
+/* */
+/* */
+/* 895 */ private static String showTags = Console.message("ShowNametags");
+/* 896 */ private static String hideTags = Console.message("HideNametags");
+/* */
+/* */ private void handleGraphicsItem() {
+/* 899 */ if (IniFile.gamma().getIniInt("UserEnabled3DHardware", 0) == 0) {
+/* 900 */ IniFile.gamma().setIniInt("UserEnabled3DHardware", 1);
+/* 901 */ this.graphicsItem.setLabel(disable3D);
+/* */ } else {
+/* 903 */ IniFile.gamma().setIniInt("UserEnabled3DHardware", 0);
+/* 904 */ this.graphicsItem.setLabel(enable3D);
+/* */ }
+/* */
+/* 907 */ new OkCancelDialog(getFrame(), null, Console.message("Alert"), null,
+/* 908 */ Console.message("OK"), Console.message("Change-exit"), true);
+/* */ }
+/* */
+/* */
+/* */
+/* 913 */ private static String enableClassicChat = Console.message("EnableClassicChat");
+/* */
+/* 915 */ private static String disableClassicChat = Console.message("DisableClassicChat");
+/* 916 */ private static String configureChat = Console.message("Config-Chat");
+/* */ Menu chatLogMenu;
+/* */
+/* 919 */ private void handleChatBoxItem() { if (IniFile.gamma().getIniInt("classicChatBox", 1) == 0) {
+/* 920 */ IniFile.gamma().setIniInt("classicChatBox", 1);
+/* 921 */ this.chatBoxItem.setLabel(disableClassicChat);
+/* */ } else {
+/* 923 */ IniFile.gamma().setIniInt("classicChatBox", 0);
+/* 924 */ this.chatBoxItem.setLabel(enableClassicChat);
+/* */ }
+/* */
+/* 927 */ new OkCancelDialog(getFrame(), null, Console.message("Alert"), null,
+/* 928 */ Console.message("OK"), Console.message("Change-exit"), true);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public AvMenu getAvatarMenu()
+/* */ {
+/* 936 */ return this.avatarMenu;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void inventoryChanged()
+/* */ {
+/* 946 */ super.inventoryChanged();
+/* 947 */ if (this.avatarMenu != null) {
+/* 948 */ this.avatarMenu.buildSpecialGuestMenu();
+/* */ }
+/* */ }
+/* */
+/* */
+/* */ public void setMenusWRTVIP()
+/* */ {
+/* 955 */ if (this.avatarMenu != null) {
+/* 956 */ this.avatarMenu.setEnabled(getVIP());
+/* 957 */ this.avatarMenu.customize.setEnabled(getVIP());
+/* */ }
+/* 959 */ if (this.savedAvs != null) {
+/* 960 */ this.savedAvs.setEnabled(getVIP());
+/* */ }
+/* 962 */ if (this.chatLogMenu != null) {
+/* 963 */ this.chatLogMenu.setEnabled(getVIP());
+/* */ }
+/* 965 */ if (this.toggleVoiceChatItem != null)
+/* */ {
+/* 967 */ this.toggleVoiceChatItem.setLabel((getVIP()) && (VoiceChat.voiceChatEnabled) ?
+/* 968 */ Console.message("Reject-Voice") :
+/* 969 */ Console.message("Accept-Voice"));
+/* 970 */ this.toggleVoiceChatItem.setEnabled((getVIP()) &&
+/* 971 */ (VoiceChat.voiceChatAvailable()));
+/* */ }
+/* 973 */ if (this.becomeVIPItem != null) {
+/* 974 */ this.becomeVIPItem.setLabel(vip > 0 ?
+/* */
+/* 976 */ Console.message("Become-full-VIP") : vip > 1 ? Console.message("Youre-a-VIP") :
+/* 977 */ Console.message("Become-VIP"));
+/* */ }
+/* 979 */ if (this.numVisItem != null) {
+/* 980 */ this.numVisItem.setEnabled(getVIP());
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void addBroadcastMenu()
+/* */ {
+/* 990 */ if (this.bootSomeone == null) {
+/* 991 */ if (IniFile.gamma().getIniInt("Broadcast", 0) != 0) {
+/* 992 */ Menu menu = new Menu(Console.message("Broadcast"));
+/* 993 */ menu.add(this.broadcastToRoom = new MenuItem(
+/* 994 */ Console.message("Users")));
+/* 995 */ menu.add(this.broadcastToAll = new MenuItem(
+/* 996 */ Console.message("All-users")));
+/* 997 */ addMenuItem(menu, "Options");
+/* */ }
+/* 999 */ this.bootSomeone = new MenuItem(Console.message("Boot-user"));
+/* 1000 */ addMenuItem(this.bootSomeone, "Options");
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ AvMenu avatarMenu;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ private static String[] lpList()
+/* */ {
+/* 1058 */ File dir = new File(".");
+/* 1059 */ FilenameFilter f = new FilenameFilter()
+/* */ {
+/* */ public boolean accept(File dir, String name) {
+/* 1062 */ return (name.startsWith("MessagesBundle")) &&
+/* 1063 */ (name.endsWith(".properties"));
+/* */ }
+/* 1065 */ };
+/* 1066 */ String[] list = dir.list(f);
+/* 1067 */ Collator sortCollator = Collator.getInstance();
+/* 1068 */ sortStrings(sortCollator, list);
+/* 1069 */ return list;
+/* */ }
+/* */
+/* */
+/* */
+/* */ private int dpList(Vector<String> lList, Vector<String> sList, int[] lSizes)
+/* */ {
+/* 1076 */ String err = NetUpdate.getLanguages(
+/* 1077 */ URL.make(NetUpdate.getUpgradeServerURL() +
+/* 1078 */ "I18N/" + "languages.lst"), lList, sList, lSizes);
+/* 1079 */ if (err != null) {
+/* 1080 */ System.out.println(err);
+/* 1081 */ return 0;
+/* */ }
+/* 1083 */ return lList.size();
+/* */ }
+/* */
+/* */
+/* */
+/* */ private int fpList(Vector<String> lList, Vector<String> sList, int[] lSizes)
+/* */ {
+/* 1090 */ String err = NetUpdate.getLanguages(
+/* 1091 */ URL.make(NetUpdate.getUpgradeServerURL() +
+/* 1092 */ "I18N/" + "fonts.lst"), lList, sList, lSizes);
+/* 1093 */ if (err != null) {
+/* 1094 */ System.out.println(err);
+/* 1095 */ return 0;
+/* */ }
+/* 1097 */ return lList.size();
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public static void sortStrings(Collator collator, String[] words, Locale[] Locales, String[][] Codes)
+/* */ {
+/* 1108 */ for (int i = 0; i < words.length; i++) {
+/* 1109 */ for (int j = i + 1; j < words.length; j++) {
+/* 1110 */ if (collator.compare(words[i], words[j]) > 0) {
+/* 1111 */ String tmp = words[i];
+/* 1112 */ Locale ltmp = Locales[i];
+/* 1113 */ String c0 = Codes[i][0];
+/* 1114 */ String c1 = Codes[i][1];
+/* 1115 */ words[i] = words[j];
+/* 1116 */ Locales[i] = Locales[j];
+/* 1117 */ Codes[i][0] = Codes[j][0];
+/* 1118 */ Codes[i][1] = Codes[j][1];
+/* 1119 */ words[j] = tmp;
+/* 1120 */ Locales[j] = ltmp;
+/* 1121 */ Codes[j][0] = c0;
+/* 1122 */ Codes[j][1] = c1;
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public static void sortStrings(Collator collator, String[] words, Locale[] Locales, Vector<String> CodeL, Vector<String> CodeS)
+/* */ {
+/* 1136 */ for (int i = 0; i < words.length; i++) {
+/* 1137 */ for (int j = i + 1; j < words.length; j++) {
+/* 1138 */ if (collator.compare(words[i], words[j]) > 0) {
+/* 1139 */ String tmp = words[i];
+/* 1140 */ Locale ltmp = Locales[i];
+/* 1141 */ String c0 = (String)CodeL.elementAt(i);
+/* 1142 */ String c1 = (String)CodeS.elementAt(i);
+/* 1143 */ words[i] = words[j];
+/* 1144 */ Locales[i] = Locales[j];
+/* 1145 */ CodeL.setElementAt((String)CodeL.elementAt(j), i);
+/* 1146 */ CodeS.setElementAt((String)CodeS.elementAt(j), i);
+/* 1147 */ words[j] = tmp;
+/* 1148 */ Locales[j] = ltmp;
+/* 1149 */ CodeL.setElementAt(c0, j);
+/* 1150 */ CodeS.setElementAt(c1, j);
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* */ public static void sortStrings(Collator collator, String[] words)
+/* */ {
+/* 1159 */ for (int i = 0; i < words.length; i++) {
+/* 1160 */ for (int j = i + 1; j < words.length; j++) {
+/* 1161 */ if (collator.compare(words[i], words[j]) > 0) {
+/* 1162 */ String tmp = words[i];
+/* 1163 */ words[i] = words[j];
+/* 1164 */ words[j] = tmp;
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public void activate(Container c)
+/* */ {
+/* 1175 */ super.activate(c);
+/* */
+/* 1177 */ c.setBackground(Color.black);
+/* 1178 */ c.setForeground(Color.white);
+/* 1179 */ c.setLayout(new BorderLayout());
+/* */
+/* 1181 */ c.add("Center", this.top);
+/* 1182 */ c.add("South", this.bottom);
+/* */
+/* 1184 */ this.chat.line.setBackground(Color.white);
+/* 1185 */ this.chat.line.setForeground(Color.black);
+/* */
+/* 1187 */ boolean useShaper = Gamma.getShaper() != null;
+/* */
+/* 1189 */ if (useShaper) {
+/* 1190 */ this.shaperHelpItem = addMenuItem(Console.message("using-shaper"),
+/* 1191 */ "Help");
+/* */ }
+/* */
+/* */
+/* */
+/* 1196 */ if (NetUpdate.getInfoURL() != null) {
+/* 1197 */ this.helpItem = addMenuItem(Console.message("Help-Contents"), "Help");
+/* 1198 */ this.infoItem = addMenuItem(Console.message("Latest-info"), "Help");
+/* */ }
+/* */
+/* 1201 */ Object[] arguments = { new String(Std.getProductName()) };
+/* 1202 */ this.aboutItem = addMenuItem(MessageFormat.format(
+/* 1203 */ Console.message("About-product"), arguments), "Help");
+/* */
+/* */
+/* 1206 */ int cameraMode = IniFile.gamma().getIniInt("CAM_MODE",
+/* 1207 */ 7);
+/* 1208 */ int cameraSpeed = IniFile.gamma().getIniInt("CAM_SPEED",
+/* 1209 */ 3);
+/* */
+/* 1211 */ if ((!useShaper) && (cameraMode == 9)) {
+/* 1212 */ cameraMode = 7;
+/* */ }
+/* */
+/* 1215 */ this.pilot.setOutsideCameraMode(cameraMode, cameraSpeed);
+/* */
+/* 1217 */ Menu viewMenu = new Menu(Console.message("Change-View"));
+/* 1218 */ addMenuItem(viewMenu, "Options");
+/* */
+/* 1220 */ MenuItem cameraVMenu = new MenuItem(Console.message("CAMERA-VIEW"));
+/* 1221 */ cameraVMenu.setFont(mfont);
+/* 1222 */ viewMenu.add(cameraVMenu);
+/* */
+/* 1224 */ this.viewItems = new Vector();
+/* */
+/* 1226 */ for (int i = 0; i < this.viewNames.size(); i++) {
+/* 1227 */ CameraView currView = (CameraView)this.viewNames.elementAt(i);
+/* 1228 */ CheckboxMenuItem item = new CheckboxMenuItem(" " +
+/* 1229 */ Console.message(currView.viewName),
+/* 1230 */ cameraMode == currView.viewID);
+/* 1231 */ if (cameraMode == currView.viewID)
+/* 1232 */ this.currentViewItem = item;
+/* 1233 */ item.setFont(mfont);
+/* 1234 */ viewMenu.add(item);
+/* 1235 */ this.viewItems.addElement(item);
+/* */
+/* 1237 */ if (currView.viewName == "Orthographic")
+/* */ {
+/* 1239 */ this.orthographicViewItem = item;
+/* */ }
+/* */ }
+/* */
+/* 1243 */ viewMenu.addSeparator();
+/* 1244 */ MenuItem cameraSMenu = new MenuItem(Console.message("CAMERA-SPEED"));
+/* 1245 */ cameraSMenu.setFont(mfont);
+/* 1246 */ viewMenu.add(cameraSMenu);
+/* */
+/* 1248 */ this.camSpeedItems = new Vector();
+/* 1249 */ for (int i = 0; i < this.speedNames.size(); i++) {
+/* 1250 */ CameraSpeed currSpeed = (CameraSpeed)this.speedNames.elementAt(i);
+/* 1251 */ CheckboxMenuItem item = new CheckboxMenuItem(" " +
+/* 1252 */ Console.message(currSpeed.speedName),
+/* 1253 */ currSpeed.speedID == cameraSpeed);
+/* 1254 */ if (currSpeed.speedID == cameraSpeed)
+/* 1255 */ this.currentCamSpeedItem = item;
+/* 1256 */ item.setFont(mfont);
+/* 1257 */ viewMenu.add(item);
+/* 1258 */ this.camSpeedItems.addElement(item);
+/* */ }
+/* */
+/* */
+/* 1262 */ this.becomeVIPItem = addMenuItem(
+/* 1263 */ vip == 1 ? Console.message("Become-full-VIP") :
+/* 1264 */ Console.message("Become-VIP"), "VIP");
+/* */
+/* 1266 */ addMenuItem(this.avatarMenu = new AvMenu(this, this.lastPilotRequested), "VIP");
+/* 1267 */ addMenuItem(this.savedAvs, "VIP");
+/* 1268 */ addMenuItem(this.avatarMenu.customize, "VIP");
+/* */
+/* */
+/* 1271 */ this.toggleVoiceChatItem = addMenuItem(Console.message("Enable-Voice"),
+/* 1272 */ "VIP");
+/* 1273 */ this.toggleVoiceChatItem.setEnabled(false);
+/* */
+/* 1275 */ this.numVisItem = addMenuItem(Console.message("Num-Visible"), "VIP");
+/* */
+/* 1277 */ if ((NetUpdate.isInternalVersion()) ||
+/* 1278 */ (IniFile.gamma().getIniInt("EnableTrading", 0) == 1)) {
+/* 1279 */ this.inventoryItem = addMenuItem("My Stuff", "VIP");
+/* 1280 */ this.checkInventoryItem = addMenuItem("Check Inventory", "VIP");
+/* */ }
+/* */
+/* 1283 */ if ((NetUpdate.isInternalVersion()) ||
+/* 1284 */ (IniFile.gamma().getIniInt("EnableBank", 0) == 1)) {
+/* 1285 */ this.bankItem = addMenuItem("Access Bank Account", "VIP");
+/* */ }
+/* */
+/* 1288 */ if (IniFile.gamma().getIniInt("EnableUBU", 0) == 1) {
+/* 1289 */ this.ubuItem = addMenuItem("U-B-U Vanatar", "VIP");
+/* */ }
+/* */
+/* 1292 */ setMenusWRTVIP();
+/* */
+/* 1294 */ this.proxyServerItem = addMenuItem(Console.message("Proxy-Server"),
+/* 1295 */ "Options");
+/* */
+/* 1297 */ this.checkAccountItem = addMenuItem(Console.message("Account-Info"),
+/* 1298 */ "Options");
+/* */
+/* 1300 */ if (useShaper) {
+/* 1301 */ this.statisticsItem = addMenuItem(Console.message("Display-Stat"),
+/* 1302 */ "Options");
+/* */ }
+/* */
+/* 1305 */ this.upgradeItem = addMenuItem(Console.message("Upgrade-Now"), "Options");
+/* */
+/* 1307 */ if (useShaper) {
+/* 1308 */ this.channelItem = addMenuItem(Console.message("Dimension-Sel"),
+/* 1309 */ "Options");
+/* */ }
+/* 1311 */ this.serverItem = addMenuItem(signIn, "Options");
+/* 1312 */ setOnlineState(this.galaxy.getOnlineEnabled(), this.galaxy.getOnline());
+/* */
+/* */
+/* 1315 */ if (IniFile.gamma().getIniInt("recorderEnabled", 1) == 1) {
+/* 1316 */ Menu recorderMenu = new Menu(Console.message("Recorder"));
+/* 1317 */ addMenuItem(recorderMenu, "Options");
+/* */
+/* 1319 */ this.recorderRecItem = new MenuItem(Console.message("Record"));
+/* 1320 */ recorderMenu.add(this.recorderRecItem);
+/* 1321 */ this.recorderStopItem = new MenuItem(Console.message("Stop"));
+/* 1322 */ recorderMenu.add(this.recorderStopItem);
+/* 1323 */ this.recorderPlayItem = new MenuItem(Console.message("Play"));
+/* 1324 */ recorderMenu.add(this.recorderPlayItem);
+/* */ }
+/* */
+/* 1327 */ if (NetUpdate.isInternalVersion()) {
+/* 1328 */ Menu languageMenu = new Menu(Console.message("Languages"));
+/* 1329 */ addMenuItem(languageMenu, "Options");
+/* */
+/* */
+/* 1332 */ Menu downloadFont = new Menu(Console.message("Download-Font"));
+/* 1333 */ languageMenu.add(downloadFont);
+/* 1334 */ downloadFont.setFont(mfont);
+/* */
+/* */
+/* 1337 */ this.fontItems = new Vector();
+/* 1338 */ for (int i = 0; i < this.fLength; i++)
+/* */ {
+/* 1340 */ if (this.flList.elementAt(i) != null) {
+/* 1341 */ if (this.fsList.elementAt(i) != null) {
+/* 1342 */ this.newfLocale[i] = new Locale(
+/* 1343 */ (String)this.flList.elementAt(i),
+/* 1344 */ (String)this.fsList.elementAt(i));
+/* */
+/* */
+/* 1347 */ String code = (String)this.flList.elementAt(i) + "_" +
+/* 1348 */ (String)this.fsList.elementAt(i);
+/* */
+/* 1350 */ if (code.equals(Console.message(code))) {
+/* 1351 */ this.dFonts[i] = new MenuItem(
+/* 1352 */ this.newfLocale[i].getDisplayName());
+/* */ } else {
+/* 1354 */ this.dFonts[i] = new MenuItem(
+/* 1355 */ Console.message(code));
+/* */ }
+/* */ } else {
+/* 1358 */ String code = (String)this.flList.elementAt(i);
+/* 1359 */ if (code.equals(Console.message(code))) {
+/* 1360 */ this.dFonts[i] = new MenuItem(
+/* 1361 */ (String)this.flList.elementAt(i));
+/* */ } else {
+/* 1363 */ this.dFonts[i] = new MenuItem(
+/* 1364 */ Console.message(code));
+/* */ }
+/* */ }
+/* 1367 */ this.dFonts[i].setFont(mfont);
+/* */
+/* 1369 */ downloadFont.add(this.dFonts[i]);
+/* 1370 */ this.fontItems.addElement(this.dFonts[i]);
+/* */ }
+/* */ }
+/* */
+/* */
+/* 1375 */ Menu downloadLanguage = new Menu(
+/* 1376 */ Console.message("Download-Language"));
+/* 1377 */ languageMenu.add(downloadLanguage);
+/* 1378 */ downloadLanguage.setFont(mfont);
+/* */
+/* */
+/* 1381 */ this.downItems = new Vector();
+/* 1382 */ String[] sLangs = new String[this.dLength];
+/* */
+/* 1384 */ for (int i = 0; i < this.dLength; i++)
+/* */ {
+/* */
+/* */
+/* */
+/* */
+/* 1390 */ if (this.lList.elementAt(i) != null) {
+/* 1391 */ this.newdLocale[i] = new Locale((String)this.lList.elementAt(i),
+/* 1392 */ (String)this.sList.elementAt(i));
+/* */
+/* */ String lName0;
+/* */
+/* */ String lName0;
+/* 1397 */ if (i > 0) {
+/* 1398 */ Locale locale0 = new Locale((String)this.lList.elementAt(i - 1),
+/* 1399 */ (String)this.sList.elementAt(i - 1));
+/* 1400 */ lName0 = locale0.getDisplayName();
+/* */ } else {
+/* 1402 */ lName0 = this.newdLocale[i].getDisplayName();
+/* */ }
+/* 1404 */ String lName1 = this.newdLocale[i].getDisplayName();
+/* 1405 */ lName1 = lName1.substring(0, lName1.indexOf('(') - 1);
+/* */ String lName;
+/* 1407 */ String lName; if (i < this.dLength - 1) {
+/* 1408 */ Locale locale2 = new Locale((String)this.lList.elementAt(i + 1),
+/* 1409 */ (String)this.sList.elementAt(i + 1));
+/* 1410 */ String lName2 = locale2.getDisplayName();
+/* 1411 */ lName2 = lName2.substring(0, lName2.indexOf('(') - 1);
+/* 1412 */ String lName; if (lName2.equals(lName1)) {
+/* 1413 */ lName = this.newdLocale[i].getDisplayName();
+/* */ } else
+/* 1415 */ lName = lName1; } else { String lName;
+/* 1416 */ if (i == this.dLength - 1) {
+/* 1417 */ lName0 = lName0.substring(0, lName0.indexOf('(') - 1);
+/* 1418 */ String lName; if (lName1.equals(lName0)) {
+/* 1419 */ lName = this.newdLocale[i].getDisplayName();
+/* */ } else
+/* 1421 */ lName = lName1; } else { String lName;
+/* 1422 */ if (sLangs[(i - 1)].equals(lName1)) {
+/* 1423 */ lName = this.newdLocale[i].getDisplayName();
+/* */ } else
+/* 1425 */ lName = lName1;
+/* */ }
+/* */ }
+/* 1428 */ String code = (String)this.lList.elementAt(i) + "_" +
+/* 1429 */ (String)this.sList.elementAt(i);
+/* */
+/* 1431 */ if (code.equals(Console.message(code))) {
+/* 1432 */ sLangs[i] = lName;
+/* */ } else {
+/* 1434 */ sLangs[i] = Console.message(code);
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* 1439 */ Collator sortCollator = Collator.getInstance();
+/* 1440 */ sortStrings(sortCollator, sLangs, this.newdLocale, this.lList, this.sList);
+/* */
+/* 1442 */ for (int i = 0; i < this.dLength; i++) {
+/* 1443 */ this.dLangs[i] = new MenuItem(sLangs[i]);
+/* 1444 */ this.dLangs[i].setFont(mfont);
+/* */
+/* 1446 */ downloadLanguage.add(this.dLangs[i]);
+/* 1447 */ this.downItems.addElement(this.dLangs[i]);
+/* */ }
+/* */
+/* */
+/* 1451 */ Menu switchLang = new Menu(Console.message("Switch-Language"));
+/* 1452 */ languageMenu.add(switchLang);
+/* 1453 */ switchLang.setFont(mfont);
+/* */
+/* */
+/* */
+/* 1457 */ this.langItems = new Vector();
+/* */
+/* 1459 */ for (int i = 0; i < lLength; i++) {
+/* 1460 */ int imb = lNames[i].indexOf('_');
+/* 1461 */ if (imb < 0) {
+/* 1462 */ lCodes[i][0] = "en";
+/* 1463 */ lCodes[i][1] = "US";
+/* */ } else {
+/* 1465 */ int ipr = lNames[i].lastIndexOf('.');
+/* 1466 */ if (ipr < 0) {
+/* 1467 */ ipr = 0;
+/* */ }
+/* 1469 */ lCodes[i][0] = lNames[i].substring(imb + 1, imb + 3);
+/* */
+/* 1471 */ if (ipr > imb + 4) {
+/* 1472 */ lCodes[i][1] = lNames[i].substring(imb + 4, ipr);
+/* */ } else {
+/* 1474 */ lCodes[i][1] = lCodes[i][0].toUpperCase();
+/* */ }
+/* */ }
+/* */ }
+/* 1478 */ String[] slLangs = new String[lLength];
+/* */
+/* 1480 */ for (int i = 0; i < lLength; i++)
+/* */ {
+/* 1482 */ newLocale[i] = new Locale(lCodes[i][0], lCodes[i][1]);
+/* */
+/* */
+/* */ String lName0;
+/* */
+/* */
+/* */ String lName0;
+/* */
+/* 1490 */ if (i > 0) {
+/* 1491 */ Locale locale0 = new Locale(lCodes[(i - 1)][0], lCodes[(i - 1)][1]);
+/* 1492 */ lName0 = locale0.getDisplayName();
+/* */ } else {
+/* 1494 */ lName0 = newLocale[i].getDisplayName();
+/* */ }
+/* 1496 */ String lName1 = newLocale[i].getDisplayName();
+/* 1497 */ lName1 = lName1.substring(0, lName1.indexOf('(') - 1);
+/* */ String lName;
+/* 1499 */ String lName; if (i < lLength - 1) {
+/* 1500 */ Locale locale2 = new Locale(lCodes[(i + 1)][0], lCodes[(i + 1)][1]);
+/* 1501 */ String lName2 = locale2.getDisplayName();
+/* 1502 */ lName2 = lName2.substring(0, lName2.indexOf('(') - 1);
+/* 1503 */ String lName; if (lName2.equals(lName1)) {
+/* 1504 */ lName = newLocale[i].getDisplayName();
+/* */ } else
+/* 1506 */ lName = lName1; } else { String lName;
+/* 1507 */ if (i == lLength - 1) {
+/* 1508 */ lName0 = lName0.substring(0, lName0.indexOf('(') - 1);
+/* 1509 */ String lName; if (lName1.equals(lName0)) {
+/* 1510 */ lName = newLocale[i].getDisplayName();
+/* */ } else
+/* 1512 */ lName = lName1; } else { String lName;
+/* 1513 */ if (slLangs[(i - 1)].equals(lName1)) {
+/* 1514 */ lName = newLocale[i].getDisplayName();
+/* */ } else
+/* 1516 */ lName = lName1;
+/* */ }
+/* */ }
+/* 1519 */ String code = lCodes[i][0] + "_" + lCodes[i][1];
+/* */
+/* 1521 */ if (code.equals(Console.message(code))) {
+/* 1522 */ slLangs[i] = lName;
+/* */ } else {
+/* 1524 */ slLangs[i] = Console.message(code);
+/* */ }
+/* */ }
+/* 1527 */ sortStrings(sortCollator, slLangs, newLocale, lCodes);
+/* */
+/* 1529 */ for (int i = 0; i < lLength; i++) {
+/* 1530 */ lLangs[i] = new MenuItem(slLangs[i]);
+/* 1531 */ lLangs[i].setFont(mfont);
+/* 1532 */ switchLang.add(lLangs[i]);
+/* 1533 */ this.langItems.addElement(lLangs[i]);
+/* */ }
+/* */
+/* 1536 */ this.currentLang = new MenuItem(Console.message("Current-Language"));
+/* 1537 */ languageMenu.add(this.currentLang);
+/* 1538 */ this.currentLang.setFont(mfont);
+/* */ }
+/* */
+/* 1541 */ if (useShaper) {
+/* 1542 */ this.condenseItem = addMenuItem(Console.message("Condense-Files"),
+/* 1543 */ "Options");
+/* 1544 */ this.expandItem = addMenuItem(Console.message("Expand-Files"), "Options");
+/* 1545 */ this.musicManItem = addMenuItem(Console.message("Music-Manager"),
+/* 1546 */ "Options");
+/* 1547 */ this.i18nTest = addMenuItem(Console.message("I18N-Test"), "Options");
+/* */ }
+/* */
+/* 1550 */ this.cdPlayerItem = addMenuItem(Console.message("MusicM"), "Options");
+/* 1551 */ this.volumeItem = addMenuItem(Console.message("Volume-control"), "Options");
+/* */
+/* 1553 */ if (RenderWare.get3DHardwareAvailable()) {
+/* 1554 */ if (RenderWare.get3DHardwareInUse()) {
+/* 1555 */ this.graphicsItem = addMenuItem(disable3D, "Options");
+/* */ } else {
+/* 1557 */ this.graphicsItem = addMenuItem(enable3D, "Options");
+/* */ }
+/* */ }
+/* 1560 */ if (IniFile.gamma().getIniInt("SHOWNAMETAGS", 1) == 1) {
+/* 1561 */ this.nametagItem = addMenuItem(hideTags, "Options");
+/* */ } else {
+/* 1563 */ this.nametagItem = addMenuItem(showTags, "Options");
+/* */ }
+/* 1565 */ if (IniFile.gamma().getIniInt("classicChatBox", 1) == 1) {
+/* 1566 */ this.chatBoxItem = addMenuItem(disableClassicChat, "Options");
+/* */ } else {
+/* 1568 */ this.chatBoxItem = addMenuItem(enableClassicChat, "Options");
+/* 1569 */ this.chatItem = addMenuItem(configureChat, "Options");
+/* */ }
+/* */
+/* */
+/* 1573 */ if (Gamma.loadProgress != null) {
+/* 1574 */ Gamma.loadProgress.setMessage("Preloading avatars...");
+/* 1575 */ Gamma.loadProgress.advance();
+/* */ }
+/* */
+/* 1578 */ menuDone();
+/* 1579 */ getFrame().activate();
+/* 1580 */ LogFile.mailLogIfPresent(getSmtpServer());
+/* 1581 */ this.render.requestFocus();
+/* 1582 */ setMenusWRTVIP();
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 1588 */ this.bootSomeone = null;
+/* */
+/* 1590 */ if (broadcastEnabled()) {
+/* 1591 */ addBroadcastMenu();
+/* */ }
+/* 1593 */ this.universeMode = false;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void setVIP(boolean f)
+/* */ {
+/* 1603 */ super.setVIP(f);
+/* 1604 */ setMenusWRTVIP();
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 1615 */ setNameStr();
+/* */ }
+/* */
+/* */ public void checkCourtesyVIP()
+/* */ {
+/* 1620 */ super.checkCourtesyVIP();
+/* 1621 */ setMenusWRTVIP();
+/* 1622 */ setNameStr();
+/* */ }
+/* */
+/* */ public void setNameStr() {
+/* 1626 */ String nameStr = this.galaxy.getUsernameU();
+/* */
+/* 1628 */ boolean isOnline = this.galaxy.getOnline();
+/* */
+/* 1630 */ if (!isOnline) {
+/* 1631 */ this.yourName.setText(Console.message("Off-line"));
+/* 1632 */ return;
+/* */ }
+/* */
+/* 1635 */ if (nameStr.length() > 0) {
+/* 1636 */ if (nameStr.regionMatches(true, 0, "VIP ", 0, 4)) {
+/* 1637 */ nameStr = nameStr.substring(4);
+/* */ }
+/* 1639 */ if (vip > 0) {
+/* 1640 */ if (vip > 1) {
+/* 1641 */ nameStr = Console.message("VIP") + " " + nameStr;
+/* */ } else {
+/* 1643 */ nameStr = Console.message("vip") + " " + nameStr;
+/* */ }
+/* */ }
+/* 1646 */ IniFile.gamma().setIniString("LASTCHATNAME", parseExtended(nameStr));
+/* 1647 */ this.yourName.setText(Console.parseUnicode(nameStr));
+/* */ }
+/* */ }
+/* */
+/* */ public void enableBroadcast(boolean enabled)
+/* */ {
+/* 1653 */ super.enableBroadcast(enabled);
+/* 1654 */ if (enabled) {
+/* 1655 */ addBroadcastMenu();
+/* */ }
+/* */ }
+/* */
+/* */ public void deactivate() {
+/* 1660 */ super.deactivate();
+/* 1661 */ this.universeMode = false;
+/* */ }
+/* */
+/* 1664 */ private int chooseView = -1;
+/* 1665 */ private int chooseCamSpeed = -1;
+/* */
+/* 1667 */ private static String sleepStatus = Console.message("Sleeping");
+/* */ OkCancelDialog reloginDialog;
+/* */
+/* */ protected void setSleepMode(String mode) {
+/* 1671 */ super.setSleepMode(mode);
+/* */
+/* 1673 */ if ((mode != null) && (mode.equals(Console.message("asleep")))) {
+/* 1674 */ this.statusMessage = sleepStatus;
+/* 1675 */ } else if (this.statusMessage == sleepStatus) {
+/* 1676 */ this.statusMessage = "";
+/* */ }
+/* */ }
+/* */
+/* */ private void relogin()
+/* */ {
+/* 1682 */ if (this.serverItem.getLabel().equals(signOut)) {
+/* 1683 */ this.reloginDialog = new OkCancelDialog(getFrame(), this,
+/* 1684 */ Console.message("Re-login"), Console.message("Cancel"),
+/* 1685 */ Console.message("OK"), Console.message("auto-sign-out"),
+/* 1686 */ true);
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ @Deprecated
+/* */ public boolean action(Event event, Object what)
+/* */ {
+/* 1696 */ if (event.target == this.aboutItem) {
+/* 1697 */ new AboutDialog(Std.getProductName(), getFrame());
+/* 1698 */ } else if ((event.target == this.statisticsItem) && (this.statisticsItem != null)) {
+/* 1699 */ new StatisticsWindow(getFrame());
+/* 1700 */ } else if (this.viewItems.contains(event.target)) {
+/* 1701 */ changeView((CheckboxMenuItem)event.target);
+/* 1702 */ } else if (this.camSpeedItems.contains(event.target)) {
+/* 1703 */ changeCamSpeed((CheckboxMenuItem)event.target);
+/* 1704 */ } else if (event.target == this.gettingStartedItem) {
+/* 1705 */ new SendURLAction(getHelpGettingStarted()).startBrowser();
+/* 1706 */ } else if (event.target == this.shaperHelpItem)
+/* */ {
+/* 1708 */ String helpURL = IniFile.override().getIniString("ShaperHelp",
+/* 1709 */ new StringBuilder(String.valueOf(getScriptServer())).append("shaperhelp.pl").toString()) +
+/* 1710 */ "?u=";
+/* 1711 */ String lastName = IniFile.gamma().getIniString("lastchatname", "");
+/* 1712 */ if (!lastName.equals("")) {
+/* 1713 */ if (lastName.startsWith("VIP "))
+/* 1714 */ lastName = lastName.substring(4);
+/* 1715 */ helpURL = helpURL + lastName;
+/* */ }
+/* */
+/* 1718 */ new SendURLAction(WebControlImp.processURL(helpURL)).startBrowser();
+/* 1719 */ } else if (event.target == this.helpItem) {
+/* 1720 */ String serv = NetUpdate.getUpgradeServerURL();
+/* */
+/* 1722 */ String directory = IniFile.override().getIniString("HelpDirectory",
+/* 1723 */ "help");
+/* 1724 */ String helpPage = IniFile.override().getIniString("HelpPage",
+/* 1725 */ Std.getVersion() + Console.message(".html"));
+/* */
+/* */
+/* 1728 */ if (wasHttpNoSuchFile(serv + directory + "/" + helpPage)) {
+/* 1729 */ helpPage = IniFile.override().getIniString("HelpPage",
+/* 1730 */ Std.getVersion() + ".html");
+/* */ }
+/* 1732 */ new SendURLAction(serv + directory + "/" + helpPage).startBrowser();
+/* 1733 */ } else if (event.target == this.infoItem) {
+/* 1734 */ String infoOverride = IniFile.override().getIniString(
+/* 1735 */ "infoOverride", "");
+/* 1736 */ if (infoOverride.equals("")) {
+/* 1737 */ NetUpdate.showInfo();
+/* */ } else {
+/* 1739 */ new SendURLAction(infoOverride).startBrowser();
+/* */ }
+/* 1741 */ } else if (event.target == this.i18nTest)
+/* */ {
+/* 1743 */ Locale df = Locale.getDefault();
+/* 1744 */ Console.println("Default = " + df.getDisplayName());
+/* */
+/* 1746 */ DateFormat fulldate = DateFormat.getDateTimeInstance(
+/* 1747 */ 1, 1);
+/* 1748 */ Date today = new Date();
+/* 1749 */ Console.println("Today = " + fulldate.format(today));
+/* */
+/* 1751 */ Locale[] list = DateFormat.getAvailableLocales();
+/* 1752 */ Console.println("Avaliable Locales are:");
+/* 1753 */ for (int i = 0; i < list.length; i++) {
+/* 1754 */ Locale.setDefault(list[i]);
+/* 1755 */ Console.println(list[i].getDisplayName() + " " + list[i]);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* 1761 */ Locale fr = new Locale("fr", "FR");
+/* 1762 */ Locale de = new Locale("de", "DE");
+/* 1763 */ Locale ja = new Locale("ja", "JP");
+/* 1764 */ Locale zh = new Locale("zh", "CN");
+/* 1765 */ Locale th = new Locale("th", "TH");
+/* 1766 */ Locale ru = new Locale("ru", "RU");
+/* 1767 */ Locale iw = new Locale("iw", "IL");
+/* */
+/* 1769 */ Console.println("file.encoding = " +
+/* 1770 */ System.getProperty("file.encoding"));
+/* */
+/* */
+/* */
+/* 1774 */ Console.println(message("test-language", fr));
+/* 1775 */ Console.println(message("test-language", de));
+/* 1776 */ Console.println(message("test-language", ja));
+/* 1777 */ Console.println(message("test-language", zh));
+/* 1778 */ Console.println(message("test-language", th));
+/* 1779 */ Console.println(message("test-language", ru));
+/* 1780 */ Console.println(message("test-language", iw));
+/* */
+/* */
+/* 1783 */ Console.println(message("test-language", df));
+/* */ }
+/* 1785 */ else if (event.target == this.checkAccountItem) {
+/* 1786 */ String accountOverride = IniFile.override().getIniString(
+/* 1787 */ "accountOverride", "");
+/* 1788 */ if (accountOverride.equals("")) {
+/* 1789 */ String accountScript = IniFile.override().getIniString(
+/* 1790 */ "accountInfoPage", "account" + Console.message(".pl"));
+/* 1791 */ if (wasHttpNoSuchFile(getScriptServer() + accountScript)) {
+/* 1792 */ accountScript = IniFile.override().getIniString(
+/* 1793 */ "accountInfoPage", "account.pl");
+/* */ }
+/* 1795 */ new SendURLAction(getScriptServer() + accountScript, true).startBrowser();
+/* */ } else {
+/* 1797 */ new SendURLAction(accountOverride).startBrowser();
+/* */ }
+/* 1799 */ relogin();
+/* 1800 */ } else if (event.target == this.upgradeItem) {
+/* 1801 */ NetUpdate.doUpdate(true);
+/* */ }
+/* 1803 */ else if ((event.target == this.channelItem) && (this.channelItem != null)) {
+/* 1804 */ Galaxy g = getGalaxy();
+/* 1805 */ String channel = "";
+/* 1806 */ assert (g != null);
+/* 1807 */ if (g != null)
+/* 1808 */ channel = g.getChannel();
+/* 1809 */ new ChannelDialog(getFrame(), this,
+/* 1810 */ Console.message("Dimension-Sel"), channel);
+/* 1811 */ } else if (event.target == this.becomeVIPItem) {
+/* 1812 */ String completeOverride = IniFile.override().getIniString(
+/* 1813 */ "vipOverride", "");
+/* 1814 */ if (completeOverride.equals("")) {
+/* 1815 */ String vipScript = IniFile.override().getIniString("vipPage",
+/* 1816 */ "vip" + Console.message(".pl"));
+/* 1817 */ if (wasHttpNoSuchFile(getScriptServer() + vipScript)) {
+/* 1818 */ vipScript = IniFile.override().getIniString("vipPage",
+/* 1819 */ "vip.pl");
+/* */ }
+/* 1821 */ new SendURLAction(getScriptServer() + vipScript, true).startBrowser();
+/* */ } else {
+/* 1823 */ new SendURLAction(completeOverride, false).startBrowser();
+/* */ }
+/* 1825 */ relogin();
+/* 1826 */ } else if (event.target == this.numVisItem) {
+/* 1827 */ new SetNumVisibleAvs();
+/* 1828 */ } else if (event.target == this.inventoryItem) {
+/* 1829 */ EquipAction eAction = new EquipAction();
+/* 1830 */ eAction.trigger(null, null);
+/* 1831 */ } else if (event.target == this.checkInventoryItem) {
+/* 1832 */ new SendURLAction(getScriptServer() + "inventory.pl", true).startBrowser();
+/* */ }
+/* 1834 */ else if (event.target == this.bankItem) {
+/* 1835 */ new SendURLAction(getScriptServer() + "bank.pl", true).startBrowser();
+/* */ }
+/* 1837 */ else if (event.target == this.ubuItem) {
+/* 1838 */ String ubuDest = IniFile.gamma().getIniString("UbuDestURL", getScriptServer() + "ubu.pl");
+/* 1839 */ new SendURLAction(ubuDest, true).startBrowser();
+/* 1840 */ } else if (event.target == this.proxyServerItem) {
+/* 1841 */ System.out.println("Triggering the Proxy Server dialog.");
+/* 1842 */ ProxyServerDialog psd = new ProxyServerDialog();
+/* 1843 */ psd.setVisible(true);
+/* 1844 */ } else if (event.target == this.toggleVoiceChatItem) {
+/* 1845 */ VoiceChat.setVoiceChatEnabled(!VoiceChat.voiceChatEnabled);
+/* 1846 */ setMenusWRTVIP();
+/* 1847 */ } else if (event.target == this.serverItem) {
+/* 1848 */ handleServerItem();
+/* 1849 */ } else if (event.target == this.condenseItem) {
+/* 1850 */ new ArchiveMaker(true);
+/* 1851 */ } else if (event.target == this.expandItem) {
+/* 1852 */ new ArchiveMaker(false);
+/* 1853 */ } else if (event.target == this.musicManItem) {
+/* 1854 */ MusicManager.showDialog();
+/* 1855 */ } else if (event.target == this.cdPlayerItem) {
+/* 1856 */ if (this.cdcontrol == null) {
+/* 1857 */ this.playedCD = true;
+/* 1858 */ this.cdcontrol = new CDControl(getFrame(), this);
+/* */ }
+/* 1860 */ } else if (event.target == this.volumeItem) {
+/* 1861 */ if (!CDPlayerAction.launchVolumeControlApp())
+/* 1862 */ new OkCancelDialog(getFrame(), null,
+/* 1863 */ Console.message("No-Volume"), null,
+/* 1864 */ Console.message("OK"),
+/* 1865 */ Console.message("Cannot-locate"), true);
+/* 1866 */ } else if (event.target == this.graphicsItem) {
+/* 1867 */ handleGraphicsItem();
+/* 1868 */ } else if (event.target == this.nametagItem) {
+/* 1869 */ handleNametagsItem();
+/* 1870 */ } else if (event.target == this.chatBoxItem) {
+/* 1871 */ handleChatBoxItem();
+/* 1872 */ } else if ((event.target == this.chatItem) && (this.chatItem != null)) {
+/* 1873 */ new ChatDialog(getFrame(), this,
+/* 1874 */ Console.message("Chat-Configuration"), IniFile.gamma()
+/* 1875 */ .getIniInt("ChatFontSize", 12), chatLines,
+/* 1876 */ IniFile.gamma().getIniInt("ChatLengthLimit", 20000));
+/* 1877 */ } else if (event.target == this.bootSomeone) {
+/* 1878 */ new BootDialog(getFrame(), this, Console.message("Boot-user"));
+/* 1879 */ } else if (event.target == this.broadcastToRoom) {
+/* 1880 */ startWhispering("room");
+/* 1881 */ } else if (event.target == this.broadcastToAll) {
+/* 1882 */ startWhispering("world");
+/* 1883 */ } else if (event.target == this.currentLang) {
+/* 1884 */ String code = Locale.getDefault().toString();
+/* 1885 */ if (code == Console.message(code)) {
+/* 1886 */ Console.println(
+/* 1887 */ Console.message("Current-Language") + " = " + Locale.getDefault().getDisplayName());
+/* */ } else
+/* 1889 */ Console.println(
+/* 1890 */ Console.message("Current-Language") + " = " + Console.message(code));
+/* 1891 */ } else if (event.target == this.recorderPlayItem) {
+/* 1892 */ println(Console.message("BlackBoxPlay"));
+/* 1893 */ BlackBox.getInstance().play();
+/* 1894 */ } else if (event.target == this.recorderRecItem) {
+/* 1895 */ println(Console.message("BlackBoxRec"));
+/* 1896 */ BlackBox.getInstance().record();
+/* 1897 */ } else if (event.target == this.recorderStopItem) {
+/* 1898 */ println(Console.message("BlackBoxStop"));
+/* 1899 */ BlackBox.getInstance().stop();
+/* 1900 */ } else if ((this.fontItems != null) && (this.fontItems.contains(event.target)))
+/* */ {
+/* 1902 */ String languageURL = IniFile.gamma().getIniString("upgradeServer",
+/* 1903 */ "") +
+/* 1904 */ "/I18N/font_";
+/* */
+/* 1906 */ for (int i = 0; i < this.fLength; i++) {
+/* 1907 */ if (event.target == this.fontItems.elementAt(i)) {
+/* 1908 */ if (this.fsList.elementAt(i) != null) {
+/* 1909 */ languageURL =
+/* 1910 */ languageURL + (String)this.flList.elementAt(i) + "_" + (String)this.fsList.elementAt(i) + ".EXE";
+/* */ } else {
+/* 1912 */ languageURL =
+/* 1913 */ languageURL + (String)this.flList.elementAt(i) + ".EXE";
+/* */ }
+/* */
+/* 1916 */ int sz = this.fSizes[i];
+/* 1917 */ String fName = languageURL.substring(
+/* 1918 */ languageURL.lastIndexOf('/') + 1,
+/* 1919 */ languageURL.length());
+/* 1920 */ LanguageManager.handle(languageURL, sz, fName);
+/* 1921 */ break;
+/* */ }
+/* */ }
+/* 1924 */ } else if ((this.downItems != null) && (this.downItems.contains(event.target)))
+/* */ {
+/* 1926 */ String languageURL = IniFile.gamma().getIniString("upgradeServer",
+/* 1927 */ "") +
+/* 1928 */ "/I18N/language_";
+/* */
+/* 1930 */ for (int i = 0; i < this.dLength; i++) {
+/* 1931 */ if (event.target == this.downItems.elementAt(i)) {
+/* 1932 */ if (this.sList.elementAt(i) != null) {
+/* 1933 */ languageURL =
+/* 1934 */ languageURL + (String)this.lList.elementAt(i) + "_" + (String)this.sList.elementAt(i) + ".zip";
+/* */
+/* */
+/* 1937 */ IniFile.gamma().setIniString(
+/* 1938 */ "DEFAULTLANGUAGE",
+/* 1939 */ (String)this.lList.elementAt(i) + "_" +
+/* 1940 */ (String)this.sList.elementAt(i));
+/* */ } else {
+/* 1942 */ languageURL = languageURL + (String)this.lList.elementAt(i) + ".zip";
+/* */
+/* */
+/* 1945 */ IniFile.gamma().setIniString("DEFAULTLANGUAGE",
+/* 1946 */ (String)this.lList.elementAt(i));
+/* */ }
+/* */
+/* 1949 */ int sz = this.lSizes[i];
+/* 1950 */ String fName = languageURL.substring(
+/* 1951 */ languageURL.lastIndexOf('/') + 1,
+/* 1952 */ languageURL.length());
+/* 1953 */ LanguageManager.handle(languageURL, sz, fName);
+/* */
+/* 1955 */ break;
+/* */ }
+/* */ }
+/* 1958 */ } else if ((this.langItems != null) && (this.langItems.contains(event.target)))
+/* */ {
+/* 1960 */ for (int i = 0; i < lLength; i++) {
+/* 1961 */ if (event.target == this.langItems.elementAt(i)) {
+/* 1962 */ Locale.setDefault(newLocale[i]);
+/* 1963 */ String code = newLocale[i].toString();
+/* 1964 */ if (code == Console.message(code)) {
+/* 1965 */ Console.println(
+/* 1966 */ message("Setting-to") + " " + newLocale[i].getDisplayName());
+/* */ } else {
+/* 1968 */ Console.println(
+/* 1969 */ message("Setting-to") + " " + Console.message(code));
+/* */ }
+/* */
+/* 1972 */ IniFile.gamma().setIniString("DEFAULTLANGUAGE",
+/* 1973 */ lCodes[i][0] + "_" + lCodes[i][1]);
+/* */
+/* 1975 */ new OkCancelDialog(getFrame(), null,
+/* 1976 */ Console.message("Alert"), null,
+/* 1977 */ Console.message("OK"),
+/* 1978 */ Console.message("Change-exit"), true);
+/* */
+/* 1980 */ break;
+/* */ }
+/* */ }
+/* 1983 */ } else if ((this.avatarMenu == null) || (!this.avatarMenu.action(event, what)))
+/* */ {
+/* */
+/* 1986 */ return super.action(event, what);
+/* */ }
+/* 1988 */ return true;
+/* */ }
+/* */
+/* */
+/* */
+/* 1993 */ private Object nextAvatarMutex = new Object();
+/* */ private URL nextAvatar;
+/* */ private CheckboxMenuItem nextAvatarItem;
+/* */ private CheckboxMenuItem curAvatarItem;
+/* */
+/* */ public void setCurrentAvatarItem(CheckboxMenuItem item)
+/* */ {
+/* 2000 */ if (this.curAvatarItem != null)
+/* 2001 */ this.curAvatarItem.setState(false);
+/* 2002 */ this.curAvatarItem = item;
+/* 2003 */ if (this.curAvatarItem != null) {
+/* 2004 */ this.curAvatarItem.setState(true);
+/* */ }
+/* */ }
+/* */
+/* */ public CheckboxMenuItem getCurrentAvatarItem() {
+/* 2009 */ return this.curAvatarItem;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public void deletedSavedAvatar(CheckboxMenuItem item)
+/* */ {
+/* 2017 */ if (this.curAvatarItem == item) {
+/* 2018 */ findAvatarMenuItem(getDefaultAvatarURL());
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */ public void setNextAvatar(URL url, CheckboxMenuItem item)
+/* */ {
+/* 2026 */ synchronized (this.nextAvatarMutex) {
+/* 2027 */ this.nextAvatar = url;
+/* 2028 */ this.nextAvatarItem = item;
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ private void findAvatarMenuItem(URL url)
+/* */ {
+/* 2039 */ synchronized (this.nextAvatarMutex) {
+/* 2040 */ if (this.nextAvatarItem == null) { CheckboxMenuItem item;
+/* */ CheckboxMenuItem item;
+/* 2042 */ if (((this.savedAvs != null) && ((item = this.savedAvs.findMenuItem(url)) != null)) || (
+/* 2043 */ (this.avatarMenu != null) &&
+/* 2044 */ ((item = this.avatarMenu.findMenuItem(url)) != null))) {
+/* 2045 */ setCurrentAvatarItem(item);
+/* */ } else {
+/* 2047 */ setCurrentAvatarItem(null);
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */ private URL getHelpGettingStarted()
+/* */ {
+/* 2057 */ IniFile ini = new IniFile("InstalledWorlds");
+/* 2058 */ String helpName = Console.message("Getting-started");
+/* */
+/* */
+/* 2061 */ String w = ini.getIniString("InstalledWorld0", "");
+/* 2062 */ if (!w.equals("")) {
+/* 2063 */ URL name = URL.make("home:" + w + "/" + helpName);
+/* 2064 */ File f = new File(name.unalias());
+/* 2065 */ if (f.exists())
+/* 2066 */ return name;
+/* */ }
+/* 2068 */ return URL.make("home:" + helpName);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ private void changeView(CheckboxMenuItem item)
+/* */ {
+/* 2078 */ this.chooseView = this.viewItems.indexOf(item);
+/* */
+/* */
+/* */
+/* 2082 */ if (item != this.currentViewItem) {
+/* 2083 */ this.currentViewItem.setState(false);
+/* 2084 */ this.currentViewItem = item;
+/* 2085 */ this.currentViewItem.setState(true);
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ private void changeCamSpeed(CheckboxMenuItem item)
+/* */ {
+/* 2103 */ this.chooseCamSpeed = this.camSpeedItems.indexOf(item);
+/* */
+/* 2105 */ if (item != this.currentCamSpeedItem) {
+/* 2106 */ this.currentCamSpeedItem.setState(false);
+/* 2107 */ this.currentCamSpeedItem = item;
+/* 2108 */ this.currentCamSpeedItem.setState(true);
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void resetCamera()
+/* */ {
+/* 2118 */ if ((this.viewItems == null) || (this.camSpeedItems == null))
+/* 2119 */ return;
+/* 2120 */ this.chooseView = this.viewItems.indexOf(this.currentViewItem);
+/* 2121 */ this.chooseCamSpeed = this.camSpeedItems.indexOf(this.currentCamSpeedItem);
+/* */ }
+/* */
+/* */
+/* */
+/* */ private void handleServerItem()
+/* */ {
+/* 2128 */ if (!this.serverItem.getLabel().equals(signIn)) {
+/* 2129 */ Galaxy.forceOffline(false);
+/* */
+/* */ }
+/* */ else
+/* */ {
+/* */
+/* 2135 */ getGalaxy().localForceOnline();
+/* */
+/* */
+/* 2138 */ getGalaxy().waitForConnection(this);
+/* */ }
+/* */ }
+/* */
+/* */ public UniversePanel getUniverse() {
+/* 2143 */ return this.universeMode ? this.universe : null;
+/* */ }
+/* */
+/* */ public synchronized void setUniverseMode(boolean f)
+/* */ {
+/* 2148 */ if (f == this.universeMode) {
+/* 2149 */ return;
+/* */ }
+/* 2151 */ this.universeMode = f;
+/* 2152 */ if (this.universeMode) {
+/* 2153 */ if (this.universe == null) {
+/* 2154 */ this.universe = new UniversePanel(this);
+/* 2155 */ this.renderAndUniverse.add("universe", this.universe);
+/* */ }
+/* 2157 */ this.renderCard.show(this.renderAndUniverse, "universe");
+/* */
+/* 2159 */ this.universe.startWatch();
+/* 2160 */ this.render.requestFocus();
+/* */ } else {
+/* 2162 */ this.renderCard.show(this.renderAndUniverse, "render");
+/* 2163 */ if (physMem < 64000000) {
+/* 2164 */ this.renderAndUniverse.remove(this.universe);
+/* 2165 */ this.universe.stopWatch();
+/* 2166 */ this.universe.flushImage();
+/* 2167 */ this.universe = null;
+/* */ }
+/* 2169 */ this.renderAndUniverse.repaint();
+/* */ }
+/* */ }
+/* */
+/* */ public void toggleUniverseMode() {
+/* 2174 */ setUniverseMode(!this.universeMode);
+/* */ }
+/* */
+/* */ public boolean isUniverseMode() {
+/* 2178 */ return this.universeMode;
+/* */ }
+/* */
+/* */ public Object imageButtonsCallback(Component who, int which)
+/* */ {
+/* 2183 */ if (who != this.driveButton)
+/* */ {
+/* 2185 */ if (who == this.quitButton) {
+/* 2186 */ maybeQuit();
+/* 2187 */ } else if (who == this.adCubeButton) {
+/* 2188 */ String adURL = IniFile.gamma().getIniString("AdCubeURL", "http://www.worlds.com/");
+/* 2189 */ new SendURLAction(adURL, true).startBrowser();
+/* */ }
+/* 2191 */ else if (who == this.exploreButton) {
+/* 2192 */ toggleUniverseMode();
+/* 2193 */ } else if (who == this.menuButtons) {
+/* 2194 */ switch (which) {
+/* */ case 0:
+/* 2196 */ return getMenu("Help");
+/* */ case 1:
+/* 2198 */ return getMenu("Options");
+/* */
+/* */
+/* */ case 2:
+/* 2202 */ String prodName = IniFile.override().getIniString(
+/* 2203 */ "ProductName", "");
+/* 2204 */ if ((!prodName.equalsIgnoreCase("RedLightWorld")) &&
+/* 2205 */ (!prodName.equalsIgnoreCase("RedLightCenter")))
+/* 2206 */ EMailPart.showMessage(this);
+/* 2207 */ break;
+/* */
+/* */ case 3:
+/* 2210 */ return (PopupMenu)this.marks.getMenu();
+/* */ case 4:
+/* 2212 */ return (PopupMenu)this.marks.getLetsMenu();
+/* */ case 5:
+/* 2214 */ this.actions.present();
+/* 2215 */ break;
+/* */ case 6:
+/* 2217 */ return getMenu("VIP");
+/* */ }
+/* */ } }
+/* 2220 */ return null;
+/* */ }
+/* */
+/* */ public RenderCanvas getRender() {
+/* 2224 */ return this.render;
+/* */ }
+/* */
+/* */ public FriendsListPart getFriends() {
+/* 2228 */ return this.friends;
+/* */ }
+/* */
+/* */ public MuteListPart getMutes() {
+/* 2232 */ return this.mutes;
+/* */ }
+/* */
+/* */
+/* 2236 */ private static String lastWorldName = "";
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void generateFrameEvents(FrameEvent f)
+/* */ {
+/* 2245 */ if (Window.getWindowState(Window.getFrameHandle()) == 1) {
+/* 2246 */ goToSleep();
+/* */ }
+/* 2248 */ if (doDrive) {
+/* 2249 */ doDrive = false;
+/* */
+/* 2251 */ this.render.drive();
+/* 2252 */ wasDelta = true;
+/* */ }
+/* */
+/* 2255 */ super.generateFrameEvents(f);
+/* */
+/* 2257 */ Pilot pilot = Pilot.getActive();
+/* */
+/* */
+/* 2260 */ GammaFrame frame = getFrame();
+/* */
+/* 2262 */ String worldName = "";
+/* 2263 */ if (pilot != null) {
+/* 2264 */ World world = pilot.getWorld();
+/* 2265 */ if (world != null) {
+/* 2266 */ String name = world.getName();
+/* 2267 */ if (name != null)
+/* 2268 */ worldName = name;
+/* */ }
+/* */ }
+/* 2271 */ if (!lastWorldName.equals(worldName)) {
+/* 2272 */ lastWorldName = worldName;
+/* 2273 */ String newTitle = GammaFrame.getDefaultTitle();
+/* 2274 */ if (worldName.length() != 0) {
+/* 2275 */ newTitle = newTitle + " - " + worldName;
+/* */
+/* */
+/* */
+/* 2279 */ if (!this.playedCD) {
+/* 2280 */ CDAudio.startupPlay();
+/* 2281 */ this.playedCD = true;
+/* */ }
+/* */ }
+/* 2284 */ frame.setTitle(newTitle);
+/* */ }
+/* */
+/* 2287 */ if (pilot == null) {
+/* 2288 */ return;
+/* */ }
+/* 2290 */ if ((this.chooseView != -1) || (this.chooseCamSpeed != -1)) {
+/* 2291 */ int oldCameraMode = pilot.getOutsideCameraMode();
+/* 2292 */ int oldCameraSpeed = pilot.getOutsideCameraSpeed();
+/* */
+/* 2294 */ int cameraMode = oldCameraMode;
+/* 2295 */ int cameraSpeed = oldCameraSpeed;
+/* */
+/* 2297 */ if (this.chooseView != -1) {
+/* 2298 */ cameraMode = ((CameraView)this.viewNames.elementAt(this.chooseView)).viewID;
+/* */ }
+/* 2300 */ if (this.chooseCamSpeed != -1) {
+/* 2301 */ cameraSpeed =
+/* 2302 */ ((CameraSpeed)this.speedNames.elementAt(this.chooseCamSpeed)).speedID;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* 2308 */ pilot.setOutsideCameraMode(cameraMode, cameraSpeed);
+/* */
+/* 2310 */ if (cameraMode != 99) {
+/* 2311 */ IniFile.gamma().setIniInt("CAM_MODE", cameraMode);
+/* 2312 */ IniFile.gamma().setIniInt("CAM_SPEED", cameraSpeed);
+/* */ }
+/* */
+/* 2315 */ this.chooseView = -1;
+/* 2316 */ this.chooseCamSpeed = -1;
+/* */ }
+/* */
+/* 2319 */ if (this.wasTeleporting != this.marks.isTeleporting()) {
+/* 2320 */ this.wasTeleporting = this.marks.isTeleporting();
+/* 2321 */ if (this.wasTeleporting) {
+/* 2322 */ this.statusMessage = loadingString;
+/* 2323 */ } else if (this.statusMessage == loadingString) {
+/* 2324 */ this.statusMessage = "";
+/* */ }
+/* */ }
+/* */
+/* 2328 */ checkVMWarning();
+/* */
+/* 2330 */ if ((wasDelta) &&
+/* 2331 */ (!this.render.getDeltaMode()))
+/* */ {
+/* 2333 */ this.statusMessage = arrowKeyMsg;
+/* 2334 */ wasDelta = false;
+/* 2335 */ this.driveButton.drawCursed();
+/* */ }
+/* */
+/* */
+/* */
+/* 2340 */ synchronized (this.status) {
+/* 2341 */ if ((this.statusMessage != this.lastStatus) && (this.overrideMessage == null)) {
+/* 2342 */ this.lastStatus = this.statusMessage;
+/* 2343 */ this.status.setText(this.statusMessage);
+/* */ }
+/* */ }
+/* */
+/* */
+/* 2348 */ synchronized (this.nextAvatarMutex) {
+/* 2349 */ if (this.nextAvatar != null) {
+/* 2350 */ setAvatar(this.nextAvatar);
+/* 2351 */ this.nextAvatar = null;
+/* */
+/* 2353 */ if (this.avatarMenu != null) {
+/* 2354 */ this.avatarMenu.notifyOfChange();
+/* */ }
+/* 2356 */ if (this.nextAvatarItem != null) {
+/* 2357 */ setCurrentAvatarItem(this.nextAvatarItem);
+/* 2358 */ this.nextAvatarItem = null;
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* 2364 */ private static String lowVMMsg = Console.message("Low-virt");
+/* */ private boolean showedMidWarn;
+/* 2366 */ private static boolean startupMemCheck = true;
+/* */ public static int physMem;
+/* */ protected URL avatarURL;
+/* */
+/* 2370 */ private void checkVMWarning() { int now = Std.getFastTime();
+/* 2371 */ if (now > this.lastVMCheck + 10000) {
+/* 2372 */ StatMemNode m = StatMemNode.getNode();
+/* 2373 */ m.updateMemoryStatus();
+/* */
+/* */
+/* 2376 */ if (m._availPageMem < 0)
+/* 2377 */ m._availPageMem = 2000000000;
+/* 2378 */ if (m._totPhysMem < 0) {
+/* 2379 */ m._totPhysMem = 2000000000;
+/* */ }
+/* 2381 */ physMem = m._totPhysMem;
+/* 2382 */ if (m._availPageMem < 4194304) {
+/* 2383 */ if ((this.lastVMBigWarning == 0) || (this.showedMidWarn) ||
+/* 2384 */ (now > this.lastVMBigWarning + 300000)) {
+/* 2385 */ Console.println(Console.message("Low-virt-mem"));
+/* 2386 */ this.lastVMBigWarning = now;
+/* 2387 */ this.showedMidWarn = false;
+/* */ }
+/* 2389 */ this.statusMessage = lowVMMsg;
+/* 2390 */ } else if ((m._availPageMem > 5242880) &&
+/* 2391 */ (this.lastVMBigWarning != 0)) {
+/* 2392 */ if (m._availPageMem > 10485760) {
+/* 2393 */ Console.println(Console.message("plenty-virt"));
+/* 2394 */ this.lastVMBigWarning = 0;
+/* 2395 */ } else if (!this.showedMidWarn) {
+/* 2396 */ Console.println(Console.message("plenty-virt-mem"));
+/* 2397 */ this.showedMidWarn = true;
+/* */ }
+/* 2399 */ if (this.statusMessage == lowVMMsg) {
+/* 2400 */ this.statusMessage = "";
+/* */ }
+/* */ }
+/* 2403 */ Object[] arguments = { new String(Std.getProductName()),
+/* 2404 */ new Integer(24) };
+/* */
+/* 2406 */ if (startupMemCheck) {
+/* 2407 */ if (m._totPhysMem < 24000000) {
+/* 2408 */ String result = MessageFormat.format(
+/* 2409 */ Console.message("Mem-detected"), arguments);
+/* */
+/* 2411 */ new OkCancelDialog(getFrame(), null,
+/* 2412 */ Console.message("Too-Little-RAM"), null,
+/* 2413 */ Console.message("OK"), result, true);
+/* */ }
+/* */
+/* 2416 */ startupMemCheck = false;
+/* 2417 */ System.out.println("System has " + m._totPhysMem +
+/* 2418 */ " bytes of physical RAM");
+/* */ }
+/* */
+/* 2421 */ this.lastVMCheck = now;
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public URL getAvatarName()
+/* */ {
+/* 2436 */ return this.avatarURL;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void setServerURL(URL serverURL)
+/* */ {
+/* 2459 */ super.setServerURL(serverURL);
+/* */ }
+/* */
+/* */ public void dialogDone(Object who, boolean confirmed)
+/* */ {
+/* 2464 */ if ((who instanceof QuitDialog)) {
+/* 2465 */ if (confirmed)
+/* 2466 */ Console.quit();
+/* 2467 */ } else if ((who instanceof BootDialog)) {
+/* 2468 */ if (confirmed) {
+/* 2469 */ BootDialog bd = (BootDialog)who;
+/* 2470 */ String bname = bd.getBoot();
+/* 2471 */ if (!bname.equals(""))
+/* 2472 */ Pilot.sendText("world", "!boot " + bname);
+/* */ }
+/* 2474 */ } else if ((who instanceof ChannelDialog)) {
+/* 2475 */ if (confirmed) {
+/* 2476 */ ChannelDialog cd = (ChannelDialog)who;
+/* 2477 */ String newChannel = cd.getChannel();
+/* */
+/* 2479 */ Pilot pilot = Pilot.getActive();
+/* 2480 */ String oldPos = pilot != null ? pilot.getURL() : null;
+/* 2481 */ if (oldPos != null)
+/* */ {
+/* */
+/* 2484 */ int channelIndex = oldPos.indexOf("<");
+/* 2485 */ int channelEndIndex = oldPos.indexOf(">");
+/* 2486 */ if ((channelIndex >= 0) && (channelEndIndex > channelIndex))
+/* 2487 */ TeleportAction.teleport(
+/* */
+/* */
+/* 2490 */ oldPos.substring(0, channelIndex + 1) + newChannel + oldPos.substring(channelEndIndex), null);
+/* */ } else {
+/* 2492 */ Console.println(Console.message("cant-determine"));
+/* */ }
+/* */ }
+/* 2495 */ } else if ((who instanceof ChatDialog)) {
+/* 2496 */ if (confirmed) {
+/* 2497 */ ChatDialog cd = (ChatDialog)who;
+/* 2498 */ int newFontsize = cd.getFontsize();
+/* 2499 */ int newLines = cd.getLines();
+/* 2500 */ int newLength = cd.getLength();
+/* 2501 */ if (newLines < 6) {
+/* 2502 */ newLines = 6;
+/* */ }
+/* */
+/* 2505 */ int oldFontSize = IniFile.gamma().getIniInt("ChatFontSize", 12);
+/* 2506 */ int oldLength = IniFile.gamma().getIniInt("ChatLengthLimit",
+/* 2507 */ 20000);
+/* 2508 */ if ((newFontsize != oldFontSize) || (newLines != chatLines) ||
+/* 2509 */ (newLength != oldLength))
+/* */ {
+/* 2511 */ if (newFontsize != oldFontSize)
+/* 2512 */ IniFile.gamma().setIniInt("ChatFontSize", newFontsize);
+/* 2513 */ if (newLines != chatLines) {
+/* 2514 */ chatLines = newLines;
+/* 2515 */ IniFile.gamma().setIniInt("ChatLines", newLines);
+/* */ }
+/* 2517 */ if (newLength != oldLength) {
+/* 2518 */ NewSharedTextArea.chatLengthLimit = newLength;
+/* 2519 */ ClassicSharedTextArea.chatLengthLimit = newLength;
+/* 2520 */ IniFile.gamma().setIniInt("ChatLengthLimit", newLength);
+/* */ }
+/* */
+/* 2523 */ int h = chatLines *
+/* 2524 */ this.chat.listen.getComponent()
+/* 2525 */ .getFontMetrics(this.chat.listen.getFont())
+/* 2526 */ .getHeight();
+/* */
+/* */
+/* 2529 */ h -= 96;
+/* 2530 */ if ((h > 0) && (this.adFiller != null)) {
+/* 2531 */ this.adFiller.setHeight(h);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 2541 */ if (this.chat.listen.getComponent().getClass() == NewSharedTextArea.class) {
+/* */ try {
+/* 2543 */ NewSharedTextArea gta = (NewSharedTextArea)this.chat.listen
+/* 2544 */ .getComponent();
+/* 2545 */ gta.setFontSize(newFontsize);
+/* 2546 */ gta.setRows(chatLines);
+/* */
+/* 2548 */ gta.scrollToBottom();
+/* 2549 */ gta.setScrollBounds();
+/* */ }
+/* */ catch (Exception localException) {}
+/* */ }
+/* */
+/* */
+/* 2555 */ Console.frame.invalidate();
+/* 2556 */ Console.frame.validate();
+/* 2557 */ Console.frame.repaint();
+/* */ }
+/* */
+/* */ }
+/* */
+/* */ }
+/* 2563 */ else if ((who instanceof LoginWizard)) {
+/* 2564 */ if (!$assertionsDisabled) throw new AssertionError();
+/* 2565 */ } else if ((who instanceof CDControl)) {
+/* 2566 */ if (this.cdcontrol == who)
+/* 2567 */ this.cdcontrol = null;
+/* 2568 */ } else if ((who instanceof InternetConnectionDialog)) {
+/* 2569 */ if (!$assertionsDisabled) throw new AssertionError();
+/* 2570 */ } else if (who == this.reloginDialog) {
+/* 2571 */ if (confirmed)
+/* 2572 */ Galaxy.forceOffline(true);
+/* 2573 */ this.reloginDialog = null;
+/* */ }
+/* */ }
+/* */
+/* */
+/* */ public void setAvatar(URL url)
+/* */ {
+/* 2580 */ this.avatarURL = url;
+/* */
+/* */
+/* 2583 */ boolean isVIPAv = url.getInternal().toLowerCase().endsWith(".rwg");
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 2589 */ boolean hasAmnesty = (url.equals(getDefaultURL())) &&
+/* 2590 */ (!getGalaxy().getOnline());
+/* */
+/* 2592 */ if ((!getVIP()) && (isVIPAv) && (!hasAmnesty)) {
+/* 2593 */ Console.println(
+/* */
+/* 2595 */ Console.message("Only-VIPs") + " '" + SelectAvatarAction.getPrettyAvatarName(url.getBase()) + "'.");
+/* 2596 */ return;
+/* */ }
+/* */
+/* */
+/* */
+/* 2601 */ if (VehicleShape.isVehicle(url)) {
+/* 2602 */ this.tempCarAvatar = url.getAbsolute();
+/* 2603 */ super.setAvatar(url);
+/* 2604 */ return;
+/* */ }
+/* */
+/* 2607 */ this.tempCarAvatar = "";
+/* */
+/* */
+/* 2610 */ if (this.avatarMenu != null) {
+/* 2611 */ this.avatarMenu.customize.setEnabled(!url.getAbsolute().endsWith("mov"));
+/* */ }
+/* */
+/* 2614 */ if (!url.equals(getDefaultAvatarURL())) {
+/* 2615 */ if (getVIPAvatars()) {
+/* 2616 */ if (!isVIPAv) {
+/* 2617 */ IniFile.gamma().setIniString("VIPAVATAR", "");
+/* */ }
+/* */ else
+/* 2620 */ IniFile.gamma().setIniString("VIPAVATAR", url.getAbsolute());
+/* */ }
+/* 2622 */ if (!isVIPAv)
+/* 2623 */ IniFile.gamma().setIniString("AVATAR", url.getAbsolute());
+/* */ }
+/* 2625 */ super.setAvatar(url);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ protected void loadPilot(URL url)
+/* */ {
+/* 2642 */ super.loadPilot(url);
+/* */
+/* 2644 */ findAvatarMenuItem(url);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void setChatname(String chatname)
+/* */ {
+/* 2653 */ assert (chatname != null);
+/* 2654 */ if (chatname.length() != 0) {
+/* 2655 */ String nameStr = (getVIP() ? (vip > 1 ? Console.message("VIP") +
+/* 2656 */ " " : Console.message("vip")) +
+/* 2657 */ " " : "") +
+/* 2658 */ "\"" + Console.parseUnicode(chatname) + "\"";
+/* 2659 */ this.yourName.setText(nameStr);
+/* */
+/* 2661 */ IniFile.gamma()
+/* 2662 */ .setIniString("LASTCHATNAME", parseExtended(nameStr));
+/* */ } else {
+/* 2664 */ this.yourName.setText(Console.message("Off-line"));
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void connectionCallback(Object caller, boolean connected)
+/* */ {
+/* 2675 */ super.connectionCallback(caller, connected);
+/* 2676 */ if ((caller instanceof Galaxy))
+/* */ {
+/* 2678 */ if (caller != this.galaxy)
+/* 2679 */ return;
+/* 2680 */ if (connected) {
+/* 2681 */ WorldServer serv = getServerNew();
+/* 2682 */ this.friends.setServer(serv, getGalaxy().getIniSection());
+/* 2683 */ this.mutes.setServer(serv, getGalaxy().getIniSection());
+/* 2684 */ if (vip < 2) {
+/* 2685 */ Console.println(vip == 1 ?
+/* 2686 */ Console.message("Press-full-VIP") :
+/* 2687 */ Console.message("Press-VIP"));
+/* */ }
+/* 2689 */ PosableShape.downloadPermittedNames();
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void galaxyDisconnected()
+/* */ {
+/* 2701 */ super.galaxyDisconnected();
+/* 2702 */ getFriends().maybeServerDisconnect();
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public boolean okToQuit()
+/* */ {
+/* 2711 */ int quitDlg = IniFile.override().getIniInt("QuitDialog", 1);
+/* */ try
+/* */ {
+/* 2714 */ if (quitDlg == 1) {
+/* 2715 */ new QuitDialog(getFrame(), this);
+/* 2716 */ return false;
+/* */ }
+/* */ }
+/* */ catch (Exception localException) {}
+/* */
+/* */
+/* 2722 */ return true;
+/* */ }
+/* */
+/* */ public Rectangle getBrowserPlacement()
+/* */ {
+/* 2727 */ String coords = IniFile.gamma().getIniString("BROWSERWINDOW", "");
+/* 2728 */ if (coords.length() != 0) {
+/* 2729 */ StringTokenizer tok = new StringTokenizer(coords, " ,");
+/* */ try {
+/* 2731 */ return new Rectangle(Integer.parseInt(tok.nextToken()),
+/* 2732 */ Integer.parseInt(tok.nextToken()), Integer.parseInt(tok
+/* 2733 */ .nextToken()),
+/* 2734 */ Integer.parseInt(tok.nextToken()));
+/* */ }
+/* */ catch (NumberFormatException localNumberFormatException) {}catch (NoSuchElementException localNoSuchElementException) {}
+/* */ }
+/* */
+/* */
+/* */
+/* 2741 */ int w = this.menuButtons.getLocationOnScreen().x -
+/* 2742 */ (int)(this.menuButtons.getSize().width * 0.7D);
+/* */
+/* */
+/* */
+/* */
+/* 2747 */ int frameWidth = Window.getSystemMetrics(32);
+/* 2748 */ int screenWidth = Toolkit.getDefaultToolkit().getScreenSize().width;
+/* 2749 */ int minWidth = Math.min(screenWidth, 640) + 2 * frameWidth;
+/* */
+/* */
+/* */
+/* */
+/* 2754 */ int x = 0;
+/* */
+/* 2756 */ if (w != minWidth) {
+/* 2757 */ if (w > minWidth)
+/* 2758 */ x += w - minWidth;
+/* 2759 */ w = minWidth;
+/* */ }
+/* */
+/* */
+/* 2763 */ if (w > screenWidth) {
+/* 2764 */ x += -frameWidth;
+/* */ }
+/* 2766 */ int h = this.chat.listen.getLocationOnScreen().y +
+/* 2767 */ this.chat.listen.getSize().height - this.chat.line.getSize().height;
+/* 2768 */ int y = 0;
+/* */
+/* 2770 */ if (h > maxWebSize) {
+/* 2771 */ y += h - maxWebSize;
+/* 2772 */ h = maxWebSize;
+/* */ }
+/* */
+/* 2775 */ return new Rectangle(x, y, w, h);
+/* */ }
+/* */
+/* */
+/* */ public Object properties(int index, int offset, int mode, Object value)
+/* */ throws NoSuchPropertyException
+/* */ {
+/* 2782 */ Object ret = null;
+/* */
+/* 2784 */ switch (index - offset) {
+/* */ case 0:
+/* 2786 */ if (mode == 0) {
+/* 2787 */ ret = URLPropertyEditor.make(
+/* 2788 */ new Property(this, index, "Avatar"), "rwg;mov");
+/* 2789 */ } else if (mode == 1) {
+/* 2790 */ ret = this.lastPilotRequested;
+/* 2791 */ } else if (mode == 2)
+/* 2792 */ setNextAvatar((URL)value, null);
+/* 2793 */ break;
+/* */
+/* */ case 1:
+/* 2796 */ if (mode == 0) {
+/* 2797 */ ret = BooleanPropertyEditor.make(new Property(this, index,
+/* 2798 */ "Collect garbage"), "No", "Yes");
+/* 2799 */ } else if (mode == 1) {
+/* 2800 */ ret = new Boolean(false);
+/* 2801 */ } else if ((mode == 2) &&
+/* 2802 */ (((Boolean)value).booleanValue())) {
+/* 2803 */ System.gc();
+/* 2804 */ System.runFinalization();
+/* */ }
+/* */
+/* 2807 */ break;
+/* */
+/* */ default:
+/* 2810 */ ret = super.properties(index, offset + 2, mode, value);
+/* */ }
+/* 2812 */ return ret;
+/* */ }
+/* */
+/* */
+/* 2816 */ private static Object classCookie = new Object();
+/* */
+/* */ public void saveState(Saver s) throws IOException
+/* */ {
+/* 2820 */ s.saveVersion(0, classCookie);
+/* 2821 */ super.saveState(s);
+/* */ }
+/* */
+/* */ public void restoreState(Restorer r) throws IOException, TooNewException
+/* */ {
+/* 2826 */ int vers = r.restoreVersion(classCookie);
+/* 2827 */ switch (vers) {
+/* */ case 0:
+/* 2829 */ super.restoreState(r);
+/* 2830 */ break;
+/* */
+/* */ default:
+/* 2833 */ throw new TooNewException();
+/* */ }
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\DefaultConsole.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file