--[[ Override Range Indicator ]]
local Old_ActionButton_OnUpdate = ActionButton_OnUpdate;
function ActionButton_OnUpdate(elapsed) 
	
	local flag
	-- Handle range indicator
	if ( this.rangeTimer and this.rangeTimer <= elapsed ) then
		flag = IsActionInRange(ActionButton_GetPagedID(this))
		if this.RangeFlag ~= flag then
			this.RangeFlag = flag
			flag = true
		else
			flag = nil
		end
	end

	Old_ActionButton_OnUpdate(elapsed)
	
	if flag then ActionButton_UpdateUsable() end
end

local Old_ActionButton_UpdateUsable = ActionButton_UpdateUsable
function ActionButton_UpdateUsable()
	Old_ActionButton_UpdateUsable()
	
	local isUsable, notEnoughMana = IsUsableAction(ActionButton_GetPagedID(this))
	if this.RangeFlag == 0 and (isUsable or notEnoughMana) then
		getglobal(this:GetName().."Icon"):SetVertexColor(0.9, 0.3, 0.3)
		getglobal(this:GetName().."NormalTexture"):SetVertexColor(1.0, 0, 0)
	end
end