Thalassicus
Bytes and Nibblers
How do I get the tooltip working for a new tech effect icon? I added the code below to the function AddSmallButtonsToTechButton in TechButtonInclude.lua. The button correctly appears on a tech when I add a row for the tech in the Technology_DomainPromotion I created, but the button shows the tooltip of the tech instead of "testing."
Edit: nevermind I figured out the problem. I had replaced some earlier code with the "testing" placeholder and forgot to rebuild the project.
The tooltip wasn't showing up because I passed only 2 values to a ConvertTextKey expecting 3 values.
PHP:
for row in GameInfo.Technology_DomainPromotion(condition) do
local buttonName = "B"..tostring(buttonNum);
local thisButton = thisTechButtonInstance[buttonName];
if thisButton then
IconHookup( 0, textureSize, "GENERIC_FUNC_ATLAS", thisButton );
thisButton:SetHide( false );
thisButton:SetToolTipString("testing");
buttonNum = buttonNum + 1;
else
break
end
end
Edit: nevermind I figured out the problem. I had replaced some earlier code with the "testing" placeholder and forgot to rebuild the project.
