Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 1:38 am

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1176 posts ]  Go to page 1, 2, 3, 4, 5 ... 48  Next
Author Message
PostPosted: Sun Sep 21, 2008 1:51 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Difficulty: 0/5 - Very easy to add/use.
Functionality: Made for MS4, good for if TextBox is on the GameScreen(kind of).

Go into frmMirage, & look for "Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)", then add this in:

Code:
    If KeyCode = vbKeyReturn Then
        If txtChat.Visible = False Then
            txtChat.Visible = True
            txtMyChat.Visible = True
            SetFocusOnChat
        Else
            If txtMyChat.Text <> vbNullString Then
                txtChat.Visible = True
                txtMyChat.Visible = True
                Exit Sub
            End If
            txtChat.Visible = False
            txtMyChat.Visible = False
        End If
    End If


It's amde so when you press Enter, it opens. If you press enter with a message, ChatBox stays open, if you press Enter without a message it closes.

ENJOY!


Last edited by Mattyw on Mon Sep 22, 2008 3:12 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Sun Sep 21, 2008 1:53 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Would this interfere with pressing enter to send a message?

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Sun Sep 21, 2008 1:57 am 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
Code:
    If KeyCode = vbKeyReturn Then
            txtChat.Visible = not txtChat.Visible
            txtMyChat.Visible = not txtMyChat.Visible       
    End If


Top
 Profile  
 
PostPosted: Sun Sep 21, 2008 1:59 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Code:
    If KeyCode = vbKeyReturn Then
        txtChat.Visible = Not txtChat.Visible
        txtMyChat.Visible = Not txtMyChat.Visible
        KeyCode = 0
    End If

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Sun Sep 21, 2008 2:06 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Code:
' lol I added a comment
  If KeyCode = vbKeyReturn Then
        txtChat.Visible = Not txtChat.Visible
        txtMyChat.Visible = Not txtMyChat.Visible
        KeyCode = 0
    End If

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
PostPosted: Sun Sep 21, 2008 2:16 am 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
How about adding a frmMirage.Height = blah blah so that it shrinks/enlarges the form when you open/close it.


Top
 Profile  
 
PostPosted: Sun Sep 21, 2008 2:18 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
I have it ontop of my GameScreen, so I'll leave for the PUBLIC to modify. =-p

EDIT: Updated:

Code:
    If KeyCode = vbKeyReturn Then
        If txtText.Visible = False Then
            txtText.Visible = True
            txtChat.Visible = True
            txtMyChat.Visible = True
            SetFocusOnChat
        Else
            If txtMyChat.Text <> vbNullString Then
                txtText.Visible = True
                txtChat.Visible = True
                txtMyChat.Visible = True
                Exit Sub
            End If
            txtText.Visible = False
            txtChat.Visible = False
            txtMyChat.Visible = False
        End If
    End If


If you entered something, ChatBox stays open, if you entered nothing, it closes.


Top
 Profile  
 
PostPosted: Mon Sep 22, 2008 10:40 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
I don't know if it was your code or mine but every time txt.Text showed up I got Variable not defined so I changed all the txt.Text to txt.Chat and it installed properly so My code looks like this
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Call CheckInput(1, KeyCode, Shift)
    If KeyCode = vbKeyF1 Then
    frmAdminPanel.Visible = True
    End If
    If KeyCode = vbKeyReturn Then
        If txtChat.Visible = False Then
            txtChat.Visible = True
            txtChat.Visible = True
            txtMyChat.Visible = True
            SetFocusOnChat
        Else
            If txtMyChat.Text <> vbNullString Then
                txtChat.Visible = True
                txtChat.Visible = True
                txtMyChat.Visible = True
                Exit Sub
            End If
            txtChat.Visible = False
            txtChat.Visible = False
            txtMyChat.Visible = False
        End If
    End If
End Sub

That is my whole Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)


Top
 Profile  
 
PostPosted: Mon Sep 22, 2008 3:11 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
skillzalot wrote:
I don't know if it was your code or mine but every time txt.Text showed up I got Variable not defined so I changed all the txt.Text to txt.Chat and it installed properly so My code looks like this
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Call CheckInput(1, KeyCode, Shift)
    If KeyCode = vbKeyF1 Then
    frmAdminPanel.Visible = True
    End If
    If KeyCode = vbKeyReturn Then
        If txtChat.Visible = False Then
            txtChat.Visible = True
            txtChat.Visible = True
            txtMyChat.Visible = True
            SetFocusOnChat
        Else
            If txtMyChat.Text <> vbNullString Then
                txtChat.Visible = True
                txtChat.Visible = True
                txtMyChat.Visible = True
                Exit Sub
            End If
            txtChat.Visible = False
            txtChat.Visible = False
            txtMyChat.Visible = False
        End If
    End If
End Sub

That is my whole Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

Change/remove txtText, forgot to remove from tut, I used that, but removed & changed with a Dropdown list.


Top
 Profile  
 
PostPosted: Mon Sep 22, 2008 8:11 pm 
Offline
Regular

Joined: Fri Jul 28, 2006 9:20 pm
Posts: 39
Location: <--soemwhere in that general direction
wouldnt this interfere with enter to pick up items? (assuming enter is pick up items)


Top
 Profile  
 
PostPosted: Mon Sep 22, 2008 8:41 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Clu wrote:
wouldnt this interfere with enter to pick up items? (assuming enter is pick up items)


Could, it's why I changed my Pickup to SpaceBar. =-p


Top
 Profile  
 
PostPosted: Tue Feb 17, 2009 1:30 pm 
Offline
Knowledgeable

Joined: Thu Nov 22, 2007 2:59 pm
Posts: 143
Location: London, England
Google Talk: aeronjl+mirage@googlemail.com
Apologies for the necro but I had a look at this and it doesn't work anymore.
In HandleKeyPresses
Code:
If LenB(ChatText) = 0 Then


change that little bit to
Code:
    If LenB(ChatText) = 0 Then
        If KeyAscii = vbKeyReturn Then
            If frmMirage.txtChat.Visible = True Then
                frmMirage.txtChat.Visible = False
                frmMirage.txtMyChat.Visible = False
            Else
                frmMirage.txtMyChat.Visible = True
                frmMirage.txtChat.Visible = True
                SetFocusOnChat
            End If
            Exit Sub
        End If
    End If


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 7:47 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:39 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Econ


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:40 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
50.6


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:41 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:42 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:43 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Unit


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:44 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Girl


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:45 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Toto


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:47 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Stan


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:48 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Mary


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:49 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Pack


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:50 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Sara


Top
 Profile  
 
PostPosted: Tue Dec 28, 2021 7:51 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Oper


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1176 posts ]  Go to page 1, 2, 3, 4, 5 ... 48  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group