Thalassicus
Bytes and Nibblers
How do I change difficulty names or descriptions?
I tried just altering the database values, but found it doesn't work for the "select difficulty" window. So I opened it up and found this:
Since it's outside the functions it loads before mods load. I think I need to update the Name/Help/Tooltip values for each button in GameSetupScreen's ShowHideHandler function. How do I access a button's fields from within the parent file?
I tried just altering the database values, but found it doesn't work for the "select difficulty" window. So I opened it up and found this:
PHP:
for info in GameInfo.HandicapInfos() do
local controlTable = {};
ContextPtr:BuildInstanceForControl( "ItemInstance", controlTable, Controls.Stack );
IconHookup( info.PortraitIndex, 64, info.IconAtlas, controlTable.Icon );
controlTable.Help:SetText( Locale.ConvertTextKey( info.Help ) );
controlTable.Name:SetText( Locale.ConvertTextKey( info.Description ) );
controlTable.Button:SetToolTipString( Locale.ConvertTextKey( info.Help ) );
controlTable.Button:SetVoid1( info.ID );
controlTable.Button:RegisterCallback( Mouse.eLClick, DifficultySelected );
end
Since it's outside the functions it loads before mods load. I think I need to update the Name/Help/Tooltip values for each button in GameSetupScreen's ShowHideHandler function. How do I access a button's fields from within the parent file?