You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -257,13 +257,13 @@ class _BtnColor extends Gui.Button
257
257
return dwTextFlags | DT_WORDBREAK
258
258
}
259
259
260
-
/** Set/ Get the Button Text Color (RGB). (To set the text colour, you must have used `SetColor()`, `SetBackColor()`, or `BackColor` to set the background colour at least once beforehand.) */
260
+
/** @prop {Integer} TextColor Set/ Get the Button Text Color (RGB). (To set the text colour, you must have used `SetColor()`, `SetBackColor()`, or `BackColor` to set the background colour at least once beforehand.) */
261
261
TextColor {
262
262
Get => this.HasProp("_textColor") && _BtnColor.RgbToBgr(this._textColor)
263
263
Set => this._textColor := _BtnColor.RgbToBgr(value)
264
264
}
265
265
266
-
/** Set/ Get the Button background Color (RGB). */
266
+
/** @prop {Integer} BackColor Set/ Get the Button background Color (RGB). */
267
267
BackColor {
268
268
Get => this.HasProp("_clr") && _BtnColor.RgbToBgr(this._clr)
269
269
Set {
@@ -281,30 +281,33 @@ class _BtnColor extends Gui.Button
281
281
}
282
282
}
283
283
284
-
/** Button border color (RGB). (To set the border colour, you must have used `SetColor()`, `SetBackColor()`, or `BackColor` to set the background colour at least once beforehand.)*/
284
+
/** @prop {Integer} BorderColor Button border color (RGB). (To set the border colour, you must have used `SetColor()`, `SetBackColor()`, or `BackColor` to set the background colour at least once beforehand.)*/
285
285
BorderColor {
286
286
Get => this.HasProp("_borderColor") && _BtnColor.RgbToBgr(this._borderColor)
287
287
Set => this._borderColor := _BtnColor.RgbToBgr(value)
288
288
}
289
289
290
-
/** Rounded corner preference for the button. (To set the rounded corner preference, you must have used `SetColor()`, `SetBackColor()`, or `BackColor` to set the background colour at least once beforehand.) */
290
+
/** @prop {Integer} RoundedCorner Rounded corner preference for the button. (To set the rounded corner preference, you must have used `SetColor()`, `SetBackColor()`, or `BackColor` to set the background colour at least once beforehand.) */
291
291
RoundedCorner {
292
-
Get => this.HasProp("_roundedCorner") && _BtnColor.RgbToBgr(this._roundedCorner)
292
+
Get => this.HasProp("_roundedCorner") && this._roundedCorner
293
293
Set => this._roundedCorner := value
294
294
}
295
295
296
296
/**
297
+
* @prop {Integer} ShowBorder
297
298
* Border preference. (To set the border preference, you must have used `SetColor()`, `SetBackColor()`, or `BackColor` to set the background colour at least once beforehand.)
299
+
* - `n` : The higher the value, the thicker the button's border when focused.
298
300
* - `1` : Highlight when focused.
299
301
* - `0` : No border displayed.
300
302
* - `-1`: Border always visible.
303
+
* - `-n`: The lower the value, the thicker the button's border when always visible.
301
304
*/
302
305
ShowBorder {
303
-
Get => this.HasProp("_showBorder") &&_BtnColor.RgbToBgr(this._showBorder)
306
+
Get => this.HasProp("_showBorder") && this._showBorder
304
307
Set {
305
-
if((value >= -1) && (value <= 1))
308
+
ifIsNumber(Value)
306
309
this._showBorder := value
307
-
else throw ValueError("The value must be -1, 0 or 1.", "ShowBorder")
310
+
else throw TypeError("The value must be a number.", "ShowBorder")
308
311
}
309
312
}
310
313
@@ -316,9 +319,11 @@ class _BtnColor extends Gui.Button
316
319
* - For Windows 11: Enabled (value: 9).
317
320
* - For Windows 10: Disabled.
318
321
* @param {boolean} [showBorder=1]
319
-
* - `1` : Highlight when focused.
320
-
* - `0` : No border displayed.
322
+
* - `n` : The higher the value, the thicker the button's border when focused.
323
+
* - `1`: Highlight when focused.
324
+
* - `0`: No border displayed.
321
325
* - `-1`: Border always visible.
326
+
* - `-n`: The lower the value, the thicker the button's border when always visible.
322
327
* @param {number} [borderColor=0xFFFFFF] - Button border color (RGB).
323
328
* @param {number} [txColor] - Button text color (RGB). If omitted, the text colour will be automatically set to white or black depends on the background colour.
324
329
*/
@@ -329,9 +334,11 @@ class _BtnColor extends Gui.Button
329
334
* @param {number} bgColor - Button's background color (RGB).
330
335
* @param {number} [txColor] - Button text color (RGB). If omitted, the text colour will be automatically set to white or black depends on the background colour.
331
336
* @param {boolean} [showBorder=1]
337
+
* - `n` : The higher the value, the thicker the button's border when focused.
332
338
* - `1` : Highlight when focused.
333
339
* - `0` : No border displayed.
334
340
* - `-1`: Border always visible.
341
+
* - `-n`: The lower the value, the thicker the button's border when always visible.
335
342
* @param {number} [borderColor=0xFFFFFF] - Button border color (RGB).
336
343
* @param {number} [roundedCorner] - Rounded corner preference for the button. If omitted,
337
344
* - For Windows 11: Enabled (value: 9).
@@ -349,7 +356,7 @@ class _BtnColor extends Gui.Button
0 commit comments