New tech effect icons?

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
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."

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. :lol: The tooltip wasn't showing up because I passed only 2 values to a ConvertTextKey expecting 3 values.
 
Back
Top Bottom