Override dsb_write across the entire codebase?
Posted: Fri Mar 06, 2020 4:33 pm
I'd really like to be able to override/wrap dsb_write across the entire codebase.
There are a lot of ALL CAPS strings scattered throughout, and if I want to render them in sentence case, I have to override all the functions that render the text which is... . I'd also like my wrapper function to automatically work out if the text is too long for the console area, and needs to be wrapped (I already have a function to split a string and create multiple lines of text from it).
Is there a way to do this?
If this is tricky, an alternate solution would be to store all messages in a global table that can be easily overridden, and then modify dsb_write so that it will wrap the text at a specified pixel length/character count or delimiter (as the / character works with scrolls) ...?
There are a lot of ALL CAPS strings scattered throughout, and if I want to render them in sentence case, I have to override all the functions that render the text which is... . I'd also like my wrapper function to automatically work out if the text is too long for the console area, and needs to be wrapped (I already have a function to split a string and create multiple lines of text from it).
Is there a way to do this?
If this is tricky, an alternate solution would be to store all messages in a global table that can be easily overridden, and then modify dsb_write so that it will wrap the text at a specified pixel length/character count or delimiter (as the / character works with scrolls) ...?