public Spinner(int x, int y, int size, int min, int max, int val, int step, GuiRotation rot) {
		this.x = x;
		this.y = y;
		if (rot == GuiRotation.HORIZONTAL) {
			width = size;
			height = HEIGHT;
		} else {
			width = HEIGHT;
			height = size;
		}
		value = val;
		this.min = min;
		this.max = max;
		this.step = step;
		this.rot = rot;
		
		titles = new String[max - min];
		
		minus = new ArrowButton(x, y + ((rot == GuiRotation.HORIZONTAL) ? 0 : height - ArrowButton.HEIGHT), (rot == GuiRotation.HORIZONTAL) ? ArrowButton.MINUS_HOR
				: ArrowButton.MINUS_VER);
		minus.setClickEvent(new IGuiEvent() {
			
			@Override
			public void trigger() {
				value = (value >= Spinner.this.min + Spinner.this.step) ? value - Spinner.this.step : Spinner.this.min;
				if (clickEvent != null) clickEvent.trigger();
			}
		});
		plus = new ArrowButton(x + ((rot == GuiRotation.HORIZONTAL) ? width - ArrowButton.WIDTH : 0), y, (rot == GuiRotation.HORIZONTAL) ? ArrowButton.PLUS_HOR : ArrowButton.PLUS_VER);
		plus.setClickEvent(new IGuiEvent() {
			
			@Override
			public void trigger() {
				value = (value < Spinner.this.max - Spinner.this.step) ? value + Spinner.this.step : Spinner.this.max - 1;
				if (clickEvent != null) clickEvent.trigger();
			}
		});
	}