summaryrefslogtreecommitdiff
path: root/windows/keybuddy2/src/keyButton.h
blob: 38e9484249fdc500f451b6993f32792f715c59cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _KeyBuddy2_keyButton_h_
#define _KeyBuddy2_keyButton_h_

// custom button class, that is extended by simulated pushes and releases
class keyButton:public Button{
public:
	int finger; // for which finger is this button? (determines the drawing color)
	void simDown(){
		if(IsReadOnly() || !IsEnabled() || IsPush()) return;
		KeyPush();
		Sync();
	}
	void simUp(){
		if(!IsPush()) return;
		FinishPush();
		Sync();
	}
	bool isPushed(){
		return IsPush();
	}
	void LeftDown(Point, dword){}; // overwrite mouse action so buttons do not react to clicking
	void LeftUp(Point, dword){};
};

#endif