mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
56 lines
987 B
C#
56 lines
987 B
C#
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using SanAndreasUnity.Utilities;
|
|||
|
using SanAndreasUnity.Net;
|
|||
|
|
|||
|
namespace SanAndreasUnity.UI
|
|||
|
{
|
|||
|
|
|||
|
public class JoinGameWindow : PauseMenuWindow
|
|||
|
{
|
|||
|
string m_ip = "";
|
|||
|
string m_port = NetManager.defaultListenPortNumber.ToString();
|
|||
|
|
|||
|
|
|||
|
JoinGameWindow()
|
|||
|
{
|
|||
|
|
|||
|
// set default parameters
|
|||
|
|
|||
|
this.windowName = "Join Game";
|
|||
|
this.useScrollView = true;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
void Start ()
|
|||
|
{
|
|||
|
// adjust rect
|
|||
|
this.windowRect = GUIUtils.GetCenteredRect(new Vector2(550, 300));
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
protected override void OnWindowGUI ()
|
|||
|
{
|
|||
|
|
|||
|
GUILayout.Label ("IP:");
|
|||
|
m_ip = GUILayout.TextField(m_ip);
|
|||
|
|
|||
|
GUILayout.Label ("Port:");
|
|||
|
m_port = GUILayout.TextField(m_port);
|
|||
|
|
|||
|
GUILayout.Space(40);
|
|||
|
|
|||
|
if (GUILayout.Button("Connect", GUILayout.MinWidth(80), GUILayout.MinHeight(30)))
|
|||
|
Connect();
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
void Connect()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}
|