8000 :globe_with_meridians: Catnip: Translate Pointer catmod to Russian an… · ct-js/ct-js@0fe8936 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0fe8936

Browse files
🌐 Catnip: Translate Pointer catmod to Russian and add more human-readable English names
1 parent 48f3b22 commit 0fe8936

File tree

1 file changed

+86
-4
lines changed

1 file changed

+86
-4
lines changed

app/data/ct.libs/pointer/types.d.ts

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,101 +101,150 @@ declare namespace pointer {
101101
* @catnipIgnore
102102
*/
103103
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+
*/
105109
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+
*/
107115
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+
*/
109121
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+
*/
111127
var yui: number;
112128
/**
113129
* The horizontal position of the primary pointer in the previous frame,
114130
* in gameplay coordinates.
131+
* @catnipName pointer's previous x
132+
* @catnipName_Ru предыдущий x указателя
115133
*/
116134
var xprev: number;
117135
/**
118136
* The vertical position of the primary pointer in the previous frame,
119137
* in gameplay coordinates.
138+
* @catnipName pointer's previous y
139+
* @catnipName_Ru предыдущий y указателя
120140
*/
121141
var yprev: number;
122142
/**
143+
*
123144
* 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
124147
*/
125148
var xuiprev: number;
126149
/**
127150
* 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
128153
*/
129154
var yuiprev: number;
130155
/**
131156
* The current tracked position of a locked pointer in UI space.
132157
* Note that it only changes when ct.pointer works in the locking mode.
133158
* The initial value of the locked pointer is set to the last known position
134159
* of the unlocked primary pointer.
160+
* @catnipName locked pointer's x
161+
* @catnipName_Ru x захвач. указателя
135162
*/
136163
var xlocked: number;
137164
/**
138165
* The current tracked position of a locked pointer in UI space.
139166
* Note that it only changes when ct.pointer works in the locking mode.
140167
* The initial value of the locked pointer is set to the last known position
141168
* of the unlocked primary pointer.
169+
* @catnipName locked pointer's y
170+
* @catnipName_Ru y захвач. указателя
142171
*/
143172
var ylocked: number;
144173
/**
145174
* The current movement speed of a locked pointer relative to UI space.
146175
* Note that it only changes when ct.pointer works in the locking mode.
176+
* @catnipName locked pointer's x movement
177+
* @catnipName_Ru движение по x захвач. указателя
147178
*/
148179
var xmovement: number;
149180
/**
150181
* The current movement speed of a locked pointer relative to UI space.
151182
* Note that it only changes when ct.pointer works in the locking mode.
183+
* @catnipName locked pointer's y movement
184+
* @catnipName_Ru движение по y захвач. указателя
152185
*/
153186
var ymovement: number;
154187
/**
155188
* The current pressure made onto the primary pointer.
156189
* Note that this property is usually defined for special pointer types,
157190
* e.g. for graphic tablet's digital pens.
158191
* You will usually get 0.5 for mouse and touch events of regular devices.
192+
* @catnipName pointer's pressure
193+
* @catnipName_Ru нажим указателя
159194
*/
160195
var pressure: number;
161196
/**
162197
* A number that, with a proper bitmask, tells which buttons are currently pressed.
163198
* Use ct.pointer.isButtonPressed(buttonName, ct.pointer.buttons) to check
164199
* for specific buttons.
200+
* @catnipName pressed buttons
201+
* @catnipName_Ru нажатые кнопки
165202
*/
166203
var buttons: number;
167204
/**
168205
* The plane angle (in degrees, in the range of -90 to 90)
169206
* between the Y–Z plane and the plane containing both the pointer
170207
* (e.g. pen stylus) axis and the Y axis.
208+
* @catnipName pointer's x tilt
209+
* @catnipName_Ru наклон указателя по x
171210
*/
172211
var tiltX: number;
173212
/**
174213
* the plane angle (in degrees, in the range of -90 to 90)
175214
* between the X–Z plane and the plane containing both the pointer
176215
* (e.g. pen stylus) axis and the X axis.
216+
* @catnipName pointer's y tilt
217+
* @catnipName_Ru наклон указателя по y
177218
*/
178219
var tiltY: number;
179220
/**
180221
* The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees,
181222
* with a value in the range 0 to 359.
223+
* @catnipName pointer's twist
224+
* @catnipName_Ru поворот указателя
182225
*/
183226
var twist: number;
184227
/**
185228
* The size of the primary pointer, in UI coordinates.
186229
* Depending on the type of the pointer, this property may not be available
187230
* and will be equal to 0 or something close to 1.
231+
* @catnipName pointer's width
232+
* @catnipName_Ru ширина указателя
188233
*/
189234
var width: number;
190235
/**
191236
* The size of the primary pointer, in UI coordinates.
192237
* Depending on the type of the pointer, this property may not be available
193238
* and will be equal to 0 or something close to 1.
239+
* @catnipName pointer's height
240+
* @catnipName_Ru высота указателя
194241
*/
195242
var height: number;
196243
/**
197244
* The type of the pointer used most recently (the one that was pressed).
198245
* It usually equals to either 'mouse', 'touch', or 'pen'.
246+
* @catnipName pointer's type
247+
* @catnipName_Ru тип указателя
199248
*/
200249
var type: string;
201250

@@ -204,16 +253,25 @@ declare namespace pointer {
204253
* It can be used to reset the state of ct.pointer, but note that hover events
205254
* are reset as well meaning that pointers (like mouse) will report them only
206255
* when they become active again (for example, with a mouse click).
256+
*
257+
* @catnipName Clear pointers' events
258+
* @catnipName_Ru Очистить события указателей
207259
*/
208260
function clear(): void;
209261
/**
210262
* Clears all the memorized pointer events that were released in the current frame.
263+
*
264+
* @catnipName Clear pointers' "released" event
265+
* @catnipName_Ru Очистить события отпущенных указателей
211266
*/
212267
function clearReleased(): void;
213268
/**
214269
* Either returns the pointer that is currently colliding with the passed copy that exists
215270
* in gameplay coordinates, or returns `false` if there is no collision.
216271
* Collisions happen only if the pointer is currently held down.
272+
*
273+
* @catnipName pointer touches
274+
* @catnipName_Ru указатель касается
217275
*/
218276
function collides(
219277
copy: Copy,
@@ -224,6 +282,9 @@ declare namespace pointer {
224282
* Either returns the pointer that is currently colliding with the passed copy that exists
225283
* in UI coordinates, or returns `false` if there is no collision.
226284
* Collisions happen only if the pointer is currently held down.
285+
*
286+
* @catnipName pointer touches ui
287+
* @catnipName_Ru указатель касается ui
227288
*/
228289
function collidesUi(
229290
copy: Copy,
@@ -233,20 +294,41 @@ declare namespace pointer {
233294
/**
234295
* Either returns the pointer that is currently hovering over the passed copy that exists
235296
* in gameplay coordinates, or returns `false` if there is no such pointers.
297+
*
298+
* @catnipName pointer hovers
299+
* @catnipName_Ru указатель над
236300
*/
237301
function hovers(copy: Copy, pointer?: IPointer): false | IPointer;
238302
/**
239303
* Either returns the pointer that is currently hovering over the passed copy that exists
240304
* in UI coordinates, or returns `false` if there is no such pointers.
305+
*
306+
* @catnipName pointer hovers ui
307+
* @catnipName_Ru указатель над ui
241308
*/
242309
function hoversUi(copy: Copy, pointer?: IPointer): false | IPointer;
310+
/**
311+
* @catnipName is pointer's button pressed
312+
* @catnipName_Ru кнопка указателя нажата
313+
*/
243314
function isButtonPressed(button: PointerButtonName, pointer: IPointer): boolean;
315+
/**
316+
* @catnipName Lock the pointer
317+
* @catnipName_Ru Заблокировать указатель
318+
*/
244319
function lock(): void;
320+
/**
321+
* @catnipName Unlock the pointer
322+
* @catnipName_Ru Разблокировать указатель
323+
*/
245324
function unlock(): void;
246325
/**
247326
* Equals to `true` when the pointer is locked.
248327
* Note that the pointer can still be unlocked while the locking mode is on,
249328
* for example after a player pressed ESC key or switched to a different window.
329+
*
330+
* @catnipName is pointer locked
331+
* @catnipName_Ru указатель заблокирован
250332
*/
251333
var locked: boolean;
252334
}

0 commit comments

Comments
 (0)
0