mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-02-16 03:21:05 +01:00
"YA first draft."
This commit is contained in:
parent
65aada570d
commit
1292db317c
File diff suppressed because one or more lines are too long
222
bygfoot.glade
222
bygfoot.glade
@ -68,7 +68,7 @@
|
||||
<accelerator key="l" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1112">
|
||||
<widget class="GtkImage" id="image1384">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-revert-to-saved</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -136,7 +136,7 @@
|
||||
<accelerator key="p" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1113">
|
||||
<widget class="GtkImage" id="image1385">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-preferences</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -207,7 +207,7 @@
|
||||
<accelerator key="F3" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1114">
|
||||
<widget class="GtkImage" id="image1386">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_fixtures.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -228,7 +228,7 @@
|
||||
<accelerator key="F4" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1115">
|
||||
<widget class="GtkImage" id="image1387">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_fixtures_comp.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -249,7 +249,7 @@
|
||||
<accelerator key="F5" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1116">
|
||||
<widget class="GtkImage" id="image1388">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_table.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -270,7 +270,7 @@
|
||||
<accelerator key="F6" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1117">
|
||||
<widget class="GtkImage" id="image1389">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_league_results.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -297,7 +297,7 @@
|
||||
<accelerator key="s" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1118">
|
||||
<widget class="GtkImage" id="image1390">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_league_stats.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -318,7 +318,7 @@
|
||||
<accelerator key="h" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1119">
|
||||
<widget class="GtkImage" id="image1391">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_history.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -350,7 +350,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1120">
|
||||
<widget class="GtkImage" id="image1392">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_style.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -428,7 +428,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1121">
|
||||
<widget class="GtkImage" id="image1393">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_scout.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -495,7 +495,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1122">
|
||||
<widget class="GtkImage" id="image1394">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_physio.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -555,6 +555,95 @@
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="menu_youth_academy">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Youth academy</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="menu_youth_academy_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="menu_show_youth_academy">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Show youth academy</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_menu_show_youth_academy_activate" last_modification_time="Thu, 07 Jul 2005 13:10:39 GMT"/>
|
||||
<accelerator key="y" modifiers="0" signal="activate"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="youth_coach1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Youth coach</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="youth_coach1_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioMenuItem" id="menu_yc_best">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Best</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="activate" handler="on_menu_team_button_press_event" last_modification_time="Thu, 07 Jul 2005 14:50:03 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioMenuItem" id="menu_yc_good">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Good</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="group">menu_yc_best</property>
|
||||
<signal name="activate" handler="on_menu_team_button_press_event" last_modification_time="Thu, 07 Jul 2005 14:50:03 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioMenuItem" id="menu_yc_average">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Average</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="group">menu_yc_best</property>
|
||||
<signal name="activate" handler="on_menu_team_button_press_event" last_modification_time="Thu, 07 Jul 2005 14:50:03 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioMenuItem" id="menu_yc_bad">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Bad</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="group">menu_yc_best</property>
|
||||
<signal name="activate" handler="on_menu_team_button_press_event" last_modification_time="Thu, 07 Jul 2005 14:50:03 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="menu_set_investment">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Set the percentage of your income you want to spend on the youth academy</property>
|
||||
<property name="label" translatable="yes">Set investment</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_menu_set_investment_activate" last_modification_time="Thu, 07 Jul 2005 13:10:39 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="menu_boost">
|
||||
<property name="visible">True</property>
|
||||
@ -562,7 +651,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1123">
|
||||
<widget class="GtkImage" id="image1395">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_boost.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -625,7 +714,7 @@
|
||||
<signal name="activate" handler="on_menu_reset_players_activate" last_modification_time="Tue, 26 Apr 2005 13:16:39 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1124">
|
||||
<widget class="GtkImage" id="image1396">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-undo</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -646,7 +735,7 @@
|
||||
<signal name="activate" handler="on_menu_custom_structure_activate" last_modification_time="Sat, 26 Feb 2005 12:46:30 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1125">
|
||||
<widget class="GtkImage" id="image1397">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_structure.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -668,7 +757,7 @@
|
||||
<accelerator key="r" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1126">
|
||||
<widget class="GtkImage" id="image1398">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_rearrange.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -694,7 +783,7 @@
|
||||
<signal name="activate" handler="on_menu_browse_teams_activate" last_modification_time="Mon, 03 Jan 2005 16:58:58 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1127">
|
||||
<widget class="GtkImage" id="image1399">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_browse_tms.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -727,7 +816,7 @@
|
||||
<signal name="activate" handler="on_menu_show_info_activate" last_modification_time="Sun, 02 Jan 2005 15:42:09 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1128">
|
||||
<widget class="GtkImage" id="image1400">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_player_info.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -747,7 +836,7 @@
|
||||
<signal name="activate" handler="on_menu_put_on_transfer_list_activate" last_modification_time="Sun, 02 Jan 2005 15:42:09 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1129">
|
||||
<widget class="GtkImage" id="image1401">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_player_put_transfer.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -767,7 +856,7 @@
|
||||
<signal name="activate" handler="on_menu_remove_from_transfer_list_activate" last_modification_time="Sun, 02 Jan 2005 15:42:09 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1130">
|
||||
<widget class="GtkImage" id="image1402">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_player_remove_transfer.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -787,7 +876,7 @@
|
||||
<signal name="activate" handler="on_menu_offer_new_contract_activate" last_modification_time="Fri, 25 Mar 2005 09:23:28 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1131">
|
||||
<widget class="GtkImage" id="image1403">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_player_contract.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -807,7 +896,7 @@
|
||||
<signal name="activate" handler="on_menu_fire_activate" last_modification_time="Sun, 02 Jan 2005 15:42:09 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1132">
|
||||
<widget class="GtkImage" id="image1404">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_player_fire.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -827,7 +916,7 @@
|
||||
<signal name="activate" handler="on_menu_shoots_penalties_activate" last_modification_time="Sun, 02 Jan 2005 15:42:09 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1133">
|
||||
<widget class="GtkImage" id="image1405">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_player_shoots.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -839,6 +928,15 @@
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="menu_move_to_youth_academy">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Move to youth academy</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_menu_move_to_youth_academy_activate" last_modification_time="Thu, 07 Jul 2005 21:12:26 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="trennlinie10">
|
||||
<property name="visible">True</property>
|
||||
@ -853,7 +951,7 @@
|
||||
<signal name="activate" handler="on_menu_browse_players_activate" last_modification_time="Sat, 26 Mar 2005 09:42:31 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1134">
|
||||
<widget class="GtkImage" id="image1406">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_player_browse.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -887,7 +985,7 @@
|
||||
<accelerator key="m" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1135">
|
||||
<widget class="GtkImage" id="image1407">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_last_match.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -908,7 +1006,7 @@
|
||||
<accelerator key="F2" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1136">
|
||||
<widget class="GtkImage" id="image1408">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_match_stats.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -928,7 +1026,7 @@
|
||||
<signal name="activate" handler="on_menu_user_show_coming_matches_activate" last_modification_time="Tue, 14 Jun 2005 07:21:03 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1137">
|
||||
<widget class="GtkImage" id="image1409">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-jump-to</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -956,7 +1054,7 @@
|
||||
<accelerator key="h" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1138">
|
||||
<widget class="GtkImage" id="image1410">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_history.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -983,7 +1081,7 @@
|
||||
<accelerator key="F9" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1139">
|
||||
<widget class="GtkImage" id="image1411">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-go-forward</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1005,7 +1103,7 @@
|
||||
<accelerator key="F8" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1140">
|
||||
<widget class="GtkImage" id="image1412">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-go-back</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1027,7 +1125,7 @@
|
||||
<accelerator key="F12" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1141">
|
||||
<widget class="GtkImage" id="image1413">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-justify-fill</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1062,7 +1160,7 @@
|
||||
<accelerator key="f" modifiers="0" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1142">
|
||||
<widget class="GtkImage" id="image1414">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_finances.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -1083,7 +1181,7 @@
|
||||
<accelerator key="f" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1143">
|
||||
<widget class="GtkImage" id="image1415">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">menu_stadium.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
@ -1116,7 +1214,7 @@
|
||||
<signal name="activate" handler="on_menu_about_activate" last_modification_time="Sun, 18 Jan 2004 15:58:22 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1144">
|
||||
<widget class="GtkImage" id="image1416">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-dialog-info</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1137,7 +1235,7 @@
|
||||
<signal name="activate" handler="on_menu_contributors_activate" last_modification_time="Sun, 22 May 2005 06:42:11 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1145">
|
||||
<widget class="GtkImage" id="image1417">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1158,7 +1256,7 @@
|
||||
<signal name="activate" handler="on_menu_help_activate" last_modification_time="Sun, 22 May 2005 06:42:11 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1146">
|
||||
<widget class="GtkImage" id="image1418">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-help</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -2335,6 +2433,60 @@
|
||||
<signal name="activate" handler="on_player_menu_shoots_penalties_activate" last_modification_time="Sat, 26 Mar 2005 08:47:31 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="player_menu_move_to_youth_academy">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Move to youth academy</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_player_menu_move_to_youth_academy_activate" last_modification_time="Thu, 07 Jul 2005 21:13:04 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkMenu" id="menu_youth">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="menu_youth_move_to_team">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Move to team</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_menu_youth_move_to_team_activate" last_modification_time="Fri, 08 Jul 2005 08:31:16 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1420">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-go-back</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="menu_youth_kick_out_of_academy">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Kick out of academy</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_menu_youth_kick_out_of_academy_activate" last_modification_time="Fri, 08 Jul 2005 08:31:16 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1421">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-delete</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</glade-interface>
|
||||
|
@ -1036,6 +1036,26 @@
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="checkbutton_conf_youth">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Whether a confirmation popup is shown when you kick out a youth from your academy</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Confirm removing youths</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="checkbutton_show_job">
|
||||
<property name="visible">True</property>
|
||||
|
936
po/bygfoot.pot
936
po/bygfoot.pot
File diff suppressed because it is too large
Load Diff
@ -46,10 +46,10 @@ bygfoot_SOURCES = \
|
||||
support.c support.h \
|
||||
table.c cup.h league.h misc.h table.h variables.h \
|
||||
team.c cup.h file.h fixture.h game_gui.h game.h league.h main.h maths.h misc.h option.h player.h team.h transfer.h user.h xml_team.h \
|
||||
transfer.c cup.h finance.h free.h game_gui.h main.h maths.h misc.h option.h player.h support.h team.h transfer.h treeview.h user.h \
|
||||
transfer.c callbacks.h cup.h finance.h free.h game_gui.h main.h maths.h misc.h option.h player.h support.h team.h transfer.h treeview.h user.h \
|
||||
treeview.c cup.h finance.h fixture.h free.h game.h language.h league.h live_game.h maths.h misc.h option.h player.h support.h team.h transfer.h treeview.h treeview_helper.h user.h \
|
||||
treeview_helper.c cup.h file.h fixture.h free.h league.h misc.h option.h player.h support.h team.h transfer.h treeview.h treeview_helper.h user.h variables.h \
|
||||
user.c cup.h finance.h fixture.h free.h game_gui.h league.h live_game.h main.h maths.h misc.h name.h option.h player.h support.h team.h transfer.h treeview.h user.h window.h \
|
||||
user.c cup.h finance.h fixture.h free.h game_gui.h league.h live_game.h main.h maths.h misc.h name.h option.h player.h support.h team.h transfer.h treeview.h user.h window.h youth_academy.h \
|
||||
window.c callbacks.h file.h finance.h free.h game_gui.h gui.h interface.h league.h live_game.h load_save.h main.h misc2_interface.h misc_callback_func.h misc_interface.h option_gui.h option.h options_interface.h support.h transfer.h treeview.h treeview_helper.h user.h window.h \
|
||||
xml.c cup.h file.h free.h gui.h league.h misc.h option.h support.h table.h transfer_struct.h user.h variables.h xml.h xml_loadsave_cup.h xml_loadsave_fixtures.h xml_loadsave_league.h xml_loadsave_league_stat.h xml_loadsave_live_game.h xml_loadsave_table.h xml_loadsave_teams.h xml_loadsave_transfers.h xml_loadsave_users.h \
|
||||
xml_loadsave_cup.c cup.h file.h misc.h table.h team.h xml.h xml_loadsave_cup.h xml_loadsave_fixtures.h xml_loadsave_table.h xml_loadsave_teams.h \
|
||||
@ -68,7 +68,8 @@ bygfoot_SOURCES = \
|
||||
xml_league.c cup_struct.h file.h free.h league.h misc.h table.h team.h variables.h xml_cup.h xml_league.h \
|
||||
xml_lg_commentary.c free.h lg_commentary.h live_game.h misc.h variables.h xml_lg_commentary.h \
|
||||
xml_name.c file.h free.h misc.h name.h variables.h xml_name.h \
|
||||
xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h
|
||||
xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h \
|
||||
youth_academy.c user.h youth_academy.h
|
||||
|
||||
bygfoot_LDADD = @PACKAGE_LIBS@ $(INTLLIBS)
|
||||
|
||||
|
@ -124,6 +124,7 @@ typedef struct
|
||||
*file_chooser,
|
||||
*contract,
|
||||
*menu_player,
|
||||
*menu_youth,
|
||||
*user_management,
|
||||
*wdebug,
|
||||
*help,
|
||||
|
@ -75,13 +75,13 @@ callback_player_clicked(gint idx, GdkEventButton *event)
|
||||
|
||||
if(event->button == 1)
|
||||
{
|
||||
if(selected_row[0] == -1)
|
||||
if(selected_row == -1)
|
||||
{
|
||||
selected_row[0] = idx;
|
||||
selected_row = idx;
|
||||
return;
|
||||
}
|
||||
|
||||
player_swap(current_user.tm, selected_row[0],
|
||||
player_swap(current_user.tm, selected_row,
|
||||
current_user.tm, idx);
|
||||
if(opt_user_int("int_opt_user_swap_adapts") == 1 &&
|
||||
current_user.tm->structure !=
|
||||
@ -94,7 +94,7 @@ callback_player_clicked(gint idx, GdkEventButton *event)
|
||||
|
||||
game_gui_write_av_skills();
|
||||
|
||||
selected_row[0] = -1;
|
||||
selected_row = -1;
|
||||
|
||||
treeview_show_user_player_list();
|
||||
if(stat0 == STATUS_MAIN)
|
||||
@ -104,13 +104,18 @@ callback_player_clicked(gint idx, GdkEventButton *event)
|
||||
{
|
||||
if(stat0 == STATUS_SHOW_TRANSFER_LIST)
|
||||
{
|
||||
selected_row[0] = -1;
|
||||
selected_row = -1;
|
||||
transfer_add_remove_user_player(player_of_idx_team(current_user.tm, idx));
|
||||
}
|
||||
else if(stat0 == STATUS_SHOW_YA)
|
||||
{
|
||||
selected_row = idx;
|
||||
on_menu_move_to_youth_academy_activate(NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
selected_row = idx;
|
||||
window_show_menu_player((GdkEvent*)event);
|
||||
selected_row[0] = idx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,9 +428,8 @@ callback_transfer_list_clicked(gint button, gint idx)
|
||||
{
|
||||
if(team_is_user(tr->tm) != -1)
|
||||
{
|
||||
sprintf(buf, _("User %s didn't consider your offer yet."),
|
||||
game_gui_print_message(_("User %s didn't consider your offer yet."),
|
||||
user_from_team(tr->tm)->name->str);
|
||||
game_gui_print_message(buf);
|
||||
}
|
||||
else
|
||||
callback_transfer_list_cpu(button, idx);
|
||||
@ -734,3 +738,29 @@ callback_show_player_team(void)
|
||||
|
||||
treeview_show_player_list_team(treeview_right, pl->team, current_user.scout % 10);
|
||||
}
|
||||
|
||||
/** Show the youth players of the current user. */
|
||||
void
|
||||
callback_show_youth_academy(void)
|
||||
{
|
||||
gint i;
|
||||
PlayerListAttribute attributes;
|
||||
|
||||
for(i=0;i<PLAYER_LIST_ATTRIBUTE_END;i++)
|
||||
attributes.on_off[i] = 0;
|
||||
|
||||
attributes.on_off[PLAYER_LIST_ATTRIBUTE_NAME] =
|
||||
attributes.on_off[PLAYER_LIST_ATTRIBUTE_POS] =
|
||||
attributes.on_off[PLAYER_LIST_ATTRIBUTE_SKILL] =
|
||||
attributes.on_off[PLAYER_LIST_ATTRIBUTE_FITNESS] =
|
||||
attributes.on_off[PLAYER_LIST_ATTRIBUTE_STATUS] =
|
||||
attributes.on_off[PLAYER_LIST_ATTRIBUTE_AGE] =
|
||||
attributes.on_off[PLAYER_LIST_ATTRIBUTE_ETAL] = 1;
|
||||
|
||||
if(stat0 != STATUS_SHOW_YA)
|
||||
game_gui_print_message(_("Right click to move players to and from the youth academy; left click for context menu."));
|
||||
|
||||
treeview_show_player_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")),
|
||||
player_get_pointers_from_array(current_user.youth_academy.players),
|
||||
attributes, FALSE);
|
||||
}
|
||||
|
@ -57,4 +57,7 @@ callback_show_next_opponent(void);
|
||||
void
|
||||
callback_show_player_team(void);
|
||||
|
||||
void
|
||||
callback_show_youth_academy(void);
|
||||
|
||||
#endif
|
||||
|
152
src/callbacks.c
152
src/callbacks.c
@ -142,16 +142,13 @@ void
|
||||
on_button_transfers_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
|
||||
if(sett_int("int_opt_disable_transfers"))
|
||||
game_gui_print_message(_("Transfers are disabled in this country definition."));
|
||||
else if(week < transfer_get_deadline() || transfer_list->len > 0)
|
||||
{
|
||||
stat0 = STATUS_SHOW_TRANSFER_LIST;
|
||||
game_gui_print_message(_("Left click to make an offer. Right click to remove offer."));
|
||||
sprintf(buf, _("Transfer deadline is Week %d"), transfer_get_deadline());
|
||||
game_gui_print_message_with_delay(buf);
|
||||
game_gui_print_message_with_delay(_("Transfer deadline is Week %d"), transfer_get_deadline());
|
||||
treeview_show_transfer_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")));
|
||||
gtk_notebook_set_current_page(GTK_NOTEBOOK(lookup_widget(window.main, "notebook_player")), 1);
|
||||
|
||||
@ -208,9 +205,9 @@ on_player_list1_button_press_event (GtkWidget *widget,
|
||||
if(treeview_helper_select_row(GTK_TREE_VIEW(widget), event))
|
||||
idx = treeview_helper_get_index(GTK_TREE_VIEW(widget), 0);
|
||||
|
||||
if(idx < 0 || idx - 1 == selected_row[0])
|
||||
if(idx < 0 || idx - 1 == selected_row)
|
||||
{
|
||||
selected_row[0] = -1;
|
||||
selected_row = -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -235,7 +232,7 @@ on_button_browse_forward_clicked (GtkButton *button,
|
||||
callback_show_team(SHOW_NEXT);
|
||||
break;
|
||||
case STATUS_SHOW_PLAYER_INFO:
|
||||
selected_row[0] = (selected_row[0] + 1) % current_user.tm->players->len;
|
||||
selected_row = (selected_row + 1) % current_user.tm->players->len;
|
||||
on_menu_show_info_activate(NULL, NULL);
|
||||
break;
|
||||
case STATUS_SHOW_SEASON_HISTORY:
|
||||
@ -261,7 +258,7 @@ on_button_browse_back_clicked (GtkButton *button,
|
||||
callback_show_team(SHOW_PREVIOUS);
|
||||
break;
|
||||
case STATUS_SHOW_PLAYER_INFO:
|
||||
selected_row[0] = (selected_row[0] == 0) ? current_user.tm->players->len - 1 : selected_row[0] - 1;
|
||||
selected_row = (selected_row == 0) ? current_user.tm->players->len - 1 : selected_row - 1;
|
||||
on_menu_show_info_activate(NULL, NULL);
|
||||
break;
|
||||
case STATUS_SHOW_SEASON_HISTORY:
|
||||
@ -399,14 +396,14 @@ on_menu_put_on_transfer_list_activate (GtkMenuItem *menuitem,
|
||||
{
|
||||
if(sett_int("int_opt_disable_transfers"))
|
||||
game_gui_print_message(_("Transfers are disabled in this country definition."));
|
||||
else if(selected_row[0] == -1)
|
||||
else if(selected_row == -1)
|
||||
game_gui_print_message(_("You haven't selected a player."));
|
||||
else if(query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row[0])))
|
||||
else if(query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row)))
|
||||
game_gui_print_message(_("The player is already on the list."));
|
||||
else
|
||||
{
|
||||
setsav0;
|
||||
transfer_add_remove_user_player(player_of_idx_team(current_user.tm, selected_row[0]));
|
||||
transfer_add_remove_user_player(player_of_idx_team(current_user.tm, selected_row));
|
||||
}
|
||||
}
|
||||
|
||||
@ -415,14 +412,14 @@ void
|
||||
on_menu_remove_from_transfer_list_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(selected_row[0] == -1)
|
||||
if(selected_row == -1)
|
||||
game_gui_print_message(_("You haven't selected a player."));
|
||||
else if(!query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row[0])))
|
||||
else if(!query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row)))
|
||||
game_gui_print_message(_("The player is not on the list."));
|
||||
else
|
||||
{
|
||||
setsav0;
|
||||
transfer_add_remove_user_player(player_of_idx_team(current_user.tm, selected_row[0]));
|
||||
transfer_add_remove_user_player(player_of_idx_team(current_user.tm, selected_row));
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,14 +428,14 @@ void
|
||||
on_menu_fire_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(selected_row[0] == -1)
|
||||
if(selected_row == -1)
|
||||
game_gui_print_message(_("You haven't selected a player."));
|
||||
else if(current_user.tm->players->len == 11)
|
||||
game_gui_show_warning(_("Your team can't have less than 11 players."));
|
||||
else
|
||||
{
|
||||
callback_fire_player(selected_row[0]);
|
||||
selected_row[0] = -1;
|
||||
callback_fire_player(selected_row);
|
||||
selected_row = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -447,11 +444,9 @@ void
|
||||
on_menu_shoots_penalties_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
|
||||
if(selected_row[0] == -1)
|
||||
if(selected_row == -1)
|
||||
game_gui_print_message(_("You haven't selected a player."));
|
||||
else if(player_of_idx_team(current_user.tm, selected_row[0])->id ==
|
||||
else if(player_of_idx_team(current_user.tm, selected_row)->id ==
|
||||
opt_user_int("int_opt_user_penalty_shooter"))
|
||||
{
|
||||
opt_user_set_int("int_opt_user_penalty_shooter", -1);
|
||||
@ -461,16 +456,46 @@ on_menu_shoots_penalties_activate (GtkMenuItem *menuitem,
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(buf, _("%s will shoot penalties and free kicks when he plays."),
|
||||
player_of_idx_team(current_user.tm, selected_row[0])->name->str);
|
||||
game_gui_print_message(_("%s will shoot penalties and free kicks when he plays."),
|
||||
player_of_idx_team(current_user.tm, selected_row)->name->str);
|
||||
opt_user_set_int("int_opt_user_penalty_shooter",
|
||||
player_of_idx_team(current_user.tm, selected_row[0])->id);
|
||||
game_gui_print_message(buf);
|
||||
player_of_idx_team(current_user.tm, selected_row)->id);
|
||||
treeview_show_user_player_list();
|
||||
setsav0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
on_menu_move_to_youth_academy_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
Player *pl;
|
||||
|
||||
if(selected_row == -1)
|
||||
game_gui_print_message(_("You haven't selected a player."));
|
||||
else
|
||||
{
|
||||
pl = player_of_idx_team(current_user.tm, selected_row);
|
||||
|
||||
if(pl->age > const_float("float_player_age_lower"))
|
||||
game_gui_print_message(_("The player is too old for the youth academy."));
|
||||
else if(current_user.tm->players->len <= 11)
|
||||
game_gui_print_message(_("You can't move the player, there are too few players in your team."));
|
||||
else if(current_user.youth_academy.players->len ==
|
||||
const_int("int_youth_academy_max_youths"))
|
||||
game_gui_print_message(_("There is no room in your youth academy."));
|
||||
else
|
||||
{
|
||||
player_move_to_ya(selected_row);
|
||||
treeview_show_user_player_list();
|
||||
on_menu_show_youth_academy_activate(NULL, NULL);
|
||||
selected_row = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
on_menu_my_league_results_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
@ -549,6 +574,13 @@ on_treeview_right_button_press_event (GtkWidget *widget,
|
||||
case STATUS_SHOW_PLAYER_LIST:
|
||||
callback_show_player_team();
|
||||
break;
|
||||
case STATUS_SHOW_YA:
|
||||
selected_row = idx - 1;
|
||||
if(event->button == 3)
|
||||
on_menu_youth_move_to_team_activate(NULL, NULL);
|
||||
else
|
||||
window_show_menu_youth((GdkEvent*)event);
|
||||
break;
|
||||
}
|
||||
|
||||
gui_set_arrows();
|
||||
@ -793,13 +825,13 @@ on_menu_offer_new_contract_activate (GtkMenuItem *menuitem,
|
||||
return;
|
||||
}
|
||||
|
||||
if(selected_row[0] == -1)
|
||||
if(selected_row == -1)
|
||||
{
|
||||
game_gui_print_message(_("You haven't selected a player."));
|
||||
return;
|
||||
}
|
||||
|
||||
callback_offer_new_contract(selected_row[0]);
|
||||
callback_offer_new_contract(selected_row);
|
||||
|
||||
setsav0;
|
||||
}
|
||||
@ -809,7 +841,7 @@ void
|
||||
on_menu_show_info_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(selected_row[0] == -1)
|
||||
if(selected_row == -1)
|
||||
{
|
||||
game_gui_print_message(_("You haven't selected a player."));
|
||||
return;
|
||||
@ -817,7 +849,7 @@ on_menu_show_info_activate (GtkMenuItem *menuitem,
|
||||
|
||||
if(stat0 != STATUS_LIVE_GAME_PAUSE)
|
||||
stat0 = STATUS_SHOW_PLAYER_INFO;
|
||||
treeview_show_player_info(player_of_idx_team(current_user.tm, selected_row[0]));
|
||||
treeview_show_player_info(player_of_idx_team(current_user.tm, selected_row));
|
||||
|
||||
gui_set_arrows();
|
||||
}
|
||||
@ -866,6 +898,15 @@ on_player_menu_shoots_penalties_activate
|
||||
on_menu_shoots_penalties_activate(NULL, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
on_player_menu_move_to_youth_academy_activate
|
||||
(GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
on_menu_move_to_youth_academy_activate(NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
on_menu_browse_players_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
@ -962,3 +1003,56 @@ on_button_quit_button_press_event (GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
on_menu_show_youth_academy_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
callback_show_youth_academy();
|
||||
stat0 = STATUS_SHOW_YA;
|
||||
}
|
||||
|
||||
void
|
||||
on_menu_set_investment_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
stat1 = STATUS_SET_YA_PERCENTAGE;
|
||||
window_show_digits(_("Set the percentage of your income you want to devote to your youth academy."),
|
||||
NULL, -1, "%", current_user.youth_academy.percentage);
|
||||
}
|
||||
|
||||
void
|
||||
on_menu_youth_move_to_team_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(current_user.tm->players->len == const_int("int_team_max_players"))
|
||||
game_gui_print_message(_("You can't have more than %d players in the team."),
|
||||
const_int("int_team_max_players"));
|
||||
else
|
||||
{
|
||||
player_move_from_ya(selected_row);
|
||||
treeview_show_user_player_list();
|
||||
on_menu_show_youth_academy_activate(NULL, NULL);
|
||||
selected_row = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
on_menu_youth_kick_out_of_academy_activate
|
||||
(GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if(opt_user_int("int_opt_user_confirm_youth"))
|
||||
{
|
||||
stat1 = STATUS_QUERY_KICK_YOUTH;
|
||||
window_show_yesno(_("Do you really want to kick the poor boy out of your academy?"));
|
||||
}
|
||||
else
|
||||
{
|
||||
free_player(&g_array_index(current_user.youth_academy.players, Player, selected_row));
|
||||
g_array_remove_index(current_user.youth_academy.players, selected_row);
|
||||
on_menu_show_youth_academy_activate(NULL, NULL);
|
||||
selected_row = -1;
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,6 @@ on_menu_reset_players_activate (GtkMenuItem *menuitem,
|
||||
void
|
||||
on_menu_league_stats_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
on_button_quit_button_press_event (GtkWidget *widget,
|
||||
@ -267,3 +266,30 @@ void
|
||||
on_menu_user_show_coming_matches_activate
|
||||
(GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_menu_show_youth_academy_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_menu_set_investment_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
#endif
|
||||
|
||||
void
|
||||
on_menu_move_to_youth_academy_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_player_menu_move_to_youth_academy_activate
|
||||
(GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_menu_youth_move_to_team_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_menu_youth_kick_out_of_academy_activate
|
||||
(GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
14
src/debug.c
14
src/debug.c
@ -9,17 +9,15 @@
|
||||
void
|
||||
debug_action(const gchar *text, gint value)
|
||||
{
|
||||
gchar message[SMALL];
|
||||
|
||||
if(g_str_has_prefix(text, "deb"))
|
||||
{
|
||||
opt_set_int("int_opt_debug", value);
|
||||
sprintf(message, "Debug value set to %d.", value);
|
||||
game_gui_print_message("Debug value set to %d.", value);
|
||||
}
|
||||
else if(g_str_has_prefix(text, "cap"))
|
||||
{
|
||||
current_user.tm->stadium.capacity += value;
|
||||
sprintf(message, "Stadium capacity changed by %d. New: %d.", value,
|
||||
game_gui_print_message("Stadium capacity changed by %d. New: %d.", value,
|
||||
current_user.tm->stadium.capacity);
|
||||
}
|
||||
else if(g_str_has_prefix(text, "saf"))
|
||||
@ -27,19 +25,19 @@ debug_action(const gchar *text, gint value)
|
||||
current_user.tm->stadium.safety += ((gfloat)value / 100);
|
||||
current_user.tm->stadium.safety =
|
||||
CLAMP(current_user.tm->stadium.safety, 0, 1);
|
||||
sprintf(message, "Stadium safety changed by %d. New: %.2f", value,
|
||||
game_gui_print_message("Stadium safety changed by %d. New: %.2f", value,
|
||||
current_user.tm->stadium.safety);
|
||||
}
|
||||
else if(g_str_has_prefix(text, "mon"))
|
||||
{
|
||||
current_user.money += value;
|
||||
sprintf(message, "Money changed by %d. New: %d.", value,
|
||||
game_gui_print_message("Money changed by %d. New: %d.", value,
|
||||
current_user.money);
|
||||
}
|
||||
else if(g_str_has_prefix(text, "suc"))
|
||||
{
|
||||
current_user.counters[COUNT_USER_SUCCESS] += value;
|
||||
sprintf(message, "Success counter changed by %d. New: %d.", value,
|
||||
game_gui_print_message("Success counter changed by %d. New: %d.", value,
|
||||
current_user.counters[COUNT_USER_SUCCESS]);
|
||||
}
|
||||
else if(g_str_has_prefix(text, "help"))
|
||||
@ -51,10 +49,8 @@ debug_action(const gchar *text, gint value)
|
||||
"mon \t change money\n"
|
||||
"suc \t change success counter\n"
|
||||
"help \t display this help\n");
|
||||
strcpy(message, "");
|
||||
}
|
||||
|
||||
game_gui_print_message(message);
|
||||
setsav0;
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,9 @@ enum Status0Value
|
||||
STATUS_QUERY_USER_NO_TURN,
|
||||
STATUS_GENERATE_TEAMS,
|
||||
STATUS_SPONSOR_CONTINUE,
|
||||
STATUS_SHOW_YA,
|
||||
STATUS_SET_YA_PERCENTAGE,
|
||||
STATUS_QUERY_KICK_YOUTH,
|
||||
STATUS_END
|
||||
};
|
||||
|
||||
|
@ -426,7 +426,6 @@ file_load_opt_file(const gchar *filename, OptionList *optionlist)
|
||||
new.string_value = NULL;
|
||||
sscanf(opt_value, "%d", &new.value);
|
||||
}
|
||||
|
||||
g_array_append_val(optionlist->list, new);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,11 @@ finance_update_user_weekly(User *user)
|
||||
const_float("float_finance_scout_factor2"),
|
||||
const_float("float_finance_scout_factor3"),
|
||||
const_float("float_finance_scout_factor4")};
|
||||
gfloat yc_factor[4] =
|
||||
{const_float("float_finance_yc_factor1"),
|
||||
const_float("float_finance_yc_factor2"),
|
||||
const_float("float_finance_yc_factor3"),
|
||||
const_float("float_finance_yc_factor4")};
|
||||
|
||||
if(sett_int("int_opt_disable_finances"))
|
||||
return;
|
||||
@ -46,6 +51,11 @@ finance_update_user_weekly(User *user)
|
||||
user->money_in[1][MON_IN_SPONSOR] += user->sponsor.benefit;
|
||||
user->sponsor.contract = MAX(user->sponsor.contract - 1, 0);
|
||||
|
||||
user->money -= (gint)rint((gfloat)user->sponsor.benefit *
|
||||
(gfloat)user->youth_academy.percentage / 100);
|
||||
user->money_out[1][MON_OUT_YA] -= (gint)rint((gfloat)user->sponsor.benefit *
|
||||
(gfloat)user->youth_academy.percentage / 100);
|
||||
|
||||
if(user->counters[COUNT_USER_NEW_SPONSOR] > 1)
|
||||
user->counters[COUNT_USER_NEW_SPONSOR]--;
|
||||
else if(user->sponsor.contract == 4 &&
|
||||
@ -74,6 +84,12 @@ finance_update_user_weekly(User *user)
|
||||
user->money_out[1][MON_OUT_SCOUT] -= (gint)(finance_wage_unit(tm) * scout_factor[user->scout % 10]);
|
||||
user->money -= (gint)(finance_wage_unit(tm) * scout_factor[user->scout % 10]);
|
||||
|
||||
if(user->youth_academy.players->len > 0)
|
||||
{
|
||||
user->money_out[1][MON_OUT_YC] -= (gint)(finance_wage_unit(tm) * yc_factor[user->youth_academy.coach % 10]);
|
||||
user->money -= (gint)(finance_wage_unit(tm) * yc_factor[user->youth_academy.coach % 10]);
|
||||
}
|
||||
|
||||
user->debt = (gint)rint((gfloat)user->debt * (1 + const_float("float_finance_interest")));
|
||||
|
||||
if(user->money < -finance_team_drawing_credit_loan(user->tm, FALSE) &&
|
||||
@ -155,8 +171,6 @@ finance_team_drawing_credit_loan(const Team *tm, gboolean loan)
|
||||
void
|
||||
finance_get_loan(gint value)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
|
||||
current_user.money += value;
|
||||
current_user.debt -= value;
|
||||
|
||||
@ -164,11 +178,10 @@ finance_get_loan(gint value)
|
||||
const_int("int_finance_payback_weeks") :
|
||||
current_user.counters[COUNT_USER_LOAN];
|
||||
|
||||
sprintf(buf, _("You have %d weeks to pay back your loan."),
|
||||
current_user.counters[COUNT_USER_LOAN]);
|
||||
game_gui_print_message(_("You have %d weeks to pay back your loan."),
|
||||
current_user.counters[COUNT_USER_LOAN]);
|
||||
|
||||
on_menu_show_finances_activate(NULL, NULL);
|
||||
game_gui_print_message(buf);
|
||||
}
|
||||
|
||||
|
||||
@ -177,7 +190,6 @@ finance_get_loan(gint value)
|
||||
void
|
||||
finance_pay_loan(gint value)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
gint add = (gint)rint((gfloat)value / (gfloat)(-current_user.debt) *
|
||||
(gfloat)const_int("int_finance_payback_weeks"));
|
||||
|
||||
@ -187,19 +199,18 @@ finance_pay_loan(gint value)
|
||||
if(current_user.debt == 0)
|
||||
{
|
||||
current_user.counters[COUNT_USER_LOAN] = -1;
|
||||
strcpy(buf, _("You are free from debt."));
|
||||
game_gui_print_message(_("You are free from debt."));
|
||||
}
|
||||
else
|
||||
{
|
||||
current_user.counters[COUNT_USER_LOAN] =
|
||||
MIN(current_user.counters[COUNT_USER_LOAN] + add,
|
||||
const_int("int_finance_payback_weeks"));
|
||||
sprintf(buf, _("You have %d weeks to pay back the rest of your loan."),
|
||||
current_user.counters[COUNT_USER_LOAN]);
|
||||
game_gui_print_message(_("You have %d weeks to pay back the rest of your loan."),
|
||||
current_user.counters[COUNT_USER_LOAN]);
|
||||
}
|
||||
|
||||
on_menu_show_finances_activate(NULL, NULL);
|
||||
game_gui_print_message(buf);
|
||||
}
|
||||
|
||||
/** Return the cost of a stadium improvement.
|
||||
|
23
src/free.c
23
src/free.c
@ -126,6 +126,8 @@ free_user(User *user)
|
||||
g_string_free(g_array_index(user->history,
|
||||
UserHistory, i).value_string, TRUE);
|
||||
free_g_array(&user->history);
|
||||
|
||||
free_player_array(&user->youth_academy.players);
|
||||
}
|
||||
|
||||
/** Free a user event. */
|
||||
@ -345,20 +347,27 @@ free_teams_array(GArray **teams, gboolean reset)
|
||||
void
|
||||
free_team(Team *tm)
|
||||
{
|
||||
gint i;
|
||||
|
||||
free_g_string(&tm->stadium.name);
|
||||
free_g_string(&tm->name);
|
||||
free_g_string(&tm->names_file);
|
||||
free_g_string(&tm->symbol);
|
||||
free_g_string(&tm->def_file);
|
||||
|
||||
if(tm->players != NULL)
|
||||
{
|
||||
for(i=0;i<tm->players->len;i++)
|
||||
free_player(&g_array_index(tm->players, Player, i));
|
||||
free_player_array(&tm->players);
|
||||
}
|
||||
|
||||
free_g_array(&tm->players);
|
||||
/** Free an array containing players. */
|
||||
void
|
||||
free_player_array(GArray **players)
|
||||
{
|
||||
gint i;
|
||||
|
||||
if(*players != NULL)
|
||||
{
|
||||
for(i=0;i<(*players)->len;i++)
|
||||
free_player(&g_array_index((*players), Player, i));
|
||||
|
||||
free_g_array(players);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,9 @@ free_variables(void);
|
||||
void
|
||||
free_g_string_array(GPtrArray **array);
|
||||
|
||||
void
|
||||
free_player_array(GArray **players);
|
||||
|
||||
void
|
||||
free_player(Player *pl);
|
||||
|
||||
|
15
src/game.c
15
src/game.c
@ -257,6 +257,13 @@ game_initialize(Fixture *fix)
|
||||
usr(user_idx[0]).money += ticket_income;
|
||||
usr(user_idx[0]).money_in[1][MON_IN_TICKET] += ticket_income;
|
||||
|
||||
usr(user_idx[0]).money -=
|
||||
(gint)rint((gfloat)ticket_income *
|
||||
(gfloat)usr(user_idx[0]).youth_academy.percentage / 100);
|
||||
usr(user_idx[0]).money_out[1][MON_OUT_YA] -=
|
||||
(gint)rint((gfloat)ticket_income *
|
||||
(gfloat)usr(user_idx[0]).youth_academy.percentage / 100);
|
||||
|
||||
if(debug < 50)
|
||||
{
|
||||
fix->teams[0]->stadium.safety -=
|
||||
@ -279,6 +286,10 @@ game_initialize(Fixture *fix)
|
||||
g_array_index(fix->teams[i]->players, Player, j).career[PLAYER_VALUE_GAMES]++;
|
||||
|
||||
g_array_index(fix->teams[i]->players, Player, j).participation = TRUE;
|
||||
|
||||
if(query_player_is_youth((&g_array_index(fix->teams[i]->players, Player, j))))
|
||||
g_array_index(fix->teams[i]->players, Player, j).lsu +=
|
||||
const_float("float_youth_lsu_addition_match");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -629,7 +640,7 @@ game_substitute_player(Team *tm, gint player_number)
|
||||
{
|
||||
game_gui_write_av_skills();
|
||||
|
||||
selected_row[0] = -1;
|
||||
selected_row = -1;
|
||||
treeview_show_user_player_list();
|
||||
}
|
||||
|
||||
@ -757,7 +768,7 @@ game_substitute_player_send_off(gint clid, Team *tm, gint player_number,
|
||||
{
|
||||
game_gui_write_av_skills();
|
||||
|
||||
selected_row[0] = -1;
|
||||
selected_row = -1;
|
||||
treeview_show_user_player_list();
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,8 @@ game_gui_live_game_set_hscale(const LiveGameUnit *unit, GtkHScale *hscale)
|
||||
/** Look up the widgets in the main window. */
|
||||
void
|
||||
game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout,
|
||||
GtkWidget **physio, GtkWidget **boost)
|
||||
GtkWidget **physio, GtkWidget **boost,
|
||||
GtkWidget **yc)
|
||||
{
|
||||
style[0] = lookup_widget(window.main, "menu_all_out_defend");
|
||||
style[1] = lookup_widget(window.main, "menu_defend");
|
||||
@ -174,6 +175,11 @@ game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout,
|
||||
boost[0] = lookup_widget(window.main, "menu_boost_anti");
|
||||
boost[1] = lookup_widget(window.main, "menu_boost_off");
|
||||
boost[2] = lookup_widget(window.main, "menu_boost_on");
|
||||
|
||||
yc[0] = lookup_widget(window.main, "menu_yc_best");
|
||||
yc[1] = lookup_widget(window.main, "menu_yc_good");
|
||||
yc[2] = lookup_widget(window.main, "menu_yc_average");
|
||||
yc[3] = lookup_widget(window.main, "menu_yc_bad");
|
||||
}
|
||||
|
||||
/** Set information like season, user, week etc. into the appropriate labels. */
|
||||
@ -247,14 +253,16 @@ game_gui_write_av_skills(void)
|
||||
void
|
||||
game_gui_write_radio_items(void)
|
||||
{
|
||||
GtkWidget *style[5], *scout[4], *physio[4], *boost[3];
|
||||
GtkWidget *style[5], *scout[4], *physio[4],
|
||||
*boost[3], *yc[4];
|
||||
|
||||
game_gui_get_radio_items(style, scout, physio, boost);
|
||||
game_gui_get_radio_items(style, scout, physio, boost, yc);
|
||||
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(style[current_user.tm->style + 2]), TRUE);
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(scout[current_user.scout % 10]), TRUE);
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(physio[current_user.physio % 10]), TRUE);
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(boost[current_user.tm->boost + 1]), TRUE);
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(yc[current_user.youth_academy.coach % 10]), TRUE);
|
||||
}
|
||||
|
||||
/** Set the appropriate images for the style and boost meters. */
|
||||
@ -291,12 +299,13 @@ void
|
||||
game_gui_read_radio_items(GtkWidget *widget)
|
||||
{
|
||||
gint i;
|
||||
GtkWidget *boost[3];
|
||||
GtkWidget *boost[3], *yc[4];
|
||||
GtkWidget *style[5], *scout[4], *physio[4];
|
||||
gint old_scout = current_user.scout,
|
||||
old_physio = current_user.physio;
|
||||
old_physio = current_user.physio,
|
||||
old_yc = current_user.youth_academy.coach;
|
||||
|
||||
game_gui_get_radio_items(style, scout, physio, boost);
|
||||
game_gui_get_radio_items(style, scout, physio, boost, yc);
|
||||
|
||||
for(i=0;i<3;i++)
|
||||
if(widget == boost[i])
|
||||
@ -321,6 +330,10 @@ game_gui_read_radio_items(GtkWidget *widget)
|
||||
for(i=0;i<4;i++)
|
||||
if(widget == physio[i])
|
||||
current_user.physio = 100 + i * 10 + old_physio % 10;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
if(widget == yc[i])
|
||||
current_user.youth_academy.coach = 100 + i * 10 + old_yc % 10;
|
||||
|
||||
if(math_get_place(current_user.scout, 2) == old_scout % 10)
|
||||
current_user.scout = old_scout % 10;
|
||||
@ -328,8 +341,12 @@ game_gui_read_radio_items(GtkWidget *widget)
|
||||
if(math_get_place(current_user.physio, 2) == old_physio % 10)
|
||||
current_user.physio = old_physio % 10;
|
||||
|
||||
if(math_get_place(current_user.youth_academy.coach, 2) == old_yc % 10)
|
||||
current_user.youth_academy.coach = old_yc % 10;
|
||||
|
||||
if(old_scout != current_user.scout ||
|
||||
old_physio != current_user.physio)
|
||||
old_physio != current_user.physio ||
|
||||
old_yc != current_user.youth_academy.coach)
|
||||
game_gui_print_message(_("Next week you'll fire him and hire a new one."));
|
||||
|
||||
game_gui_write_meters();
|
||||
@ -365,14 +382,22 @@ game_gui_show_main(void)
|
||||
user_show_sponsor_continue();
|
||||
}
|
||||
|
||||
/** Print a message into the main window entry. */
|
||||
|
||||
/** Print a message in the message area. */
|
||||
gboolean
|
||||
game_gui_print_message(gchar *text)
|
||||
game_gui_print_message(gchar *format, ...)
|
||||
{
|
||||
gchar text[SMALL];
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
g_vsprintf(text, format, args);
|
||||
va_end (args);
|
||||
|
||||
if(g_str_has_prefix(text, "___"))
|
||||
{
|
||||
gtk_entry_set_text(GTK_ENTRY(lookup_widget(window.main, "entry_message")), text + 3);
|
||||
g_free(text);
|
||||
g_free(format);
|
||||
}
|
||||
else
|
||||
gtk_entry_set_text(GTK_ENTRY(lookup_widget(window.main, "entry_message")), text);
|
||||
@ -388,9 +413,17 @@ game_gui_print_message(gchar *text)
|
||||
|
||||
/** Print a message after some seconds of delay. */
|
||||
void
|
||||
game_gui_print_message_with_delay(gchar *text)
|
||||
game_gui_print_message_with_delay(const gchar *format, ...)
|
||||
{
|
||||
gchar *local_text = g_strdup_printf("___%s", text);
|
||||
gchar text[SMALL];
|
||||
gchar *local_text = NULL;
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
g_vsprintf(text, format, args);
|
||||
va_end (args);
|
||||
|
||||
local_text = g_strdup_printf("___%s", text);
|
||||
|
||||
g_timeout_add(const_int("int_game_gui_message_delay") * 1000,
|
||||
(GSourceFunc)game_gui_print_message, local_text);
|
||||
@ -509,15 +542,22 @@ game_gui_set_main_window_sensitivity(gboolean value)
|
||||
/** Show a window with a warning.
|
||||
@param text The text to show in the window. */
|
||||
void
|
||||
game_gui_show_warning(gchar *text)
|
||||
game_gui_show_warning(const gchar *format, ...)
|
||||
{
|
||||
gchar text[SMALL];
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
g_vsprintf(text, format, args);
|
||||
va_end (args);
|
||||
|
||||
if(opt_int("int_opt_prefer_messages") &&
|
||||
window.main != NULL)
|
||||
game_gui_print_message(text);
|
||||
else
|
||||
{
|
||||
window_create(WINDOW_WARNING);
|
||||
gtk_label_set_text(GTK_LABEL(lookup_widget(window.warning, "label_warning")), text);
|
||||
window_create(WINDOW_WARNING);
|
||||
gtk_label_set_text(GTK_LABEL(lookup_widget(window.warning, "label_warning")), text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -598,7 +638,6 @@ game_gui_write_check_items(void)
|
||||
void
|
||||
game_gui_read_check_items(GtkWidget *widget)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
GtkWidget *menu_job_offers =
|
||||
lookup_widget(window.main, "menu_job_offers"),
|
||||
*menu_live_game = lookup_widget(window.main, "menu_live_game"),
|
||||
@ -607,28 +646,26 @@ game_gui_read_check_items(GtkWidget *widget)
|
||||
if(widget == menu_job_offers)
|
||||
{
|
||||
opt_user_set_int("int_opt_user_show_job_offers", !opt_user_int("int_opt_user_show_job_offers"));
|
||||
sprintf(buf, _("Job offers set to %s."),
|
||||
team_attribute_to_char(TEAM_ATTRIBUTE_BOOST,
|
||||
opt_user_int("int_opt_user_show_job_offers")));
|
||||
game_gui_print_message(_("Job offers set to %s."),
|
||||
team_attribute_to_char(TEAM_ATTRIBUTE_BOOST,
|
||||
opt_user_int("int_opt_user_show_job_offers")));
|
||||
}
|
||||
else if(widget == menu_live_game)
|
||||
{
|
||||
opt_user_set_int("int_opt_user_show_live_game", !opt_user_int("int_opt_user_show_live_game"));
|
||||
sprintf(buf, _("Live game set to %s."),
|
||||
team_attribute_to_char(TEAM_ATTRIBUTE_BOOST,
|
||||
opt_user_int("int_opt_user_show_live_game")));
|
||||
game_gui_print_message(_("Live game set to %s."),
|
||||
team_attribute_to_char(TEAM_ATTRIBUTE_BOOST,
|
||||
opt_user_int("int_opt_user_show_live_game")));
|
||||
}
|
||||
else if(widget == menu_overwrite)
|
||||
{
|
||||
opt_set_int("int_opt_save_will_overwrite", !opt_int("int_opt_save_will_overwrite"));
|
||||
sprintf(buf, _("Overwrite set to %s."),
|
||||
team_attribute_to_char(TEAM_ATTRIBUTE_BOOST,
|
||||
opt_int("int_opt_save_will_overwrite")));
|
||||
game_gui_print_message(_("Overwrite set to %s."),
|
||||
team_attribute_to_char(TEAM_ATTRIBUTE_BOOST,
|
||||
opt_int("int_opt_save_will_overwrite")));
|
||||
}
|
||||
else
|
||||
g_warning("game_gui_read_check_items: unknown widget.");
|
||||
|
||||
game_gui_print_message(buf);
|
||||
}
|
||||
|
||||
/** Set the appropriate text into the labels in the help window.
|
||||
|
@ -1,6 +1,9 @@
|
||||
#ifndef GAME_GUI_H
|
||||
#define GAME_GUI_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <glib/gprintf.h>
|
||||
|
||||
#include "bygfoot.h"
|
||||
#include "live_game_struct.h"
|
||||
#include "option_struct.h"
|
||||
@ -22,14 +25,21 @@ void
|
||||
game_gui_show_main(void);
|
||||
|
||||
void
|
||||
game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout,
|
||||
GtkWidget **physio, GtkWidget **boost);
|
||||
game_gui_show_warning(const gchar *format, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
gboolean
|
||||
game_gui_print_message(gchar *text);
|
||||
game_gui_print_message(gchar *format, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
void
|
||||
game_gui_print_message_with_delay(gchar *text);
|
||||
game_gui_print_message_with_delay(const gchar *format, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
void
|
||||
game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout,
|
||||
GtkWidget **physio, GtkWidget **boost,
|
||||
GtkWidget **yc);
|
||||
|
||||
void
|
||||
game_gui_read_radio_items(GtkWidget *widget);
|
||||
@ -46,9 +56,6 @@ game_gui_set_main_window_sensitivity(gboolean value);
|
||||
void
|
||||
game_gui_write_av_skills(void);
|
||||
|
||||
void
|
||||
game_gui_show_warning(gchar *text);
|
||||
|
||||
void
|
||||
game_gui_write_meters(void);
|
||||
|
||||
|
501
src/interface.c
501
src/interface.c
@ -38,7 +38,7 @@ create_main_window (void)
|
||||
GtkWidget *menu_new;
|
||||
GtkWidget *menu_open;
|
||||
GtkWidget *menu_load_last_save;
|
||||
GtkWidget *image1112;
|
||||
GtkWidget *image1384;
|
||||
GtkWidget *menu_save;
|
||||
GtkWidget *menu_save_as;
|
||||
GtkWidget *trennlinie1;
|
||||
@ -46,7 +46,7 @@ create_main_window (void)
|
||||
GtkWidget *menu_options;
|
||||
GtkWidget *menu_options_menu;
|
||||
GtkWidget *menu_preferences;
|
||||
GtkWidget *image1113;
|
||||
GtkWidget *image1385;
|
||||
GtkWidget *trennlinie7;
|
||||
GtkWidget *menu_job_offers;
|
||||
GtkWidget *menu_live_game;
|
||||
@ -54,22 +54,22 @@ create_main_window (void)
|
||||
GtkWidget *menu_figures;
|
||||
GtkWidget *menu_figures_menu;
|
||||
GtkWidget *menu_fixtures_week;
|
||||
GtkWidget *image1114;
|
||||
GtkWidget *image1386;
|
||||
GtkWidget *menu_fixtures;
|
||||
GtkWidget *image1115;
|
||||
GtkWidget *image1387;
|
||||
GtkWidget *menu_tables;
|
||||
GtkWidget *image1116;
|
||||
GtkWidget *image1388;
|
||||
GtkWidget *menu_my_league_results;
|
||||
GtkWidget *image1117;
|
||||
GtkWidget *image1389;
|
||||
GtkWidget *trennlinie13;
|
||||
GtkWidget *menu_league_stats;
|
||||
GtkWidget *image1118;
|
||||
GtkWidget *image1390;
|
||||
GtkWidget *menu_season_history;
|
||||
GtkWidget *image1119;
|
||||
GtkWidget *image1391;
|
||||
GtkWidget *menu_team;
|
||||
GtkWidget *menu_team_menu;
|
||||
GtkWidget *menu_playing_style;
|
||||
GtkWidget *image1120;
|
||||
GtkWidget *image1392;
|
||||
GtkWidget *menu_playing_style_menu;
|
||||
GSList *menu_all_out_defend_group = NULL;
|
||||
GtkWidget *menu_all_out_defend;
|
||||
@ -78,7 +78,7 @@ create_main_window (void)
|
||||
GtkWidget *menu_attack;
|
||||
GtkWidget *menu_all_out_attack;
|
||||
GtkWidget *menu_scout;
|
||||
GtkWidget *image1121;
|
||||
GtkWidget *image1393;
|
||||
GtkWidget *menu_scout_menu;
|
||||
GSList *menu_scout_best_group = NULL;
|
||||
GtkWidget *menu_scout_best;
|
||||
@ -86,15 +86,26 @@ create_main_window (void)
|
||||
GtkWidget *menu_scout_average;
|
||||
GtkWidget *menu_scout_bad;
|
||||
GtkWidget *menu_physio;
|
||||
GtkWidget *image1122;
|
||||
GtkWidget *image1394;
|
||||
GtkWidget *menu_physio_menu;
|
||||
GSList *menu_physio_best_group = NULL;
|
||||
GtkWidget *menu_physio_best;
|
||||
GtkWidget *menu_physio_good;
|
||||
GtkWidget *menu_physio_average;
|
||||
GtkWidget *menu_physio_bad;
|
||||
GtkWidget *menu_youth_academy;
|
||||
GtkWidget *menu_youth_academy_menu;
|
||||
GtkWidget *menu_show_youth_academy;
|
||||
GtkWidget *youth_coach1;
|
||||
GtkWidget *youth_coach1_menu;
|
||||
GSList *menu_yc_best_group = NULL;
|
||||
GtkWidget *menu_yc_best;
|
||||
GtkWidget *menu_yc_good;
|
||||
GtkWidget *menu_yc_average;
|
||||
GtkWidget *menu_yc_bad;
|
||||
GtkWidget *menu_set_investment;
|
||||
GtkWidget *menu_boost;
|
||||
GtkWidget *image1123;
|
||||
GtkWidget *image1395;
|
||||
GtkWidget *menu_boost_menu;
|
||||
GSList *menu_boost_on_group = NULL;
|
||||
GtkWidget *menu_boost_on;
|
||||
@ -102,63 +113,64 @@ create_main_window (void)
|
||||
GtkWidget *menu_boost_anti;
|
||||
GtkWidget *trennlinie11;
|
||||
GtkWidget *menu_reset_players;
|
||||
GtkWidget *image1124;
|
||||
GtkWidget *image1396;
|
||||
GtkWidget *menu_custom_structure;
|
||||
GtkWidget *image1125;
|
||||
GtkWidget *image1397;
|
||||
GtkWidget *menu_rearrange_team;
|
||||
GtkWidget *image1126;
|
||||
GtkWidget *image1398;
|
||||
GtkWidget *trennlinie8;
|
||||
GtkWidget *menu_browse_teams;
|
||||
GtkWidget *image1127;
|
||||
GtkWidget *image1399;
|
||||
GtkWidget *menu_player;
|
||||
GtkWidget *menu_player_menu;
|
||||
GtkWidget *menu_show_info;
|
||||
GtkWidget *image1128;
|
||||
GtkWidget *image1400;
|
||||
GtkWidget *menu_put_on_transfer_list;
|
||||
GtkWidget *image1129;
|
||||
GtkWidget *image1401;
|
||||
GtkWidget *menu_remove_from_transfer_list;
|
||||
GtkWidget *image1130;
|
||||
GtkWidget *image1402;
|
||||
GtkWidget *menu_offer_new_contract;
|
||||
GtkWidget *image1131;
|
||||
GtkWidget *image1403;
|
||||
GtkWidget *menu_fire;
|
||||
GtkWidget *image1132;
|
||||
GtkWidget *image1404;
|
||||
GtkWidget *menu_shoots_penalties;
|
||||
GtkWidget *image1133;
|
||||
GtkWidget *image1405;
|
||||
GtkWidget *menu_move_to_youth_academy;
|
||||
GtkWidget *trennlinie10;
|
||||
GtkWidget *menu_browse_players;
|
||||
GtkWidget *image1134;
|
||||
GtkWidget *image1406;
|
||||
GtkWidget *menu_user;
|
||||
GtkWidget *menu_user_menu;
|
||||
GtkWidget *menu_user_show_last_match;
|
||||
GtkWidget *image1135;
|
||||
GtkWidget *image1407;
|
||||
GtkWidget *menu_user_show_last_stats;
|
||||
GtkWidget *image1136;
|
||||
GtkWidget *image1408;
|
||||
GtkWidget *menu_user_show_coming_matches;
|
||||
GtkWidget *image1137;
|
||||
GtkWidget *image1409;
|
||||
GtkWidget *trennlinie12;
|
||||
GtkWidget *menu_user_show_history;
|
||||
GtkWidget *image1138;
|
||||
GtkWidget *image1410;
|
||||
GtkWidget *trennlinie9;
|
||||
GtkWidget *menu_next_user;
|
||||
GtkWidget *image1139;
|
||||
GtkWidget *image1411;
|
||||
GtkWidget *menu_previous_user;
|
||||
GtkWidget *image1140;
|
||||
GtkWidget *image1412;
|
||||
GtkWidget *menu_manage_users;
|
||||
GtkWidget *image1141;
|
||||
GtkWidget *image1413;
|
||||
GtkWidget *menu_finances_stadium;
|
||||
GtkWidget *menu_finances_stadium_menu;
|
||||
GtkWidget *menu_show_finances;
|
||||
GtkWidget *image1142;
|
||||
GtkWidget *image1414;
|
||||
GtkWidget *menu_show_stadium;
|
||||
GtkWidget *image1143;
|
||||
GtkWidget *image1415;
|
||||
GtkWidget *menu_help1;
|
||||
GtkWidget *menu_help1_menu;
|
||||
GtkWidget *menu_about;
|
||||
GtkWidget *image1144;
|
||||
GtkWidget *image1416;
|
||||
GtkWidget *menu_contributors;
|
||||
GtkWidget *image1145;
|
||||
GtkWidget *image1417;
|
||||
GtkWidget *menu_help;
|
||||
GtkWidget *image1146;
|
||||
GtkWidget *image1418;
|
||||
GtkWidget *hbox1;
|
||||
GtkWidget *button_load;
|
||||
GtkWidget *image11;
|
||||
@ -279,9 +291,9 @@ create_main_window (void)
|
||||
GDK_l, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1112 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1112);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_load_last_save), image1112);
|
||||
image1384 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1384);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_load_last_save), image1384);
|
||||
|
||||
menu_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
|
||||
gtk_widget_show (menu_save);
|
||||
@ -314,9 +326,9 @@ create_main_window (void)
|
||||
GDK_p, GDK_CONTROL_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1113 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1113);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image1113);
|
||||
image1385 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1385);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image1385);
|
||||
|
||||
trennlinie7 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (trennlinie7);
|
||||
@ -351,9 +363,9 @@ create_main_window (void)
|
||||
GDK_F3, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1114 = create_pixmap (main_window, "menu_fixtures.png");
|
||||
gtk_widget_show (image1114);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures_week), image1114);
|
||||
image1386 = create_pixmap (main_window, "menu_fixtures.png");
|
||||
gtk_widget_show (image1386);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures_week), image1386);
|
||||
|
||||
menu_fixtures = gtk_image_menu_item_new_with_mnemonic (_("Fixtures (competitions)"));
|
||||
gtk_widget_show (menu_fixtures);
|
||||
@ -362,9 +374,9 @@ create_main_window (void)
|
||||
GDK_F4, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1115 = create_pixmap (main_window, "menu_fixtures_comp.png");
|
||||
gtk_widget_show (image1115);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures), image1115);
|
||||
image1387 = create_pixmap (main_window, "menu_fixtures_comp.png");
|
||||
gtk_widget_show (image1387);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures), image1387);
|
||||
|
||||
menu_tables = gtk_image_menu_item_new_with_mnemonic (_("Tables"));
|
||||
gtk_widget_show (menu_tables);
|
||||
@ -373,9 +385,9 @@ create_main_window (void)
|
||||
GDK_F5, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1116 = create_pixmap (main_window, "menu_table.png");
|
||||
gtk_widget_show (image1116);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_tables), image1116);
|
||||
image1388 = create_pixmap (main_window, "menu_table.png");
|
||||
gtk_widget_show (image1388);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_tables), image1388);
|
||||
|
||||
menu_my_league_results = gtk_image_menu_item_new_with_mnemonic (_("My league results"));
|
||||
gtk_widget_show (menu_my_league_results);
|
||||
@ -384,9 +396,9 @@ create_main_window (void)
|
||||
GDK_F6, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1117 = create_pixmap (main_window, "menu_league_results.png");
|
||||
gtk_widget_show (image1117);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_my_league_results), image1117);
|
||||
image1389 = create_pixmap (main_window, "menu_league_results.png");
|
||||
gtk_widget_show (image1389);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_my_league_results), image1389);
|
||||
|
||||
trennlinie13 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (trennlinie13);
|
||||
@ -400,9 +412,9 @@ create_main_window (void)
|
||||
GDK_s, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1118 = create_pixmap (main_window, "menu_league_stats.png");
|
||||
gtk_widget_show (image1118);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_league_stats), image1118);
|
||||
image1390 = create_pixmap (main_window, "menu_league_stats.png");
|
||||
gtk_widget_show (image1390);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_league_stats), image1390);
|
||||
|
||||
menu_season_history = gtk_image_menu_item_new_with_mnemonic (_("Season history"));
|
||||
gtk_widget_show (menu_season_history);
|
||||
@ -411,9 +423,9 @@ create_main_window (void)
|
||||
GDK_h, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1119 = create_pixmap (main_window, "menu_history.png");
|
||||
gtk_widget_show (image1119);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_season_history), image1119);
|
||||
image1391 = create_pixmap (main_window, "menu_history.png");
|
||||
gtk_widget_show (image1391);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_season_history), image1391);
|
||||
|
||||
menu_team = gtk_menu_item_new_with_mnemonic (_("_Team"));
|
||||
gtk_widget_show (menu_team);
|
||||
@ -426,9 +438,9 @@ create_main_window (void)
|
||||
gtk_widget_show (menu_playing_style);
|
||||
gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_playing_style);
|
||||
|
||||
image1120 = create_pixmap (main_window, "menu_style.png");
|
||||
gtk_widget_show (image1120);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_playing_style), image1120);
|
||||
image1392 = create_pixmap (main_window, "menu_style.png");
|
||||
gtk_widget_show (image1392);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_playing_style), image1392);
|
||||
|
||||
menu_playing_style_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_playing_style), menu_playing_style_menu);
|
||||
@ -467,9 +479,9 @@ create_main_window (void)
|
||||
gtk_widget_show (menu_scout);
|
||||
gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_scout);
|
||||
|
||||
image1121 = create_pixmap (main_window, "menu_scout.png");
|
||||
gtk_widget_show (image1121);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_scout), image1121);
|
||||
image1393 = create_pixmap (main_window, "menu_scout.png");
|
||||
gtk_widget_show (image1393);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_scout), image1393);
|
||||
|
||||
menu_scout_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_scout), menu_scout_menu);
|
||||
@ -502,9 +514,9 @@ create_main_window (void)
|
||||
gtk_widget_show (menu_physio);
|
||||
gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_physio);
|
||||
|
||||
image1122 = create_pixmap (main_window, "menu_physio.png");
|
||||
gtk_widget_show (image1122);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_physio), image1122);
|
||||
image1394 = create_pixmap (main_window, "menu_physio.png");
|
||||
gtk_widget_show (image1394);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_physio), image1394);
|
||||
|
||||
menu_physio_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_physio), menu_physio_menu);
|
||||
@ -533,13 +545,63 @@ create_main_window (void)
|
||||
gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_bad);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_physio_bad), TRUE);
|
||||
|
||||
menu_youth_academy = gtk_menu_item_new_with_mnemonic (_("Youth academy"));
|
||||
gtk_widget_show (menu_youth_academy);
|
||||
gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_youth_academy);
|
||||
|
||||
menu_youth_academy_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_youth_academy), menu_youth_academy_menu);
|
||||
|
||||
menu_show_youth_academy = gtk_menu_item_new_with_mnemonic (_("Show youth academy"));
|
||||
gtk_widget_show (menu_show_youth_academy);
|
||||
gtk_container_add (GTK_CONTAINER (menu_youth_academy_menu), menu_show_youth_academy);
|
||||
gtk_widget_add_accelerator (menu_show_youth_academy, "activate", accel_group,
|
||||
GDK_y, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
youth_coach1 = gtk_menu_item_new_with_mnemonic (_("Youth coach"));
|
||||
gtk_widget_show (youth_coach1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_youth_academy_menu), youth_coach1);
|
||||
|
||||
youth_coach1_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (youth_coach1), youth_coach1_menu);
|
||||
|
||||
menu_yc_best = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Best"));
|
||||
menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_best));
|
||||
gtk_widget_show (menu_yc_best);
|
||||
gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_best);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_best), TRUE);
|
||||
|
||||
menu_yc_good = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Good"));
|
||||
menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_good));
|
||||
gtk_widget_show (menu_yc_good);
|
||||
gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_good);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_good), TRUE);
|
||||
|
||||
menu_yc_average = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Average"));
|
||||
menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_average));
|
||||
gtk_widget_show (menu_yc_average);
|
||||
gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_average);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_average), TRUE);
|
||||
|
||||
menu_yc_bad = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Bad"));
|
||||
menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_bad));
|
||||
gtk_widget_show (menu_yc_bad);
|
||||
gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_bad);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_bad), TRUE);
|
||||
|
||||
menu_set_investment = gtk_menu_item_new_with_mnemonic (_("Set investment"));
|
||||
gtk_widget_show (menu_set_investment);
|
||||
gtk_container_add (GTK_CONTAINER (menu_youth_academy_menu), menu_set_investment);
|
||||
gtk_tooltips_set_tip (tooltips, menu_set_investment, _("Set the percentage of your income you want to spend on the youth academy"), NULL);
|
||||
|
||||
menu_boost = gtk_image_menu_item_new_with_mnemonic (_("Boost"));
|
||||
gtk_widget_show (menu_boost);
|
||||
gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_boost);
|
||||
|
||||
image1123 = create_pixmap (main_window, "menu_boost.png");
|
||||
gtk_widget_show (image1123);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_boost), image1123);
|
||||
image1395 = create_pixmap (main_window, "menu_boost.png");
|
||||
gtk_widget_show (image1395);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_boost), image1395);
|
||||
|
||||
menu_boost_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_boost), menu_boost_menu);
|
||||
@ -571,17 +633,17 @@ create_main_window (void)
|
||||
gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_reset_players);
|
||||
gtk_tooltips_set_tip (tooltips, menu_reset_players, _("Reset player list to the formation at the beginning of the live game pause (right click on player list)"), NULL);
|
||||
|
||||
image1124 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1124);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reset_players), image1124);
|
||||
image1396 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1396);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reset_players), image1396);
|
||||
|
||||
menu_custom_structure = gtk_image_menu_item_new_with_mnemonic (_("Enter custom structure"));
|
||||
gtk_widget_show (menu_custom_structure);
|
||||
gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_custom_structure);
|
||||
|
||||
image1125 = create_pixmap (main_window, "menu_structure.png");
|
||||
gtk_widget_show (image1125);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_custom_structure), image1125);
|
||||
image1397 = create_pixmap (main_window, "menu_structure.png");
|
||||
gtk_widget_show (image1397);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_custom_structure), image1397);
|
||||
|
||||
menu_rearrange_team = gtk_image_menu_item_new_with_mnemonic (_("Rearrange team"));
|
||||
gtk_widget_show (menu_rearrange_team);
|
||||
@ -591,9 +653,9 @@ create_main_window (void)
|
||||
GDK_r, GDK_CONTROL_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1126 = create_pixmap (main_window, "menu_rearrange.png");
|
||||
gtk_widget_show (image1126);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_rearrange_team), image1126);
|
||||
image1398 = create_pixmap (main_window, "menu_rearrange.png");
|
||||
gtk_widget_show (image1398);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_rearrange_team), image1398);
|
||||
|
||||
trennlinie8 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (trennlinie8);
|
||||
@ -604,9 +666,9 @@ create_main_window (void)
|
||||
gtk_widget_show (menu_browse_teams);
|
||||
gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_browse_teams);
|
||||
|
||||
image1127 = create_pixmap (main_window, "menu_browse_tms.png");
|
||||
gtk_widget_show (image1127);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_teams), image1127);
|
||||
image1399 = create_pixmap (main_window, "menu_browse_tms.png");
|
||||
gtk_widget_show (image1399);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_teams), image1399);
|
||||
|
||||
menu_player = gtk_menu_item_new_with_mnemonic (_("_Player"));
|
||||
gtk_widget_show (menu_player);
|
||||
@ -619,49 +681,53 @@ create_main_window (void)
|
||||
gtk_widget_show (menu_show_info);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_show_info);
|
||||
|
||||
image1128 = create_pixmap (main_window, "menu_player_info.png");
|
||||
gtk_widget_show (image1128);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_info), image1128);
|
||||
image1400 = create_pixmap (main_window, "menu_player_info.png");
|
||||
gtk_widget_show (image1400);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_info), image1400);
|
||||
|
||||
menu_put_on_transfer_list = gtk_image_menu_item_new_with_mnemonic (_("Put on transfer list"));
|
||||
gtk_widget_show (menu_put_on_transfer_list);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_put_on_transfer_list);
|
||||
|
||||
image1129 = create_pixmap (main_window, "menu_player_put_transfer.png");
|
||||
gtk_widget_show (image1129);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_put_on_transfer_list), image1129);
|
||||
image1401 = create_pixmap (main_window, "menu_player_put_transfer.png");
|
||||
gtk_widget_show (image1401);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_put_on_transfer_list), image1401);
|
||||
|
||||
menu_remove_from_transfer_list = gtk_image_menu_item_new_with_mnemonic (_("Remove from transfer list"));
|
||||
gtk_widget_show (menu_remove_from_transfer_list);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_remove_from_transfer_list);
|
||||
|
||||
image1130 = create_pixmap (main_window, "menu_player_remove_transfer.png");
|
||||
gtk_widget_show (image1130);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_remove_from_transfer_list), image1130);
|
||||
image1402 = create_pixmap (main_window, "menu_player_remove_transfer.png");
|
||||
gtk_widget_show (image1402);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_remove_from_transfer_list), image1402);
|
||||
|
||||
menu_offer_new_contract = gtk_image_menu_item_new_with_mnemonic (_("Offer new contract"));
|
||||
gtk_widget_show (menu_offer_new_contract);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_offer_new_contract);
|
||||
|
||||
image1131 = create_pixmap (main_window, "menu_player_contract.png");
|
||||
gtk_widget_show (image1131);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_offer_new_contract), image1131);
|
||||
image1403 = create_pixmap (main_window, "menu_player_contract.png");
|
||||
gtk_widget_show (image1403);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_offer_new_contract), image1403);
|
||||
|
||||
menu_fire = gtk_image_menu_item_new_with_mnemonic (_("Fire"));
|
||||
gtk_widget_show (menu_fire);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_fire);
|
||||
|
||||
image1132 = create_pixmap (main_window, "menu_player_fire.png");
|
||||
gtk_widget_show (image1132);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fire), image1132);
|
||||
image1404 = create_pixmap (main_window, "menu_player_fire.png");
|
||||
gtk_widget_show (image1404);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fire), image1404);
|
||||
|
||||
menu_shoots_penalties = gtk_image_menu_item_new_with_mnemonic (_("Shoots penalties"));
|
||||
gtk_widget_show (menu_shoots_penalties);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_shoots_penalties);
|
||||
|
||||
image1133 = create_pixmap (main_window, "menu_player_shoots.png");
|
||||
gtk_widget_show (image1133);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_shoots_penalties), image1133);
|
||||
image1405 = create_pixmap (main_window, "menu_player_shoots.png");
|
||||
gtk_widget_show (image1405);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_shoots_penalties), image1405);
|
||||
|
||||
menu_move_to_youth_academy = gtk_menu_item_new_with_mnemonic (_("Move to youth academy"));
|
||||
gtk_widget_show (menu_move_to_youth_academy);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_move_to_youth_academy);
|
||||
|
||||
trennlinie10 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (trennlinie10);
|
||||
@ -672,9 +738,9 @@ create_main_window (void)
|
||||
gtk_widget_show (menu_browse_players);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_browse_players);
|
||||
|
||||
image1134 = create_pixmap (main_window, "menu_player_browse.png");
|
||||
gtk_widget_show (image1134);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_players), image1134);
|
||||
image1406 = create_pixmap (main_window, "menu_player_browse.png");
|
||||
gtk_widget_show (image1406);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_players), image1406);
|
||||
|
||||
menu_user = gtk_menu_item_new_with_mnemonic (_("_User"));
|
||||
gtk_widget_show (menu_user);
|
||||
@ -690,9 +756,9 @@ create_main_window (void)
|
||||
GDK_m, GDK_CONTROL_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1135 = create_pixmap (main_window, "menu_last_match.png");
|
||||
gtk_widget_show (image1135);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_match), image1135);
|
||||
image1407 = create_pixmap (main_window, "menu_last_match.png");
|
||||
gtk_widget_show (image1407);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_match), image1407);
|
||||
|
||||
menu_user_show_last_stats = gtk_image_menu_item_new_with_mnemonic (_("Show last match stats"));
|
||||
gtk_widget_show (menu_user_show_last_stats);
|
||||
@ -701,17 +767,17 @@ create_main_window (void)
|
||||
GDK_F2, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1136 = create_pixmap (main_window, "menu_match_stats.png");
|
||||
gtk_widget_show (image1136);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_stats), image1136);
|
||||
image1408 = create_pixmap (main_window, "menu_match_stats.png");
|
||||
gtk_widget_show (image1408);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_stats), image1408);
|
||||
|
||||
menu_user_show_coming_matches = gtk_image_menu_item_new_with_mnemonic (_("Show coming matches"));
|
||||
gtk_widget_show (menu_user_show_coming_matches);
|
||||
gtk_container_add (GTK_CONTAINER (menu_user_menu), menu_user_show_coming_matches);
|
||||
|
||||
image1137 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1137);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_coming_matches), image1137);
|
||||
image1409 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1409);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_coming_matches), image1409);
|
||||
|
||||
trennlinie12 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (trennlinie12);
|
||||
@ -725,9 +791,9 @@ create_main_window (void)
|
||||
GDK_h, GDK_CONTROL_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1138 = create_pixmap (main_window, "menu_history.png");
|
||||
gtk_widget_show (image1138);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_history), image1138);
|
||||
image1410 = create_pixmap (main_window, "menu_history.png");
|
||||
gtk_widget_show (image1410);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_history), image1410);
|
||||
|
||||
trennlinie9 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (trennlinie9);
|
||||
@ -741,9 +807,9 @@ create_main_window (void)
|
||||
GDK_F9, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1139 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1139);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image1139);
|
||||
image1411 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1411);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image1411);
|
||||
|
||||
menu_previous_user = gtk_image_menu_item_new_with_mnemonic (_("Previous user"));
|
||||
gtk_widget_show (menu_previous_user);
|
||||
@ -752,9 +818,9 @@ create_main_window (void)
|
||||
GDK_F8, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1140 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1140);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image1140);
|
||||
image1412 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1412);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image1412);
|
||||
|
||||
menu_manage_users = gtk_image_menu_item_new_with_mnemonic (_("Manage users"));
|
||||
gtk_widget_show (menu_manage_users);
|
||||
@ -763,9 +829,9 @@ create_main_window (void)
|
||||
GDK_F12, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1141 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1141);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image1141);
|
||||
image1413 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1413);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image1413);
|
||||
|
||||
menu_finances_stadium = gtk_menu_item_new_with_mnemonic (_("Fin_Stad"));
|
||||
gtk_widget_show (menu_finances_stadium);
|
||||
@ -781,9 +847,9 @@ create_main_window (void)
|
||||
GDK_f, 0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1142 = create_pixmap (main_window, "menu_finances.png");
|
||||
gtk_widget_show (image1142);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_finances), image1142);
|
||||
image1414 = create_pixmap (main_window, "menu_finances.png");
|
||||
gtk_widget_show (image1414);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_finances), image1414);
|
||||
|
||||
menu_show_stadium = gtk_image_menu_item_new_with_mnemonic (_("Show stadium"));
|
||||
gtk_widget_show (menu_show_stadium);
|
||||
@ -792,9 +858,9 @@ create_main_window (void)
|
||||
GDK_f, GDK_CONTROL_MASK,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
image1143 = create_pixmap (main_window, "menu_stadium.png");
|
||||
gtk_widget_show (image1143);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_stadium), image1143);
|
||||
image1415 = create_pixmap (main_window, "menu_stadium.png");
|
||||
gtk_widget_show (image1415);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_stadium), image1415);
|
||||
|
||||
menu_help1 = gtk_menu_item_new_with_mnemonic (_("_Help"));
|
||||
gtk_widget_show (menu_help1);
|
||||
@ -807,25 +873,25 @@ create_main_window (void)
|
||||
gtk_widget_show (menu_about);
|
||||
gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_about);
|
||||
|
||||
image1144 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1144);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_about), image1144);
|
||||
image1416 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1416);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_about), image1416);
|
||||
|
||||
menu_contributors = gtk_image_menu_item_new_with_mnemonic (_("Contributors"));
|
||||
gtk_widget_show (menu_contributors);
|
||||
gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_contributors);
|
||||
|
||||
image1145 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1145);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_contributors), image1145);
|
||||
image1417 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1417);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_contributors), image1417);
|
||||
|
||||
menu_help = gtk_image_menu_item_new_with_mnemonic (_("Help"));
|
||||
gtk_widget_show (menu_help);
|
||||
gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_help);
|
||||
|
||||
image1146 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1146);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_help), image1146);
|
||||
image1418 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1418);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_help), image1418);
|
||||
|
||||
hbox1 = gtk_hbox_new (FALSE, 0);
|
||||
gtk_widget_show (hbox1);
|
||||
@ -1275,6 +1341,24 @@ create_main_window (void)
|
||||
g_signal_connect ((gpointer) menu_physio_bad, "button_press_event",
|
||||
G_CALLBACK (on_menu_team_button_press_event),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_show_youth_academy, "activate",
|
||||
G_CALLBACK (on_menu_show_youth_academy_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_yc_best, "activate",
|
||||
G_CALLBACK (on_menu_team_button_press_event),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_yc_good, "activate",
|
||||
G_CALLBACK (on_menu_team_button_press_event),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_yc_average, "activate",
|
||||
G_CALLBACK (on_menu_team_button_press_event),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_yc_bad, "activate",
|
||||
G_CALLBACK (on_menu_team_button_press_event),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_set_investment, "activate",
|
||||
G_CALLBACK (on_menu_set_investment_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_boost_on, "button_press_event",
|
||||
G_CALLBACK (on_menu_team_button_press_event),
|
||||
NULL);
|
||||
@ -1314,6 +1398,9 @@ create_main_window (void)
|
||||
g_signal_connect ((gpointer) menu_shoots_penalties, "activate",
|
||||
G_CALLBACK (on_menu_shoots_penalties_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_move_to_youth_academy, "activate",
|
||||
G_CALLBACK (on_menu_move_to_youth_academy_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_browse_players, "activate",
|
||||
G_CALLBACK (on_menu_browse_players_activate),
|
||||
NULL);
|
||||
@ -1414,7 +1501,7 @@ create_main_window (void)
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_new, "menu_new");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_open, "menu_open");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_load_last_save, "menu_load_last_save");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1112, "image1112");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1384, "image1384");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_save, "menu_save");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_save_as, "menu_save_as");
|
||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie1, "trennlinie1");
|
||||
@ -1422,7 +1509,7 @@ create_main_window (void)
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_options, "menu_options");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_options_menu, "menu_options_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_preferences, "menu_preferences");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1113, "image1113");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1385, "image1385");
|
||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie7, "trennlinie7");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_job_offers, "menu_job_offers");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_live_game, "menu_live_game");
|
||||
@ -1430,22 +1517,22 @@ create_main_window (void)
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_figures, "menu_figures");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_figures_menu, "menu_figures_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_fixtures_week, "menu_fixtures_week");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1114, "image1114");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1386, "image1386");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_fixtures, "menu_fixtures");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1115, "image1115");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1387, "image1387");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_tables, "menu_tables");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1116, "image1116");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1388, "image1388");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_my_league_results, "menu_my_league_results");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1117, "image1117");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1389, "image1389");
|
||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie13, "trennlinie13");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_league_stats, "menu_league_stats");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1118, "image1118");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1390, "image1390");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_season_history, "menu_season_history");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1119, "image1119");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1391, "image1391");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_team, "menu_team");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_team_menu, "menu_team_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_playing_style, "menu_playing_style");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1120, "image1120");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1392, "image1392");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_playing_style_menu, "menu_playing_style_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_all_out_defend, "menu_all_out_defend");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_defend, "menu_defend");
|
||||
@ -1453,84 +1540,95 @@ create_main_window (void)
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_attack, "menu_attack");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_all_out_attack, "menu_all_out_attack");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_scout, "menu_scout");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1121, "image1121");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1393, "image1393");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_scout_menu, "menu_scout_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_scout_best, "menu_scout_best");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_scout_good, "menu_scout_good");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_scout_average, "menu_scout_average");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_scout_bad, "menu_scout_bad");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_physio, "menu_physio");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1122, "image1122");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1394, "image1394");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_physio_menu, "menu_physio_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_physio_best, "menu_physio_best");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_physio_good, "menu_physio_good");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_physio_average, "menu_physio_average");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_physio_bad, "menu_physio_bad");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_youth_academy, "menu_youth_academy");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_youth_academy_menu, "menu_youth_academy_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_show_youth_academy, "menu_show_youth_academy");
|
||||
GLADE_HOOKUP_OBJECT (main_window, youth_coach1, "youth_coach1");
|
||||
GLADE_HOOKUP_OBJECT (main_window, youth_coach1_menu, "youth_coach1_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_yc_best, "menu_yc_best");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_yc_good, "menu_yc_good");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_yc_average, "menu_yc_average");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_yc_bad, "menu_yc_bad");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_set_investment, "menu_set_investment");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_boost, "menu_boost");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1123, "image1123");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1395, "image1395");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_boost_menu, "menu_boost_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_boost_on, "menu_boost_on");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_boost_off, "menu_boost_off");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_boost_anti, "menu_boost_anti");
|
||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie11, "trennlinie11");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_reset_players, "menu_reset_players");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1124, "image1124");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1396, "image1396");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_custom_structure, "menu_custom_structure");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1125, "image1125");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1397, "image1397");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_rearrange_team, "menu_rearrange_team");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1126, "image1126");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1398, "image1398");
|
||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie8, "trennlinie8");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_browse_teams, "menu_browse_teams");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1127, "image1127");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1399, "image1399");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_player, "menu_player");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_player_menu, "menu_player_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_show_info, "menu_show_info");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1128, "image1128");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1400, "image1400");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_put_on_transfer_list, "menu_put_on_transfer_list");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1129, "image1129");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1401, "image1401");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_remove_from_transfer_list, "menu_remove_from_transfer_list");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1130, "image1130");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1402, "image1402");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_offer_new_contract, "menu_offer_new_contract");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1131, "image1131");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1403, "image1403");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_fire, "menu_fire");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1132, "image1132");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1404, "image1404");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_shoots_penalties, "menu_shoots_penalties");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1133, "image1133");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1405, "image1405");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_move_to_youth_academy, "menu_move_to_youth_academy");
|
||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie10, "trennlinie10");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_browse_players, "menu_browse_players");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1134, "image1134");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1406, "image1406");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_user, "menu_user");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_user_menu, "menu_user_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_match, "menu_user_show_last_match");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1135, "image1135");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1407, "image1407");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_stats, "menu_user_show_last_stats");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1136, "image1136");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1408, "image1408");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_user_show_coming_matches, "menu_user_show_coming_matches");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1137, "image1137");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1409, "image1409");
|
||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie12, "trennlinie12");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_user_show_history, "menu_user_show_history");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1138, "image1138");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1410, "image1410");
|
||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie9, "trennlinie9");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_next_user, "menu_next_user");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1139, "image1139");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1411, "image1411");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_previous_user, "menu_previous_user");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1140, "image1140");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1412, "image1412");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_manage_users, "menu_manage_users");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1141, "image1141");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1413, "image1413");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium, "menu_finances_stadium");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium_menu, "menu_finances_stadium_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_show_finances, "menu_show_finances");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1142, "image1142");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1414, "image1414");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_show_stadium, "menu_show_stadium");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1143, "image1143");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1415, "image1415");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_help1, "menu_help1");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_help1_menu, "menu_help1_menu");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_about, "menu_about");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1144, "image1144");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1416, "image1416");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_contributors, "menu_contributors");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1145, "image1145");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1417, "image1417");
|
||||
GLADE_HOOKUP_OBJECT (main_window, menu_help, "menu_help");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1146, "image1146");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image1418, "image1418");
|
||||
GLADE_HOOKUP_OBJECT (main_window, hbox1, "hbox1");
|
||||
GLADE_HOOKUP_OBJECT (main_window, button_load, "button_load");
|
||||
GLADE_HOOKUP_OBJECT (main_window, image11, "image11");
|
||||
@ -1621,6 +1719,7 @@ create_menu_player (void)
|
||||
GtkWidget *player_menu_offer_new_contract;
|
||||
GtkWidget *player_menu_fire;
|
||||
GtkWidget *player_menu_shoots_penalties;
|
||||
GtkWidget *player_menu_move_to_youth_academy;
|
||||
|
||||
menu_player = gtk_menu_new ();
|
||||
|
||||
@ -1648,6 +1747,10 @@ create_menu_player (void)
|
||||
gtk_widget_show (player_menu_shoots_penalties);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player), player_menu_shoots_penalties);
|
||||
|
||||
player_menu_move_to_youth_academy = gtk_menu_item_new_with_mnemonic (_("Move to youth academy"));
|
||||
gtk_widget_show (player_menu_move_to_youth_academy);
|
||||
gtk_container_add (GTK_CONTAINER (menu_player), player_menu_move_to_youth_academy);
|
||||
|
||||
g_signal_connect ((gpointer) player_menu_show_info, "activate",
|
||||
G_CALLBACK (on_player_menu_show_info_activate),
|
||||
NULL);
|
||||
@ -1666,6 +1769,9 @@ create_menu_player (void)
|
||||
g_signal_connect ((gpointer) player_menu_shoots_penalties, "activate",
|
||||
G_CALLBACK (on_player_menu_shoots_penalties_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) player_menu_move_to_youth_academy, "activate",
|
||||
G_CALLBACK (on_player_menu_move_to_youth_academy_activate),
|
||||
NULL);
|
||||
|
||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||
GLADE_HOOKUP_OBJECT_NO_REF (menu_player, menu_player, "menu_player");
|
||||
@ -1675,7 +1781,52 @@ create_menu_player (void)
|
||||
GLADE_HOOKUP_OBJECT (menu_player, player_menu_offer_new_contract, "player_menu_offer_new_contract");
|
||||
GLADE_HOOKUP_OBJECT (menu_player, player_menu_fire, "player_menu_fire");
|
||||
GLADE_HOOKUP_OBJECT (menu_player, player_menu_shoots_penalties, "player_menu_shoots_penalties");
|
||||
GLADE_HOOKUP_OBJECT (menu_player, player_menu_move_to_youth_academy, "player_menu_move_to_youth_academy");
|
||||
|
||||
return menu_player;
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
create_menu_youth (void)
|
||||
{
|
||||
GtkWidget *menu_youth;
|
||||
GtkWidget *menu_youth_move_to_team;
|
||||
GtkWidget *image1420;
|
||||
GtkWidget *menu_youth_kick_out_of_academy;
|
||||
GtkWidget *image1421;
|
||||
|
||||
menu_youth = gtk_menu_new ();
|
||||
|
||||
menu_youth_move_to_team = gtk_image_menu_item_new_with_mnemonic (_("Move to team"));
|
||||
gtk_widget_show (menu_youth_move_to_team);
|
||||
gtk_container_add (GTK_CONTAINER (menu_youth), menu_youth_move_to_team);
|
||||
|
||||
image1420 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1420);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_youth_move_to_team), image1420);
|
||||
|
||||
menu_youth_kick_out_of_academy = gtk_image_menu_item_new_with_mnemonic (_("Kick out of academy"));
|
||||
gtk_widget_show (menu_youth_kick_out_of_academy);
|
||||
gtk_container_add (GTK_CONTAINER (menu_youth), menu_youth_kick_out_of_academy);
|
||||
|
||||
image1421 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image1421);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_youth_kick_out_of_academy), image1421);
|
||||
|
||||
g_signal_connect ((gpointer) menu_youth_move_to_team, "activate",
|
||||
G_CALLBACK (on_menu_youth_move_to_team_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_youth_kick_out_of_academy, "activate",
|
||||
G_CALLBACK (on_menu_youth_kick_out_of_academy_activate),
|
||||
NULL);
|
||||
|
||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||
GLADE_HOOKUP_OBJECT_NO_REF (menu_youth, menu_youth, "menu_youth");
|
||||
GLADE_HOOKUP_OBJECT (menu_youth, menu_youth_move_to_team, "menu_youth_move_to_team");
|
||||
GLADE_HOOKUP_OBJECT (menu_youth, image1420, "image1420");
|
||||
GLADE_HOOKUP_OBJECT (menu_youth, menu_youth_kick_out_of_academy, "menu_youth_kick_out_of_academy");
|
||||
GLADE_HOOKUP_OBJECT (menu_youth, image1421, "image1421");
|
||||
|
||||
return menu_youth;
|
||||
}
|
||||
|
||||
|
@ -4,3 +4,4 @@
|
||||
|
||||
GtkWidget* create_main_window (void);
|
||||
GtkWidget* create_menu_player (void);
|
||||
GtkWidget* create_menu_youth (void);
|
||||
|
@ -96,23 +96,27 @@ lg_commentary_generate(const LiveGame *live_game, LiveGameUnit *unit)
|
||||
gboolean
|
||||
lg_commentary_check_commentary(const LGCommentary *commentary, gchar *dest)
|
||||
{
|
||||
if((commentary->condition != NULL &&
|
||||
gchar buf[SMALL];
|
||||
|
||||
if(strlen(commentary->text->str) == 0 ||
|
||||
(commentary->condition != NULL &&
|
||||
!lg_commentary_parse_condition(commentary->condition->str)) ||
|
||||
(repetition == FALSE && query_lg_commentary_is_repetition(commentary->id)))
|
||||
return FALSE;
|
||||
|
||||
strcpy(dest, commentary->text->str);
|
||||
|
||||
if(lg_commentary_replace_tokens(dest))
|
||||
if(lg_commentary_replace_tokens(dest))
|
||||
{
|
||||
lg_commentary_replace_expressions(dest);
|
||||
|
||||
if(lg_commentary_replace_tokens(dest))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
do
|
||||
{
|
||||
strcpy(buf, dest);
|
||||
if(!lg_commentary_replace_tokens(dest))
|
||||
return FALSE;
|
||||
|
||||
lg_commentary_replace_expressions(dest);
|
||||
}
|
||||
while(strcmp(buf, dest) != 0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/** Check whether a commentary with given id has been used in the last
|
||||
@ -216,17 +220,19 @@ gboolean
|
||||
lg_commentary_parse_condition(const gchar *condition)
|
||||
{
|
||||
gboolean return_value = FALSE;
|
||||
gchar buf[SMALL];
|
||||
gchar buf[SMALL], buf2[SMALL];
|
||||
|
||||
strcpy(buf, condition);
|
||||
|
||||
if(!lg_commentary_replace_tokens(buf))
|
||||
return FALSE;
|
||||
|
||||
lg_commentary_replace_expressions(buf);
|
||||
do
|
||||
{
|
||||
strcpy(buf2, buf);
|
||||
if(!lg_commentary_replace_tokens(buf))
|
||||
return FALSE;
|
||||
|
||||
if(!lg_commentary_replace_tokens(buf))
|
||||
return FALSE;
|
||||
lg_commentary_replace_expressions(buf);
|
||||
}
|
||||
while(strcmp(buf2, buf) != 0);
|
||||
|
||||
misc_parse(buf, &return_value);
|
||||
|
||||
|
@ -61,7 +61,7 @@ main_init_variables(void)
|
||||
constants.datalist = options.datalist = lg_tokens.datalist = NULL;
|
||||
|
||||
popups_active = 0;
|
||||
selected_row[0] = selected_row[1] = -1;
|
||||
selected_row = -1;
|
||||
|
||||
timeout_id = -1;
|
||||
|
||||
|
@ -10,6 +10,7 @@ void
|
||||
main_init_variables(void);
|
||||
|
||||
void
|
||||
main_exit_program(gint exit_code, gchar *exit_message);
|
||||
main_exit_program(gint exit_code, gchar *exit_message)
|
||||
__attribute__ ((noreturn));
|
||||
|
||||
#endif
|
||||
|
@ -19,7 +19,6 @@ void
|
||||
misc2_callback_transfer_user_player(void)
|
||||
{
|
||||
Team *new_team = transoff(stat2, 0).tm;
|
||||
gchar buf[SMALL];
|
||||
|
||||
if(team_is_user(new_team) != -1)
|
||||
{
|
||||
@ -44,13 +43,12 @@ misc2_callback_transfer_user_player(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(buf, _("%s couldn't afford to buy %s or his roster was full."),
|
||||
user_from_team(new_team)->name->str,
|
||||
player_of_id_team(trans(stat2).tm, trans(stat2).id)->name->str);
|
||||
game_gui_show_warning(buf);
|
||||
sprintf(buf, _("You didn't have enough money to buy %s or your roster was full."),
|
||||
player_of_id_team(trans(stat2).tm, trans(stat2).id)->name->str);
|
||||
user_event_add(user_from_team(new_team), EVENT_TYPE_WARNING, -1, -1, NULL, buf);
|
||||
game_gui_show_warning(_("%s couldn't afford to buy %s or his roster was full."),
|
||||
user_from_team(new_team)->name->str,
|
||||
player_of_id_team(trans(stat2).tm, trans(stat2).id)->name->str);
|
||||
user_event_add(user_from_team(new_team), EVENT_TYPE_WARNING, -1, -1, NULL,
|
||||
_("You didn't have enough money to buy %s or your roster was full."),
|
||||
player_of_id_team(trans(stat2).tm, trans(stat2).id)->name->str);
|
||||
g_array_remove_index(trans(stat2).offers, 0);
|
||||
if(trans(stat2).offers->len > 0 &&
|
||||
transoff(stat2, 0).status == TRANSFER_OFFER_NOT_CONSIDERED)
|
||||
@ -107,7 +105,6 @@ misc2_callback_transfer_cpu_player(void)
|
||||
gboolean
|
||||
misc2_callback_change_structure(gint structure)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
gint poss_struct = team_find_appropriate_structure(current_user.tm);
|
||||
|
||||
if(math_get_place(structure, 1) + math_get_place(structure, 2) +
|
||||
@ -115,8 +112,7 @@ misc2_callback_change_structure(gint structure)
|
||||
math_get_place(poss_struct, 1) + math_get_place(poss_struct, 2) +
|
||||
math_get_place(poss_struct, 3))
|
||||
{
|
||||
sprintf(buf, _("The structure value %d is invalid."), structure);
|
||||
game_gui_show_warning(buf);
|
||||
game_gui_show_warning(_("The structure value %d is invalid."), structure);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -157,25 +153,20 @@ misc2_callback_contract_offer(void)
|
||||
{
|
||||
pl->contract += (i + 1);
|
||||
pl->wage = value;
|
||||
sprintf(buf, _("%s accepts your offer."), pl->name->str);
|
||||
game_gui_show_warning(buf);
|
||||
game_gui_show_warning(_("%s accepts your offer."), pl->name->str);
|
||||
window_destroy(&window.contract, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
pl->offers++;
|
||||
if(pl->offers < const_int("int_contract_max_offers"))
|
||||
{
|
||||
sprintf(buf, _("%s rejects your offer. You may still make %d offers."),
|
||||
pl->name->str,
|
||||
const_int("int_contract_max_offers") - pl->offers);
|
||||
game_gui_show_warning(buf);
|
||||
}
|
||||
game_gui_show_warning(_("%s rejects your offer. You may still make %d offers."),
|
||||
pl->name->str,
|
||||
const_int("int_contract_max_offers") - pl->offers);
|
||||
else
|
||||
{
|
||||
sprintf(buf, _("%s rejects your offer and won't negotiate with you anymore. You should sell him before his contract expires (he'll simply leave your team otherwise)."),
|
||||
pl->name->str);
|
||||
game_gui_show_warning(buf);
|
||||
game_gui_show_warning(_("%s rejects your offer and won't negotiate with you anymore. You should sell him before his contract expires (he'll simply leave your team otherwise)."),
|
||||
pl->name->str);
|
||||
window_destroy(&window.contract, FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include "callback_func.h"
|
||||
#include "debug.h"
|
||||
#include "finance.h"
|
||||
#include "free.h"
|
||||
#include "game_gui.h"
|
||||
#include "load_save.h"
|
||||
#include "main.h"
|
||||
@ -118,6 +119,9 @@ on_button_digits_ok_clicked (GtkButton *button,
|
||||
if(destroy_window && stat0 == STATUS_LIVE_GAME_PAUSE)
|
||||
gtk_widget_set_sensitive(window.main, TRUE);
|
||||
break;
|
||||
case STATUS_SET_YA_PERCENTAGE:
|
||||
current_user.youth_academy.percentage = values[1];
|
||||
break;
|
||||
}
|
||||
|
||||
if(destroy_window)
|
||||
@ -189,6 +193,12 @@ on_button_yesno_yes_clicked (GtkButton *button,
|
||||
load_save_autosave();
|
||||
callback_show_next_live_game();
|
||||
break;
|
||||
case STATUS_QUERY_KICK_YOUTH:
|
||||
free_player(&g_array_index(current_user.youth_academy.players, Player, selected_row));
|
||||
g_array_remove_index(current_user.youth_academy.players, selected_row);
|
||||
on_menu_show_youth_academy_activate(NULL, NULL);
|
||||
selected_row = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if(stat4 == STATUS_SHOW_EVENT)
|
||||
|
@ -14,7 +14,6 @@
|
||||
enum BooleanOptions
|
||||
{
|
||||
BOOL_OPT_CONF_QUIT = 0,
|
||||
BOOL_OPT_CONF_UNFIT,
|
||||
BOOL_OPT_SAVE_OVERWRITE,
|
||||
BOOL_OPT_MAXIMIZE,
|
||||
BOOL_OPT_PREFER_MESS,
|
||||
@ -26,6 +25,8 @@ enum BooleanOptions
|
||||
BOOL_OPT_PAUSE_RED,
|
||||
BOOL_OPT_PAUSE_BREAK,
|
||||
BOOL_OPT_AUTO_SUB,
|
||||
BOOL_OPT_CONF_UNFIT,
|
||||
BOOL_OPT_CONF_YOUTH,
|
||||
BOOL_OPT_SHOW_JOB,
|
||||
BOOL_OPT_SWAP,
|
||||
BOOL_OPT_SHOW_OVERALL,
|
||||
@ -126,6 +127,10 @@ option_gui_write_bool_widgets(gint **bool_options, GtkToggleButton **bool_widget
|
||||
GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_auto_sub"));
|
||||
bool_options[BOOL_OPT_AUTO_SUB] = opt_user_intp("int_opt_user_auto_sub");
|
||||
|
||||
bool_widgets[BOOL_OPT_CONF_YOUTH] =
|
||||
GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_conf_youth"));
|
||||
bool_options[BOOL_OPT_CONF_YOUTH] = opt_user_intp("int_opt_user_confirm_youth");
|
||||
|
||||
bool_widgets[BOOL_OPT_SHOW_JOB] =
|
||||
GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_show_job"));
|
||||
bool_options[BOOL_OPT_SHOW_JOB] = opt_user_intp("int_opt_user_show_job_offers");
|
||||
|
@ -94,6 +94,7 @@ create_window_options (void)
|
||||
GtkWidget *label2;
|
||||
GtkWidget *hbox6;
|
||||
GtkWidget *vbox6;
|
||||
GtkWidget *checkbutton_conf_youth;
|
||||
GtkWidget *checkbutton_show_job;
|
||||
GtkWidget *eventbox1;
|
||||
GtkWidget *hbox10;
|
||||
@ -497,6 +498,11 @@ create_window_options (void)
|
||||
gtk_widget_show (vbox6);
|
||||
gtk_box_pack_start (GTK_BOX (hbox6), vbox6, TRUE, TRUE, 0);
|
||||
|
||||
checkbutton_conf_youth = gtk_check_button_new_with_mnemonic (_("Confirm removing youths"));
|
||||
gtk_widget_show (checkbutton_conf_youth);
|
||||
gtk_box_pack_start (GTK_BOX (vbox6), checkbutton_conf_youth, FALSE, FALSE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, checkbutton_conf_youth, _("Whether a confirmation popup is shown when you kick out a youth from your academy"), NULL);
|
||||
|
||||
checkbutton_show_job = gtk_check_button_new_with_mnemonic (_("Show job offers"));
|
||||
gtk_widget_show (checkbutton_show_job);
|
||||
gtk_box_pack_start (GTK_BOX (vbox6), checkbutton_show_job, FALSE, FALSE, 0);
|
||||
@ -1059,6 +1065,7 @@ create_window_options (void)
|
||||
GLADE_HOOKUP_OBJECT (window_options, label2, "label2");
|
||||
GLADE_HOOKUP_OBJECT (window_options, hbox6, "hbox6");
|
||||
GLADE_HOOKUP_OBJECT (window_options, vbox6, "vbox6");
|
||||
GLADE_HOOKUP_OBJECT (window_options, checkbutton_conf_youth, "checkbutton_conf_youth");
|
||||
GLADE_HOOKUP_OBJECT (window_options, checkbutton_show_job, "checkbutton_show_job");
|
||||
GLADE_HOOKUP_OBJECT (window_options, eventbox1, "eventbox1");
|
||||
GLADE_HOOKUP_OBJECT (window_options, hbox10, "hbox10");
|
||||
|
116
src/player.c
116
src/player.c
@ -914,13 +914,21 @@ player_update_skill(Player *pl)
|
||||
const_float("float_player_skill_devel_else_upper")}};
|
||||
gfloat diff;
|
||||
|
||||
if(pl->age > pl->peak_age)
|
||||
pl->lsu += (pl->health == 0) ? 1 : const_float("float_player_lsu_injured_old");
|
||||
else if(pl->health == 0 &&
|
||||
((gfloat)player_games_goals_get(pl, pl->team->clid, PLAYER_VALUE_GAMES) / (gfloat)week >=
|
||||
const_float("float_player_lsu_games_percentage") ||
|
||||
math_rnd(0, 1) <= const_float("float_player_lsu_increase_prob")))
|
||||
pl->lsu++;
|
||||
if(!query_player_is_youth(pl))
|
||||
{
|
||||
if(pl->age > pl->peak_age)
|
||||
pl->lsu += (pl->health == 0) ? 1 : const_float("float_player_lsu_injured_old");
|
||||
else if(pl->health == 0 &&
|
||||
((gfloat)player_games_goals_get(pl, pl->team->clid, PLAYER_VALUE_GAMES) / (gfloat)week >=
|
||||
const_float("float_player_lsu_games_percentage") ||
|
||||
math_rnd(0, 1) <= const_float("float_player_lsu_increase_prob")))
|
||||
pl->lsu++;
|
||||
}
|
||||
else
|
||||
pl->lsu += (pl->health != 0) ? 0 :
|
||||
const_float("float_youth_academy_lsu_addition_best") -
|
||||
(user_from_team(pl->team)->youth_academy.av_coach *
|
||||
const_float("float_youth_academy_lsu_penalty"));
|
||||
|
||||
if(pl->lsu < const_float("float_player_lsu_update_limit") ||
|
||||
math_rnd(0, 1) < powf(const_float("float_player_lsu_update_base_prob"),
|
||||
@ -935,14 +943,19 @@ player_update_skill(Player *pl)
|
||||
if(diff > age_limits[i])
|
||||
break;
|
||||
|
||||
if(i < 3)
|
||||
pl->skill += (pl->talent - pl->skill) * math_rnd(factor_limits[i][0], factor_limits[i][1]);
|
||||
else if(i < 5)
|
||||
pl->skill += math_rnd(increase_decrease[0][0], increase_decrease[0][1]);
|
||||
else if(i < 7)
|
||||
pl->skill += math_rnd(increase_decrease[i - 4][0], increase_decrease[i - 4][1]);
|
||||
if(!query_player_is_youth(pl))
|
||||
{
|
||||
if(i < 3)
|
||||
pl->skill += (pl->talent - pl->skill) * math_rnd(factor_limits[i][0], factor_limits[i][1]);
|
||||
else if(i < 5)
|
||||
pl->skill += math_rnd(increase_decrease[0][0], increase_decrease[0][1]);
|
||||
else if(i < 7)
|
||||
pl->skill += math_rnd(increase_decrease[i - 4][0], increase_decrease[i - 4][1]);
|
||||
else
|
||||
pl->skill += math_rnd(increase_decrease[3][0], increase_decrease[3][1]);
|
||||
}
|
||||
else
|
||||
pl->skill += math_rnd(increase_decrease[3][0], increase_decrease[3][1]);
|
||||
pl->skill /= const_float("float_youth_academy_skill_reduce_factor");
|
||||
|
||||
pl->skill = CLAMP(pl->skill, 0, pl->talent);
|
||||
pl->cskill = player_get_cskill(pl, pl->cpos, TRUE);
|
||||
@ -999,36 +1012,28 @@ player_update_injury(Player *pl)
|
||||
}
|
||||
}
|
||||
|
||||
/** Update players in user teams (age, skill, fitness etc.)
|
||||
@param tm The team of the player.
|
||||
@param idx The index in the players array. */
|
||||
/** Update a player in a user team (age, skill etc.). */
|
||||
void
|
||||
player_update_weekly(Team *tm, gint idx)
|
||||
player_update_weekly(Player *pl)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
Player *pl = player_of_idx_team(tm, idx);
|
||||
|
||||
if(debug < 50)
|
||||
{
|
||||
pl->age += 0.0192;
|
||||
|
||||
if(!sett_int("int_opt_disable_contracts"))
|
||||
if(!sett_int("int_opt_disable_contracts") &&
|
||||
pl->age > const_float("float_player_age_lower"))
|
||||
pl->contract -= 0.0192;
|
||||
}
|
||||
|
||||
if(!sett_int("int_opt_disable_contracts") && debug < 50 &&
|
||||
pl->contract * 12 <= opt_user_int("int_opt_user_contract_limit") &&
|
||||
(pl->contract + 0.0192) * 12 > opt_user_int("int_opt_user_contract_limit"))
|
||||
{
|
||||
sprintf(buf, _("%s's contract expires in %.1f years."),
|
||||
pl->name->str, pl->contract);
|
||||
|
||||
user_event_add(&usr(team_is_user(tm)), EVENT_TYPE_WARNING,
|
||||
-1, -1, NULL, buf);
|
||||
}
|
||||
user_event_add(user_from_team(pl->team), EVENT_TYPE_WARNING,
|
||||
-1, -1, NULL, _("%s's contract expires in %.1f years."),
|
||||
pl->name->str, pl->contract);
|
||||
|
||||
if(pl->contract <= 0)
|
||||
player_remove_contract(tm, idx);
|
||||
player_remove_contract(pl);
|
||||
|
||||
player_update_skill(pl);
|
||||
if(pl->health > 0)
|
||||
@ -1039,11 +1044,11 @@ player_update_weekly(Team *tm, gint idx)
|
||||
@param tm The user team.
|
||||
@param idx The player index. */
|
||||
void
|
||||
player_remove_contract(Team *tm, gint idx)
|
||||
player_remove_contract(Player *pl)
|
||||
{
|
||||
user_event_add(user_from_team(tm), EVENT_TYPE_PLAYER_LEFT, -1, -1, NULL,
|
||||
player_of_idx_team(tm, idx)->name->str);
|
||||
player_remove_from_team(tm, idx);
|
||||
user_event_add(user_from_team(pl->team), EVENT_TYPE_PLAYER_LEFT, -1, -1, NULL,
|
||||
pl->name->str);
|
||||
player_remove_from_team(pl->team, player_id_index(pl->team, pl->id));
|
||||
}
|
||||
|
||||
/** Remove a player from a team.
|
||||
@ -1237,3 +1242,46 @@ player_get_last_name(const gchar *name)
|
||||
|
||||
return rev_name;
|
||||
}
|
||||
|
||||
/** Create a pointer array with pointers to the players
|
||||
and return it. */
|
||||
GPtrArray*
|
||||
player_get_pointers_from_array(const GArray *players_array)
|
||||
{
|
||||
gint i;
|
||||
GPtrArray *players = g_ptr_array_new();
|
||||
|
||||
for(i=0;i<players_array->len;i++)
|
||||
g_ptr_array_add(players, &g_array_index(players_array, Player, i));
|
||||
|
||||
return players;
|
||||
}
|
||||
|
||||
|
||||
/** Move a player from the team to the youth academy. */
|
||||
void
|
||||
player_move_to_ya(gint idx)
|
||||
{
|
||||
Player *pl = player_of_idx_team(current_user.tm, idx);
|
||||
Player player = *pl;
|
||||
|
||||
if(query_transfer_player_is_on_list(pl))
|
||||
transfer_remove_player_ptr(pl);
|
||||
|
||||
player.cskill = player.skill;
|
||||
player.cpos = player.pos;
|
||||
|
||||
g_array_remove_index(current_user.tm->players, idx);
|
||||
g_array_append_val(current_user.youth_academy.players, player);
|
||||
}
|
||||
|
||||
/** Move a player from the youth academy to the team. */
|
||||
void
|
||||
player_move_from_ya(gint idx)
|
||||
{
|
||||
Player *pl = &g_array_index(current_user.youth_academy.players, Player, idx);
|
||||
Player player = *pl;
|
||||
|
||||
g_array_remove_index(current_user.youth_academy.players, idx);
|
||||
g_array_append_val(current_user.tm->players, player);
|
||||
}
|
||||
|
15
src/player.h
15
src/player.h
@ -13,6 +13,8 @@ enum PlayerCompareAttrib
|
||||
PLAYER_COMPARE_ATTRIBUTE_END
|
||||
};
|
||||
|
||||
#define query_player_is_youth(pl) (pl->age <= const_float("float_player_age_lower"))
|
||||
|
||||
Player
|
||||
player_new(Team *tm, gfloat average_skill, gboolean new_id);
|
||||
|
||||
@ -86,10 +88,10 @@ gint
|
||||
player_games_goals_get(const Player *pl, gint clid, gint type);
|
||||
|
||||
void
|
||||
player_update_weekly(Team *tm, gint idx);
|
||||
player_update_weekly(Player *pl);
|
||||
|
||||
void
|
||||
player_remove_contract(Team *tm, gint idx);
|
||||
player_remove_contract(Player *pl);
|
||||
|
||||
void
|
||||
player_update_skill(Player *pl);
|
||||
@ -130,4 +132,13 @@ player_get_last_name(const gchar *name);
|
||||
void
|
||||
player_complete_def(Player *pl, gfloat average_skill);
|
||||
|
||||
GPtrArray*
|
||||
player_get_pointers_from_array(const GArray *players);
|
||||
|
||||
void
|
||||
player_move_to_ya(gint idx);
|
||||
|
||||
void
|
||||
player_move_from_ya(gint idx);
|
||||
|
||||
#endif
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "user.h"
|
||||
#include "variables.h"
|
||||
#include "xml_name.h"
|
||||
#include "youth_academy.h"
|
||||
|
||||
/** Prototype of a function called at the start or
|
||||
end of a week round. */
|
||||
@ -42,7 +43,7 @@ WeekFunc start_week_round_funcs[] =
|
||||
WeekFunc start_week_funcs[] =
|
||||
{start_week_add_cups, start_week_update_users,
|
||||
start_week_update_user_teams, start_week_update_user_finances,
|
||||
transfer_update, NULL};
|
||||
youth_academy_update_weekly, transfer_update, NULL};
|
||||
|
||||
WeekFunc end_week_funcs[] = {stat_update_leagues, end_week_hide_cups, NULL};
|
||||
|
||||
@ -93,6 +94,11 @@ start_new_season(void)
|
||||
for(i=0;i<users->len;i++)
|
||||
{
|
||||
usr(i).tm = team_of_id(usr(i).team_id);
|
||||
|
||||
usr(i).youth_academy.tm = usr(i).tm;
|
||||
for(j=0;j<usr(i).youth_academy.players->len;j++)
|
||||
g_array_index(usr(i).youth_academy.players, Player, j).team = usr(i).tm;
|
||||
|
||||
live_game_reset(&usr(i).live_game, NULL, TRUE);
|
||||
}
|
||||
}
|
||||
@ -470,6 +476,9 @@ start_week_update_users(void)
|
||||
if(usr(i).physio >= 100)
|
||||
usr(i).physio = math_get_place(usr(i).physio, 2);
|
||||
|
||||
if(usr(i).youth_academy.coach >= 100)
|
||||
usr(i).youth_academy.coach = math_get_place(usr(i).youth_academy.coach, 2);
|
||||
|
||||
user_weekly_update_counters(&usr(i));
|
||||
}
|
||||
}
|
||||
|
25
src/team.c
25
src/team.c
@ -226,21 +226,6 @@ team_of_id(gint id)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/** Return the players of the team in a pointer array.
|
||||
@param tm The team we examine.
|
||||
@return The players of the team in an array. */
|
||||
GPtrArray*
|
||||
team_get_player_pointers(const Team *tm)
|
||||
{
|
||||
gint i;
|
||||
GPtrArray *players = g_ptr_array_new();
|
||||
|
||||
for(i=0;i<tm->players->len;i++)
|
||||
g_ptr_array_add(players, &g_array_index(tm->players, Player, i));
|
||||
|
||||
return players;
|
||||
}
|
||||
|
||||
/** Return a pointer to the next or last fixture the team participates in.
|
||||
@param tm The team we examine.
|
||||
@return The pointer to the fixture or NULL if none is found. */
|
||||
@ -533,8 +518,6 @@ team_attribute_to_char(gint attribute, gint value)
|
||||
void
|
||||
team_change_attribute_with_message(Team *tm, gint attribute, gint new_value)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
|
||||
switch(attribute)
|
||||
{
|
||||
default:
|
||||
@ -542,15 +525,13 @@ team_change_attribute_with_message(Team *tm, gint attribute, gint new_value)
|
||||
break;
|
||||
case TEAM_ATTRIBUTE_STYLE:
|
||||
current_user.tm->style = new_value;
|
||||
sprintf(buf, _("Team style changed to %s."), team_attribute_to_char(attribute, new_value));
|
||||
game_gui_print_message(_("Team style changed to %s."), team_attribute_to_char(attribute, new_value));
|
||||
break;
|
||||
case TEAM_ATTRIBUTE_BOOST:
|
||||
current_user.tm->boost = new_value;
|
||||
sprintf(buf, _("Boost changed to %s."), team_attribute_to_char(attribute, new_value));
|
||||
game_gui_print_message(_("Boost changed to %s."), team_attribute_to_char(attribute, new_value));
|
||||
break;
|
||||
}
|
||||
|
||||
game_gui_print_message(buf);
|
||||
}
|
||||
|
||||
/** Make cpu players healthy etc.
|
||||
@ -686,7 +667,7 @@ team_update_user_team_weekly(Team *tm)
|
||||
gint i;
|
||||
|
||||
for(i=tm->players->len - 1;i>=0;i--)
|
||||
player_update_weekly(tm, i);
|
||||
player_update_weekly(&g_array_index(tm->players, Player, i));
|
||||
}
|
||||
|
||||
/** Regenerate player fitness etc. after a match.
|
||||
|
@ -54,9 +54,6 @@ team_get_pointers_from_array(const GArray *teams);
|
||||
Team*
|
||||
team_of_id(gint id);
|
||||
|
||||
GPtrArray*
|
||||
team_get_player_pointers(const Team *tm);
|
||||
|
||||
Fixture*
|
||||
team_get_fixture(const Team *tm, gboolean last_fixture);
|
||||
|
||||
|
@ -438,8 +438,6 @@ transfer_remove_offer(gint idx, const Team *tm)
|
||||
void
|
||||
transfer_add_remove_user_player(Player *pl)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
|
||||
if(!query_transfer_player_is_on_list(pl))
|
||||
{
|
||||
if(week < transfer_get_deadline())
|
||||
@ -447,18 +445,16 @@ transfer_add_remove_user_player(Player *pl)
|
||||
transfer_add_player(pl,
|
||||
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
||||
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
||||
sprintf(buf, _("%s has been added to the transfer list for %d weeks."),
|
||||
pl->name->str,
|
||||
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
||||
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
||||
game_gui_print_message(_("%s has been added to the transfer list for %d weeks."),
|
||||
pl->name->str,
|
||||
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
||||
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
game_gui_print_message(_("The transfer deadline is over."));
|
||||
return;
|
||||
}
|
||||
|
||||
game_gui_print_message(buf);
|
||||
}
|
||||
else
|
||||
transfer_remove_player_ptr(pl);
|
||||
|
@ -368,7 +368,7 @@ treeview_show_user_player_list(void)
|
||||
|
||||
for(i=0;i<2;i++)
|
||||
{
|
||||
players = team_get_player_pointers(current_user.tm);
|
||||
players = player_get_pointers_from_array(current_user.tm->players);
|
||||
user_set_player_list_attributes(¤t_user, &attribute, i + 1);
|
||||
treeview_show_player_list(GTK_TREE_VIEW(treeview[i]), players, attribute, TRUE);
|
||||
}
|
||||
@ -379,7 +379,7 @@ treeview_show_user_player_list(void)
|
||||
void
|
||||
treeview_show_player_list_team(GtkTreeView *treeview, const Team *tm, gint scout)
|
||||
{
|
||||
GPtrArray *players = team_get_player_pointers(tm);
|
||||
GPtrArray *players = player_get_pointers_from_array(tm->players);
|
||||
|
||||
treeview_show_player_list(treeview, players,
|
||||
treeview_helper_get_attributes_from_scout(scout), TRUE);
|
||||
@ -1274,6 +1274,8 @@ treeview_create_finances(const User* user)
|
||||
{_("Wages"),
|
||||
_("Physio"),
|
||||
_("Scout"),
|
||||
_("Youth coach"),
|
||||
_("Youth academy"),
|
||||
_("Journey costs"),
|
||||
/* Money paid to players a user fired. */
|
||||
_("Compensations")};
|
||||
@ -1385,6 +1387,13 @@ treeview_create_finances(const User* user)
|
||||
gtk_list_store_append(ls, &iter);
|
||||
gtk_list_store_set(ls, &iter, 0, "", 1, "", 2, "", -1);
|
||||
|
||||
sprintf(buf, "%d%%", user->youth_academy.percentage);
|
||||
gtk_list_store_append(ls, &iter);
|
||||
gtk_list_store_set(ls, &iter, 0, _("Youth acad. invest."), 1, buf, 2, "", -1);
|
||||
|
||||
gtk_list_store_append(ls, &iter);
|
||||
gtk_list_store_set(ls, &iter, 0, "", 1, "", 2, "", -1);
|
||||
|
||||
treeview_create_stadium_summary(ls);
|
||||
|
||||
return GTK_TREE_MODEL(ls);
|
||||
|
55
src/user.c
55
src/user.c
@ -17,6 +17,7 @@
|
||||
#include "treeview.h"
|
||||
#include "user.h"
|
||||
#include "window.h"
|
||||
#include "youth_academy.h"
|
||||
|
||||
/** Create a new user with default values. */
|
||||
User
|
||||
@ -101,6 +102,8 @@ user_set_up_team(User *user)
|
||||
user_set_up_finances(user);
|
||||
user_set_up_counters(user);
|
||||
|
||||
user->youth_academy = youth_academy_new(user->tm);
|
||||
|
||||
user->counters[COUNT_USER_NEW_SPONSOR] = (sett_int("int_opt_disable_finances")) ? -5 : 1;
|
||||
}
|
||||
|
||||
@ -245,7 +248,6 @@ user_from_team(const Team *tm)
|
||||
void
|
||||
user_job_offer(User *user)
|
||||
{
|
||||
gchar buf[SMALL];
|
||||
Team *new_team = NULL;
|
||||
|
||||
if(math_rnd(0, 1) > const_float("float_user_success_counter_check") ||
|
||||
@ -255,8 +257,8 @@ user_job_offer(User *user)
|
||||
if(user->counters[COUNT_USER_SUCCESS] < -(gfloat)const_int("int_user_success_offer_limit") * 0.9 &&
|
||||
!user->counters[COUNT_USER_WARNING])
|
||||
{
|
||||
sprintf(buf, _("The owners of %s are not satisfied with the recent performance of the team. There are rumours they're looking for a new manager."), user->tm->name->str);
|
||||
user_event_add(user, EVENT_TYPE_WARNING, -1, -1, NULL, buf);
|
||||
user_event_add(user, EVENT_TYPE_WARNING, -1, -1, NULL,
|
||||
_("The owners of %s are not satisfied with the recent performance of the team. There are rumours they're looking for a new manager."), user->tm->name->str);
|
||||
user->counters[COUNT_USER_WARNING] = 1;
|
||||
return;
|
||||
}
|
||||
@ -354,18 +356,25 @@ user_event_new(void)
|
||||
/** Add an event with the specified values to the event array of the user. */
|
||||
void
|
||||
user_event_add(User *user, gint type, gint value1, gint value2,
|
||||
gpointer value_pointer, gchar *value_string)
|
||||
gpointer value_pointer, gchar *format, ...)
|
||||
{
|
||||
Event new = user_event_new();
|
||||
|
||||
gchar text[SMALL];
|
||||
va_list args;
|
||||
|
||||
new.user = user;
|
||||
new.type = type;
|
||||
new.value1 = value1;
|
||||
new.value2 = value2;
|
||||
new.value_pointer = value_pointer;
|
||||
|
||||
if(value_string != NULL)
|
||||
new.value_string = g_string_new(value_string);
|
||||
if(format != NULL)
|
||||
{
|
||||
va_start (args, format);
|
||||
g_vsprintf(text, format, args);
|
||||
va_end (args);
|
||||
new.value_string = g_string_new(text);
|
||||
}
|
||||
else
|
||||
new.value_string = NULL;
|
||||
|
||||
@ -403,9 +412,8 @@ user_event_show_next(void)
|
||||
g_warning("user_event_show_next: unknown event type %d\n", event->type);
|
||||
break;
|
||||
case EVENT_TYPE_PLAYER_LEFT:
|
||||
sprintf(buf, _("%s has left your team because his contract expired."),
|
||||
game_gui_show_warning(_("%s has left your team because his contract expired."),
|
||||
event->value_string->str);
|
||||
game_gui_show_warning(buf);
|
||||
break;
|
||||
case EVENT_TYPE_WARNING:
|
||||
game_gui_show_warning(event->value_string->str);
|
||||
@ -427,59 +435,50 @@ user_event_show_next(void)
|
||||
break;
|
||||
case EVENT_TYPE_OVERDRAW:
|
||||
if(event->value1 == 1)
|
||||
sprintf(buf, _("You have overdrawn your bank account. The team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive"));
|
||||
game_gui_show_warning(_("You have overdrawn your bank account. The team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive"));
|
||||
else
|
||||
sprintf(buf, _("You have overdrawn your bank account once again. Bear in mind that after the fourth time you get fired.\nThe team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive"));
|
||||
game_gui_show_warning(buf);
|
||||
game_gui_show_warning(_("You have overdrawn your bank account once again. Bear in mind that after the fourth time you get fired.\nThe team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive"));
|
||||
break;
|
||||
case EVENT_TYPE_TRANSFER_OFFER_USER:
|
||||
sprintf(buf, _("Have a look at the transfer list, there's an offer for %s."),
|
||||
game_gui_show_warning(_("Have a look at the transfer list, there's an offer for %s."),
|
||||
event->value_string->str);
|
||||
game_gui_show_warning(buf);
|
||||
break;
|
||||
case EVENT_TYPE_TRANSFER_OFFER_CPU:
|
||||
sprintf(buf, _("Your offer for %s has been accepted. If you still want to buy him, go to the transfer list and left click on the player."),
|
||||
game_gui_show_warning(_("Your offer for %s has been accepted. If you still want to buy him, go to the transfer list and left click on the player."),
|
||||
event->value_string->str);
|
||||
game_gui_show_warning(buf);
|
||||
break;
|
||||
case EVENT_TYPE_TRANSFER_OFFER_REJECTED_BETTER_OFFER:
|
||||
misc_print_grouped_int(event->value1, buf2);
|
||||
misc_print_grouped_int(event->value2, buf3);
|
||||
sprintf(buf, _("The owners of %s have rejected your offer (%s / %s) for %s. There was a better offer for the player than yours."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str);
|
||||
game_gui_show_warning(buf);
|
||||
game_gui_show_warning(_("The owners of %s have rejected your offer (%s / %s) for %s. There was a better offer for the player than yours."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str);
|
||||
break;
|
||||
case EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE:
|
||||
misc_print_grouped_int(event->value1, buf2);
|
||||
misc_print_grouped_int(event->value2, buf3);
|
||||
sprintf(buf, _("The owners of %s have rejected your offer (%s / %s) for %s. Neither the fee nor the wage you offered were acceptable, they say."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str);
|
||||
game_gui_show_warning(buf);
|
||||
game_gui_show_warning(_("The owners of %s have rejected your offer (%s / %s) for %s. Neither the fee nor the wage you offered were acceptable, they say."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str);
|
||||
break;
|
||||
case EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE:
|
||||
misc_print_grouped_int(event->value1, buf2);
|
||||
misc_print_grouped_int(event->value2, buf3);
|
||||
sprintf(buf, _("The owners of %s have rejected your offer (%s / %s) for %s. The team owners weren't satisfied with the fee you offered."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str);
|
||||
game_gui_show_warning(buf);
|
||||
game_gui_show_warning(_("The owners of %s have rejected your offer (%s / %s) for %s. The team owners weren't satisfied with the fee you offered."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str);
|
||||
break;
|
||||
case EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE:
|
||||
misc_print_grouped_int(event->value1, buf2);
|
||||
misc_print_grouped_int(event->value2, buf3);
|
||||
/* A player from a team has rejected a transfer offer. */
|
||||
sprintf(buf, _("%s of %s has rejected your offer (%s / %s). He wasn't satisfied with the wage you offered."),
|
||||
game_gui_show_warning(_("%s of %s has rejected your offer (%s / %s). He wasn't satisfied with the wage you offered."),
|
||||
event->value_string->str,
|
||||
((Team*)event->value_pointer)->name->str, buf2, buf3);
|
||||
game_gui_show_warning(buf);
|
||||
break;
|
||||
case EVENT_TYPE_TRANSFER_OFFER_MONEY:
|
||||
/* Buy a player from a team. */
|
||||
sprintf(buf, _("You didn't have enough money to buy %s from %s."),
|
||||
game_gui_show_warning(_("You didn't have enough money to buy %s from %s."),
|
||||
event->value_string->str, ((Team*)event->value_pointer)->name->str);
|
||||
game_gui_show_warning(buf);
|
||||
break;
|
||||
case EVENT_TYPE_TRANSFER_OFFER_ROSTER:
|
||||
/* Buy a player from a team. */
|
||||
sprintf(buf, _("Your roster is full. You couldn't buy %s from %s."),
|
||||
game_gui_show_warning(_("Your roster is full. You couldn't buy %s from %s."),
|
||||
event->value_string->str, ((Team*)event->value_pointer)->name->str);
|
||||
game_gui_show_warning(buf);
|
||||
break;
|
||||
case EVENT_TYPE_PLAYER_CAREER_STOP:
|
||||
sprintf(buf, _("%s's injury was so severe that he can't play football on a professional level anymore. He leaves your team."), player_of_id_team(event->user->tm, event->value1)->name->str);
|
||||
|
@ -45,7 +45,8 @@ user_event_new(void);
|
||||
|
||||
void
|
||||
user_event_add(User *user, gint type, gint value1, gint value2,
|
||||
gpointer pointer_value, gchar *string_value);
|
||||
gpointer value_pointer, gchar *format, ...)
|
||||
__attribute__ ((format (printf, 6, 7)));
|
||||
|
||||
void
|
||||
user_event_remove(User *user, gint idx);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "option_struct.h"
|
||||
#include "player_struct.h"
|
||||
#include "team_struct.h"
|
||||
#include "youth_academy_struct.h"
|
||||
|
||||
/** Indices for the money_in array. */
|
||||
enum MonIn
|
||||
@ -24,6 +25,8 @@ enum MonOut
|
||||
MON_OUT_WAGE = 0,
|
||||
MON_OUT_PHYSIO,
|
||||
MON_OUT_SCOUT,
|
||||
MON_OUT_YC,
|
||||
MON_OUT_YA,
|
||||
MON_OUT_JOURNEY,
|
||||
MON_OUT_COMPENSATIONS,
|
||||
MON_OUT_TRANSFERS,
|
||||
@ -121,8 +124,10 @@ typedef struct
|
||||
gint scout, physio;
|
||||
/** The variable for the latest user live game. @see #Game */
|
||||
LiveGame live_game;
|
||||
|
||||
/** Sponsor of the user. */
|
||||
UserSponsor sponsor;
|
||||
/** Youth academy of the user. */
|
||||
YouthAcademy youth_academy;
|
||||
} User;
|
||||
|
||||
enum EventType
|
||||
|
@ -54,8 +54,8 @@ gint status[6];
|
||||
/** A pointer we store temporary stuff in. */
|
||||
gpointer statp;
|
||||
|
||||
/** The currently selected rows in the treeviews. */
|
||||
gint selected_row[2];
|
||||
/** The currently selected row in the treeview. */
|
||||
gint selected_row;
|
||||
|
||||
/** An array of name lists. */
|
||||
GArray *name_lists;
|
||||
|
23
src/window.c
23
src/window.c
@ -199,6 +199,19 @@ window_show_menu_player(GdkEvent *event)
|
||||
((GdkEventButton*)event)->button, gdk_event_get_time(event));
|
||||
}
|
||||
|
||||
/** Show the youth academy context menu, triggered by 'event'. */
|
||||
void
|
||||
window_show_menu_youth(GdkEvent *event)
|
||||
{
|
||||
if(window.menu_youth != NULL)
|
||||
window_destroy(&window.menu_youth, FALSE);
|
||||
|
||||
window.menu_youth = create_menu_youth();
|
||||
|
||||
gtk_menu_popup(GTK_MENU(window.menu_youth), NULL, NULL, NULL, NULL,
|
||||
((GdkEventButton*)event)->button, gdk_event_get_time(event));
|
||||
}
|
||||
|
||||
/** Show the digits window with the labels and values set
|
||||
according to the arguments. */
|
||||
void
|
||||
@ -217,9 +230,12 @@ window_show_digits(const gchar *text_main, const gchar* text1, gint value1,
|
||||
spinbutton1 = GTK_SPIN_BUTTON(lookup_widget(window.digits, "spinbutton1"));
|
||||
spinbutton2 = GTK_SPIN_BUTTON(lookup_widget(window.digits, "spinbutton2"));
|
||||
|
||||
if(stat0 == STATUS_GET_LOAN ||
|
||||
stat0 == STATUS_PAY_LOAN)
|
||||
if(stat1 == STATUS_GET_LOAN ||
|
||||
stat1 == STATUS_PAY_LOAN)
|
||||
gtk_spin_button_set_range(spinbutton1, (gdouble)1, (gdouble)value1);
|
||||
else if(stat1 == STATUS_SET_YA_PERCENTAGE)
|
||||
gtk_spin_button_set_range(spinbutton2, (gdouble)0,
|
||||
(gdouble)const_int("int_youth_academy_max_percentage"));
|
||||
|
||||
gtk_spin_button_set_value(spinbutton1, (gdouble)value1);
|
||||
gtk_spin_button_set_value(spinbutton2, (gdouble)value2);
|
||||
@ -364,8 +380,7 @@ window_create(gint window_type)
|
||||
{
|
||||
window.main = create_main_window();
|
||||
wind = window.main;
|
||||
sprintf(buf, _("Welcome to Bygfoot %s"), VERS);
|
||||
game_gui_print_message(buf);
|
||||
game_gui_print_message(_("Welcome to Bygfoot %s"), VERS);
|
||||
sprintf(buf, "Bygfoot Football Manager %s", VERS);
|
||||
}
|
||||
else
|
||||
|
@ -59,6 +59,9 @@ window_show_options(void);
|
||||
void
|
||||
window_show_menu_player(GdkEvent *event);
|
||||
|
||||
void
|
||||
window_show_menu_youth(GdkEvent *event);
|
||||
|
||||
void
|
||||
window_live_set_spinbuttons(void);
|
||||
|
||||
|
@ -291,6 +291,12 @@ float_finance_physio_factor2 5000
|
||||
float_finance_physio_factor3 4000
|
||||
float_finance_physio_factor4 3000
|
||||
|
||||
# wage factor for youth coach
|
||||
float_finance_yc_factor1 35000
|
||||
float_finance_yc_factor2 25000
|
||||
float_finance_yc_factor3 18000
|
||||
float_finance_yc_factor4 10000
|
||||
|
||||
# interest rate
|
||||
float_finance_interest 200
|
||||
|
||||
@ -771,3 +777,66 @@ float_sponsor_continue_prob 1000
|
||||
# how many live game units we check backwards to avoid
|
||||
# having the same commentary text too often
|
||||
int_lg_commentary_check_backwards 12
|
||||
|
||||
# default percentage for youth academy
|
||||
int_youth_academy_default_percentage 5
|
||||
|
||||
# upper and lower bounds for number of youths
|
||||
# in the academy
|
||||
int_youth_academy_youths_lower 1
|
||||
int_youth_academy_youths_upper 2
|
||||
|
||||
# upper and lower values for the counter determining
|
||||
# when a new youth appears (in weeks)
|
||||
float_youth_academy_youth_counter_lower 350000
|
||||
float_youth_academy_youth_counter_upper 450000
|
||||
|
||||
# upper and lower values for youth ages
|
||||
float_youth_academy_age_lower 155000
|
||||
float_youth_academy_age_upper 175000
|
||||
|
||||
# skill reduce factor (exponent is
|
||||
# peak_age - age)
|
||||
float_youth_academy_skill_reduce_factor 9800
|
||||
|
||||
# weight of the coach for the average skill
|
||||
# between 0 and 1
|
||||
float_youth_academy_coach_weight 2500
|
||||
|
||||
# upper and lower factor values for average skill
|
||||
# (actual value depends on coach and percentage)
|
||||
float_youth_academy_skill_factor_lower 8000
|
||||
float_youth_academy_skill_factor_upper 12000
|
||||
|
||||
# youth skill variance (to have random
|
||||
# skills, not always the same)
|
||||
float_youth_academy_skill_variance 1000
|
||||
|
||||
# maximum percentage the user can devote to the youth academy
|
||||
int_youth_academy_max_percentage 25
|
||||
|
||||
# Last skill update addition when the user's average
|
||||
# youth coach was BEST
|
||||
float_youth_academy_lsu_addition_best 13000
|
||||
|
||||
# how much we substract from the above value when the
|
||||
# coach was worse
|
||||
float_youth_academy_lsu_penalty 2000
|
||||
|
||||
# how much the average youth coach and
|
||||
# investment percentage weighs; the higher
|
||||
# the slower the change of the value when
|
||||
# the user changes the coach (e.g. BAD -> BEST)
|
||||
# or the percentage (e.g. 5% -> 20%)
|
||||
float_youth_academy_average_weight 25000
|
||||
|
||||
# new youth counter decrease if the average percentage
|
||||
# is approx. 0
|
||||
float_youth_academy_counter_decrease_min 10000
|
||||
|
||||
# additional lsu change if a youth plays a match
|
||||
float_youth_lsu_addition_match 10000
|
||||
|
||||
# how many youths there may be at most in the YA
|
||||
int_youth_academy_max_youths 10
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
# Most of these options are uncommented because their meaning
|
||||
# is rather clear if you take a look at the options window in the game.
|
||||
|
||||
int_opt_user_confirm_youth 0
|
||||
|
||||
int_opt_user_show_live_game 0
|
||||
int_opt_user_live_game_speed 0
|
||||
int_opt_user_live_game_verbosity 7
|
||||
|
@ -46,7 +46,7 @@
|
||||
<commentary cond="_GD_ > 1 and _MT_ < 20">Das sollte der Sieg sein für _TW_</commentary>
|
||||
<commentary cond="_GD_ > 2">_TW_ beherrscht _TL_ nach Belieben</commentary>
|
||||
<commentary cond="_GD_ > 2">Keine Chance für _TL_ in diesem Spiel</commentary>
|
||||
<commentary cond="_GD_ > 2 and _MT_ < 30">Das wird wohl nix mehr für_TL_</commentary>
|
||||
<commentary cond="_GD_ > 2 and _MT_ < 30">Das wird wohl nix mehr für _TL_</commentary>
|
||||
<commentary cond="_GOALS0_ + _GOALS1_ > 2 and _MI_ < 20">Das könnte ein sehr torreiches Spiel werden heute</commentary>
|
||||
<commentary cond="_GD_ = 1 and _MT_ < 10">_TL_ kann den Ausgleich noch schaffen</commentary>
|
||||
<commentary cond="_REDS0_ = _REDS1_ and _TAVSKILLDIFF_ > 7 and _G[_TAVSKILL1_ > _TAVSKILL0_]_ < _G[_TAVSKILL1_ < _TAVSKILL0_]_">Was für eine Überraschung, das vermeintlich unterlegene Team führt</commentary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user