private void Dispose()
 {
     background     = null;
     idInput        = null;
     passwordInput  = null;
     loginButton    = null;
     toSignUpButton = null;
 }
Beispiel #2
0
 private void Dispose()
 {
     background       = null;
     roomNameBG       = null;
     chattingView     = null;
     chattingInput    = null;
     roomChangeToggle = null;
     roomNameView     = null;
     roomListViewer   = null;
 }
        private void InitializeComponent()
        {
            #region UI RESOURCE INITIALIZE SOURCE CODE

            /// <summary>
            /// idInput UI Resource Initialize
            /// </summary>
            idInput = new TextInputField("InputField");

            idInput.Position     = new Vector3(705, 177, 0);
            idInput.FieldTexture = D3D9Manager.Instance.FindTexture("NameInput");
            idInput.MaxLength    = 15;
            idInput.StringColor  = new Color(127, 127, 127);
            idInput.StringOffset = new Vector3(30, 6, 0);


            /// <summary>
            /// passwordInput UI Resource Initialize
            /// </summary>
            passwordInput = new TextInputField("InputField");

            passwordInput.Position     = new Vector3(705, 241, 0);
            passwordInput.FieldTexture = D3D9Manager.Instance.FindTexture("NameInput");
            passwordInput.MaxLength    = 15;
            passwordInput.StringColor  = new Color(127, 127, 127);
            passwordInput.StringOffset = new Vector3(30, 6, 0);


            /// <summary>
            /// userNameInput UI Resource Initialize
            /// </summary>
            userNameInput = new TextInputField("InputField");

            userNameInput.Position     = new Vector3(705, 305, 0);
            userNameInput.FieldTexture = D3D9Manager.Instance.FindTexture("NameInput");
            userNameInput.MaxLength    = 15;
            userNameInput.StringColor  = new Color(127, 127, 127);
            userNameInput.StringOffset = new Vector3(30, 6, 0);


            /// <summary>
            /// signUpButton UI Resource Initialize
            /// </summary>
            signUpButton = new Button();

            signUpButton.ButtonTexture     = D3D9Manager.Instance.FindTexture("SignupButton");
            signUpButton.Position          = new Vector3(637, 381, 0);
            signUpButton.Scale             = new Vector3(1.0f, 1.0f, 1.0f);
            signUpButton.IsMouseOverResize = true;
            signUpButton.OnButtonClick    += SignUpButton_OnClick;


            /// <summary>
            /// signUpButton UI Resource Initialize
            /// </summary>
            toSignInButton = new Button();

            toSignInButton.ButtonTexture     = D3D9Manager.Instance.FindTexture("BackButton");
            toSignInButton.Position          = new Vector3(48, 48, 0);
            toSignInButton.Scale             = new Vector3(1.0f, 1.0f, 1.0f);
            toSignInButton.IsMouseOverResize = true;
            toSignInButton.OnButtonClick    += ToSignInButton_OnClick;

            /// <summary>
            /// signUpButton UI Resource Initialize
            /// </summary>
            background = new TextureObject();

            background.Position = new Vector3(ClientWindow.Width / 2, ClientWindow.Height / 2, 0);
            background.Scale    = new Vector3(1, 1, 1);
            background.Texture  = D3D9Manager.Instance.FindTexture("Background");


            /// <summary>
            /// Add To GameObject Manager
            /// </summary>
            GameObjectManager.Instance.AddObject(background);
            GameObjectManager.Instance.AddObject(idInput);
            GameObjectManager.Instance.AddObject(passwordInput);
            GameObjectManager.Instance.AddObject(userNameInput);
            GameObjectManager.Instance.AddObject(signUpButton);
            GameObjectManager.Instance.AddObject(toSignInButton);


            #endregion
        }
        private void InitializeComponent()
        {
            #region UI RESOURCE INITIALIZE SOURCE CODE

            /// <summary>
            /// background UI Resource Initialize
            /// </summary>
            background = new TextureObject();

            background.Position = new Vector3(ClientWindow.Width / 2, ClientWindow.Height / 2, 0);
            background.Scale    = new Vector3(1, 1, 1);
            background.Texture  = D3D9Manager.Instance.FindTexture("Background");

            /// <summary>
            /// idInput UI Resource Initialize
            /// </summary>
            idInput = new TextInputField("InputField");

            idInput.Position     = new Vector3(619, 415, 0);
            idInput.FieldTexture = D3D9Manager.Instance.FindTexture("NameInput");
            idInput.MaxLength    = 15;
            idInput.StringColor  = new Color(127, 127, 127);
            idInput.StringOffset = new Vector3(20, 6, 0);

            /// <summary>
            /// passwordInput UI Resource Initialize
            /// </summary>
            passwordInput = new TextInputField("InputField");

            passwordInput.Position     = new Vector3(619, 472, 0);
            passwordInput.FieldTexture = D3D9Manager.Instance.FindTexture("NameInput");
            passwordInput.MaxLength    = 15;
            passwordInput.StringColor  = new Color(127, 127, 127);
            passwordInput.StringOffset = new Vector3(20, 6, 0);
            passwordInput.PasswordChar = '●';

            /// <summary>
            /// loginButton UI Resource Initialize
            /// </summary>
            loginButton = new Button();

            loginButton.ButtonTexture     = D3D9Manager.Instance.FindTexture("LoginButton");
            loginButton.Position          = new Vector3(850, 443, 0);
            loginButton.Scale             = new Vector3(1.0f, 1.0f, 1.0f);
            loginButton.IsMouseOverResize = true;
            loginButton.OnButtonClick    += LoginButton_OnClick;

            /// <summary>
            /// toSignUpButton UI Resource Initialize
            /// </summary>
            toSignUpButton = new Button();

            toSignUpButton.ButtonTexture     = D3D9Manager.Instance.FindTexture("ToSignupButton");
            toSignUpButton.Position          = new Vector3(100, 670, 0);
            toSignUpButton.Scale             = new Vector3(1.0f, 1.0f, 1.0f);
            toSignUpButton.IsMouseOverResize = true;

            toSignUpButton.OnButtonClick += ToSignUpButton_OnClick;


            GameObjectManager.Instance.AddObject(background);
            GameObjectManager.Instance.AddObject(idInput);
            GameObjectManager.Instance.AddObject(passwordInput);
            GameObjectManager.Instance.AddObject(loginButton);
            GameObjectManager.Instance.AddObject(toSignUpButton);

            #endregion
        }
Beispiel #5
0
        private void InitializeComponent()
        {
            #region UI RESOURCE INITIALIZE SOURCE CODE

            /// <summary>
            /// background UI Resource Initialize
            /// </summary>
            background = new TextureObject();

            background.Position = new Vector3(ClientWindow.Width / 2, ClientWindow.Height / 2, 0);
            background.Scale    = new Vector3(1, 1, 1);
            background.Texture  = D3D9Manager.Instance.CreateTexture("Background", "./Resource/Background3.png");

            /// <summary>
            /// roomNameBG UI Resource Initialize
            /// </summary>
            roomNameBG = new TextureObject();

            roomNameBG.Position = new Vector3(320, 56, 0);
            roomNameBG.Scale    = new Vector3(1, 1, 1);
            roomNameBG.Texture  = D3D9Manager.Instance.CreateTexture("RoomNameBG", "./Resource/RoomName.png");

            /// <summary>
            /// roomChangeToggle UI Resource Initialize
            /// </summary>
            roomChangeToggle = new Button();

            roomChangeToggle.ButtonTexture     = D3D9Manager.Instance.CreateTexture("RoomChange", "./Resource/RoomChange.png");
            roomChangeToggle.Position          = new Vector3(1087, 58, 0);
            roomChangeToggle.Scale             = new Vector3(1.0f, 1.0f, 1.0f);
            roomChangeToggle.IsMouseOverResize = true;
            roomChangeToggle.OnButtonClick    += RoomChangeToggle_OnClick;


            /// <summary>
            /// chattingView UI Resource Initialize
            /// </summary>
            chattingView = new TextList("ChatListFont");

            chattingView.TextDepth = 25;
            chattingView.Position  = new Vector3(30, D3D9Manager.Instance.WindowHeight - 160, 0);

            /// <summary>
            /// chattingInput UI Resource Initialize
            /// </summary>
            chattingInput = new TextInputField("ChatInputFont");

            chattingInput.Position     = new Vector3(549, D3D9Manager.Instance.WindowHeight - 100, 0);
            chattingInput.FieldTexture = D3D9Manager.Instance.FindTexture("ChatInput");
            chattingInput.MaxLength    = 60;
            chattingInput.StringColor  = new Color(127, 127, 127);
            chattingInput.StringOffset = new Vector3(16, 3, 0);
            chattingInput.OnEnter     += ChattingInput_OnEnter;

            /// <summary>
            /// roomNameView UI Resource Initialize
            /// </summary>
            roomNameView = new TextBox();

            roomNameView.Position    = new Vector3(50, 20, 0);
            roomNameView.Text        = ClientManager.Instance.CurrentChatRoom;
            roomNameView.StringColor = new Color(255, 255, 255, 255);
            roomNameView.FontKey     = "RoomTitleFont";

            /// <summary>
            /// roomListViewer UI Resource Initialize
            /// </summary>

            roomListViewer = new NetworkRoomListViewer();

            roomListViewer.Position = new Vector3(1087, 300, 0);
            roomListViewer.IsActive = false;

            GameObjectManager.Instance.AddObject(background);
            GameObjectManager.Instance.AddObject(roomNameBG);
            GameObjectManager.Instance.AddObject(chattingView);
            GameObjectManager.Instance.AddObject(chattingInput);
            GameObjectManager.Instance.AddObject(roomChangeToggle);
            GameObjectManager.Instance.AddObject(roomNameView);
            GameObjectManager.Instance.AddObject(roomListViewer);

            #endregion
        }