Skip to content

Commit ca47906

Browse files
committed
port: Grid
1 parent 10f56b3 commit ca47906

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Grid/main.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Gtk from "gi://Gtk?version=4.0";
2+
13
const button_ids = [
24
"button00",
35
"button01",
@@ -28,10 +30,10 @@ function onClicked(button) {
2830
const pc_is_thinking_row = Math.floor(Math.random() * 3).toString();
2931
const pc_is_thinking_col = Math.floor(Math.random() * 3).toString();
3032
//make pc reaction if possible
31-
const temp = workbench.builder.get_object(
33+
const temp = workbench.builder.get_object<Gtk.Button>(
3234
`button${pc_is_thinking_row}${pc_is_thinking_col}`,
3335
);
34-
const temp_image = temp.get_child();
36+
const temp_image = temp.get_child() as Gtk.Image;
3537
if (!temp_image.icon_name) {
3638
//store and show pc reaction
3739
temp_image.icon_name = "circle-outline-thick-symbolic";

0 commit comments

Comments
 (0)