CustomCursor CursorPointer; dword CursorFile = FROM "../TWB/pointer.cur"; #include "..\lib\collection.h" #define NOLINE 0 #define UNDERLINE 1 #define MAXLINKS 400 struct array_link { dword link, text; int x,y,w,h; int underline; }; struct LinksArray { array_link links[MAXLINKS]; collection page_links; dword buflen; int count, active; void Hover(); void AddLink(); void AddText(); dword GetURL(); void Clear(); } PageLinks; void LinksArray::AddLink(dword lpath, int link_x, link_y) { if (count>= MAXLINKS) return; links[count].x = link_x; links[count].y = link_y; page_links.add(lpath); links[count].link = page_links.get(page_links.count-1); count++; } void LinksArray::AddText(dword new_text, int link_w, link_h, link_underline) { if (count>= MAXLINKS) || (!count) return; links[count-1].w = link_w; links[count-1].h = link_h; links[count-1].underline = link_underline; page_links.add(new_text); links[count-1].text = page_links.get(page_links.count-1); } dword LinksArray::GetURL(int id) { return links[id].link; } void LinksArray::Clear() { page_links.drop(); page_links.realloc_size = 4096 * 32; count = 0; active = -1; CursorPointer.Restore(); } char temp[sizeof(URL)]; PathShow_data status_text = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, 0, #temp, 0}; void LinksArray::Hover(dword mx, my, link_col_in, link_col_a, bg_col) { int i; signed int WBY = -WB1.list.first*WB1.list.item_h - WB1.DrawBuf.zoom; for (i=0; ilinks[i].x) && (my>links[i].y) && (mx