Hi all, i've just got a few questions, if anyone knows the answers to any, then all help is appreciated.
First, i have an issue with menus, why is it then when you have a large menu, it works fine, but in my menubar building code below, i added some images, (to load, save, undo, red, settings, ect), it will still compile, but using images in the menus seems to mess it up and cause it to crash occasionally when there is no reason to, Has this been fixed in any version of BlueGui out there.
` Create MenuBar ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mMenuBar As Integer : mMenubar = CreateMenu(DBWin)
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mFile As Integer : mFile = CreateMenuSub( mMenubar ,"&File" ,"" )
Global mNew As Integer : mNew = CreateMenuItem(mFile ,"&New" ,AppPath$+"Images\New.bmp" )
Global mOpen As Integer : mOpen = CreateMenuItem(mFile ,"&Open" ,AppPath$+"Images\Open.bmp" )
Global mRecent As Integer : mRecent = CreateMenuSub( mFile ,"&Recent" ,"" )
` Dim mRecentData(9) As Integer : For n = 1 to 10 : Temp$ = Get Registry$("SOFTWARE\DarkBasic World Creator","RecentDocument"+Str$(n)) : If Temp$ <> "" : mRecentData(n-1) = CreateMenuItem(mRecent,Temp$,"") : EndIf : Next n
Global mSave As Integer : mSave = CreateMenuItem(mFile ,"&Save" ,AppPath$+"Images\Save.bmp" )
Global mSaveAs As Integer : mSaveAs = CreateMenuItem(mFile ,"Save &As" ,"" ) : AddMenuSplitter mFile
Global mExportDBCode As Integer : mExportDBCode = CreateMenuItem(mFile ,"Export DarkBasic Code" ,"" ) : AddMenuSplitter mFile
Global mAssociateFormats As Integer : mAssociateFormats = CreateMenuItem(mFile ,"Associate File Formats" ,"" ) : AddMenuSplitter mFile
Global mExit As Integer : mExit = CreateMenuItem(mFile ,"E&xit" ,"" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mEdit As Integer : mEdit = CreateMenuSub( mMenubar ,"&Edit" ,"" )
Global mUndo As Integer : mUndo = CreateMenuItem(mEdit ,"&Undo" ,AppPath$+"Images\Undo.bmp" )
Global mRedo As Integer : mRedo = CreateMenuItem(mEdit ,"&Redo" ,AppPath$+"Images\Redo.bmp" ) : AddMenuSplitter mEdit
Global mGameSettings As Integer : mGameSettings = CreateMenuItem(mEdit ,"&Game Settings" ,AppPath$+"Images\Game Settings.bmp" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mView As Integer : mView = CreateMenuSub( mMenubar ,"&View" ,"" )
Global mShowStatusbar As Integer : mShowStatusbar = CreateMenuItem(mView ,"Show &Statusbar" ,"" )
Global mShowToolbar As Integer : mShowToolbar = CreateMenuItem(mView ,"Show &Toolbar" ,"" )
Global mShowTabs As Integer : mShowTabs = CreateMenuItem(mView ,"Show T&abs" ,"" ) : AddMenuSplitter mView
Global mShowProjectManager As Integer : mShowProjectManager = CreateMenuItem(mView ,"Show Project &Manager" ,"" )
Global mShowProperties As Integer : mShowProperties = CreateMenuItem(mView ,"Show &Properties" ,"" )
Global mShowNotes As Integer : mShowNotes = CreateMenuItem(mView ,"Show Project &Notes" ,"" )
Global mShowCamWin As Integer : mShowCamWin = CreateMenuItem(mView ,"Show &Camera Controls" ,"" ) : AddMenuSplitter mView
Global mShowStatistics As Integer : mShowStatistics = CreateMenuItem(mView ,"Project &Statistics" ,"" ) : AddMenuSplitter mView
Global mHardwareInfo As Integer : mHardwareInfo = CreateMenuItem(mView ,"&Hardware Information" ,AppPath$+"Images\Hardware.bmp" )
Global mSettings As Integer : mSettings = CreateMenuItem(mView ,"&Settings" ,AppPath$+"Images\Settings.bmp" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mTools As Integer : mTools = CreateMenuSub( mMenubar ,"&Tools" ,"" )
Dim mToolDim(10) As Integer : Set Dir AppPath$+"Tools\" : Perform Checklist For Files : For v = 3 to Checklist Quantity() : Add To Stack mToolDim() : mToolDim(Array Count(mToolDim())) = CreateMenuItem(mTools,Checklist String$(v),"") : Next v : Empty Checklist
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mWindow As Integer : mWindow = CreateMenuSub( mMenubar ,"&Window" ,"" )
Global mWindowAlignL As Integer : mWindowAlignL = CreateMenuItem(mWindow ,"Align &Left" ,AppPath$+"Images\Align Left.bmp" )
Global mWindowAlignR As Integer : mWindowAlignR = CreateMenuItem(mWindow ,"Align &Right" ,AppPath$+"Images\Align Right.bmp" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mHelp As Integer : mHelp = CreateMenuSub( mMenubar ,"&Help" ,"" )
Global mshowhelp As Integer : mShowHelp = CreateMenuItem(mHelp ,"&Help" ,"" )
Global mHelpOnline As Integer : mHelpOnline = CreateMenuSub( mHelp ,"&Online" ,"" )
Global mHelpDBForum As Integer : mHelpDBForum = CreateMenuItem(mHelpOnline ,"DarkBasic &Forum" ,"" )
Global mHelpCodeBase As Integer : mHelpCodeBase = CreateMenuItem(mHelpOnline ,"DarkBasic &CodeBase" ,"" )
Global mHelpCodeBase2 As Integer : mHelpCodeBase2 = CreateMenuItem(mHelpOnline ,"&Unofficial CodeBase" ,"" )
Global mHelpReport As Integer : mHelpReport = CreateMenuItem(mHelp ,"&Report A Problem" ,"" )
Global mHelpAbout As Integer : mHelpAbout = CreateMenuItem(mHelp ,"&About" ,"" )
` Create Right Click Menu's ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mSkySphere As Integer : mSkySphere = CreatePopupMenu()
Global mSkySphereChange As Integer : mSkySphereChange = CreateMenuItem(mSkySphere ,"&Change SkySphere" ,"" )
Global mSkySphereRemove As Integer : mSkySphereRemove = CreateMenuItem(mSkySphere ,"&Remove SkySphere" ,"" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mSkySphere2 As Integer : mSkySphere2 = CreatePopupMenu()
Global mSkySphereAdd As Integer : mSkySphereAdd = CreateMenuItem(mSkySphere2 ,"&Add SkySphere" ,"" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mZones As Integer : mZones = CreatePopupMenu()
Global mZonesPosition As Integer : mZonesPosition = CreateMenuItem(mZones ,"&Position Zone" ,"" )
Global mZonesResize As Integer : mZonesResize = CreateMenuItem(mZones ,"&Resize Zone" ,"" ) : AddMenuSplitter mZones
Global mZonesHide As Integer : mZonesHide = CreateMenuItem(mZones ,"&Hide Zone" ,"" ) : AddMenuSplitter mZones
Global mZonesSelectMusic As Integer : mZonesSelectMusic = CreateMenuItem(mZones ,"&Select Background Music" ,"" )
Global mZonesLoopMusic As Integer : mZonesLoopMusic = CreateMenuItem(mZones ,"&Loop Background Music" ,"" ) : AddMenuSplitter mZones
Global mZonesSelect3DSound As Integer : mZonesSelect3DSound = CreateMenuItem(mZones ,"&Select 3D Sound" ,"" )
Global mZonesLoop3DSound As Integer : mZonesLoop3DSound = CreateMenuItem(mZones ,"&Loop 3D Sound" ,"" ) : AddMenuSplitter mZones
Global mZonesDelete As Integer : mZonesDelete = CreateMenuItem(mZones ,"&Delete Zone" ,"" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mObject As Integer : mObject = CreatePopupMenu()
Global mObjectPreview As Integer : mObjectPreview = CreateMenuItem(mObject ,"Pre&view" ,"" ) : AddMenuSplitter mObject
Global mObjectTile As Integer : mObjectTile = CreateMenuItem(mObject ,"&Tile Object" ,"" )
Global mObjectClone As Integer : mObjectClone = CreateMenuItem(mObject ,"&Clone Object" ,"" ) : AddMenuSplitter mObject
Global mObjectPosition As Integer : mObjectPosition = CreateMenuItem(mObject ,"&Position Object" ,"" )
Global mObjectRotate As Integer : mObjectRotate = CreateMenuItem(mObject ,"&Rotate Object" ,"" )
Global mObjectResize As Integer : mObjectResize = CreateMenuItem(mObject ,"Re&size Object" ,"" ) : AddMenuSplitter mObject
Global mObjectTexturing As Integer : mObjectTexturing = CreateMenuSub( mObject ,"Object &Texture" ,"" )
Global mObjectTexture As Integer : mObjectTexture = CreateMenuItem(mObjectTexturing ,"&Select Object Texture" ,"" )
Global mObjectRemoveTexture As Integer : mObjectRemoveTexture = CreateMenuItem(mObjectTexturing ,"&Remove Object Texture" ,"" )
Global mObjectEditTexture As Integer : mObjectEditTexture = CreateMenuItem(mObjectTexturing ,"&Edit Object Texture" ,"" ) : AddMenuSplitter mObjectTexturing
Global mObjectTextureWithAVI As Integer : mObjectTextureWithAVI = CreateMenuItem(mObjectTexturing ,"&Texture With AVI" ,"" )
Global mObjectTextureWithCamera As Integer : mObjectTextureWithCamera = CreateMenuItem(mObjectTexturing ,"&Texture With Camera" ,"" )
Global mObjectColor As Integer : mObjectColor = CreateMenuItem(mObject ,"&Color Object" ,"" ) : AddMenuSplitter mObject
Global mObjectShaders As Integer : mObjectShaders = CreateMenuSub( mObject ,"&Shaders" ,"" ) : AddMenuSplitter mObject
Global mObjectSHologram As Integer : mObjectSHologram = CreateMenuItem(mObjectShaders ,"&Hologram White" ,"" )
Global mObjectSPhongHologram As Integer : mObjectSPhongHologram = CreateMenuItem(mObjectShaders ,"&Hologram Blue" ,"" )
Global mObjectSUFOGlass As Integer : mObjectSUFOGlass = CreateMenuItem(mObjectShaders ,"Crystal And &Glass" ,"" )
Global mObjectSCartoon As Integer : mObjectSCartoon = CreateMenuItem(mObjectShaders ,"&Cartoon" ,"" )
Global mObjectSMetal As Integer : mObjectSMetal = CreateMenuItem(mObjectShaders ,"&Metal" ,"" )
Global mObjectSSphereMapping As Integer : mObjectSSphereMapping = CreateMenuItem(mObjectShaders ,"&Sphere Mapping" ,"" )
Global mObjectSReliefMapping As Integer : mObjectSRelief = CreateMenuSub( mObjectShaders ,"&Relief Mapping" ,"" )
Global mObjectSReliefMappingOpen As Integer : mObjectSReliefOpen = CreateMenuItem(mObjectSRelief ,"&Open Relief Mapping Image" ,"" ) : AddMenuSplitter mObjectSRelief
Dim mShaderReliefDim(0) As Integer : Set Dir AppPath$+"Resources\FX\Relief Mapping\Defaults\" : Perform Checklist For Files : For Value = 3 to Checklist Quantity() : Add To Stack mShaderReliefDim() : mShaderReliefDim(Array Count(mShaderReliefDim())) = CreateMenuItem(mObjectSRelief ,Checklist String$(Value) ,"") : Next Value : Empty Checklist
Global mObjectSOffsetMapping As Integer : mObjectSOffsetMapping = CreateMenuItem(mObjectShaders ,"&Rock Wall, (Offset Mapping)" ,"" )
Global mObjectSFallingCover As Integer : mObjectSFallingCover = CreateMenuSub( mObjectShaders ,"&Falling Cover" ,"" )
Global mObjectSFallingCoverOpen As Integer : mObjectSFallingCoverOpen = CreateMenuItem(mObjectSFallingCover,"&Open Falling Cover Texture" ,"" ) : AddMenuSplitter mObjectSFallingCover
Dim mShaderFallingCoverDim(0) As Integer : Set Dir AppPath$+"Resources\FX\Falling Cover\Defaults\" : Perform Checklist For Files : For Value = 3 to Checklist Quantity() : Add To Stack mShaderFallingCoverDim() : mShaderFallingCoverDim(Array Count(mShaderFallingCoverDim())) = CreateMenuItem(mObjectSFallingCover,Fast Left$(Checklist String$(Value),Len(Checklist String$(Value))-4),"") : Next Value : Empty Checklist
Global mObjectSFur As Integer : mObjectSFur = CreateMenuSub( mObjectShaders ,"&Fur" ,"" )
Global mObjectSReliefMappingOpen As Integer : mObjectSReliefOpen = CreateMenuItem(mObjectSFur ,"&Open Fur Mask Image" ,"" ) : AddMenuSplitter mObjectSFur
Dim mShaderFurDim(0) As Integer : Set Dir AppPath$+"Resources\FX\Fur\Defaults\" : Perform Checklist For Files : For Value = 3 to Checklist Quantity() : Add To Stack mShaderFurDim() : mShaderFurDim(Array Count(mShaderFurDim())) = CreateMenuItem(mObjectSFur ,Fast Left$(Checklist String$(Value),Len(Checklist String$(Value))-4),"") : Next Value : Empty Checklist
Global mObjectSReflection As Integer : mObjectSReflection = CreateMenuItem(mObjectShaders ,"&Reflection" ,"" )
Global mObjectCull As Integer : mObjectCull = CreateMenuItem(mObject ,"&Cull Object" ,"" )
Global mObjectGhost As Integer : mObjectGhost = CreateMenuItem(mObject ,"&Ghost Object" ,"" )
Global mObjectReflective As Integer : mObjectReflective = CreateMenuItem(mObject ,"&Reflective" ,"" )
Global mObjectWireFrame As Integer : mObjectWireFrame = CreateMenuItem(mObject ,"&WireFrame" ,"" )
Global mObjectBounds As Integer : mObjectBounds = CreateMenuItem(mObject ,"&Bounds" ,"" )
Global mObjectHide As Integer : mObjectHide = CreateMenuItem(mObject ,"&Hide Object" ,"" ) : AddMenuSplitter mObject
Global mObjectBehaviour As Integer : mObjectBehaviour = CreateMenuSub( mObject ,"&Behaviour" ,"" )
Global mObjectFlamable As Integer : mObjectFlamable = CreateMenuItem(mObjectBehaviour ,"Object &Flamable" ,"" )
Global mObjectExplosive As Integer : mObjectExplosive = CreateMenuItem(mObjectBehaviour ,"Object &Explosive" ,"" )
Global mObjectBreakable As Integer : mObjectBreakable = CreateMenuItem(mObjectBehaviour ,"Object &Breakable" ,"" )
Global mObjectMaterial As Integer : mObjectMaterial = CreateMenuSub( mObject ,"&Material" ,"" ) : AddMenuSplitter mObject
Global mObjectMaterialNone As Integer : mObjectMaterialNone = CreateMenuItem(mObjectMaterial ,"&None" ,"" ) : AddMenuSplitter mObjectMaterial
Global mObjectMaterialCarpet As Integer : mObjectMaterialCarpet = CreateMenuItem(mObjectMaterial ,"&Carpet" ,"" )
Global mObjectMaterialGlass As Integer : mObjectMaterialGlass = CreateMenuItem(mObjectMaterial ,"&Glass" ,"" )
Global mObjectMaterialGrass As Integer : mObjectMaterialGrass = CreateMenuItem(mObjectMaterial ,"&Grass" ,"" )
Global mObjectMaterialHallway As Integer : mObjectMaterialHallway = CreateMenuItem(mObjectMaterial ,"&Hallway" ,"" )
Global mObjectMaterialMetal As Integer : mObjectMaterialMetal = CreateMenuItem(mObjectMaterial ,"&Metal" ,"" )
Global mObjectMaterialStone As Integer : mObjectMaterialStone = CreateMenuItem(mObjectMaterial ,"&Stone" ,"" )
Global mObjectMaterialWater As Integer : mObjectMaterialWater = CreateMenuItem(mObjectMaterial ,"&Water" ,"" )
Global mObjectMaterialWood As Integer : mObjectMaterialWood = CreateMenuItem(mObjectMaterial ,"&Wood" ,"" )
Global mObjectAnim As Integer : mObjectAnim = CreateMenuSub( mObject ,"&Animation" ,"" ) : AddMenuSplitter mObject
Global mObjectAnimPlay As Integer : mObjectAnimPlay = CreateMenuItem(mObjectAnim ,"&Play" ,"" )
Global mObjectAnimPause As Integer : mObjectAnimPause = CreateMenuItem(mObjectAnim ,"&Pause" ,"" )
Global mObjectAnimStop As Integer : mObjectAnimStop = CreateMenuItem(mObjectAnim ,"&Stop" ,"" ) : AddMenuSplitter mObjectAnim
Global mObjectAnimNext As Integer : mObjectAnimNext = CreateMenuItem(mObjectAnim ,"&Next Frame" ,"" )
Global mObjectAnimPrevious As Integer : mObjectAnimPrevious = CreateMenuItem(mObjectAnim ,"&Previous Frame" ,"" )
Global mObjectSave As Integer : mObjectSave = CreateMenuSub( mObject ,"&Export Object" ,"" )
Global mObjectSaveDBO As Integer : mObjectSaveDBO = CreateMenuItem(mObjectSave ,"Export DarkBasic Object (&dbo)" ,"" )
Global mObjectSaveX As Integer : mObjectSaveX = CreateMenuItem(mObjectSave ,"Export DirectX Object (&x)" ,"" )
Global mObjectFPSCExport As Integer : mObjectFPSCExport = CreateMenuItem(mObjectSave ,"Export &FPSC Entity" ,"" ) : AddMenuSplitter mObject
Global mObjectDelete As Integer : mObjectDelete = CreateMenuItem(mObject ,"&Delete Object" ,"" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mLight As Integer : mLight = CreatePopupMenu()
Global mLightClone As Integer : mLightClone = CreateMenuItem(mLight ,"&Clone Light" ,"" ) : AddMenuSplitter mLight
Global mLightPosition As Integer : mLightPosition = CreateMenuItem(mLight ,"&Position Light" ,"" )
Global mLightRotate As Integer : mLightRotate = CreateMenuItem(mLight ,"&Rotate Light" ,"" )
Global mLightColor As Integer : mLightColor = CreateMenuItem(mLight ,"&Color Light" ,"" ) : AddMenuSplitter mLight
Global mLightDelete As Integer : mLightDelete = CreateMenuItem(mLight ,"&Delete Light" ,"" )
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Global mWater As Integer : mWater = CreatePopupMenu()
Global mWaterTextureSize As Integer : mWaterTextureSize = CreateMenuSub( mWater ,"&Texture Size" ,"" ) : AddMenuSplitter mWater
Global mWaterTextureSize1024 As Integer : mWaterTextureSize1024 = CreateMenuItem(mWaterTextureSize ,"&1024" ,"" )
Global mWaterTextureSize512 As Integer : mWaterTextureSize512 = CreateMenuItem(mWaterTextureSize ,"&512" ,"" )
Global mWaterTextureSize256 As Integer : mWaterTextureSize256 = CreateMenuItem(mWaterTextureSize ,"&256" ,"" )
Global mWaterReflection As Integer : mWaterReflection = CreateMenuItem(mWater ,"Enable Ref&lection" ,"" ) : SetMenuItemChecked mWater,mWaterReflection,1
Global mWaterRefraction As Integer : mWaterRefraction = CreateMenuItem(mWater ,"Enable Ref&raction" ,"" ) : AddMenuSplitter mWater
Global mWaterDelete As Integer : mWaterDelete = CreateMenuItem(mWater ,"&Delete Water" ,"" ) : SetMenuItemChecked mWater,mWaterRefraction,1 : SetMenuItemChecked mWaterTextureSize,mWaterTextureSize1024,1
` ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Return
Second, I know that the Source code was released and a member on the forum updated it somewhat, what's the newest version available, and does anyone know where i can get a list of updates, (im still using the original BlueGui2 DLL at the mo)