summaryrefslogtreecommitdiff
path: root/NET/worlds/console/AdBanner.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/console/AdBanner.java')
-rw-r--r--NET/worlds/console/AdBanner.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/NET/worlds/console/AdBanner.java b/NET/worlds/console/AdBanner.java
new file mode 100644
index 0000000..b4abf72
--- /dev/null
+++ b/NET/worlds/console/AdBanner.java
@@ -0,0 +1,55 @@
+/* */ package NET.worlds.console;
+/* */
+/* */ import NET.worlds.core.IniFile;
+/* */ import java.io.PrintStream;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class AdBanner
+/* */ {
+/* */ public AdBanner(int width, int height, String url)
+/* */ {
+/* 17 */ if (IniFile.gamma().getIniInt("NoAdBanners", 0) == 1) {
+/* 18 */ return;
+/* */ }
+/* 20 */ Console c = Console.getActive();
+/* 21 */ if ((c != null) && ((c instanceof DefaultConsole))) {
+/* 22 */ DefaultConsole dc = (DefaultConsole)c;
+/* */
+/* */ try
+/* */ {
+/* 26 */ RenderCanvas canvas = dc.getRender();
+/* 27 */ if (canvas == null) {
+/* 28 */ return;
+/* */ }
+/* 30 */ this.wc = new WebControl(canvas, width, height, false, true, true);
+/* 31 */ this.wc.activate();
+/* 32 */ this.wc.setURL(url);
+/* */ }
+/* */ catch (NoWebControlException e) {
+/* 35 */ System.out.println("Error creating IE control; " + e.toString());
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* */ public void detach()
+/* */ {
+/* 43 */ if (this.wc != null)
+/* 44 */ this.wc.detach();
+/* 45 */ this.wc = null;
+/* */ }
+/* */
+/* 48 */ private WebControl wc = null;
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\AdBanner.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file