private void updlayout() { synchronized (ui.sess.glob.paginae) { List<Pagina> cur = new ArrayList<Pagina>(); loading = !cons(this.cur, cur); Collections.sort(cur, sorter); int i = curoff; hotmap.clear(); for (int y = 0; y < gsz.y; y++) { for (int x = 0; x < gsz.x; x++) { Pagina btn = null; if ((this.cur != null) && (x == gsz.x - 1) && (y == gsz.y - 1)) { btn = bk; } else if ((cur.size() > ((gsz.x * gsz.y) - 1)) && (x == gsz.x - 2) && (y == gsz.y - 1)) { btn = next; } else if (i < cur.size()) { Resource.AButton ad = cur.get(i).act(); if (ad.hk != 0) hotmap.put(Character.toUpperCase(ad.hk), cur.get(i)); btn = cur.get(i++); } layout[x][y] = btn; } } pagseq = ui.sess.glob.pagseq; } }
private Tex glowmask(Pagina pag) { Tex ret = glowmasks.get(pag); if (ret == null) { ret = new TexI( PUtils.glowmask( PUtils.glowmask(pag.res().layer(Resource.imgc).img.getRaster()), 4, new Color(32, 255, 32))); glowmasks.put(pag, ret); } return (ret); }
public boolean globtype(char k, KeyEvent ev) { if ((k == 27) && (this.cur != null)) { this.cur = null; curoff = 0; updlayout(); return (true); } else if ((k == 8) && (this.cur != null)) { this.cur = paginafor(this.cur.act().parent); curoff = 0; updlayout(); return (true); } else if ((k == 'N') && (layout[gsz.x - 2][gsz.y - 1] == next)) { use(next, false); return (true); } Pagina r = hotmap.get(Character.toUpperCase(k)); if (r != null) { use(r, true); return (true); } return (false); }