From e1e781bb2135ef78592226f1a3eaba4925702f1f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 May 2021 16:38:41 -0700 Subject: :star: --- NET/worlds/console/SetNumVisibleAvs.java | 174 +++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 NET/worlds/console/SetNumVisibleAvs.java (limited to 'NET/worlds/console/SetNumVisibleAvs.java') diff --git a/NET/worlds/console/SetNumVisibleAvs.java b/NET/worlds/console/SetNumVisibleAvs.java new file mode 100644 index 0000000..6227e6a --- /dev/null +++ b/NET/worlds/console/SetNumVisibleAvs.java @@ -0,0 +1,174 @@ +/* */ package NET.worlds.console; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.Galaxy; +/* */ import java.awt.BorderLayout; +/* */ import java.awt.Button; +/* */ import java.awt.Checkbox; +/* */ import java.awt.CheckboxGroup; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.GridLayout; +/* */ import java.awt.Label; +/* */ import java.awt.Panel; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetNumVisibleAvs +/* */ extends PolledDialog +/* */ { +/* */ private static final long serialVersionUID = -1189914406658113132L; +/* 29 */ private Button okButton = new Button( +/* 30 */ Console.message("Apply-Vis")); +/* 31 */ CheckboxGroup numAvsChoice = new CheckboxGroup(); +/* 32 */ CheckboxGroup fullAvsChoice = new CheckboxGroup(); +/* 33 */ private static Font font = new Font( +/* 34 */ Console.message("MenuFont"), 0, 12); +/* */ +/* */ public SetNumVisibleAvs() +/* */ { +/* 38 */ super(Console.getFrame(), null, Console.message("Num-Visible"), true); +/* 39 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 44 */ setLayout(new BorderLayout()); +/* 45 */ add("North", new Filler(5, 5)); +/* 46 */ add("South", new Filler(10, 10)); +/* 47 */ add("East", new Filler(5, 5)); +/* 48 */ add("West", new Filler(5, 5)); +/* */ +/* 50 */ Panel main = new Panel(new BorderLayout()); +/* 51 */ main.setFont(font); +/* */ +/* 53 */ main.add("North", new MultiLineLabel( +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 60 */ Console.message("sel-max-av"), 5, 5)); +/* */ +/* 62 */ Panel choices = new Panel(new GridLayout(10, 2)); +/* */ +/* 64 */ int numAvs = IniFile.gamma().getIniInt("avatars", 24); +/* */ +/* */ +/* 67 */ choices.add(new Label("")); +/* 68 */ choices.add(new Label(Console.message("Max-Avs"))); +/* */ +/* */ +/* 71 */ choices.add(new Label(Console.message("Slower"), +/* 72 */ 1)); +/* 73 */ choices.add(new Checkbox("100", this.numAvsChoice, numAvs == 100)); +/* */ +/* */ +/* 76 */ choices.add(new Label("")); +/* 77 */ choices.add(new Checkbox("80", this.numAvsChoice, numAvs == 80)); +/* */ +/* */ +/* 80 */ choices.add(new Label("")); +/* 81 */ choices.add(new Checkbox("60", this.numAvsChoice, numAvs == 60)); +/* */ +/* */ +/* 84 */ choices.add(new Label("")); +/* 85 */ choices.add(new Checkbox("40", this.numAvsChoice, numAvs == 40)); +/* */ +/* */ +/* 88 */ choices.add(new Label("")); +/* 89 */ choices.add(new Checkbox("32", this.numAvsChoice, numAvs == 32)); +/* */ +/* */ +/* 92 */ choices.add(new Label("")); +/* 93 */ choices.add(new Checkbox("24", this.numAvsChoice, numAvs == 24)); +/* */ +/* */ +/* 96 */ choices.add(new Label("")); +/* 97 */ choices.add(new Checkbox("16", this.numAvsChoice, numAvs == 16)); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 104 */ choices.add(new Label("")); +/* 105 */ choices.add(new Checkbox("8", this.numAvsChoice, numAvs == 8)); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 116 */ choices.add(new Label(Console.message("Faster"), +/* 117 */ 1)); +/* 118 */ choices.add(new Checkbox("4", this.numAvsChoice, numAvs == 4)); +/* */ +/* */ +/* */ +/* 122 */ main.add("Center", choices); +/* */ +/* 124 */ main.add("South", this.okButton); +/* */ +/* 126 */ add("Center", main); +/* */ } +/* */ +/* */ public boolean action(Event event, Object what) +/* */ { +/* 131 */ Object target = event.target; +/* 132 */ if (target == this.okButton) { +/* 133 */ done(true); +/* */ } else +/* 135 */ return false; +/* 136 */ return true; +/* */ } +/* */ +/* */ protected boolean done(boolean confirmed) +/* */ { +/* 141 */ if (confirmed) +/* */ { +/* 143 */ Checkbox c = this.numAvsChoice.getSelectedCheckbox(); +/* 144 */ if (c != null) { +/* */ try { +/* 146 */ IniFile.gamma().setIniInt("avatars", +/* 147 */ Integer.parseInt(c.getLabel())); +/* */ } +/* */ catch (NumberFormatException localNumberFormatException) {} +/* */ } +/* */ +/* 152 */ c = this.fullAvsChoice.getSelectedCheckbox(); +/* 153 */ if (c != null) { +/* */ try { +/* 155 */ String s = c.getLabel(); +/* 156 */ s = s.substring(0, s.length() - 1); +/* 157 */ IniFile.gamma().setIniInt("fullavpercent", +/* 158 */ Integer.parseInt(s)); +/* */ } +/* */ catch (NumberFormatException localNumberFormatException1) {} +/* */ } +/* */ +/* 163 */ Galaxy.forceOffline(true); +/* */ } +/* */ +/* 166 */ return super.done(confirmed); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\SetNumVisibleAvs.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file -- cgit v1.2.3