Code:
public String[] ignore_startswith = {
"View", "World", "Logout", "Open Advanced", "Toggle", "Report", "Read Quest", "Select", "Message", "Ok", "On", "Cast", "Activate", "Show", "Add",
"Delete", "Swap", "Special Attack", "Join", "Adjust", "Leave", "Combat", "Stats", "Quest", "Inventory", "Worn", "Prayer", "Magic", "Follower",
"Friend", "Ignore", "Clan", "Options", "Emotes", "Music", "Ignore"
};
public String[] ignore_contains = {
"Quickchat", "Walk here", "Special Attack"
};
public String[] ignore_equals = {
"Search", "Close"
};
private int hover_x;
private int hover_Y;
private String hover_tooltip;
public int debug_type;
public void drawTooltipHover(int draw_x, int draw_y)
{
if(!menuOpen)
if(Config.mouseovertext)
{
int mouse_x = hover_x - draw_x;
int mouse_y = hover_Y - draw_y;
drawHover(mouse_x, mouse_y);
}
}
private void drawHover(int draw_x, int draw_y)
{
hover_tooltip = menuActionName[menuActionRow - 1];
for(int starts = 0; starts < ignore_startswith.length; starts++)
{
if(hover_tooltip.startsWith(ignore_startswith[starts]))
return;
}
for(int contains = 0; contains < ignore_contains.length; contains++)
{
if(hover_tooltip.contains(ignore_contains[contains]))
return;
}
for(int equals = 0; equals < ignore_equals.length; equals++)
{
if(hover_tooltip.equals(ignore_equals[equals]))
return;
}
if(menuActionRow < 2 && itemSelected == 0 && spellSelected == 0)
return;
if(itemSelected == 1 && menuActionRow < 2)
return;
else if(spellSelected == 1 && menuActionRow < 2)
return;
else
buildDebug(hover_tooltip, debug_type);
inputTaken = true;
needDrawTabArea = true;
buildMenu(hover_tooltip, draw_x, draw_y);
}
public void buildDebug(String desc, int type)
{
if(type == 0)
{
ItemDefinition item = ItemDefinition.forID(menuActionCmd1[menuActionRow - 1]);
hover_tooltip = desc +
"\\nID: <col=ff0000>" + item.id + "</col>" +
"\\nGround: <col=ff0000>"+item.groundModel + "</col>" +
"\\nMale: <col=ff0000>" + item.maleModel + "</col>" +
"\\nFemale: <col=ff0000>"+item.femaleModel + "</col>" +
"\\nArm: [<col=ff0000>"+item.maleArm +"</col><col=ffffff>] [<col=ff0000>"+item.femaleArm +"</col><col=ffffff>]" +
"\\nValue: <col=ff0000>" + intToKOrMilLongName(item.value) + "</col>";
} else if(type == 1)
{
ObjectDefinition object = ObjectDefinition.forID(menuActionCmd4[menuActionRow - 1]);
hover_tooltip = desc + " \\nID: <col=ff0000>" + object.type;
} else
hover_tooltip = desc;
}
private void buildMenu(String desc, int draw_x, int draw_y)
{
TextDrawingArea font = newSmallFont;
int menu_width = 0;
int menu_hegiht = 0;
int x_bounds = super.mouseX + 15;
int y_bounds = super.mouseY + 20;
for (String line = hover_tooltip; line.length() > 0;)
{
int length = line.indexOf("\\n");
String new_line;
if (length != -1)
{
new_line = line.substring(0, length);
line = line.substring(length + 2);
}
else
{
new_line = line;
line = "";
}
int new_width = font.getTextWidth(new_line);
if (new_width > menu_width)
{
menu_width = new_width;
}
menu_hegiht += font.baseCharacterHeight + 2;
}
menu_width += 8;
menu_hegiht += 9;
if(x_bounds < client_width &&
y_bounds < client_height)
{
if(x_bounds + menu_width + 3 > client_width)
{
x_bounds = client_width - menu_width - 3;
}
if(y_bounds + menu_hegiht + 3 > client_height)
{
y_bounds = client_height - menu_hegiht - 3;
}
hover_x = x_bounds;
hover_Y = y_bounds;
}
DrawingArea.method338(draw_y + 1, menu_hegiht - 2, 170, 0, menu_width + 3, draw_x + 1);
DrawingArea.method338(draw_y, menu_hegiht, 170, 0, menu_width + 1, draw_x + 2);
DrawingArea.method338(draw_y + 1, menu_hegiht - 2, 256, 0xffffff, menu_width - 1, draw_x + 3);
DrawingArea.method338(draw_y + 2, menu_hegiht - 4, 256, 0xffffff, menu_width + 1, draw_x + 2);
DrawingArea.method335(0x222222, draw_y + 2, menu_width - 1, menu_hegiht - 4, 220, draw_x + 3);
for (int new_y = draw_y + font.baseCharacterHeight + 4; hover_tooltip.length() > 0; new_y += font.baseCharacterHeight + 2)
{
int length = hover_tooltip.indexOf("\\n");
if (length != -1)
{
desc = hover_tooltip.substring(0, length);
hover_tooltip = hover_tooltip.substring(length + 2);
}
else
{
desc = hover_tooltip;
hover_tooltip = "";
}
font.drawBasicString("<col=ffffff>" + desc, draw_x + 5, new_y, 0x999999, -1);
}
}
Add a toggle if ya want, and to display it,