@Override public void change(QualityList.SingleType item) { super.change(item); if (item != null) { cfg.set(item); } }
public CFGBox(String lbl, CFG<Boolean> cfg, String tip, boolean observe) { super(lbl); this.cfg = cfg; defval(); if (tip != null) { tooltip = Text.render(tip).tex(); } if (observe) { cfg.observe(this); } }
public QualityBox(int w, int listh, int itemh, CFG<QualityList.SingleType> cfg) { super(w, listh, itemh); this.cfg = cfg; this.sel = cfg.get(); }
@Override public void updated(CFG<Boolean> cfg) { a = cfg.get(); }
@Override public void destroy() { cfg.unobserve(this); super.destroy(); }
@Override public void set(boolean a) { this.a = a; cfg.set(a); }
protected void defval() { a = cfg.get(); }
public void set(T value) { CFG.set(this, value); observe(); }
public T get() { return CFG.get(this); }