Пример #1
0
  public void draw(GOut g) {
    if (screenshot && Config.sshot_noui) {
      visible = false;
    }
    super.draw(g);
    drawcmd(g, new Coord(20, 580));
    if (screenshot && (!Config.sshot_nonames || names_ready)) {
      visible = true;
      screenshot = false;
      try {
        Coord s = MainFrame.getInnerSize();
        String stamp = Utils.sessdate(System.currentTimeMillis());
        String ext = Config.sshot_compress ? ".jpg" : ".png";
        File f = new File("screenshots/SS_" + stamp + ext);
        f.mkdirs();
        Screenshot.writeToFile(f, s.x, s.y);
      } catch (GLException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }

    //	if(!afk && (System.currentTimeMillis() - ui.lastevent > 300000)) {
    //	    afk = true;
    //	    Widget slen = findchild(SlenHud.class);
    //	    if(slen != null)
    //		slen.wdgmsg("afk");
    //	} else if(afk && (System.currentTimeMillis() - ui.lastevent < 300000)) {
    //	    afk = false;
    //	}
  }
 public void draw(GOut g) {
   super.draw(g);
   drawcmd(g, new Coord(20, sz.y - 20));
 }