1
$\begingroup$

I try to create a script that simulates the blinking of terminal cursor

layout.prop(text,'character')
if text.character
    layout.prop(text,'source_character')

def uptext(text):
if text.character > 0:
blinking = [" ",text.source_character]
character2 = random.choice(blinking)
character3 = character2

text.body = character3

but the blinking is very fast, I would like to know how to improve and to correct enter image description here

$\endgroup$
1

1 Answer 1

-3
$\begingroup$

consider .... pseudo code ...

    n = 1 // for slower use 2
    fps = 24 //frames per second .. change to suit you
    timeperiod = n * fps
    if (frame % timeperiod) > (.5 * timeperiod):
       then show cursor 
       else do not show cursor
// frame is the current frame provided by Blender
// fps is the actual frames per second intended for final render

Please inspect and correct the pseudo code above

$\endgroup$
1
  • $\begingroup$ thanks for the pseudo code, I made this: link, but i want that cursor blinking itself $\endgroup$
    – vincinz
    Commented Jul 20, 2016 at 17:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .