
---------------------------------------------------------------
--  AW Display Fixture offset selection on buttons
---------------------------------------------------------------
function ShowFixedOffset()
    local inst = mc.mcGetInstance()
    local FixOffset = mc.mcCntlGetPoundVar(inst, mc.SV_MOD_GROUP_14)
    local FixNum
    if (FixOffset ~= 54.1) then --G54 through G59
        FixNum, frac = math.modf (FixOffset)
    else --G54.1 P1 through G54.1 P100
        --None of the buttons match
        FixNum = 0
    end

    local Fixture = 54
    while (Fixture <= 59) do
        if (Fixture == FixNum) then
            scr.SetProperty(string.format("btnG%.0f", Fixture), "Bg Color", "Green")
        else
            scr.SetProperty(string.format("btnG%.0f", Fixture), "Bg Color", "")
        end
        Fixture = Fixture + 1
    end
end

