diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/QuitDialog.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/console/QuitDialog.java')
| -rw-r--r-- | NET/worlds/console/QuitDialog.java | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/NET/worlds/console/QuitDialog.java b/NET/worlds/console/QuitDialog.java new file mode 100644 index 0000000..6095075 --- /dev/null +++ b/NET/worlds/console/QuitDialog.java @@ -0,0 +1,70 @@ +/* */ package NET.worlds.console; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import java.awt.Component; +/* */ import java.awt.Event; +/* */ import java.awt.Rectangle; +/* */ import java.awt.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class QuitDialog +/* */ extends PolledDialog +/* */ implements ImageButtonsCallback +/* */ { +/* */ private static final long serialVersionUID = 2648594609846911429L; +/* */ private ImageButtons ib; +/* */ +/* */ public QuitDialog(Window parent, DialogReceiver receiver) +/* */ { +/* 27 */ super(parent, receiver, Console.message("Quit"), true); +/* 28 */ Rectangle[] rects = new Rectangle[2]; +/* 29 */ int yesX = IniFile.override().getIniInt("quitYesX", 141); +/* 30 */ int yesY = IniFile.override().getIniInt("quitYesY", 76); +/* 31 */ int yesW = IniFile.override().getIniInt("quitYesW", 78); +/* 32 */ int yesH = IniFile.override().getIniInt("quitYesH", 22); +/* 33 */ rects[0] = new Rectangle(yesX, yesY, yesW, yesH); +/* 34 */ int noX = IniFile.override().getIniInt("quitNoX", 141); +/* 35 */ int noY = IniFile.override().getIniInt("quitNoY", 114); +/* 36 */ int noW = IniFile.override().getIniInt("quitNoW", 78); +/* 37 */ int noH = IniFile.override().getIniInt("quitNoH", 22); +/* 38 */ rects[1] = new Rectangle(noX, noY, noW, noH); +/* 39 */ String quitGif = IniFile.override().getIniString("quitDlg", +/* 40 */ Console.message("DYRWTQ.GIF")); +/* 41 */ this.ib = new ImageButtons(quitGif, rects, this); +/* 42 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 47 */ add("Center", this.ib); +/* */ } +/* */ +/* */ public Object imageButtonsCallback(Component who, int which) { +/* 51 */ done(which == 0); +/* 52 */ return null; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) +/* */ { +/* 58 */ if (key == 27) +/* 59 */ return done(false); +/* 60 */ if (key == 10) +/* 61 */ return done(true); +/* 62 */ return super.keyDown(event, key); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\QuitDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |