local pos
function aText(text)
pos = text:getPoint(VTextPosition)
text:setValue(VTextPosition, {x=pos.x + 50, y = pos.y})
return true
end
registerHookFunction("getActionText", "aText")
Hi ARFLme, thanks for your reply!
After reading the wiki a bit, it seems to me that getActionText is actually designed to let you set the action text string for a given mouse position x & y? http://wiki.visionaire-tracker.net/wiki/RegisterHookFunction - seems like a misnomer and should be called setActionText... ?
Anyway, if I can't access the action text textfield, and I can't use the above function to read out the current action text, is there another way to find out what the current action text is or to draw it somewhere?
Thanks!
function myActionText(mousePos)
-- individual action text: object name (in current language) of object below cursor, if there is no object then 'empty' is shown as action text
local obj = game:getLink(VGameCurrentObject)
if obj:getId().tableId == eObjects then
return 'current object: ' .. obj:getTextStr(VObjectName)
end
return 'empty'
end
registerHookFunction("getActionText", "myActionText")