Mirage Source

Free ORPG making software.
It is currently Wed Apr 24, 2024 11:25 am

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Sun Aug 17, 2008 10:54 pm 
Offline
Newbie
User avatar

Joined: Sun Aug 17, 2008 9:54 pm
Posts: 3
When you click a menu icon (ex: inventory), it opens.
When you click it again, it closes. Basically, the have icons toggle menus on/off.

Or is this programmable on our side? =D

EDIT: Great work so far gentlemen.


Top
 Profile  
 
PostPosted: Sun Aug 17, 2008 10:58 pm 
Offline
Knowledgeable

Joined: Thu Nov 22, 2007 2:59 pm
Posts: 143
Location: London, England
Google Talk: aeronjl+mirage@googlemail.com
VersionX wrote:

Or is this programmable on our side? =D



Um..how many sides are there?


Top
 Profile  
 
PostPosted: Sun Aug 17, 2008 11:26 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 11, 2007 10:38 pm
Posts: 144
Location: USA - PA :(
VersionX wrote:
When you click a menu icon (ex: inventory), it opens.
When you click it again, it closes. Basically, the have icons toggle menus on/off.


This is very easy to do.
Other engines have this O.o

_________________
Ravuya wrote:
If we didn't have randomness this forum would be full of a bunch of nerdy programmers being racist to Americans.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 12:06 am 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
Code:
Private Sub picInventory_click()
If picInv.Visible = True Then
picInv.Visible = False
Else
picInv.Visible = True
End If
End Sub


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 12:27 am 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 11, 2007 10:38 pm
Posts: 144
Location: USA - PA :(
Anthony wrote:
Code:
Private Sub picInventory_click()
If picInv.Visible = True Then
picInv.Visible = False
Else
picInv.Visible = True
End If
End Sub


See?

_________________
Ravuya wrote:
If we didn't have randomness this forum would be full of a bunch of nerdy programmers being racist to Americans.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 1:24 am 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
Anthony wrote:
Code:
Private Sub picInventory_click()
If picInv.Visible = True Then
picInv.Visible = False
Else
picInv.Visible = True
End If
End Sub


Or

Code:
Private Sub picInventory_click()
picInv.Visible = not picinv.visible
End Sub


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 12:02 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Dugor wins one gold star.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 12:09 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
I love Gold Stars.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 12:13 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
I love you.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 12:35 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 11, 2007 10:38 pm
Posts: 144
Location: USA - PA :(
I'm terrified.

_________________
Ravuya wrote:
If we didn't have randomness this forum would be full of a bunch of nerdy programmers being racist to Americans.


Top
 Profile  
 
PostPosted: Thu Aug 21, 2008 2:17 am 
Offline
Newbie
User avatar

Joined: Sun Aug 17, 2008 9:54 pm
Posts: 3
Dugor wrote:

Code:
Private Sub picInventory_click()
picInv.Visible = not picinv.visible
End Sub


Is there a better/less-verbose way to toggle the spells, it looks different:
Code:
Dim spellsVisible as Boolean

Private Sub Form_Load()
    frmMirage.Width=10080
    spellsVisible = false
End Sub

Private Sub picSpells_Click()
    If Not spellsVisible Then
        Call SendData("spells" & END_CHAR)
    Else
        Call lblSpellsCancel_Click
    End If
    spellsVisible = Not spellsVisible
End Sub


Top
 Profile  
 
PostPosted: Thu Aug 21, 2008 2:33 am 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
You shouldn't need to create a boolean. All you need is picSpells.Visible = not picSpells.Visible.

Dugors code is just using the opposite of it's value which is already there. You shouldn't have to make anything else.


Top
 Profile  
 
PostPosted: Thu Aug 21, 2008 5:45 am 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
No, he's just saying you don't need to code exery little thing. Pictureboxes have a .Visible property which is already like a Boolean variable.

Code:
Private Sub picSpells_Click()
    picPlayerSpells.Visible = not picPlayerSpells.Visible
    If picPlayerSpells.Visible = True Then
        CallSendData("spells" & END_CHAR)
    End If
End Sub

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 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