Domino_ Posted August 19, 2012 Author Share Posted August 19, 2012 > **About and Video**> > Coded for EverEmber because there were some people with their skins and the didnt look bad.> > So if you will add this in your projec you will be avalable to change game look. (only graphic)> > [media]http://youtu.be/UFmNrUhy30s[/media]> > This is not tutorial for video gui change because i'v lost my source for this, just made bit different. xD> **Let's start.**> > **(**Client Side Only**)**> > * In **modGeneral**> * afther **Public Sub Main()** add> > ```> > Dim StyleNum As Long, Style As String> > > ```> * Find **Public Sub Main()** and afther **Load frmMenu** add> > ```> > 'add name of gui> > frmMenu.CmbStyle.AddItem "Original"> > frmMenu.CmbStyle.AddItem "Dragon"> > StyleNum = Options.GUI> > 'load gui name> > If StyleNum = 0 Then Style = "Original"> > If StyleNum = 1 Then Style = "Dragon"> > > ```> To make more options to choose just add> > ```> > frmMenu.CmbStyle.AddItem "Third theme"> > > ```> and> > ```> > If StyleNum = 2 Then Style = "Third theme"> > > ```> * Change> > ```> > ' Check if the directory is there, if its not make it> > ChkDir App.Path & "\data files\", "graphics"> > ChkDir App.Path & "\data files\graphics\", "animations"> > ChkDir App.Path & "\data files\graphics\", "characters"> > ChkDir App.Path & "\data files\graphics\", "items"> > ChkDir App.Path & "\data files\graphics\", "paperdolls"> > ChkDir App.Path & "\data files\graphics\", "resources"> > ChkDir App.Path & "\data files\graphics\", "spellicons"> > ChkDir App.Path & "\data files\graphics\", "tilesets"> > ChkDir App.Path & "\data files\graphics\", "faces"> > ChkDir App.Path & "\data files\graphics\", "gui"> > ChkDir App.Path & "\data files\graphics\gui\", "menu"> > ChkDir App.Path & "\data files\graphics\gui\", "main"> > ChkDir App.Path & "\data files\graphics\gui\menu\", "buttons"> > ChkDir App.Path & "\data files\graphics\gui\main\", "buttons"> > ChkDir App.Path & "\data files\graphics\gui\main\", "bars"> > ChkDir App.Path & "\data files\", "logs"> > ChkDir App.Path & "\data files\", "maps"> > ChkDir App.Path & "\data files\", "music"> > ChkDir App.Path & "\data files\", "sound"> > > ```> to> > ```> > ' Check if the directory is there, if its not make it> > ChkDir App.Path & "\data files\", "graphics"> > ChkDir App.Path & "\data files\graphics\", "animations"> > ChkDir App.Path & "\data files\graphics\", "characters"> > ChkDir App.Path & "\data files\graphics\", "items"> > ChkDir App.Path & "\data files\graphics\", "paperdolls"> > ChkDir App.Path & "\data files\graphics\", "resources"> > ChkDir App.Path & "\data files\graphics\", "spellicons"> > ChkDir App.Path & "\data files\graphics\", "tilesets"> > ChkDir App.Path & "\data files\graphics\", "faces"> > ChkDir App.Path & "\data files\graphics\", "gui"> > ChkDir App.Path & "\data files\graphics\gui\" & Style & "\", "menu"> > ChkDir App.Path & "\data files\graphics\gui\" & Style & "\", "main"> > ChkDir App.Path & "\data files\graphics\gui\" & Style & "\menu\", "buttons"> > ChkDir App.Path & "\data files\graphics\gui\" & Style & "\main\", "buttons"> > ChkDir App.Path & "\data files\graphics\gui\" & Style & "\main\", "bars"> > ChkDir App.Path & "\data files\", "logs"> > ChkDir App.Path & "\data files\", "maps"> > ChkDir App.Path & "\data files\", "music"> > ChkDir App.Path & "\data files\", "sound"> > > ```> * Change sub **Public Sub loadGUI** to> > ```> > Public Sub loadGUI(Optional ByVal loadingScreen As Boolean = False)> > Dim i As Long> > Dim StyleNum As Long, Style As String> > ' if we can't find the interface> > On Error GoTo errorhandler> > > > LoadOptions> > StyleNum = Options.GUI> > If StyleNum = 0 Then Style = "Original"> > If StyleNum = 1 Then Style = "Dragon"> > If StyleNum >= 2 Then Style = "Original"> > > > ' loading Screen> > If loadingScreen Then> > frmLoad.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\menu\loading.jpg")> > Exit Sub> > End If ' menu> > frmMenu.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\menu\background.jpg")> > frmMenu.picMain.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\menu\main.jpg")> > frmMenu.picLogin.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\menu\login.jpg")> > frmMenu.picRegister.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\menu\register.jpg")> > frmMenu.picCredits.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\menu\credits.jpg")> > frmMenu.picCharacter.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\menu\character.jpg")> > ' main> > frmMain.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\main.jpg")> > frmMain.picInventory.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\inventory.jpg")> > frmMain.picCharacter.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\character.jpg")> > frmMain.picSpells.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\skills.jpg")> > frmMain.picOptions.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\options.jpg")> > frmMain.picParty.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\party.jpg")> > frmMain.picItemDesc.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\description_item.jpg")> > frmMain.picSpellDesc.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\description_spell.jpg")> > frmMain.picTempInv.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\dragbox.jpg")> > frmMain.picTempBank.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\dragbox.jpg")> > frmMain.picTempSpell.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\dragbox.jpg")> > frmMain.picShop.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\shop.jpg")> > frmMain.picBank.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\bank.jpg")> > frmMain.picTrade.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\trade.jpg")> > frmMain.picHotbar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\hotbar.jpg")> > ' main - bars> > frmMain.imgHPBar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\bars\health.jpg")> > frmMain.imgMPBar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\bars\spirit.jpg")> > frmMain.imgEXPBar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\bars\experience.jpg")> > ' main - party bars> > For i = 1 To MAX_PARTY_MEMBERS> > frmMain.imgPartyHealth(i).Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\bars\party_health.jpg")> > frmMain.imgPartySpirit(i).Picture = LoadPicture(App.Path & "\data files\graphics\gui\" & Style & "\main\bars\party_spirit.jpg")> > Next> > > > ' store the bar widths for calculations> > HPBar_Width = frmMain.imgHPBar.width> > SPRBar_Width = frmMain.imgMPBar.width> > EXPBar_Width = frmMain.imgEXPBar.width> > ' party> > Party_HPWidth = frmMain.imgPartyHealth(1).width> > Party_SPRWidth = frmMain.imgPartySpirit(1).width> > > > Exit Sub> > > > ' let them know we can't load the GUI> > errorhandler:> > MsgBox "Cannot find one or more interface images." & vbNewLine & "If they exist then you have not extracted the project properly." & vbNewLine & "Please follow the installation instructions fully.", vbCritical> > DestroyGame> > Exit Sub> > End Sub> > > ```> * Change sub **Public Sub renderButton_Menu(ByVal buttonNum As Long)** to> > ```> > Public Sub renderButton_Menu(ByVal buttonNum As Long)> > Dim bSuffix As String> > Dim StyleNum As Long, Style As String> > ' If debug mode, handle error then exit out> > If Options.Debug = 1 Then On Error GoTo errorhandler> > > > ' get the suffix> > Select Case MenuButton(buttonNum).state> > Case 0 ' normal> > bSuffix = "_norm"> > Case 1 ' hover> > bSuffix = "_hover"> > Case 2 ' click> > bSuffix = "_click"> > End Select> > > > 'Lets load our current GUI> > StyleNum = Options.GUI> > If StyleNum = 0 Then Style = "Original"> > If StyleNum = 1 Then Style = "Dragon"> > > > ' render the button> > frmMenu.imgButton(buttonNum).Picture = LoadPicture(App.Path & "\Data Files\graphics\gui\" & Style & "\menu\buttons\" & MenuButton(buttonNum).fileName & bSuffix & ".jpg")> > > > ' Error handler> > Exit Sub> > errorhandler:> > HandleError "renderButton_Menu", "modGeneral", Err.Number, Err.Description, Err.Source, Err.HelpContext> > Err.Clear> > Exit Sub> > End Sub> > > ```> * Change sub **Public Sub renderButton_Main(ByVal buttonNum As Long)** to> > ```> > Public Sub renderButton_Main(ByVal buttonNum As Long)> > Dim bSuffix As String> > Dim StyleNum As Long, Style As String> > ' If debug mode, handle error then exit out> > If Options.Debug = 1 Then On Error GoTo errorhandler> > > > ' get the suffix> > Select Case MainButton(buttonNum).state> > Case 0 ' normal> > bSuffix = "_norm"> > Case 1 ' hover> > bSuffix = "_hover"> > Case 2 ' click> > bSuffix = "_click"> > End Select> > > > 'Lets load our current GUI> > StyleNum = Options.GUI> > If StyleNum = 0 Then Style = "Original"> > If StyleNum = 1 Then Style = "Dragon"> > > > ' render the button> > frmMain.imgButton(buttonNum).Picture = LoadPicture(App.Path & "\Data Files\graphics\gui\" & Style & "\main\buttons\" & MainButton(buttonNum).fileName & bSuffix & ".jpg")> > > > ' Error handler> > Exit Sub> > errorhandler:> > HandleError "renderButton_Main", "modGeneral", Err.Number, Err.Description, Err.Source, Err.HelpContext> > Err.Clear> > Exit Sub> > End Sub> > > ```> * Now go to **modTypes** and in **Private Type OptionsRec** add> > ```> > GUI As Byte> > > ```> * In **modDatabase** sub **Public Sub SaveOptions()** add> > ```> > Call PutVar(fileName, "Options", "GUI", Str(Options.GUI))> > > ```> * In **Public Sub LoadOptions()** afther> > ```> > Options.Debug = 0> > > ```> add> > ```> > Options.GUI = 0> > > ```> and afther> > ```> > Options.Debug = GetVar(fileName, "Options", "Debug")> > > ```> add> > ```> > Options.GUI = GetVar(fileName, "Options", "GUI")> > > ```> * Now go to **FrmMenu** Add somewhere **Label** named **lblEditGUI** 2x click and add in it this> > ```> > picGUIChange.Visible = True> > > ```> * Somewhere add **PictureBox** with name **picGUIChange** ( Make picture box visible to false!!! )> > In it add **ComboBox** named **CmbStyle** and **Command** named **cmdSaveGUI**> * 2x click on **cmbSaveGUI** and add in> > ```> > 'Save stuff> > Options.GUI = CmbStyle.ListIndex> > SaveOptions> > loadGUIpicGUIChange.Visible = False> > > ```> > > Now add somewhere in your Config.ini this> > ```> > GUI= 0> > > ```> How to use?> > Go to " data files\graphics\gui " and you will see your main and menu folder.> > Now you need to add 2 more folders, Original and Dragon(you can call dragon whatever you want just need then change in source code.) and copy main and menu and paste in both folders.> > So now you have data files\graphics\gui\Original and there is main and menu folder with gui.> Addon> > Option Panel (with sound and music turn on/off)> > [http://www.touchofde…nel-in-frmmenu/](http://www.touchofdeathforums.com/community/index.php?/topic/128886-eo-20-option-panel-in-frmmenu/)There is 100% better way like I'v done it but forgot xDYou can use this fully or modify for your need.Ill update this code afther remember or get suggestions of better way. Link to comment Share on other sites More sharing options...
JohnPony Posted August 19, 2012 Share Posted August 19, 2012 Nice tutorial, this would do good on the wiki as well ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
TheRexion Posted August 19, 2012 Share Posted August 19, 2012 This seems insanely cool. I wonder how this wasn't made before, heh. Link to comment Share on other sites More sharing options...
Domino_ Posted August 20, 2012 Author Share Posted August 20, 2012 > This seems insanely cool. I wonder how this wasn't made before, heh.There was no requests. ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png)–-----------------------------------Added how to use information. Link to comment Share on other sites More sharing options...
PVJsquad Posted August 21, 2012 Share Posted August 21, 2012 Why I If I change the Original to Dragon the GUI still in Original .. and if I Close And Open Again the GUI change to Dragon.. Not like in the video if Change To dragon GUI change to Dragon.. ? Link to comment Share on other sites More sharing options...
Domino_ Posted August 21, 2012 Author Share Posted August 21, 2012 > Why I If I change the Original to Dragon the GUI still in Original .. and if I Close And Open Again the GUI change to Dragon.. Not like in the video if Change To dragon GUI change to Dragon.. ?Did you saved changes and have you added GUI = 0 in config.ini ?p.s. gui will be changed only afther pressing Save button.–---------------------------------------------Added link to addon. Link to comment Share on other sites More sharing options...
PVJsquad Posted August 23, 2012 Share Posted August 23, 2012 I recommend to use this script, to prevent faults when selecting style```Private Sub cmdSaveGUI_Click()If CmbStyle.ListIndex > -1 Then'Save stuffOptions.GUI = CmbStyle.ListIndexSaveOptions'loadGUIpicGUIChange.Visible = FalseElseMsgBox "Select the style that you want.", vbInformation, "Error"End IfEnd Sub``` Link to comment Share on other sites More sharing options...
Domino_ Posted August 23, 2012 Author Share Posted August 23, 2012 Ohh yea, crap, 0 = Default and 1 = Dragon , but wait. I'v added if lisindex < 0 then if it will be smaller than 0 then it will say that there is problem…ohh now i see. But its mostly the same. only mine is bit newbie xD Link to comment Share on other sites More sharing options...
PVJsquad Posted August 23, 2012 Share Posted August 23, 2012 you know? if you right click save without changing the combo list. then an error will happen Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now