new types and classes
This commit is contained in:
parent
20df39ee4e
commit
9a3a1b084a
26 changed files with 1324 additions and 2 deletions
21
lib/widgets/checkbox.ts
Normal file
21
lib/widgets/checkbox.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { NativeClasses } from "../milsko";
|
||||
import { Widget } from "../widget";
|
||||
import { WidgetOptions } from "../types";
|
||||
|
||||
export class CheckBox extends Widget {
|
||||
constructor(options: WidgetOptions) {
|
||||
super(NativeClasses.CheckBox, options);
|
||||
}
|
||||
|
||||
public setChecked(value: boolean): this {
|
||||
return this.setInteger("Ichecked", +value);
|
||||
}
|
||||
|
||||
get checked(): boolean {
|
||||
return this.getInteger("Ichecked") != 0;
|
||||
}
|
||||
|
||||
set checked(value: boolean) {
|
||||
this.setInteger("Ichecked", +value);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue