public WidgetBuy(core.Player p, core.Castle c, core.CastleBuilding b)
	{
		super();
		
		castle = c;
		player = p;
		building = b;
		
		setLayout(layout);
		//setFrameStyle(1);
		//setMinimumHeight(200);
		//setMaximumWidth(200);
		setSizePolicy(Policy.MinimumExpanding, Policy.Maximum);
		
		layout.addWidget(new QLabel("<b>"+b.name+"</b>"), 0, 0);
		layout.addWidget(new QLabel(b.description), 1, 0);
		layout.addWidget(require, 3, 0);
		
		if (c.getBuildings().contains(b)) {
			buy = new QPushButton("Kupiony");
			setInactive();
			
		} else {
		
			String buystr = "Kup (";
			if (b.cost.gold > 0) {
				buystr += ""+b.cost.gold+" złota, ";
			}
			if (b.cost.ore > 0) {
				buystr += ""+b.cost.ore+" kamienia, ";
			}
			if (b.cost.wood > 0) {
				buystr += ""+b.cost.wood+" drewna, ";
			}
			buystr = buystr.substring(0, buystr.length()-2) + ")";
			buy = new QPushButton(buystr);
			checkActive();
			
			buy.clicked.connect(this, "buyClicked()");
		}
		layout.addWidget(buy, 2, 0);
	}