Projects >> Custom-Salem >>5586f54fe3d47ca53acb4850c0ae1629dc5a8f1f

Chunk
Conflicting content
	Resource.loadimg("gfx/hud/login/cldh"),
    };
    public int height, y;
<<<<<<< HEAD
    public IButton sau, sad;
=======
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
    public List chars = new ArrayList();
    
    public static class Char {
Solution content
	Resource.loadimg("gfx/hud/login/cldh"),
    };
    public int height, y;
    public IButton sau, sad;
    public List chars = new ArrayList();
    
    public static class Char {
File
Charlist.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
	super(c, new Coord(clu[0].getWidth(), (bmargin * 2) + (bg.sz().y * height) + (margin * (height - 1))), parent);
	this.height = height;
	y = 0;
<<<<<<< HEAD
	sau = new IButton(new Coord(0, 0), this, clu[0], clu[1], clu[2]) {
		public void click() {
		    scroll(-1);
		}
	    };
	sad = new IButton(new Coord(0, sz.y - cld[0].getHeight() - 1), this, cld[0], cld[1], cld[2]) {
		public void click() {
		    scroll(1);
		}
	    };
	sau.hide();
	sad.hide();
=======
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
    }
    
    public void scroll(int amount) {
Solution content
	super(c, new Coord(clu[0].getWidth(), (bmargin * 2) + (bg.sz().y * height) + (margin * (height - 1))), parent);
	this.height = height;
	y = 0;
	sau = new IButton(new Coord(0, 0), this, clu[0], clu[1], clu[2]) {
		public void click() {
		    scroll(-1);
		}
	    };
	sad = new IButton(new Coord(0, sz.y - cld[0].getHeight() - 1), this, cld[0], cld[1], cld[2]) {
		public void click() {
		    scroll(1);
		}
	    };
	sau.hide();
	sad.hide();
    }
    
    public void scroll(int amount) {
File
Charlist.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
import static haven.PUtils.*;

public class Window extends Widget implements DTarget {
<<<<<<< HEAD
    private static final Tex tleft = Resource.loadtex("gfx/hud/wnd/tleft");
    private static final Tex tmain = Resource.loadtex("gfx/hud/wnd/tmain");
    private static final Tex tright = Resource.loadtex("gfx/hud/wnd/tright");
    public static final BufferedImage[] cbtni = new BufferedImage[] {
	Resource.loadimg("gfx/hud/wnd/cbtn"),
	Resource.loadimg("gfx/hud/wnd/cbtnd"),
	Resource.loadimg("gfx/hud/wnd/cbtnh")};
    public static final BufferedImage[] lbtni = new BufferedImage[] {
	Resource.loadimg("gfx/hud/wnd/lbtn"),
	Resource.loadimg("gfx/hud/wnd/lbtnd"),
	Resource.loadimg("gfx/hud/wnd/lbtnh")};
    public static final BufferedImage[] rbtni = new BufferedImage[] {
	Resource.loadimg("gfx/hud/wnd/rbtn"),
	Resource.loadimg("gfx/hud/wnd/rbtnd"),
	Resource.loadimg("gfx/hud/wnd/rbtnh")};
    public static final Color cc = new Color(248, 230, 190);
    public static final Text.Furnace cf = new Text.Imager(new Text.Foundry(new Font("Serif", Font.BOLD, 15), cc).aa(true)) {
	    protected BufferedImage proc(Text text) {
		return(rasterimg(blurmask2(text.img.getRaster(), 1, 1, Color.BLACK)));
	    }
	};
    public static final IBox fbox = new IBox("gfx/hud", "ftl", "ftr", "fbl", "fbr", "fl", "fr", "ft", "fb");
    public static final IBox swbox = new IBox("gfx/hud", "stl", "str", "sbl", "sbr", "sl", "sr", "st", "sb");
    public static final IBox wbox = new IBox("gfx/hud/wnd", "tl", "tr", "bl", "br", "vl", "vr", "ht", "hb");
    private static final IBox topless = new IBox(Tex.empty, Tex.empty, wbox.cbl, wbox.cbr, wbox.bl, wbox.br, Tex.empty, wbox.bb);
    private static final int th = tleft.sz().y, tdh = th - tmain.sz().y, tc = tdh + 18;
    private static final Coord capc = new Coord(20, th - 3);
    public Coord mrgn = new Coord(10, 10);
    private final Text cap;
    private boolean dt = false;
    private boolean dm = false;
    public Coord ctl, csz, atl, asz;
    private Coord doff;
    private final IButton cbtn;
    private final Collection twdgs = new LinkedList();
=======
    public static final Tex bg = Resource.loadtex("gfx/hud/wnd/bgtex");
    public static final Tex cl = Resource.loadtex("gfx/hud/wnd/cleft");
    public static final Tex cm = Resource.loadtex("gfx/hud/wnd/cmain");
    public static final Tex cr = Resource.loadtex("gfx/hud/wnd/cright");
    public static final int capo = 7, capio = 2;
    public static final Coord mrgn = new Coord(13, 13);
    public static final Color cc = Color.YELLOW;
    public static final Text.Foundry cf = new Text.Foundry(new Font("Serif", Font.PLAIN, 12));
    public static final IBox wbox = new IBox("gfx/hud/wnd", "tl", "tr", "bl", "br", "extvl", "extvr", "extht", "exthb") {
	    final Coord co = new Coord(3, 3), bo = new Coord(2, 2);

	    public Coord btloff() {return(super.btloff().sub(bo));}
	    public Coord ctloff() {return(super.ctloff().sub(co));}
	    public Coord bisz() {return(super.bisz().sub(bo.mul(2)));}
	    public Coord cisz() {return(super.cisz().sub(co.mul(2)));}
	};
    private static final BufferedImage[] cbtni = new BufferedImage[] {
	Resource.loadimg("gfx/hud/wnd/cbtn"),
	Resource.loadimg("gfx/hud/wnd/cbtnd"),
	Resource.loadimg("gfx/hud/wnd/cbtnh")};
    public final Coord tlo, rbo;
    public final IButton cbtn;
    public boolean dt = false;
    public Text cap;
    public Coord wtl, wsz, ctl, csz, atl, asz;
    public Coord doff;
    private boolean dm = false;
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3

    @RName("wnd")
    public static class $_ implements Factory {
Solution content
import static haven.PUtils.*;

public class Window extends Widget implements DTarget {
    private static final Tex tleft = Resource.loadtex("gfx/hud/wnd/tleft");
    private static final Tex tmain = Resource.loadtex("gfx/hud/wnd/tmain");
    private static final Tex tright = Resource.loadtex("gfx/hud/wnd/tright");
    public static final BufferedImage[] cbtni = new BufferedImage[] {
	Resource.loadimg("gfx/hud/wnd/cbtn"),
	Resource.loadimg("gfx/hud/wnd/cbtnd"),
	Resource.loadimg("gfx/hud/wnd/cbtnh")};
    public static final BufferedImage[] lbtni = new BufferedImage[] {
	Resource.loadimg("gfx/hud/wnd/lbtn"),
	Resource.loadimg("gfx/hud/wnd/lbtnd"),
	Resource.loadimg("gfx/hud/wnd/lbtnh")};
    public static final BufferedImage[] rbtni = new BufferedImage[] {
	Resource.loadimg("gfx/hud/wnd/rbtn"),
	Resource.loadimg("gfx/hud/wnd/rbtnd"),
	Resource.loadimg("gfx/hud/wnd/rbtnh")};
    public static final Color cc = new Color(248, 230, 190);
    public static final Text.Furnace cf = new Text.Imager(new Text.Foundry(new Font("Serif", Font.BOLD, 15), cc).aa(true)) {
	    protected BufferedImage proc(Text text) {
		return(rasterimg(blurmask2(text.img.getRaster(), 1, 1, Color.BLACK)));
	    }
	};
    public static final IBox fbox = new IBox("gfx/hud", "ftl", "ftr", "fbl", "fbr", "fl", "fr", "ft", "fb");
    public static final IBox swbox = new IBox("gfx/hud", "stl", "str", "sbl", "sbr", "sl", "sr", "st", "sb");
    public static final IBox wbox = new IBox("gfx/hud/wnd", "tl", "tr", "bl", "br", "vl", "vr", "ht", "hb");
    private static final IBox topless = new IBox(Tex.empty, Tex.empty, wbox.cbl, wbox.cbr, wbox.bl, wbox.br, Tex.empty, wbox.bb);
    private static final int th = tleft.sz().y, tdh = th - tmain.sz().y, tc = tdh + 18;
    private static final Coord capc = new Coord(20, th - 3);
    public Coord mrgn = new Coord(10, 10);
    private final Text cap;
    private boolean dt = false;
    private boolean dm = false;
    public Coord ctl, csz, atl, asz;
    private Coord doff;
    private final IButton cbtn;
    private final Collection twdgs = new LinkedList();

    @RName("wnd")
    public static class $_ implements Factory {
File
Window.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
	}
    }

<<<<<<< HEAD
    public Window(Coord c, Coord sz, Widget parent, String cap) {
=======
    public Window(Coord c, Coord sz, Widget parent, String cap, Coord tlo, Coord rbo) {
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
	super(c, new Coord(0, 0), parent);
	if(cap != null)
<<<<<<< HEAD
Solution content
	}
    }

    public Window(Coord c, Coord sz, Widget parent, String cap) {
	super(c, new Coord(0, 0), parent);
	if(cap != null)
File
Window.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
	super(c, new Coord(0, 0), parent);
	if(cap != null)
<<<<<<< HEAD
	    this.cap = cf.render(cap);
	else
	    this.cap = null;
=======
	    this.cap = cf.render(cap, cc);
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
	resize(sz);
	setfocustab(true);
	parent.setfocus(this);
Solution content
	super(c, new Coord(0, 0), parent);
	if(cap != null)
	    this.cap = cf.render(cap);
	else
	    this.cap = null;
	resize(sz);
	setfocustab(true);
	parent.setfocus(this);
File
Window.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
	addtwdg(cbtn);
    }

<<<<<<< HEAD
=======
    public Window(Coord c, Coord sz, Widget parent, String cap) {
	this(c, sz, parent, cap, new Coord(0, 0), new Coord(0, 0));
    }

    public void cdraw(GOut g) {
    }

    public void draw(GOut g) {
	Coord bgc = new Coord();
	for(bgc.y = ctl.y; bgc.y < ctl.y + csz.y; bgc.y += bg.sz().y) {
	    for(bgc.x = ctl.x; bgc.x < ctl.x + csz.x; bgc.x += bg.sz().x)
		g.image(bg, bgc, ctl, csz);
	}
	cdraw(g.reclip(atl, asz));
	wbox.draw(g, wtl, wsz);
	if(cap != null) {
	    int w = cap.sz().x;
	    int y = wtl.y - capo;
	    g.image(cl, new Coord(wtl.x + (wsz.x / 2) - (w / 2) - cl.sz().x, y));
	    g.image(cm, new Coord(wtl.x + (wsz.x / 2) - (w / 2), y), new Coord(w, cm.sz().y));
	    g.image(cr, new Coord(wtl.x + (wsz.x / 2) + (w / 2), y));
	    g.image(cap.tex(), new Coord(wtl.x + (wsz.x / 2) - (w / 2), y + capio));
	}
	super.draw(g);
    }

>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
    public Coord contentsz() {
	Coord max = new Coord(0, 0);
	for(Widget wdg = child; wdg != null; wdg = wdg.next) {
Solution content
	addtwdg(cbtn);
    }

    public Coord contentsz() {
	Coord max = new Coord(0, 0);
	for(Widget wdg = child; wdg != null; wdg = wdg.next) {
File
Window.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
    }

    public void resize(Coord sz) {
<<<<<<< HEAD
	sz = sz.add(topless.bisz()).add(0, th).add(mrgn.mul(2));
	this.sz = sz;
	ctl = topless.btloff().add(0, th);
	csz = sz.sub(topless.bisz()).sub(0, th);
	atl = ctl.add(mrgn);
	asz = csz.sub(mrgn.mul(2));
	placetwdgs();
=======
	asz = sz;
	csz = asz.add(mrgn.mul(2));
	wsz = csz.add(wbox.bisz());
	wtl = new Coord(tlo.x, Math.max(tlo.y, capo));
	this.sz = wsz.add(wtl).add(rbo);
	ctl = wtl.add(wbox.btloff());
	atl = ctl.add(mrgn);
	placecbtn();
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
	for(Widget ch = child; ch != null; ch = ch.next)
	    ch.presize();
    }
Solution content
    public void resize(Coord sz) {
	sz = sz.add(topless.bisz()).add(0, th).add(mrgn.mul(2));
	this.sz = sz;
	ctl = topless.btloff().add(0, th);
	csz = sz.sub(topless.bisz()).sub(0, th);
	atl = ctl.add(mrgn);
	asz = csz.sub(mrgn.mul(2));
	placetwdgs();
	for(Widget ch = child; ch != null; ch = ch.next)
	    ch.presize();
    }
File
Window.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Variable
Chunk
Conflicting content
	    ch.presize();
    }

<<<<<<< HEAD
    public Coord xlate(Coord c, boolean in) {
	if(in)
	    return(c.add(atl));
	else
	    return(c.sub(atl));
    }

    public void cdraw(GOut g) {
    }

    public void draw(GOut g) {
	g.chcolor(0, 0, 0, 192);
	g.frect(ctl, csz);
	g.chcolor();
	cdraw(g.reclip(xlate(Coord.z, true), asz));
	topless.draw(g, new Coord(0, th), sz.sub(0, th));
	g.image(tleft, Coord.z);
	Coord tmul = new Coord(tleft.sz().x, tdh);
	Coord tmbr = new Coord(sz.x - tright.sz().x, th);
	for(int x = tmul.x; x < tmbr.x; x += tmain.sz().x) {
	    g.image(tmain, new Coord(x, tdh), tmul, tmbr);
	}
	g.image(tright, new Coord(sz.x - tright.sz().x, tdh));
	if(cap != null)
	    g.image(cap.tex(), capc.sub(0, cap.sz().y));
	/*
	if(cap != null) {
	    GOut cg = og.reclip(new Coord(0, -7), sz.add(0, 7));
	    int w = cap.tex().sz().x;
	    cg.image(cl, new Coord((sz.x / 2) - (w / 2) - cl.sz().x, 0));
	    cg.image(cm, new Coord((sz.x / 2) - (w / 2), 0), new Coord(w, cm.sz().y));
	    cg.image(cr, new Coord((sz.x / 2) + (w / 2), 0));
	    cg.image(cap.tex(), new Coord((sz.x / 2) - (w / 2), 0));
	}
	*/
	super.draw(g);
    }

=======
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
    public void uimsg(String msg, Object... args) {
	if(msg == "pack") {
	    pack();
Solution content
	    ch.presize();
    }

    public Coord xlate(Coord c, boolean in) {
	if(in)
	    return(c.add(atl));
	else
	    return(c.sub(atl));
    }

    public void cdraw(GOut g) {
    }

    public void draw(GOut g) {
	g.chcolor(0, 0, 0, 192);
	g.frect(ctl, csz);
	g.chcolor();
	cdraw(g.reclip(xlate(Coord.z, true), asz));
	topless.draw(g, new Coord(0, th), sz.sub(0, th));
	g.image(tleft, Coord.z);
	Coord tmul = new Coord(tleft.sz().x, tdh);
	Coord tmbr = new Coord(sz.x - tright.sz().x, th);
	for(int x = tmul.x; x < tmbr.x; x += tmain.sz().x) {
	    g.image(tmain, new Coord(x, tdh), tmul, tmbr);
	}
	g.image(tright, new Coord(sz.x - tright.sz().x, tdh));
	if(cap != null)
	    g.image(cap.tex(), capc.sub(0, cap.sz().y));
	/*
	if(cap != null) {
	    GOut cg = og.reclip(new Coord(0, -7), sz.add(0, 7));
	    int w = cap.tex().sz().x;
	    cg.image(cl, new Coord((sz.x / 2) - (w / 2) - cl.sz().x, 0));
	    cg.image(cm, new Coord((sz.x / 2) - (w / 2), 0), new Coord(w, cm.sz().y));
	    cg.image(cr, new Coord((sz.x / 2) + (w / 2), 0));
	    cg.image(cap.tex(), new Coord((sz.x / 2) - (w / 2), 0));
	}
	*/
	super.draw(g);
    }

    public void uimsg(String msg, Object... args) {
	if(msg == "pack") {
	    pack();
File
Window.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
	}
    }

<<<<<<< HEAD
=======
    public Coord xlate(Coord c, boolean in) {
	if(in)
	    return(c.add(atl));
	else
	    return(c.sub(atl));
    }

>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
    public boolean mousedown(Coord c, int button) {
	parent.setfocus(this);
	raise();
Solution content
	}
    }

    public boolean mousedown(Coord c, int button) {
	parent.setfocus(this);
	raise();
File
Window.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
	raise();
	if(super.mousedown(c, button))
	    return(true);
<<<<<<< HEAD
	if(c.y < tdh)
	    return(false);
	if(button == 1) {
	    ui.grabmouse(this);
	    dm = true;
	    doff = c;
=======
	if(c.isect(wtl, wsz) || ((cap != null) && c.isect(wtl.add((wsz.x / 2) - (cap.sz().x / 2), -capo), new Coord(cap.sz().x, capo)))) {
	    if(button == 1) {
		ui.grabmouse(this);
		dm = true;
		doff = c;
	    }
	    return(true);
>>>>>>> cd58a651bd565aedb9273eaf80ad153c8d3b42e3
	}
	return(false);
    }
Solution content
	raise();
	if(super.mousedown(c, button))
	    return(true);
	if(c.y < tdh)
	    return(false);
	if(button == 1) {
	    ui.grabmouse(this);
	    dm = true;
	    doff = c;
	}
	return(true);
    }
File
Window.java
Developer's decision
Version 1
Kind of conflict
Attribute
If statement
Method invocation
Return statement
Variable