refresh rml

Discussion about using Python with libRocket.

refresh rml

Postby shimrod on Sat Feb 18, 2012 10:37 pm

Hello,

I was wondering how to refresh data shown in a rml. For example, I have a popup window, containing the distance from ennemy.
This distance is calculated each framerate. Is it possible to have a refresh on the window all X times?

How to write code allowing to have a task which will look at different datas, to refresh the information of the window?
shimrod
 
Posts: 2
Joined: Sat Feb 18, 2012 10:12 pm

Re: refresh rml

Postby lloydw on Fri Mar 02, 2012 11:55 pm

Either you can use

RML
Code: Select all
Speed <span id="currentspeed">0</span>


Code: Select all
document.GetElementById('currentspeed').SetInnerRML('100')


or you can set up a data source and have your data displayed in tabular form. Read the datasource docs :)
lloydw
Rocket Engineer
Rocket Engineer
 
Posts: 380
Joined: Tue Jan 15, 2008 10:56 pm


Return to libRocket and Python


cron