diff options
| author | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
| commit | c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch) | |
| tree | df9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/scape/ItemNotAvailableDialog.java | |
| download | worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip | |
Initial commit
Diffstat (limited to 'NET/worlds/scape/ItemNotAvailableDialog.java')
| -rw-r--r-- | NET/worlds/scape/ItemNotAvailableDialog.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/NET/worlds/scape/ItemNotAvailableDialog.java b/NET/worlds/scape/ItemNotAvailableDialog.java new file mode 100644 index 0000000..c70268f --- /dev/null +++ b/NET/worlds/scape/ItemNotAvailableDialog.java @@ -0,0 +1,42 @@ +package NET.worlds.scape; + +import NET.worlds.console.Console; +import NET.worlds.console.DialogReceiver; +import NET.worlds.console.ImageButtons; +import NET.worlds.console.ImageButtonsCallback; +import NET.worlds.console.PolledDialog; +import java.awt.Component; +import java.awt.Rectangle; +import java.awt.Window; + +public class ItemNotAvailableDialog extends PolledDialog implements ImageButtonsCallback { + private ImageButtons ib; + + public ItemNotAvailableDialog(Window parent, DialogReceiver receiver) { + super(parent, receiver, Console.message("Not-Available"), false); + this.setAlignment(1); + Rectangle[] rects = new Rectangle[]{new Rectangle(101, 22, 48, 19)}; + this.ib = new ImageButtons(Console.message("notavail.gif"), rects, this); + this.ready(); + } + + @Override + protected void build() { + this.add("Center", this.ib); + } + + @Override + public Object imageButtonsCallback(Component who, int which) { + this.done(false); + return null; + } + + @Override + public boolean keyDown(java.awt.Event event, int key) { + if (key == 27) { + return this.done(false); + } else { + return key == 10 ? this.done(false) : super.keyDown(event, key); + } + } +} |