package net.lax1dude.eaglercraft.v1_8.internal;

/**
 * Copyright (c) 2024 lax1dude. All Rights Reserved.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 * 
 */
public enum EnumTouchEvent {
	TOUCHSTART(0), TOUCHMOVE(1), TOUCHEND(2);
	
	public final int id;
	
	private EnumTouchEvent(int id) {
		this.id = id;
	}
	
	public static EnumTouchEvent getById(int id) {
		if(id >= 0 && id < lookup.length) {
			return lookup[id];
		}else {
			return null;
		}
	}
	
	private static final EnumTouchEvent[] lookup = new EnumTouchEvent[3];
	
	static {
		EnumTouchEvent[] v = values();
		for(int i = 0; i < v.length; ++i) {
			lookup[v[i].id] = v[i];
		}
	}
}
