]> www.fi.muni.cz Git - slotcarman.git/blobdiff - gui.pl
Avg lap time and other GUI updates.
[slotcarman.git] / gui.pl
diff --git a/gui.pl b/gui.pl
index 9311331b995d2ede32c2a5048672f74eb708fda8..0ea57b38ef24417d6d01fde9349631be306f16ea 100755 (executable)
--- a/gui.pl
+++ b/gui.pl
@@ -25,6 +25,28 @@ if (!$no_reader) {
        Glib::IO->add_watch(fileno($reader->fh), 'in', \&scx_read, $reader);
 }
 
+$track->car(0)->set_model('F1 Ferrari');
+$track->car(1)->set_model('F1 McLaren');
+$track->car(2)->set_model('F1 Williams');
+$track->car(3)->set_model('Citroen Xsara');
+$track->car(4)->set_model('Citroen C4');
+$track->car(5)->set_model('Ford Focus');
+
+$track->car(0)->set_lap(13);
+$track->car(1)->set_lap(11);
+$track->car(2)->set_lap(10);
+$track->car(3)->set_lap(undef);
+$track->car(4)->set_lap(undef);
+$track->car(5)->set_lap(undef);
+
+$track->car(0)->set_laptime(9.12322);
+$track->car(1)->set_laptime(15.313);
+$track->car(2)->set_laptime(8.193);
+
+$track->car(0)->set_driver('Ivi');
+$track->car(1)->set_driver('Filípek');
+$track->car(2)->set_driver('Táta');
+
 $gui->show;
 
 Gtk2->main();
@@ -37,7 +59,7 @@ sub quit {
 }
 
 sub scx_read {
-       my ($event, $reader) = @_;
+       my ($event, $fh, $reader) = @_;
 
        $reader->read();
        return TRUE;