187
edits
Line 117: | Line 117: | ||
A generalised method to manage lines of text is something else I've been thinking about and I like a lot of what you two have been saying here. For example on the E/WD there is a sequence of checklists, these would be perfect for the method you are talking, in particular something like; | A generalised method to manage lines of text is something else I've been thinking about and I like a lot of what you two have been saying here. For example on the E/WD there is a sequence of checklists, these would be perfect for the method you are talking, in particular something like; | ||
var region = TextRegion.new(lines, width, "property-prefix"); | var region = TextRegion.new(lines, width, "property-prefix"); | ||
region.append("new text"); | region.append("new text"); | ||
region.replaceAt(index, "text"); | region.replaceAt(index, "text"); | ||
region.clear(); | region.clear(); | ||
region.appendStyled("text", "style"); | region.appendStyled("text", "style"); | ||
region.replaceAtStyled(index, "text", "style"); | region.replaceAtStyled(index, "text", "style"); | ||
var nextLine = region.currentLine(); | var nextLine = region.currentLine(); | ||
so this would create a child array /lines[''lines''] under ''property-prefix'' and a internal counter (for append). In your animation XML, you just then need to tie the OSG Text object to each property in the array. | so this would create a child array /lines[''lines''] under ''property-prefix'' and a internal counter (for append). In your animation XML, you just then need to tie the OSG Text object to each property in the array. |
edits