Lines Matching refs:and

4and the like, this just isn't enough.  The new, improved BJoystick class gives you access to moder…
6 … stick), and additional axes, such as rotational controls or throttles. Game players want to use …
10 …erence application), then presents a window showing all the buttons, hats, and axes provided by th…
12 On R4 Intel, you can use the following command in a Terminal window to compile and link the program:
16 On R4 PowerPC, the following command will compile and link the program:
22and how to open them. Take a look at the PickJoystick() function in StickIt's main.cpp file. Thi…
24and it's possible for multiple devices to be chained to one game port, although none of the driver…
46 …to open the joystick device. If this fails, an error message is displayed and the loop continues …
48 …cation. This name is then displayed as the option for the user to select, and the joystick is clo…
50 PickJoystick() then lets the user select the joystick they want to use, and then the device is open…
52 PickJoystick() returns with the BJoystick object open and ready to use.
56 JWindow is a very simple class and we won't dwell on it -- it just sets up the JView, which does al…
58 …onstructor creates labels for the various displays in the view, and resizes the view and the windo…
82 …The BRect, r, is initialized to the rectangle of the first button's label, and then we enter the f…
84 …BStringView using the name as the label. Alignment and font settings are tweaked as appropriate,
86 …e column as the buttons. CountHats() is called to get the number of hats, and the labels are gene…
88 …he axes. The topmost display is a two-dimensional display for the X and Y axes, and a "Stick:" la…
90and the like. This is done just like the button labels (except that CountAxes() is called to get …
92 Finally, the view and window are resized so the height of the view and window is just a bit higher …
94 The Pulse() function just locks the window and calls Draw() to refresh the display.
96 …t begins by getting the numbers of buttons, hats, and axes, and by allocating buffers for the axis…
104and hats arrays will be used when we call GetAxisValues() and GetHatValues(); these functions fil…
106 …r to look at the state of the joystick and record the current values. Now we can actually retriev…
126 …ystick). The low-order bit represents button 0, the next bit is button 1, and so forth. If the b…
128and looks to see whether that button is pressed or not. If it's pressed, the rectangle is filled …
134 2 Up and Right
136 4 Down and Right
138 6 Down and Left
140 8 Up and Left
142 …ready), but we fill in the appropriate square given the value of each hat, and make sure the other…
146and Y axes (which we're treating as a two-dimensional field) are drawn. This code isn't very smar…
148 The rest of the axes are drawn as a horizontal slider-type display, with a black box and a red oblo…
150 Download StickIt and have a look at the code. When you get R4, give it a try. The new BJoystick c…