Thread: Right Click Hover In Menu

Results 1 to 5 of 5
  1. #1 Right Click Hover In Menu 
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    672
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    Alright so I switched all fonts on my base to newBoldFont, all seems to be going well except the hover in inventory does not work.

    Everything working perfectly:



    Inventory not working at all:



    My DrawMenu Void:
    Code:
    private void drawMenu() {
    		int i = menuOffsetX;
    		int j = menuOffsetY;
    		int k = menuWidth;
    		int j1 = super.mouseX;
    		int k1 = super.mouseY;
    		int l = menuHeight + 1;
    		int i1 = 0x5d5447;
    		int xPos = menuOffsetX;
    		int yPos = menuOffsetY;
    		int menuW = menuWidth;
    		int x = super.mouseX;
    		int y = super.mouseY;
    		int menuH = menuHeight + 1;
    		if (menuScreenArea == 1 && (clientSize > 0)) {
    			i += 519;// +extraWidth;
    			j += 168;// +extraHeight;
    		}
    		if (menuScreenArea == 2 && (clientSize > 0)) {
    			j += 338;
    		}
    		if (menuScreenArea == 3 && (clientSize > 0)) {
    			i += 515;
    			j += 0;
    		}
    		if (menuScreenArea == 0) {
    			j1 -= 4;
    			k1 -= 4;
    		}
    		if (menuScreenArea == 1) {
    			if (!(clientSize > 0)) {
    				j1 -= 519;
    				k1 -= 168;
    			}
    		}
    		if (menuScreenArea == 2) {
    			if (!(clientSize > 0)) {
    				j1 -= 17;
    				k1 -= 338;
    			}
    		}
    		if (menuScreenArea == 3 && !(clientSize > 0)) {
    			j1 -= 515;
    			k1 -= 0;
    		}
    		
    		
    			// DrawingArea.drawPixels(height, yPos, xPos, color, width);
    			// DrawingArea.fillPixels(xPos, width, height, color, yPos);
    			DrawingArea.drawPixels(menuH - 4, yPos + 2, xPos, 0x706a5e, menuW);
    			DrawingArea.drawPixels(menuH - 2, yPos + 1, xPos + 1, 0x706a5e, menuW - 2);
    			DrawingArea.drawPixels(menuH, yPos, xPos + 2, 0x706a5e, menuW - 4);
    			DrawingArea.drawPixels(menuH - 2, yPos + 1, xPos + 3, 0x2d2822, menuW - 6);
    			DrawingArea.drawPixels(menuH - 4, yPos + 2, xPos + 2, 0x2d2822, menuW - 4);
    			DrawingArea.drawPixels(menuH - 6, yPos + 3, xPos + 1, 0x2d2822, menuW - 2);
    			DrawingArea.drawPixels(menuH - 22, yPos + 19, xPos + 2, 0x524a3d, menuW - 4);
    			DrawingArea.drawPixels(menuH - 22, yPos + 20, xPos + 3, 0x524a3d, menuW - 6);
    			DrawingArea.drawPixels(menuH - 23, yPos + 20, xPos + 3, 0x2b271c, menuW - 6);
    			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);
    			newBoldFont.drawBasicString("Choose Option", xPos + 3, yPos + 14, 0xc6b895, 0, true);
    			int beforeX = xPos;
    			for (int index = 0; index < menuActionRow; index++) {
    				int yOffset = yPos + 31 + (menuActionRow - 1 - index) * 15;
    				int color = 0xffffff;
    				if (x > xPos && x < xPos + menuW && y > yOffset - 11 && y < yOffset + 5) {
    					DrawingArea.drawPixels(15, yOffset - 11, xPos + 3, 0x6f695d, menuWidth - 6);
    					detectCursor(menuActionName[index]);
    					color = 0xffff00;
    					currentActionMenu = index;
    				}
    				xPos += 3;
    				newBoldFont.drawBasicString(menuActionName[index], xPos, yOffset, color, 0, true);
    				xPos = beforeX;
    			}
    		}
    Confuses me that everything else works except invy/equiptment
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Dec 2010
    Age
    26
    Posts
    1,186
    Thanks given
    513
    Thanks received
    340
    Rep Power
    35
    Do the actual options work though and they are just not being highlighted? In other words does clicking 'drop' register even though it wasn't highlighted and still drop the item? Also, I know it might sound dumb but try it without custom cursors. I don't expect it to work but you never know when there's a bug somewhere.
    Reply With Quote  
     

  3. #3  
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    672
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    Quote Originally Posted by Tired View Post
    Do the actual options work though and they are just not being highlighted? In other words does clicking 'drop' register even though it wasn't highlighted and still drop the item? Also, I know it might sound dumb but try it without custom cursors. I don't expect it to work but you never know when there's a bug somewhere.
    Yeah each option works, will try without cursors

    Edit: Didn't work :/
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2010
    Age
    26
    Posts
    1,186
    Thanks given
    513
    Thanks received
    340
    Rep Power
    35
    Quote Originally Posted by Temperature View Post
    Yeah each option works, will try without cursors

    Edit: Didn't work :/
    I'm not understanding this, I think your issue lies within here though.
    Code:
    		if (menuToggle == false) {
    			
    			DrawingArea.fillRectangle(i1, j, k, l, 150, i);
    			DrawingArea.fillRectangle(0, j + 1, k - 2, 16, 150, i + 1);
    			DrawingArea.fillPixels(i + 1, k - 2, l - 19, 0, j + 18);
    			DrawingArea.drawRectangle(j + 18, l - 19, 150, 0, k - 2, i + 1);
    			newBoldFont.drawBasicString("Choose Option", i + 3, j + 14, 0xc6b895, 0, true);
    			newBoldFont.drawBasicString("Choose Option", i + 3, j + 14, 0xc6b895, 0, true);
    			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;
    				newBoldFont.drawBasicString(menuActionName[l1], i + 3, j2, i2, 0, true);
    			}
    I'm not sure why you have if-else statements calling if menuToggle is true or false. Check your 'menuToggle' method. Not too sure. Hopefully someone else will know.
    Reply With Quote  
     

  5. #5  
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    672
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    Quote Originally Posted by Tired View Post
    I'm not understanding this, I think your issue lies within here though.
    Code:
    		if (menuToggle == false) {
    			
    			DrawingArea.fillRectangle(i1, j, k, l, 150, i);
    			DrawingArea.fillRectangle(0, j + 1, k - 2, 16, 150, i + 1);
    			DrawingArea.fillPixels(i + 1, k - 2, l - 19, 0, j + 18);
    			DrawingArea.drawRectangle(j + 18, l - 19, 150, 0, k - 2, i + 1);
    			newBoldFont.drawBasicString("Choose Option", i + 3, j + 14, 0xc6b895, 0, true);
    			newBoldFont.drawBasicString("Choose Option", i + 3, j + 14, 0xc6b895, 0, true);
    			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;
    				newBoldFont.drawBasicString(menuActionName[l1], i + 3, j2, i2, 0, true);
    			}
    I'm not sure why you have if-else statements calling if menuToggle is true or false. Check your 'menuToggle' method. Not too sure. Hopefully someone else will know.
    Agreed, that is all part of old font system. changed it to this but no luck:

    Code:
    private void drawMenu() {
    		int i = menuOffsetX;
    		int j = menuOffsetY;
    		int k = menuWidth;
    		int j1 = super.mouseX;
    		int k1 = super.mouseY;
    		int l = menuHeight + 1;
    		int i1 = 0x5d5447;
    		int xPos = menuOffsetX;
    		int yPos = menuOffsetY;
    		int menuW = menuWidth;
    		int x = super.mouseX;
    		int y = super.mouseY;
    		int menuH = menuHeight + 1;
    		if (menuScreenArea == 1 && (clientSize > 0)) {
    			i += 519;// +extraWidth;
    			j += 168;// +extraHeight;
    		}
    		if (menuScreenArea == 2 && (clientSize > 0)) {
    			j += 338;
    		}
    		if (menuScreenArea == 3 && (clientSize > 0)) {
    			i += 515;
    			j += 0;
    		}
    		if (menuScreenArea == 0) {
    			j1 -= 4;
    			k1 -= 4;
    		}
    		if (menuScreenArea == 1) {
    			if (!(clientSize > 0)) {
    				j1 -= 519;
    				k1 -= 168;
    			}
    		}
    		if (menuScreenArea == 2) {
    			if (!(clientSize > 0)) {
    				j1 -= 17;
    				k1 -= 338;
    			}
    		}
    		if (menuScreenArea == 3 && !(clientSize > 0)) {
    			j1 -= 515;
    			k1 -= 0;
    		}
    		
    		
    			// DrawingArea.drawPixels(height, yPos, xPos, color, width);
    			// DrawingArea.fillPixels(xPos, width, height, color, yPos);
    			DrawingArea.drawPixels(menuH - 4, yPos + 2, xPos, 0x706a5e, menuW);
    			DrawingArea.drawPixels(menuH - 2, yPos + 1, xPos + 1, 0x706a5e, menuW - 2);
    			DrawingArea.drawPixels(menuH, yPos, xPos + 2, 0x706a5e, menuW - 4);
    			DrawingArea.drawPixels(menuH - 2, yPos + 1, xPos + 3, 0x2d2822, menuW - 6);
    			DrawingArea.drawPixels(menuH - 4, yPos + 2, xPos + 2, 0x2d2822, menuW - 4);
    			DrawingArea.drawPixels(menuH - 6, yPos + 3, xPos + 1, 0x2d2822, menuW - 2);
    			DrawingArea.drawPixels(menuH - 22, yPos + 19, xPos + 2, 0x524a3d, menuW - 4);
    			DrawingArea.drawPixels(menuH - 22, yPos + 20, xPos + 3, 0x524a3d, menuW - 6);
    			DrawingArea.drawPixels(menuH - 23, yPos + 20, xPos + 3, 0x2b271c, menuW - 6);
    			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);
    			newBoldFont.drawBasicString("Choose Option", xPos + 3, yPos + 14, 0xc6b895, 0, true);
    			int beforeX = xPos;
    			for (int index = 0; index < menuActionRow; index++) {
    				int yOffset = yPos + 31 + (menuActionRow - 1 - index) * 15;
    				int color = 0xffffff;
    				if (x > xPos && x < xPos + menuW && y > yOffset - 11 && y < yOffset + 5) {
    					DrawingArea.drawPixels(15, yOffset - 11, xPos + 3, 0x6f695d, menuWidth - 6);
    					detectCursor(menuActionName[index]);
    					color = 0xffff00;
    					currentActionMenu = index;
    				}
    				xPos += 3;
    				newBoldFont.drawBasicString(menuActionName[index], xPos, yOffset, color, 0, true);
    				xPos = beforeX;
    			}
    		}
    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. Right clicking items in inventory
    By Hitten in forum Help
    Replies: 4
    Last Post: 12-21-2014, 12:20 AM
  2. Client right clicking options with menu
    By Aleksandr in forum Help
    Replies: 6
    Last Post: 08-26-2014, 12:42 AM
  3. [667/7**] How to fix right click bug in PvP
    By Zach in forum Tutorials
    Replies: 5
    Last Post: 06-30-2014, 05:06 PM
  4. Replies: 3
    Last Post: 05-19-2012, 12:26 PM
  5. [BOTH]Right-click mute in chat[BOTH]
    By CurrentTheory in forum Tutorials
    Replies: 33
    Last Post: 11-02-2011, 01:22 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •