Back to project page clash_of_balls.
The source code is released under:
GNU General Public License
If you think the Android project clash_of_balls 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-2013 Hans Hardmeier <hanshardmeier@gmail.com> * Copyright (C) 2012-2013 Andrin Jenal//w ww .ja va 2 s. c o m * Copyright (C) 2012-2013 Beat Kng <beat-kueng@gmx.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ package com.sapos_aplastados.game.clash_of_balls.menu; import com.sapos_aplastados.game.clash_of_balls.Font2D; import com.sapos_aplastados.game.clash_of_balls.Texture; import com.sapos_aplastados.game.clash_of_balls.TextureManager; import com.sapos_aplastados.game.clash_of_balls.VertexBufferFloat; import com.sapos_aplastados.game.clash_of_balls.game.RenderHelper; import com.sapos_aplastados.game.clash_of_balls.game.Vector; public class MenuItemImg extends MenuItem { private String LOG_TAG = "debug"; public Font2D m_item_font; private Texture m_texture; public MenuItemImg(Vector position, Vector size , TextureManager tex_manager,int raw_id) { super(position, size); m_texture=tex_manager .get(raw_id); m_position_data = new VertexBufferFloat (VertexBufferFloat.sprite_position_data, 3); RenderHelper.initColorArray(0xffffffff, m_color); } public void draw(RenderHelper renderer) { renderer.pushModelMat(); renderer.modelMatTranslate(m_position.x, m_position.y, 0.f); renderer.modelMatScale(m_size.x, m_size.y, 0.f); drawTexture(renderer, m_texture); renderer.popModelMat(); } public void move(float dsec) { // nothing to do } public void select() { } public void deselect(){ } }