blob: c4e8e6381f96be225c2d202e5057f11aae788c05 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package NET.worlds.console;
import NET.worlds.core.IniFile;
public class AdBanner {
private WebControl wc = null;
public AdBanner(int width, int height, String url) {
if (IniFile.gamma().getIniInt("NoAdBanners", 0) != 1) {
Console c = Console.getActive();
if (c != null && c instanceof DefaultConsole) {
DefaultConsole dc = (DefaultConsole)c;
try {
RenderCanvas canvas = dc.getRender();
if (canvas == null) {
return;
}
this.wc = new WebControl(canvas, width, height, false, true, true);
this.wc.activate();
this.wc.setURL(url);
} catch (NoWebControlException var7) {
System.out.println("Error creating IE control; " + var7.toString());
}
}
}
}
public void detach() {
if (this.wc != null) {
this.wc.detach();
}
this.wc = null;
}
}
|