Back to project page Look.
The source code is released under:
====================== LOOK! LICENSING TERMS ====================== look! is licensed under the BSD 3-Clause (also known as "BSD New" or "BSD Simplified"), as follows: Copyright (c) 2010-2012, Look...
If you think the Android project Look listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** *----------------------------------------------------------------------------- * Copyright (c) 2012, Look! Development Team * All rights reserved./* w w w.j av a 2 s. c o m*/ * * Distributed under the terms of the BSD Simplified License. * * The full license is in the LICENSE file, distributed with this software. *----------------------------------------------------------------------------- */ package es.ucm.look.ar.hud; import javax.microedition.khronos.opengles.GL10; public class BasicHud implements HUD { public Button b; public BasicHud(int width, int height) { float buttonWidth = width / 5; float buttonHeight = height / 5; b = new Button(width - buttonWidth - 5, height - buttonHeight - 5, buttonWidth, buttonHeight); } @Override public void draw(GL10 gl, float width, float height ) { b.draw(gl); } @Override public boolean touch(float x, float y, int type) { if ( b.contains(x, y) ){ b.actionPerformed(); return true; } return false; } }