Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    162
    My Mood
    Aggressive

    Confused on Movable Box

    Title is self explanatory.

    I'm looking to make a dragging menu but confused on the math to make it so where ever the user clicks is where it drags from. Currently it moves the mouse to the corner of the menu being dragged.

  2. #2
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    add me
    mcazeck@hotmail.com

  3. #3
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    Definitions:
    Code:
    POINT cPos;
    int menuX = 20, menuY = 100, offsetX, offsetY;
    Code:
    	if(GetAsyncKeyState(VK_LBUTTON) < 0) 
    	{
    
    		GetCursorPos(&cPos);
    		
    		if(cPos.x > menuX - 10 && cPos.x < menuX + 125 && cPos.y > menuY - 10 && cPos.y < menuY + 455){
    			
    			if(!isDragging){
    
    				offsetX = cPos.x - menuX;
    				offsetY = cPos.y - menuY;
    				isDragging = true;
    			}
    		}
    	} else {
    
    		isDragging = false;
    	}
    	}
    	if(isDragging){
    		
    		menuX = cPos.x - offsetX;
    		menuY = cPos.y - offsetY;
    	}
    No I do not make game hacks anymore, please stop asking.

  4. The Following User Says Thank You to flameswor10 For This Useful Post:

    -Dimensions- (07-21-2011)

  5. #4
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    162
    My Mood
    Aggressive
    Quote Originally Posted by flameswor10 View Post
    Definitions:
    Code:
    POINT cPos;
    int menuX = 20, menuY = 100, offsetX, offsetY;
    Code:
    	if(GetAsyncKeyState(VK_LBUTTON) < 0) 
    	{
    
    		GetCursorPos(&cPos);
    		
    		if(cPos.x > menuX - 10 && cPos.x < menuX + 125 && cPos.y > menuY - 10 && cPos.y < menuY + 455){
    			
    			if(!isDragging){
    
    				offsetX = cPos.x - menuX;
    				offsetY = cPos.y - menuY;
    				isDragging = true;
    			}
    		}
    	} else {
    
    		isDragging = false;
    	}
    	}
    	if(isDragging){
    		
    		menuX = cPos.x - offsetX;
    		menuY = cPos.y - offsetY;
    	}
    Wow dude thank you so much!

    <3 I love you! <3

  6. #5
    Stephen's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Engine.exe
    Posts
    4,689
    Reputation
    184
    Thanks
    1,149
    My Mood
    Aggressive
    Quote Originally Posted by -Dimensions- View Post
    Wow dude thank you so much!

    <3 I love you! <3
    How hard is that. /fp

  7. The Following User Says Thank You to Stephen For This Useful Post:

    CAFlames (07-22-2011)

  8. #6
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    162
    My Mood
    Aggressive
    Quote Originally Posted by Stephen View Post


    How hard is that. /fp
    I was having a Brain Fart that day.

  9. #7
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    Quote Originally Posted by -Dimensions- View Post
    Wow dude thank you so much!

    <3 I love you! <3


    use it:

    Code:
    if (YOURFKHACK == 1) 
    	{
    	if(GetAsyncKeyState(VK_LBUTTON) < 0) 
    	{
    
    		GetCursorPos(&cPos);
    		
    		if(cPos.x > menuX - 10 && cPos.x < menuX + 125 && cPos.y > menuY - 10 && cPos.y < menuY + 455){
    			
    			if(!isDragging){
    
    				offsetX = cPos.x - menuX;
    				offsetY = cPos.y - menuY;
    				isDragging = true;
    			}
    		}
    	} else {
    
    		isDragging = false;
    	}
    	}
    	if(isDragging){
    		
    		menuX = cPos.x - offsetX;
    		menuY = cPos.y - offsetY;
    	}

  10. #8
    Stephen's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Engine.exe
    Posts
    4,689
    Reputation
    184
    Thanks
    1,149
    My Mood
    Aggressive
    Quote Originally Posted by wicho_koz View Post
    use it:

    Code:
    if (YOURFKHACK == 1) 
    	{
    	if(GetAsyncKeyState(VK_LBUTTON) < 0) 
    	{
    
    		GetCursorPos(&cPos);
    		
    		if(cPos.x > menuX - 10 && cPos.x < menuX + 125 && cPos.y > menuY - 10 && cPos.y < menuY + 455){
    			
    			if(!isDragging){
    
    				offsetX = cPos.x - menuX;
    				offsetY = cPos.y - menuY;
    				isDragging = true;
    			}
    		}
    	} else {
    
    		isDragging = false;
    	}
    	}
    	if(isDragging){
    		
    		menuX = cPos.x - offsetX;
    		menuY = cPos.y - offsetY;
    	}

    uhm .

  11. The Following User Says Thank You to Stephen For This Useful Post:

    flameswor10 (07-23-2011)

  12. #9
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    No I do not make game hacks anymore, please stop asking.

  13. #10
    OBrozz's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    819
    Reputation
    65
    Thanks
    813
    Quote Originally Posted by wicho_koz View Post
    use it:

    Code:
    if (YOURFKHACK == 1) 
    	{
    	if(GetAsyncKeyState(VK_LBUTTON) < 0) 
    	{
    
    		GetCursorPos(&cPos);
    		
    		if(cPos.x > menuX - 10 && cPos.x < menuX + 125 && cPos.y > menuY - 10 && cPos.y < menuY + 455){
    			
    			if(!isDragging){
    
    				offsetX = cPos.x - menuX;
    				offsetY = cPos.y - menuY;
    				isDragging = true;
    			}
    		}
    	} else {
    
    		isDragging = false;
    	}
    	}
    	if(isDragging){
    		
    		menuX = cPos.x - offsetX;
    		menuY = cPos.y - offsetY;
    	}
    YouDumbBro?

  14. The Following User Says Thank You to OBrozz For This Useful Post:

    flameswor10 (07-23-2011)

  15. #11
    IcySeal's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    300
    Reputation
    34
    Thanks
    148
    My Mood
    Amused
    flameswor. i feel like that was taken from my base from forever ago?

  16. #12
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    Quote Originally Posted by IcySeal View Post
    flameswor. i feel like that was taken from my base from forever ago?
    Never touched your base before.
    It was in Acidbase
    No I do not make game hacks anymore, please stop asking.

  17. #13
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    AFffffffffffffffFFFFFFFFFFFFFFFFFFFfffffffffffffff fffffffff dragging code is oldddddddddddddddddddddddddd
    Last edited by Crash; 07-25-2011 at 09:14 AM.

  18. #14
    Xlilzoosk8rX's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    the-ville, PA
    Posts
    358
    Reputation
    24
    Thanks
    53
    i use the left righ tup and down buttons to move my menu
    mine is simple to me hold alt+direction arrow= move menu

  19. #15
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    Quote Originally Posted by flameswor10 View Post
    Definitions:
    Code:
    POINT cPos;
    int menuX = 20, menuY = 100, offsetX, offsetY;
    Code:
    	if(GetAsyncKeyState(VK_LBUTTON) < 0) 
    	{
    
    		GetCursorPos(&cPos);
    		
    		if(cPos.x > menuX - 10 && cPos.x < menuX + 125 && cPos.y > menuY - 10 && cPos.y < menuY + 455){
    			
    			if(!isDragging){
    
    				offsetX = cPos.x - menuX;
    				offsetY = cPos.y - menuY;
    				isDragging = true;
    			}
    		}
    	} else {
    
    		isDragging = false;
    	}
    	}
    	if(isDragging){
    		
    		menuX = cPos.x - offsetX;
    		menuY = cPos.y - offsetY;
    	}
    for some reason that looks exactly like my menu move ..... EXACTLY!
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

Page 1 of 2 12 LastLast

Similar Threads

  1. Cheat engine detected/undetected (I am confused!!!)
    By Logica in forum General Game Hacking
    Replies: 11
    Last Post: 08-16-2008, 05:16 AM
  2. [Request]Player boxes
    By Spoking in forum WarRock - International Hacks
    Replies: 6
    Last Post: 04-15-2007, 02:37 PM
  3. blackpkerstr emty you mail box, I cant send anything to you
    By radnomguywfq3 in forum Spammers Corner
    Replies: 1
    Last Post: 02-25-2007, 11:51 AM
  4. Ammo/Damage Box Values?
    By wooden_amulet in forum WarRock - International Hacks
    Replies: 4
    Last Post: 06-02-2006, 02:55 AM
  5. Advanced Box Cut
    By Chronologix in forum Tutorials
    Replies: 11
    Last Post: 01-23-2006, 09:00 PM