V1.11 (changes: scrolls smoother) This script will scroll text. It returns a string that consists of the scrolled text. It can scroll any number of texts just call it from the text field. Call with: var_textScroll("texthere", integer space to use, integer scroll rate,{dss}) E. G. var_textScroll("some long bit of text", 6,1,{dss}) The {dss} at the end makes watchmaker update it each tick. 1 is the speed of scrolling. It will scroll faster in the wm emulator than the watch. Higher is faster. 0.5 is slower 6 is how many characters to use --text scroller: put this function in your main watchface script --text scroller var_runTime = {} function var_textScroll(myText,space,interval) var_runTime[myText] = var_runTime[myText] or 0 var_runTime[myText] = var_runTime[myText] + 1 local start local myEnd if not interval then interval = 1 end local length= string.len(myText) --dont scroll if length <= space then return myText end loc...
Get hours:minutes from {dtp} --time = {dtp} format function var_getTime(time) local hours =math.floor(time * 24) local minutes = math.floor(((time * 24) % 1) * 60) if minutes < 10 then minutes= "0"..minutes end return hours..":"..minutes end
Comments
Post a Comment