require("libs.utils")

local hook = nil
local screenWidth = 0
local font = dota.DrawUtils.GetInstance():CreateFont("", 14, 600, 0, 0, bit.bor(EFontFlags.FONTFLAG_DROPSHADOW, EFontFlags.FONTFLAG_OUTLINE))

function OnPaint()
    dota.DrawString(font, screenWidth - 65, 42, 0,255,0,255, false, os.date("%X", os.time()))
end

function Initialize()
    log.Warning("[Lua] ingame_timer.lua start\n")
    screenWidth = dota.GetScreenWidth()
    hook = dota.AddPaintHook(OnPaint)
    log.Warning("[Lua] ingame_timer.lua loaded\n")
end