We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10f56b3 commit ca47906Copy full SHA for ca47906
src/Grid/main.ts
@@ -1,3 +1,5 @@
1
+import Gtk from "gi://Gtk?version=4.0";
2
+
3
const button_ids = [
4
"button00",
5
"button01",
@@ -28,10 +30,10 @@ function onClicked(button) {
28
30
const pc_is_thinking_row = Math.floor(Math.random() * 3).toString();
29
31
const pc_is_thinking_col = Math.floor(Math.random() * 3).toString();
32
//make pc reaction if possible
- const temp = workbench.builder.get_object(
33
+ const temp = workbench.builder.get_object<Gtk.Button>(
34
`button${pc_is_thinking_row}${pc_is_thinking_col}`,
35
);
- const temp_image = temp.get_child();
36
+ const temp_image = temp.get_child() as Gtk.Image;
37
if (!temp_image.icon_name) {
38
//store and show pc reaction
39
temp_image.icon_name = "circle-outline-thick-symbolic";
0 commit comments