mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00
Rename rust API
This commit is contained in:
parent
8d1c852e89
commit
cc3994b58d
128 changed files with 631 additions and 627 deletions
|
@ -4,7 +4,7 @@
|
|||
#[allow(dead_code)]
|
||||
// ANCHOR: tiles
|
||||
fn main() {
|
||||
use sixtyfps::Model;
|
||||
use slint::Model;
|
||||
|
||||
let main_window = MainWindow::new();
|
||||
|
||||
|
@ -19,13 +19,14 @@ fn main() {
|
|||
tiles.shuffle(&mut rng);
|
||||
|
||||
// Assign the shuffled Vec to the model property
|
||||
let tiles_model = std::rc::Rc::new(sixtyfps::VecModel::from(tiles));
|
||||
let tiles_model = std::rc::Rc::new(slint::VecModel::from(tiles));
|
||||
main_window.set_memory_tiles(tiles_model.into());
|
||||
|
||||
main_window.run();
|
||||
}
|
||||
|
||||
// ANCHOR_END: tiles
|
||||
sixtyfps::sixtyfps! {
|
||||
slint::slint! {
|
||||
struct TileData := {
|
||||
image: image,
|
||||
image_visible: bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue