Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New opcode display_text_formatted #115

Merged
merged 3 commits into from
Mar 29, 2024
Merged

Conversation

MiranDMC
Copy link
Collaborator

@MiranDMC MiranDMC commented Mar 28, 2024

Gives way to draw script texts without need to create new GXT entries.
Test script:

{$CLEO .cs}
nop

{$OPCODE 2605=-1,display_text_formated offset_left %1d% offset_top %2d% format %3d% args }

while true
    wait 0
    use_text_commands {state} true

    float pos = 0.0
    int idx
    for idx = 0 to 59
        pos += 7.0
        
        set_text_scale {width} 0.3 {height} 0.9
        
        int c = idx * 4
        set_text_colour {rgb} c 255 c {alpha} 255
        
        2605: display_text_formated {offset_left} 50.0 {offset_top} pos {format} "txt %d at %0.1f" {args} idx pos
    end
end

terminate_this_custom_script

@MiranDMC MiranDMC requested a review from x87 March 28, 2024 05:02
@MiranDMC MiranDMC changed the title New opcode display_text_formated New opcode display_text_formatted Mar 28, 2024
@MiranDMC MiranDMC merged commit 66f90f8 into master Mar 29, 2024
@MiranDMC MiranDMC deleted the new_opcode_display_text_formatted branch March 29, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants