tavli

diff src/board.h @ 22:c2a2069a49ec

slot highlighting, TODO blur
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 07 Jul 2015 21:56:37 +0300
parents c3fbf9616dbd
children
line diff
     1.1 --- a/src/board.h	Thu Jul 02 00:01:39 2015 +0300
     1.2 +++ b/src/board.h	Tue Jul 07 21:56:37 2015 +0300
     1.3 @@ -41,11 +41,12 @@
     1.4  	Piece pieces[MAX_PIECES];
     1.5  	int hist[NUM_SLOTS + 1];
     1.6  	Quad slotbb[NUM_SLOTS];
     1.7 +	int slot_sel;	// current slot selection
     1.8  
     1.9  	std::vector<Object*> obj;
    1.10  	Object *piece_obj;
    1.11  
    1.12 -	Image img_wood, img_field, img_hinge;
    1.13 +	Image img_wood, img_field, img_hinge, img_highlight;
    1.14  
    1.15  	bool generate();
    1.16  	bool generate_textures();
    1.17 @@ -66,6 +67,8 @@
    1.18  	Vector3 piece_pos(int slot, int level = 0) const;
    1.19  
    1.20  	int slot_hit(const Ray &ray) const;
    1.21 +	void select_slot(int idx);
    1.22 +	int get_selected_slot() const;
    1.23  
    1.24  	void draw() const;
    1.25  };