package client.gui.element;

import client.renderer.Drawing;
import common.util.Util;

public class Label extends Fill {
	public static final int LABEL_HEIGHT = 14;
	
	public Label(int x, int y, int w, int h, String text, boolean top, boolean left) {
		super(x, y, w, h <= 0 ? LABEL_HEIGHT : h, text, top, left);
	}

	public Label(int x, int y, int w, int h, String text, boolean left) {
		super(x, y, w, h <= 0 ? LABEL_HEIGHT : h, text, left);
	}
	
	public Label(int x, int y, int w, int h, String text) {
		super(x, y, w, h <= 0 ? LABEL_HEIGHT : h, text);
	}
	
	public Label(int x, int y, int w, String text, boolean top, boolean left) {
		super(x, y - LABEL_HEIGHT, w, LABEL_HEIGHT, text, top, left);
	}

	public Label(int x, int y, int w, String text, boolean left) {
		super(x, y - LABEL_HEIGHT, w, LABEL_HEIGHT, text, left);
	}
	
	public Label(int x, int y, int w, String text) {
		super(x, y - LABEL_HEIGHT, w, LABEL_HEIGHT, text);
	}
	
	protected Label(int x, int y, int w, int h, boolean top, boolean left) {
		super(x, y, w, h <= 0 ? LABEL_HEIGHT : h, top, left);
	}

	protected void drawBackground() {
	}
	
	protected void drawForeground(int x1, int y1, int x2, int y2) {
		Drawing.drawText(this.text, x1 + this.text_x, y1 + this.text_y, this.enabled ? this.gm.style.text_label : Util.mulColor(this.gm.style.text_label, 0.5f));
	}
	
	protected int getMarginX() {
		return 0;
	}
	
	protected int getMarginY() {
		return 0;
	}
}
