Jeff Posted June 3, 2011 Author Share Posted June 3, 2011 Hello, this is my first tutorial. It's really simple so if you're a newb this is a good one to try out! This tutorial will show you the basics, but it is also fully functional for all windows corresponding to the GUI buttons except for picTrade.**You will need:**Special GUI windows having an X in the top right corner(attached)A copy of VB6basic navigation knowledge to install.This tutorial installed and functioning on all desired windows: http://www.touchofdeathforums.com/smf/index.php/topic,67261.0.htmlNow, for each window you want to make closable, first find their respective 'Mouse Down' Sub. At the bottom of it but above```' Error handler```(only if applicable. ' Error handler won't be in every sub. if it is not in the sub, just place the code at the bottom of the sub.)add``` If x > picPICNAME.width - 10 Then If y < -picPICNAME.height + 281 Then picPICNAME.Visible = False End If End If```replace picPICNAME with whatever pic it's designed to replace.now, let's break down the code. First it checks if your mouse is in the left most 10 pixels. Then, it checks if your mouse is in the top corner. It checks the top corner because 292 is the height of the picbox. 281 is the height minus 11, and 11 is the height of the x. Finally it simply makes the picbox invisible.That's it!If you have any trouble or if there's a bug, post here. I have bug tested it, but I may have missed something. Link to comment Share on other sites More sharing options...
erkro1 Posted June 3, 2011 Share Posted June 3, 2011 Nice, might be usefull for some games where the GUI is over the picScreen. ;) Link to comment Share on other sites More sharing options...
Jeff Posted June 3, 2011 Author Share Posted June 3, 2011 @Erkro1:> Nice, might be usefull for some games where the GUI is over the picScreen. ;)well now I'd say any game that wants to can put their GUI over the picScreen. With my tutorial and Sekaru's, it just takes a few minutes to get the system working nicely. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 3, 2011 Share Posted June 3, 2011 Nice, i already have my own mod for it though, most people with custom GUIs just make it themselves since every GUI has custom needs. Link to comment Share on other sites More sharing options...
Jeff Posted June 3, 2011 Author Share Posted June 3, 2011 @RyokuHasu:> Nice, i already have my own mod for it though, most people with custom GUIs just make it themselves since every GUI has custom needs.this is just to show you how to do it. Also, it's a very efficient method. It's simple and quick. Some people might try and make labels for every x, and that could get messy and is a lot slower than this method. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 3, 2011 Share Posted June 3, 2011 ah, I see. i just made a new image button that universaly hides all the player menus. =D Link to comment Share on other sites More sharing options...
Jeff Posted June 3, 2011 Author Share Posted June 3, 2011 @RyokuHasu:> ah, I see. i just made a new image button that universaly hides all the player menus. =Dwait, so you can't close 1 menu without closing them all? sounds pretty inefficient, but whatever. Also another way You could easily do this is if you shift click or right click the original button it could close, but I like my method better. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 3, 2011 Share Posted June 3, 2011 O.o no, I have my menus over to the screen and i left the original open one and close the other in ther, you can only have one open at a time. Link to comment Share on other sites More sharing options...
Darknesslighter Posted January 6, 2012 Share Posted January 6, 2012 Does this also work on CS:DE? Link to comment Share on other sites More sharing options...
Joyce Posted January 6, 2012 Share Posted January 6, 2012 When modified properly, I would imagine so. Maybe not a direct copy/paste, but if you have any idea of how the engine works a similar method may be applied. Link to comment Share on other sites More sharing options...
Jeff Posted January 7, 2012 Author Share Posted January 7, 2012 @Darknesslighter:> Does this also work on CS:DE?Doesn't CS:DE already have this feature?It should anyway, this will work for practically anything. 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