Sets the text for an updatable element in the shell content.
Syntax |
void set_text(uint32 id, const string &in text) |
---|---|
id |
Content item ID |
text |
Text to be set |
Result |
(none) |
Notes |
Although the element identifier always remains usable, it could become invalid due to other factors, such as a content reset or a normal rotation of content (due to overflow). By the time the identifier was recycled (after 4 billion elements), inconsistencies could occur. |
Example of use:
bool execute(shell::object @shell, const string &in cmdline) { uint32 id_1 = shell.content.add_text(); uint32 id_2 = shell.content.add_gauge();
shell.content.set_text(id_1, "nuovo testo"); // Set text as "nuovo testo" shell.content.set_text(id_2, "analisi..."); // Set state text as "analisi..." } |