[ widget that turns text horizontal ]

BNig bernd.niggemann at uni-wh.de
Mon May 30 10:01:39 CEST 2016


I apparently completely misunderstood what you wanted to do.

here is a script that I hope is close to what you have in mind.

Please watch out for line breaks in the script due to text wrapping

local sTurning = false
local sDegree, sAngleStep, sSizeOfText, sEndSizeOfText, sTextIncrease

on mouseUp 
   if sTurning = false then
      put true into sTurning
      put "This is Bills text" into tText
      put 220 into sDegree -- change to start at different angle
      put 3 into sAngleStep -- change to change speed
      put 22 into sSizeOfText  -- can be higher than sEndOfText ->
      put 40 into sEndSizeOfText -- set this to sSizeOfText to stop size
      put (sEndSizeOfText - sSizeOfText)/((360-sDegree)/sAngleStep) into
      lock screen
      set the displayText of widget "turnText" to tText
      set the turnAngle of widget "turnText" to sDegree
      set the sizeOfText of widget "turnText" to sSizeOfText
      unlock screen
      send "showTheText" to me in 0 milliseconds
      put false into sTurning
   end if
end mouseUp 

on showTheText 
   if sTurning then
      if sDegree > 360 then 
         set the turnAngle of widget "turnText" to 360
         set the sizeOfText of widget "turnText" to sEndSizeOfText
         put false into sTurning
         exit showTheText
      end if
      lock screen
      set the turnAngle of widget "turnText" to sDegree
      set the sizeOfText of widget "turnText" to  trunc (sSizeOfText)
      unlock screen
      add sAngleStep to sDegree
      add sTextIncrease to sSizeOfText
      send showTheText to me in 20 milliseconds 
   end if
end showTheText 

change what is indicated in the comments to customize

Kind regards


Wprothero wrote
> Bernd:
> What I was thinking was like a text fly-out. With your widget, it would
> just start from invisible and expand out from the center and stop without
> turning. Thinking of a presentation/slide show type system that would be
> more interesting that just text on a screen. What I would really love is
> one of those applications that shows the hand drawing on the screen.
> They’re pretty "old hat" now, but not in livecode.

View this message in context: http://runtime-revolution.278305.n4.nabble.com/widget-that-turns-text-horizontal-tp4705280p4705315.html
Sent from the Revolution - User mailing list archive at Nabble.com.

More information about the use-livecode mailing list