Created
October 26, 2021 19:09
-
-
Save leafac/e032d06dfec0ef8f72dedafdcd60a8ab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ScreenWriter | |
| #text = "alskdjf alkdfjkls fal kfs aflksafsdjkl fsdk jl jklsad kljfds | |
| jkladfj kldfj klfd jslfasd jklfdk jlas akjlsdfs jklfd jkladf jlkfda jklafd jklfd | |
| ajlksfdal jkfas djksdfaj klafsd jl ljafsd jlkfdasl jadfs lkjfdas lkadlfs kfs klaj | |
| fajldks"; | |
| #font = "Arial"; | |
| //@param1:scroll_progress 'Progress' 0 0 1 0.5 0.0001 | |
| //@param3:font_size 'Font Size (px)' 40 20 250 150 4 | |
| //@param5:color_red 'Color Red' 255 0 255 128 1 | |
| //@param6:color_green 'Color Green' 255 0 255 128 1 | |
| //@param7:color_blue 'Color Blue' 255 0 255 128 1 | |
| //@param8:color_alpha 'Color Alpha' 255 0 255 128 1 | |
| //@param10:position_x 'Position X' 0.2 0 1 0.5 0.01 | |
| //@param11:position_y 'Position Y' 0.66 0 1 0.5 0.01 | |
| text_length = strlen(#text); | |
| number_of_characters_to_print = floor(text_length * scroll_progress); | |
| strcpy_substr(#substring_text, #text, 0, number_of_characters_to_print); | |
| gfx_blit(0, 1); | |
| gfx_setfont(font_size, #font); | |
| gfx_r = color_red / 255; | |
| gfx_g = color_green / 255; | |
| gfx_b = color_blue / 255; | |
| gfx_a = color_alpha / 255; | |
| gfx_str_draw(#substring_text, position_x * project_w, position_y * project_h); | |
| /* | |
| sprintf(#text_length_str,"text_length = %d",text_length); | |
| gfx_str_draw(#text_length_str,500,500); | |
| */ | |
| // Left to right generation/Right to left/Centre out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment