コード例 #1
0
ファイル: TreeView.cs プロジェクト: kashifsoofi/bygfoot
 /** Show the first commentary of the live game
  * @param unit The #LiveGameUnit we show. */
 public static void LiveGameShowInitialCommentary(LiveGameUnit unit)
 {
     #if DEBUG
     Console.WriteLine("TreeViewHelper.LiveGameShowInitialCommentary");
     #endif
 }
コード例 #2
0
ファイル: TreeView.cs プロジェクト: kashifsoofi/bygfoot
 /** Fill the ls for the live game result treeview.
  * @param unit The current live game unit.
  * @return The ls we created. */
 public static TreeModel LiveGameCreateResult(LiveGameUnit unit)
 {
     #if DEBUG
     Console.WriteLine("TreeViewHelper.LiveGameCreateResult");
     #endif
     return null;
 }
コード例 #3
0
ファイル: GameGUI.cs プロジェクト: kashifsoofi/bygfoot
        /** Show the live game in the live game window.
         * @param unit The current unit we show. */
        public static void LiveGameShowUnit(LiveGameUnit unit)
        {
            #if DEBUG
            Console.WriteLine("GameGUI.LiveGameShowUnit");
            #endif
            /*
            gchar buf[SMALL];
            gfloat sleep_factor = (unit->time == 3) ?
            const_float("float_game_gui_live_game_speed_penalties_factor") : 1;
            gfloat fraction = (gfloat)live_game_unit_get_minute(unit) / 90;
            GtkProgressBar *progress_bar =
            GTK_PROGRESS_BAR(lookup_widget(window.live, "progressbar_live"));
            GtkHScale *hscale =
            GTK_HSCALE(lookup_widget(window.live, "hscale_area"));
            GtkWidget *button_pause = lookup_widget(window.live, "button_pause"),
            *button_resume = lookup_widget(window.live, "button_resume"),
            *button_live_close = lookup_widget(window.live, "button_live_close"),
            *eventbox_poss[2] = {lookup_widget(window.live, "eventbox_poss0"),
                 lookup_widget(window.live, "eventbox_poss1")};
            GdkColor color;

            if(unit->event.type == LIVE_GAME_EVENT_START_MATCH)
            treeview_live_game_show_initial_commentary(unit);
            else if(option_int("int_opt_user_live_game_verbosity",
               &usr(stat2).options) > unit->event.verbosity)
            treeview_live_game_show_commentary(unit);

            treeview_live_game_show_result(unit);

            gdk_color_parse (const_app("string_live_game_possession_color"), &color);
            gtk_widget_modify_bg(eventbox_poss[unit->possession], GTK_STATE_NORMAL, &color);
            gtk_widget_modify_bg(eventbox_poss[!unit->possession], GTK_STATE_NORMAL, NULL);

            if(option_int("int_opt_user_show_tendency_bar",
              &usr(stat2).options))
            game_gui_live_game_set_hscale(unit, hscale);
            else
            gtk_widget_hide(GTK_WIDGET(hscale));

            sprintf(buf, "%d.", live_game_unit_get_minute(unit));
            gtk_progress_bar_set_fraction(progress_bar, (fraction > 1) ? 1 : fraction);
            gtk_progress_bar_set_text(progress_bar, buf);
            g_usleep((gint)rint(sleep_factor *
            (gfloat)(const_int("int_game_gui_live_game_speed_max") +
                 (option_int("int_opt_user_live_game_speed", &usr(stat2).options) *
                  const_int("int_game_gui_live_game_speed_grad")))));

            while(gtk_events_pending())
            gtk_main_iteration();

            if(unit->event.type == LIVE_GAME_EVENT_START_MATCH)
            {
            gtk_widget_set_sensitive(button_live_close, (stat1 == STATUS_SHOW_LAST_MATCH));
            gtk_widget_set_sensitive(button_pause, TRUE);
            gtk_widget_set_sensitive(button_resume, FALSE);
            gtk_widget_grab_focus(button_pause);
            }
            else if(unit->event.type == LIVE_GAME_EVENT_END_MATCH)
            {
            gtk_widget_set_sensitive(button_live_close, TRUE);
            gtk_widget_set_sensitive(button_pause, FALSE);
            gtk_widget_set_sensitive(button_resume, FALSE);
            gui_set_sensitive_lg_meters(FALSE);
            gtk_widget_grab_focus(button_live_close);

            game_gui_set_main_window_sensitivity(FALSE);
            }
            else if(unit->event.type == LIVE_GAME_EVENT_PENALTIES)
            {
            gtk_widget_set_sensitive(button_pause, (stat1 == STATUS_SHOW_LAST_MATCH));
            gtk_widget_set_sensitive(button_resume, FALSE);
            } */
        }
コード例 #4
0
ファイル: TreeView.cs プロジェクト: kashifsoofi/bygfoot
 /** Create the list store for the live game
  * commentary treeview.
  * @param unit The unit we show.
  * @return The ls. */
 public static TreeModel LiveGameCreateInitCommentary(LiveGameUnit unit)
 {
     #if DEBUG
     Console.WriteLine("TreeViewHelper.LiveGameCreateInitCommentary");
     #endif
     return null;
 }
コード例 #5
0
ファイル: GameGUI.cs プロジェクト: kashifsoofi/bygfoot
 /** Set the area scale position and color in the live game window.
  * @param unit The current unit.
  * @param hscale The scale widget. */
 public static void LiveGameSetHScale(LiveGameUnit unit, Gtk.HScale hscale)
 {
     #if DEBUG
     Console.WriteLine("GameGUI.LiveGameSetHScale");
     #endif
 }