Cubescript Text Display Support
#1
I was thinking about the recently included tutorial made by Gibstick and DES|Bukz, and I thought about how nice it would be to allow their text to be displayed in a fashion not unlike the "!TEST BUILD!" that one might see when testing SVN. I thought I would just transcribe their tutorial into C++, then I figured, why not just include some cubescript support? So I got to coding.
This is what I came up with (so far):
VARP(displayed_text_y, 0, 10, 2500);
VARP(displayed_text_x, 0, 10, 2500);
void display_cs_text ()
{
    draw_textf("%s", displayed_text_x, displayed_text_y, getalias("displayed_text"));
}
With display_cs_text hidden away in gl_drawhud.
This allows the user to change the text location, and what the text says. Now, I do see some problems with including this, with such a huge range of values for the location, but I figured I'd get that smoothed out once I finish it.
This is what I ended up with:
[Image: helloworld.jpg]

I was wondering what the devs thought of this (currently) 8 lines of C++ being include in AC? I am also wondering what other people think I can improve in these lines. I know the ranges aren't perfect, but that will come later.
Thanks given by:


Messages In This Thread
Cubescript Text Display Support - by Ronald_Reagan - 26 Nov 10, 12:27AM
RE: Cubescript Text Display Support - by V-Man - 26 Nov 10, 05:35AM
RE: Cubescript Text Display Support - by Mael - 26 Nov 10, 05:41AM
RE: Cubescript Text Display Support - by Mael - 26 Nov 10, 06:10AM
RE: Cubescript Text Display Support - by Luc@s - 26 Nov 10, 08:06PM
RE: Cubescript Text Display Support - by V-Man - 26 Nov 10, 06:59PM
RE: Cubescript Text Display Support - by V-Man - 27 Nov 10, 04:11PM