the mini window, I wanna make a button which "mouseover" will change button color and text color...
however, I only can change the button color but the word txt was disappear...any suggestion? Thanks.
however, I only can change the button color but the word txt was disappear...any suggestion? Thanks.
Original:
WindowText (login, "f2", Char[Char_list]["name"] .. "(" .. Char[Char_list]["id"] .. ")",
space_w + 5, b_start + 4, space_w + b_width, b_start + b_height,
ColourNameToRGB ("blue"), false)
Mouseover:
function mouseover (flags,hotspot_id)
if hotspot_id == 1 then
WindowText (login, "f2", Char[Char_list[hotspot_id]]["name"] .. "(" .. Char[Char_list[hotspot_id]]["id"] .. ")",
space_w + 5, b_start + 4, space_w + b_width, b_start + b_height,
ColourNameToRGB ("red"), false)
WindowText (login, "f2", "Lv: " .. "500",
space_w + (b_width/3*2) + 5, b_start + 4, space_w + b_width, b_start + b_height,
ColourNameToRGB ("red"), false)
Redraw ()
end
CancelMouseover:
function cancelmouseover (flags,hotspot_id)
if hotspot_id == 1 then
WindowText (login, "f2", Char[Char_list[hotspot_id]]["name"] .. "(" .. Char[Char_list[hotspot_id]]["id"] .. ")",
space_w + 5, b_start + 4, space_w + b_width, b_start + b_height,
ColourNameToRGB ("white"), false)
WindowText (login, "f2", "Lv: " .. "500",
space_w + (b_width/3*2) + 5, b_start + 4, space_w + b_width, b_start + b_height,
ColourNameToRGB ("white"), false)
print(type(hotspot_id),hotspot_id)
else
print(type(hotspot_id),hotspot_id)
end --if
Repaint ()
end -- cancelmouseover