Thread: Right click option with hover help

Results 1 to 6 of 6
  1. #1 Right click option with hover help 
    Registered Member
    Join Date
    Apr 2012
    Posts
    74
    Thanks given
    3
    Thanks received
    1
    Rep Power
    8
    Hey again Rune-Server.

    So recently I followed a tutorial which frankly I can't find now :O.
    Anyway I have 1 problem. It doesn't have a hover, it just does a text-refill and changes to yellow when hovering on a text.

    Here's an example:


    As you can see it makes the text yellow upon hover. I'd like to make it have a background color change like RS ect.

    Here's the Private void drawMenu() {

    Spoiler for DrawMenu():

    Code:
    	private void drawMenu() {
            int i = menuOffsetX;
            int j = menuOffsetY;
            int k = menuWidth;
            int l = menuHeight + 1;
            int i1 = 0x5d5447;
    
            int xPos = menuOffsetX;
            int yPos = menuOffsetY;
            int menuW = menuWidth;
            int menuH = menuHeight + 1;
            int color = 0x5d5447;
    		
    //Border
      DrawingArea.method338(yPos + 2, menuH - 4, 250, 0x706a5e, menuW, xPos);
      DrawingArea.method338(yPos + 1, menuH - 2, 250, 0x706a5e, menuW - 2, xPos + 1);
      DrawingArea.method338(yPos, menuH, 200, 0x706a5e, menuW - 4, xPos + 2);
      //Border
      DrawingArea.method338(yPos + 1, menuH - 2, 250, 0x2d2822, menuW - 6, xPos + 3);
      DrawingArea.method338(yPos + 2, menuH - 4, 250, 0x2d2822, menuW - 4, xPos + 2);
      DrawingArea.method338(yPos + 3, menuH - 6, 250, 0x2d2822, menuW - 2, xPos + 1);
      //Border
      DrawingArea.method338(yPos + 19, menuH - 22, 250, 0x524a3d, menuW - 4, xPos + 2);
      DrawingArea.method338(yPos + 20, menuH - 22, 250, 0x524a3d, menuW - 6, xPos + 3);
      //Menu Fill
    	DrawingArea.method335(0x112329, yPos + 20, menuW - 6, menuH - 23, 230, xPos + 3);
      //Menu Header
      DrawingArea.fillPixels(xPos + 3, menuW - 6, 1, 0x2a291b, yPos + 2);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x2a261b, yPos + 3);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x252116, yPos + 4);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x211e15, yPos + 5);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x1e1b12, yPos + 6);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x1a170e, yPos + 7);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 2, 0x15120b, yPos + 8);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x100d08, yPos + 10);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x090a04, yPos + 11);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x080703, yPos + 12);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x090a04, yPos + 13);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x070802, yPos + 14);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x090a04, yPos + 15);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x070802, yPos + 16);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x090a04, yPos + 17);
      DrawingArea.fillPixels(xPos + 2, menuW - 4, 1, 0x2a291b, yPos + 18);
      DrawingArea.fillPixels(xPos + 3, menuW - 6, 1, 0x564943, yPos + 19);
      chatTextDrawingArea.method385(0xffffff, "Choose Option", j + 14, i + 3);
            DrawingArea.method335(i1, j, k, l, 150, i);
            DrawingArea.method335(0, j + 1, k - 2, 16, 150, i + 1);
            DrawingArea.method338(j + 18, l - 19, 150, 0, k - 2, i + 1);
            chatTextDrawingArea.method385(i1, "Choose Option", j + 14, i + 3);*/
    		int j1 = super.mouseX;
    		int k1 = super.mouseY;
    		if(menuScreenArea == 0) {
    			j1 -= 4;
    			k1 -= 4;
    		}
    		if(menuScreenArea == 1) {
    			j1 -= 519;
    			k1 -= 168;
    		}
    		if(menuScreenArea == 2) {
    			j1 -= 17;
    			k1 -= 338;
    		}
    		if(menuScreenArea == 3) {
    			j1 -= 519;
    			k1 -= 0;
    		}
    		for(int l1 = 0; l1 < menuActionRow; l1++) {
    			int i2 = j + 31 + (menuActionRow - 1 - l1) * 15;
    			int j2 = 0xffffff;
    			if(j1 > i && j1 < i + k && k1 > i2 - 13 && k1 < i2 + 3)
    				j2 = 0xffff00;
    			chatTextDrawingArea.method389(true, i + 3, j2, menuActionName[l1], i2);
    		}
    	}


    Thanks. Appreciate this.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Apr 2012
    Posts
    74
    Thanks given
    3
    Thanks received
    1
    Rep Power
    8
    Bumping. Someone might know?
    Reply With Quote  
     

  3. #3  
    Extreme Donator

    Join Date
    Sep 2008
    Posts
    110
    Thanks given
    3
    Thanks received
    8
    Rep Power
    70
    At the bottom of the drawMenu method, you have a loop

    in the loop there's a single if statement, something like:

    Code:
    if (j1 > i && j1 < i + k && k1 > i2 - 13 && k1 < i2 + 3)
    after the if statement you have something like

    Code:
    j2 = 0x123456;
    (the numbers will be different)

    replace that line with this:

    Code:
    DrawingArea.method335(0x26566C,  i2 - 11, menuWidth - 6, 15, 150, menuOffsetX+ 3);
    Should add highlighting on hover.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Apr 2012
    Posts
    74
    Thanks given
    3
    Thanks received
    1
    Rep Power
    8
    Quote Originally Posted by hadesflames View Post
    At the bottom of the drawMenu method, you have a loop

    in the loop there's a single if statement, something like:

    Code:
    if (j1 > i && j1 < i + k && k1 > i2 - 13 && k1 < i2 + 3)
    after the if statement you have something like

    Code:
    j2 = 0x123456;
    (the numbers will be different)

    replace that line with this:

    Code:
    DrawingArea.method335(0x26566C,  i2 - 11, menuWidth - 6, 15, 150, menuOffsetX+ 3);
    Should add highlighting on hover.
    Hey. I replaced it to what you said but it still doesn't work. :/ - Any Idea why?
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Jun 2012
    Posts
    201
    Thanks given
    61
    Thanks received
    77
    Rep Power
    104
    Code:
    		for(int row = 0; row < menuActionRow; row++) {
    			int y = j + 31 + (menuActionRow - 1 - row) * 15;
    			int hover = 0xffffff;
    			if(j1 > i && j1 < i + k && k1 > y - 13 && k1 < y + 3) {
    				DrawingArea.method335(0x26566C,  y - 11, menuWidth - 6, 15, 150, menuOffsetX + 3);
    				hover = 0xffff00;
    			}
    			chatTextDrawingArea.method389(true, i + 3, hover, menuActionName[row], y);
    		}
    Just like hades said
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Apr 2012
    Posts
    74
    Thanks given
    3
    Thanks received
    1
    Rep Power
    8
    Quote Originally Posted by OnCue View Post
    Code:
    		for(int row = 0; row < menuActionRow; row++) {
    			int y = j + 31 + (menuActionRow - 1 - row) * 15;
    			int hover = 0xffffff;
    			if(j1 > i && j1 < i + k && k1 > y - 13 && k1 < y + 3) {
    				DrawingArea.method335(0x26566C,  y - 11, menuWidth - 6, 15, 150, menuOffsetX + 3);
    				hover = 0xffff00;
    			}
    			chatTextDrawingArea.method389(true, i + 3, hover, menuActionName[row], y);
    		}
    Just like hades said

    It worked, great work. Thanks to the both of you.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Select Option Yellow & Green Hover
    By Keat in forum Help
    Replies: 1
    Last Post: 06-07-2012, 10:58 PM
  2. Replies: 3
    Last Post: 05-19-2012, 12:26 PM
  3. Hover over (Click here to continue)
    By myK- in forum Help
    Replies: 2
    Last Post: 11-23-2010, 07:24 AM
  4. [new] option box + hover
    By felten in forum Graphics
    Replies: 14
    Last Post: 10-28-2010, 05:42 AM
  5. Item click hover
    By Richie in forum Help
    Replies: 0
    Last Post: 08-23-2010, 05:41 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •