Mirage Source

Free ORPG making software.
It is currently Fri May 24, 2024 8:23 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Removing more forms
PostPosted: Thu Apr 02, 2009 3:11 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
The map editor attributes use a lot of forms...we could merge them all into 1 form.

On the form make 3 scroll bars: scrlData(1 To 3), lblData(1 To 3)

Then we make Public MapEditorTileData(1 To 3) save the settings and we make MapEditorDataName(1 to 3) so we can change the label captions.

Now convert all the option buttons to optAttribute(1 To total attributes) and the code would be like this:

(very pseudo code)
Code:
Private Sub optAttribute_Click(Index As Integer)
Select case index
    case TILE_TYPE_ITEM
        With frmAttribute
            MapEditorDataName(1) = "Item: 0"
            MapEditorTileData(1) = 0
            MapEditorTileData(2) = 0
            MapEditorTileData(3) = 0
            lblData(1).Caption = MapEditorDataName(1)
            lblData(2).Visible = False
            lblData(3).Visible = False
            scrlData(1).Max = MAX_ITEMS
            scrlData(2).Visible = False
            scrlData(3).Visible = False
        End With
end select
End Sub


Then on the scrlData(Index) whatever:

lblData(Index).Caption = MapEditorDataName(Index) & ": " & scrlData(Index).Value
MapEditorTileData(Index) = scrlData(Index).Value

Well I hope you get the idea.

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

Image
Image


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Group