mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Fixed << operator to be usable in .I file
This commit is contained in:
parent
3227fe2ebd
commit
f1444fcff9
@ -290,7 +290,7 @@ get_num_controls() const {
|
||||
* the various controls by index number.
|
||||
*/
|
||||
INLINE void InputDevice::
|
||||
set_control_map(int index, ControlAxis axis) {
|
||||
set_control_map(int index, InputDevice::ControlAxis axis) {
|
||||
LightMutexHolder holder(_lock);
|
||||
nassertv(index >= 0);
|
||||
if (index >= (int)_controls.size()) {
|
||||
@ -348,7 +348,7 @@ get_control(size_t index) const {
|
||||
* if the axis was not found in the list.
|
||||
*/
|
||||
INLINE InputDevice::AnalogState InputDevice::
|
||||
find_control(ControlAxis axis) const {
|
||||
find_control(InputDevice::ControlAxis axis) const {
|
||||
for (int i; i < (int)_controls.size(); i++) {
|
||||
if (_controls[i].axis == axis) {
|
||||
return _controls[i];
|
||||
|
@ -287,7 +287,8 @@ PUBLISHED:
|
||||
INLINE AnalogState get_control(size_t index) const;
|
||||
INLINE AnalogState find_control(ControlAxis axis) const;
|
||||
|
||||
// Make device controls iterable
|
||||
// Make device buttons and controls iterable
|
||||
MAKE_SEQ_PROPERTY(buttons, get_num_buttons, get_button);
|
||||
MAKE_SEQ_PROPERTY(controls, get_num_controls, get_control);
|
||||
|
||||
public:
|
||||
@ -313,8 +314,8 @@ INLINE ostream &operator << (ostream &out, const InputDevice &device) {
|
||||
return out;
|
||||
}
|
||||
|
||||
ostream &operator << (ostream &out, InputDevice::DeviceClass dc);
|
||||
ostream &operator << (ostream &out, InputDevice::ControlAxis axis);
|
||||
EXPCL_PANDA_DEVICE ostream &operator << (ostream &out, InputDevice::DeviceClass dc);
|
||||
EXPCL_PANDA_DEVICE ostream &operator << (ostream &out, InputDevice::ControlAxis axis);
|
||||
|
||||
#include "inputDevice.I"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user