Jump to content

  • Log In with Google      Sign In   
  • Create Account


Landi20

Member Since 14 Feb 2012
Offline Last Active Aug 19 2014 09:15 AM

Posts I've Made

In Topic: how remove a model

15 August 2014 - 09:46 AM

ok thanks


In Topic: how remove a model

15 August 2014 - 07:15 AM

i using sharpdx and i programaing in c#


In Topic: how remove a model

15 August 2014 - 05:38 AM

i find the soluction i only have to add a new line of code

 

this.Game.GameSystems.Remove(this);


In Topic: how remove a model

15 August 2014 - 04:56 AM

but i don´t know how remove the model

i find soluction

with this code

 this.Game.GameSystems.Remove(this);


In Topic: problem with keyboard input

11 August 2014 - 06:29 PM

i find the soluction is very simple only subistute this line for this code

 KeyboardState currentKeyboardState = NeoManager.KeyboardManager.GetState();

i have a another problem when i using the chat press in key i and press key b open a new window i using neoforce to make my game

i want only open a new window or move my character when is not focus in the chat

what happen is en i write in chat we write in console and move my character your open  a new window

this is my code

 private void InitConsole(string texto)
        {
            tbc = new TomShane.Neoforce.Controls.TabControl(NeoManager);
            //   tbc.BackColor = new Color(10, 12, 3);
            TomShane.Neoforce.Controls.Console con1 = new TomShane.Neoforce.Controls.Console(NeoManager);
            TomShane.Neoforce.Controls.Console con2 = new TomShane.Neoforce.Controls.Console(NeoManager);


            tbc.Visible = true;
            //  con2.BackColor
            // Setup of TabControl, which will be holding both consoles
            tbc.Init();
            tbc.AddPage("Global");
            tbc.AddPage("Guild");
            tbc.AddPage("PARTY");
            tbc.AddPage("TRADE");

            tbc.Alpha = 220;
            tbc.Left = 0;
            tbc.Height = 220;
            tbc.Width = 450;
            tbc.Top = NeoManager.TargetHeight - tbc.Height - 32;

            tbc.Movable = true;
            tbc.Resizable = true;
            tbc.MinimumHeight = 96;
            tbc.MinimumWidth = 160;

            tbc.TabPages[0].Add(con1);
            tbc.TabPages[1].Add(con2);
            NeoManager.Add(tbc);
            //tbc.StayOnTop = true;
            tbc.TabPages[0].TextColor = new Color(12, 12, 12);
            tbc.TabPages[1].TextColor = new Color(250, 250, 250);
            con1.Init();
            con1.Sender = texto;
            con2.Init();
            con2.Sender = texto;

         


            con2.Width = con1.Width = tbc.TabPages[0].ClientWidth;
            con2.Height = con1.Height = tbc.TabPages[0].ClientHeight;
            con2.Anchor = con1.Anchor = Anchors.All;

            con1.Channels.Add(new ConsoleChannel(0, "General", SharpDX.Color.Orange));
            con1.Channels.Add(new ConsoleChannel(1, "Private", SharpDX.Color.White));
            con1.Channels.Add(new ConsoleChannel(2, "System", SharpDX.Color.Yellow));
            con1.Channels.Add(new ConsoleChannel(3, "Guild", SharpDX.Color.Green));
            con1.Channels.Add(new ConsoleChannel(4, "Trade", SharpDX.Color.Red));

            // We want to share channels and message buffer in both consoles
            con2.Channels = con1.Channels;
            con2.MessageBuffer = con1.MessageBuffer;

            // In the second console we display only "Private" messages
            con2.ChannelFilter.Add(3);

            // Select default channels for each tab
            con1.SelectedChannel = 0;
            con2.SelectedChannel = 3;

            // Do we want to add timestamp or channel name at the start of every message?
            con1.MessageFormat = ConsoleMessageFormats.All;
            con2.MessageFormat = ConsoleMessageFormats.All;


            // Handler for altering incoming message
            con1.MessageSent += new ConsoleMessageEventHandler(con1_MessageSent);

            // We send initial welcome message to System channel
            con1.MessageBuffer.Add(new ConsoleMessage("System", "WELCOME TO THE SERVER! " + texto, 2));

            NeoManager.Add(tbc);
        }
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        void con1_MessageSent(object sender, ConsoleMessageEventArgs e)
        {
            if (e.Message.Channel == 0)
            {
                //e.Message.Text = "(!) " + e.Message.Text;
            }
        }

the keyboard input its in first post

i call the function

 public override void Update(GameTime gameTime)
        {
          
            HandleInput();
            base.Update(gameTime);

        }

PARTNERS