View Single Post
11-27-09, 01:10 AM   #33
Brainn
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 263
i have done some improvements to the clock function on the main-panel, maybe you want to include it in the next revisions

Code:
	local function MP_SetTimeText()
		local x, y, z = date("%H"), date("%M"), date("%S")
		btn_time:SetText(string.format("%02d:%02d:%02d", x, y, z))
	end
Code:
	local function MP_SetTimeText()
		local x, y = date("%H"), date("%M")
		btn_time:SetText(string.format("%02d:%02d", x, y))
	end
this is mostly a cleanup for the complex way that is currently used to format times with single digit values.
the first one includes seconds and would require the clock-button to be a little bit wider, the second one is just hour:minute as it is now.
  Reply With Quote