make it work
This commit is contained in:
@@ -16,12 +16,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with OpenRA. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Drawing;
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Widgets.Delegates
|
||||
@@ -54,7 +54,19 @@ namespace OpenRA.Widgets.Delegates
|
||||
disconnectButton.OnMouseUp = mi => {
|
||||
Game.Disconnect();
|
||||
return true;
|
||||
};
|
||||
|
||||
var lockTeamsCheckbox = lobby.GetWidget("LOCKTEAMS_CHECKBOX") as CheckboxWidget;
|
||||
lockTeamsCheckbox.IsVisible = () => true;
|
||||
lockTeamsCheckbox.Checked = () => Game.LobbyInfo.GlobalSettings.LockTeams;
|
||||
lockTeamsCheckbox.OnMouseDown = mi =>
|
||||
{
|
||||
if (Game.IsHost)
|
||||
Game.IssueOrder(Order.Chat(
|
||||
"/lockteams {0}".F(!Game.LobbyInfo.GlobalSettings.LockTeams)));
|
||||
return true;
|
||||
};
|
||||
|
||||
Game.LobbyInfoChanged += UpdatePlayerList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user