mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Replace more .60 by .slint
Mainly an automated change with git grep -O"sed -i 's/\.60/.slint/g'" -w "\.60" and some manual checks
This commit is contained in:
parent
d706d63ce1
commit
03534039d6
81 changed files with 314 additions and 313 deletions
|
@ -1,12 +1,12 @@
|
|||
# Game Logic In Rust
|
||||
|
||||
We'll implement the rules of the game in Rust as well. The general philosophy of SixtyFPS is that merely the user
|
||||
interface is implemented in the `.60` language and the business logic in your favorite programming
|
||||
interface is implemented in the `.slint` language and the business logic in your favorite programming
|
||||
language. The game rules shall enforce that at most two tiles have their curtain open. If the tiles match, then we
|
||||
consider them solved and they remain open. Otherwise we wait for a little while, so the player can memorize
|
||||
the location of the icons, and then close them again.
|
||||
|
||||
We'll modify the `.60` markup inside the `sixtyfps!` macro to signal to the Rust code when the user clicks on a tile.
|
||||
We'll modify the `.slint` markup inside the `sixtyfps!` macro to signal to the Rust code when the user clicks on a tile.
|
||||
Two changes to <span class="hljs-title">MainWindow</span> are needed: We need to add a way for the MainWindow to call to the Rust code that it should
|
||||
check if a pair of tiles has been solved. And we need to add a property that Rust code can toggle to disable further
|
||||
tile interaction, to prevent the player from opening more tiles than allowed. No cheating allowed! First, we paste
|
||||
|
@ -16,7 +16,7 @@ the callback and property declarations into <span class="hljs-title">MainWindow<
|
|||
{{#include main_game_logic_in_rust.rs:mainwindow_interface}}
|
||||
```
|
||||
|
||||
The last change to the `.60` markup is to act when the <span class="hljs-title">MemoryTile</span> signals that it was clicked on.
|
||||
The last change to the `.slint` markup is to act when the <span class="hljs-title">MemoryTile</span> signals that it was clicked on.
|
||||
We add the following handler in <span class="hljs-title">MainWindow</span>:
|
||||
|
||||
```60
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue