@@ -101,101 +101,150 @@ declare namespace pointer {
101
101
* @catnipIgnore
102
102
*/
103
103
var released : IPointer [ ] ;
104
- /** The horizontal position at which the primary pointer is positioned. */
104
+ /**
105
+ * The horizontal position at which the primary pointer is positioned.
106
+ * @catnipName pointer's x
107
+ * @catnipName_Ru x указателя
108
+ */
105
109
var x : number ;
106
- /** The vertical position at which the primary pointer is positioned. */
110
+ /**
111
+ * The vertical position at which the primary pointer is positioned.
112
+ * @catnipName pointer's y
113
+ * @catnipName_Ru y указателя
114
+ */
107
115
var y : number ;
108
- /** The horizontal position at which the primary pointer is positioned, in UI space.*/
116
+ /**
117
+ * The horizontal position at which the primary pointer is positioned, in UI space.
118
+ * @catnipName pointer's x for ui
119
+ * @catnipName_Ru x указателя для ui
120
+ */
109
121
var xui : number ;
110
- /** The vertical position at which the primary pointer is positioned, in UI space.*/
122
+ /**
123
+ * The vertical position at which the primary pointer is positioned, in UI space.
124
+ * @catnipName pointer's y for ui
125
+ * @catnipName_Ru y указателя для ui
126
+ */
111
127
var yui : number ;
112
128
/**
113
129
* The horizontal position of the primary pointer in the previous frame,
114
130
* in gameplay coordinates.
131
+ * @catnipName pointer's previous x
132
+ * @catnipName_Ru предыдущий x указателя
115
133
*/
116
134
var xprev : number ;
117
135
/**
118
136
* The vertical position of the primary pointer in the previous frame,
119
137
* in gameplay coordinates.
138
+ * @catnipName pointer's previous y
139
+ * @catnipName_Ru предыдущий y указателя
120
140
*/
121
141
var yprev : number ;
122
142
/**
143
+ *
123
144
* The horizontal position of the primary pointer in the previous frame, in UI coordinates.
145
+ * @catnipName pointer's previous x in ui
146
+ * @catnipName_Ru предыдущий x указателя в ui
124
147
*/
125
148
var xuiprev : number ;
126
149
/**
127
150
* The vertical position of the primary pointer in the previous frame, in UI coordinates.
151
+ * @catnipName pointer's previous y in ui
152
+ * @catnipName_Ru предыдущий y указателя в ui
128
153
*/
129
154
var yuiprev : number ;
130
155
/**
131
156
* The current tracked position of a locked pointer in UI space.
132
157
* Note that it only changes when ct.pointer works in the locking mode.
133
158
* The initial value of the locked pointer is set to the last known position
134
159
* of the unlocked primary pointer.
160
+ * @catnipName locked pointer's x
161
+ * @catnipName_Ru x захвач. указателя
135
162
*/
136
163
var xlocked : number ;
137
164
/**
138
165
* The current tracked position of a locked pointer in UI space.
139
166
* Note that it only changes when ct.pointer works in the locking mode.
140
167
* The initial value of the locked pointer is set to the last known position
141
168
* of the unlocked primary pointer.
169
+ * @catnipName locked pointer's y
170
+ * @catnipName_Ru y захвач. указателя
142
171
*/
143
172
var ylocked : number ;
144
173
/**
145
174
* The current movement speed of a locked pointer relative to UI space.
146
175
* Note that it only changes when ct.pointer works in the locking mode.
176
+ * @catnipName locked pointer's x movement
177
+ * @catnipName_Ru движение по x захвач. указателя
147
178
*/
148
179
var xmovement : number ;
149
180
/**
150
181
* The current movement speed of a locked pointer relative to UI space.
151
182
* Note that it only changes when ct.pointer works in the locking mode.
183
+ * @catnipName locked pointer's y movement
184
+ * @catnipName_Ru движение по y захвач. указателя
152
185
*/
153
186
var ymovement : number ;
154
187
/**
155
188
* The current pressure made onto the primary pointer.
156
189
* Note that this property is usually defined for special pointer types,
157
190
* e.g. for graphic tablet's digital pens.
158
191
* You will usually get 0.5 for mouse and touch events of regular devices.
192
+ * @catnipName pointer's pressure
193
+ * @catnipName_Ru нажим указателя
159
194
*/
160
195
var pressure : number ;
161
196
/**
162
197
* A number that, with a proper bitmask, tells which buttons are currently pressed.
163
198
* Use ct.pointer.isButtonPressed(buttonName, ct.pointer.buttons) to check
164
199
* for specific buttons.
200
+ * @catnipName pressed buttons
201
+ * @catnipName_Ru нажатые кнопки
165
202
*/
166
203
var buttons : number ;
167
204
/**
168
205
* The plane angle (in degrees, in the range of -90 to 90)
169
206
* between the Y–Z plane and the plane containing both the pointer
170
207
* (e.g. pen stylus) axis and the Y axis.
208
+ * @catnipName pointer's x tilt
209
+ * @catnipName_Ru наклон указателя по x
171
210
*/
172
211
var tiltX : number ;
173
212
/**
174
213
* the plane angle (in degrees, in the range of -90 to 90)
175
214
* between the X–Z plane and the plane containing both the pointer
176
215
* (e.g. pen stylus) axis and the X axis.
216
+ * @catnipName pointer's y tilt
217
+ * @catnipName_Ru наклон указателя по y
177
218
*/
178
219
var tiltY : number ;
179
220
/**
180
221
* The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees,
181
222
* with a value in the range 0 to 359.
223
+ * @catnipName pointer's twist
224
+ * @catnipName_Ru поворот указателя
182
225
*/
183
226
var twist : number ;
184
227
/**
185
228
* The size of the primary pointer, in UI coordinates.
186
229
* Depending on the type of the pointer, this property may not be available
187
230
* and will be equal to 0 or something close to 1.
231
+ * @catnipName pointer's width
232
+ * @catnipName_Ru ширина указателя
188
233
*/
189
234
var width : number ;
190
235
/**
191
236
* The size of the primary pointer, in UI coordinates.
192
237
* Depending on the type of the pointer, this property may not be available
193
238
* and will be equal to 0 or something close to 1.
239
+ * @catnipName pointer's height
240
+ * @catnipName_Ru высота указателя
194
241
*/
195
242
var height : number ;
196
243
/**
197
244
* The type of the pointer used most recently (the one that was pressed).
198
245
* It usually equals to either 'mouse', 'touch', or 'pen'.
246
+ * @catnipName pointer's type
247
+ * @catnipName_Ru тип указателя
199
248
*/
200
249
var type : string ;
201
250
@@ -204,16 +253,25 @@ declare namespace pointer {
204
253
* It can be used to reset the state of ct.pointer, but note that hover events
205
254
* are reset as well meaning that pointers (like mouse) will report them only
206
255
* when they become active again (for example, with a mouse click).
256
+ *
257
+ * @catnipName Clear pointers' events
258
+ * @catnipName_Ru Очистить события указателей
207
259
*/
208
260
function clear ( ) : void ;
209
261
/**
210
262
* Clears all the memorized pointer events that were released in the current frame.
263
+ *
264
+ * @catnipName Clear pointers' "released" event
265
+ * @catnipName_Ru Очистить события отпущенных указателей
211
266
*/
212
267
function clearReleased ( ) : void ;
213
268
/**
214
269
* Either returns the pointer that is currently colliding with the passed copy that exists
215
270
* in gameplay coordinates, or returns `false` if there is no collision.
216
271
* Collisions happen only if the pointer is currently held down.
272
+ *
273
+ * @catnipName pointer touches
274
+ * @catnipName_Ru указатель касается
217
275
*/
218
276
function collides (
219
277
copy : Copy ,
@@ -224,6 +282,9 @@ declare namespace pointer {
224
282
* Either returns the pointer that is currently colliding with the passed copy that exists
225
283
* in UI coordinates, or returns `false` if there is no collision.
226
284
* Collisions happen only if the pointer is currently held down.
285
+ *
286
+ * @catnipName pointer touches ui
287
+ * @catnipName_Ru указатель касается ui
227
288
*/
228
289
function collidesUi (
229
290
copy : Copy ,
@@ -233,20 +294,41 @@ declare namespace pointer {
233
294
/**
234
295
* Either returns the pointer that is currently hovering over the passed copy that exists
235
296
* in gameplay coordinates, or returns `false` if there is no such pointers.
297
+ *
298
+ * @catnipName pointer hovers
299
+ * @catnipName_Ru указатель над
236
300
*/
237
301
function hovers ( copy : Copy , pointer ?: IPointer ) : false | IPointer ;
238
302
/**
239
303
* Either returns the pointer that is currently hovering over the passed copy that exists
240
304
* in UI coordinates, or returns `false` if there is no such pointers.
305
+ *
306
+ * @catnipName pointer hovers ui
307
+ * @catnipName_Ru указатель над ui
241
308
*/
242
309
function hoversUi ( copy : Copy , pointer ?: IPointer ) : false | IPointer ;
310
+ /**
311
+ * @catnipName is pointer's button pressed
312
+ * @catnipName_Ru кнопка указателя нажата
313
+ */
243
314
function isButtonPressed ( button : PointerButtonName , pointer : IPointer ) : boolean ;
315
+ /**
316
+ * @catnipName Lock the pointer
317
+ * @catnipName_Ru Заблокировать указатель
318
+ */
244
319
function lock ( ) : void ;
320
+ /**
321
+ * @catnipName Unlock the pointer
322
+ * @catnipName_Ru Разблокировать указатель
323
+ */
245
324
function unlock ( ) : void ;
246
325
/**
247
326
* Equals to `true` when the pointer is locked.
248
327
* Note that the pointer can still be unlocked while the locking mode is on,
249
328
* for example after a player pressed ESC key or switched to a different window.
329
+ *
330
+ * @catnipName is pointer locked
331
+ * @catnipName_Ru указатель заблокирован
250
332
*/
251
333
var locked : boolean ;
252
334
}
0 commit comments