Rusmikey: Think of each .lua file as a function in its own right and each file is passed several (currently two paramters). The first is the name of the addon the file is in and, the second is a table that is exclusive to and available to all .lua files under the addon. The table can be used for sharing data/functions etc. between .lua files in the addon.
When you see something like local _,Core = ... (usually) near the beginning of a .lua file, that is the "file" retrieving these "parameters" (as mentioned, the _ is usualy used as a throwaway parameter)
Code:
function Code.lua(...)
local _, Core = ...
--or
local addonName, Core = ...
--or
local Addon, NS = ...
end
The UIRadioButtonTemplate doesn't do anything on it own other than just display a checkbutton that looks like a radio button. You have to add the OnClick code to de-select the other buttons when each one is clicked.
Lua Code:
<CheckButton name="UIRadioButtonTemplate" virtual="true">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentText" inherits="GameFontNormalSmall" parentKey="text">
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<NormalTexture file="Interface\Buttons\UI-RadioButton">
<TexCoords left="0" right="0.25" top="0" bottom="1"/>
</NormalTexture>
<HighlightTexture file="Interface\Buttons\UI-RadioButton" alphaMode="ADD">
<TexCoords left="0.5" right="0.75" top="0" bottom="1"/>
</HighlightTexture>
<CheckedTexture file="Interface\Buttons\UI-RadioButton">
<TexCoords left="0.25" right="0.5" top="0" bottom="1"/>
</CheckedTexture>
</CheckButton>