Render the goban along with ghost images for the cursor #36

Merged
savanni merged 4 commits from feature/goban into main 2023-03-31 02:43:05 +00:00
2 changed files with 10 additions and 3 deletions
Showing only changes of commit c2e7399e55 - Show all commits

View File

@ -1,5 +1,6 @@
use gtk::prelude::*;
use kifu_core::{CoreApp, Request, Response};
use kifu_gtk::ui::PlayingField;
use std::{
sync::{Arc, Mutex},
time::Duration,
@ -62,8 +63,14 @@ fn main() {
let window = gtk::ApplicationWindow::new(app);
window.present();
gtk_rx.attach(None, |message| {
gtk_rx.attach(None, move |message| {
println!("message: {:?}", message);
match message {
Response::PlayingFieldView(view) => {
let playing_field = PlayingField::new(view);
window.set_child(Some(&playing_field));
}
}
Continue(true)
});

View File

@ -56,8 +56,8 @@ impl ObjectImpl for GobanPrivate {
});
context.set_source_rgb(0.1, 0.1, 0.0);
vec![4, 9, 15].into_iter().for_each(|col| {
vec![4, 9, 15].into_iter().for_each(|row| {
vec![3, 9, 15].into_iter().for_each(|col| {
vec![3, 9, 15].into_iter().for_each(|row| {
pen.star_point(context, col, row);
});
});