This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
//Top of Global
DynamicSprite*TextSprite;
DynamicSprite*TextSpriteText;
DrawingSurface*TextSurface;
DynamicSprite*Texties;
function Add(String Text, int Colour, bool Space) //Add just literally means add a piece of text
{
TextSpriteText = DynamicSprite.CreateFromExistingSprite(TextSprite.Graphic, true);
Texties = DynamicSprite.CreateFromExistingSprite(DisplayBox.Graphic, true);
TextSurface = TextSpriteText.GetDrawingSurface();
TextSurface.Clear(COLOR_TRANSPARENT);
TextSurface.DrawImage(0, 0 - GetTextHeight(Text, eFontFont1, 306), Texties.Graphic);
TextSurface.DrawingColor = Colour;
int y = 211 - GetTextHeight(Text, eFontFont1, 306);
TextSurface.DrawStringWrapped(0, y, DisplayBox.Width, eFontFont1, eAlignLeft, Text);
TextSurface.Release();
TextSprite = DynamicSprite.CreateFromExistingSprite(TextSpriteText.Graphic, true);
DisplayBox.NormalGraphic = TextSprite.Graphic;
}
if (Parser.Said("Input one")) Add("Response one.", 15); //Adds this line of text to the screen, in green
if (Parser.Said("Input two")) Add("Response two.", 15);
...
Quote from: Khris on Fri 13/08/2010 11:02:56
Btw, wouldn't it work to simply call Add(" ");?
Add("Line one.", true);
Add("Line two.");
In Box_OnActivate:
Add(String.Format("> %s", saycommand), true); //shows the last input, with a space above
...
if (Parser.Said("Input one")) Add("Response one."); //could be in any script
//Adapted from NsMn's original code.
DynamicSprite*TextSprite;
DynamicSprite*TextSpriteText;
DrawingSurface*TextSurface;
DynamicSprite*Texties;
function Add(String Text, bool Space)
{
TextSpriteText = DynamicSprite.CreateFromExistingSprite(TextSprite.Graphic, true);
Texties = DynamicSprite.CreateFromExistingSprite(DisplayBox.Graphic, true);
TextSurface = TextSpriteText.GetDrawingSurface();
TextSurface.DrawImage(0, 0 - GetTextHeight(Text, eFontFont1, 306), Texties.Graphic);
------> <------
TextSurface.DrawStringWrapped(0, 211 - GetTextHeight(Text, eFontFont1, 306), DisplayBox.Width, eFontFont1, eAlignLeft, Text);
TextSurface.Release();
TextSprite = DynamicSprite.CreateFromExistingSprite(TextSpriteText.Graphic, true);
DisplayBox.NormalGraphic = TextSprite.Graphic;
}
//Half of the code isn't relevant to the problem but I added it just in case it's useful.
if (Space == true) ... //Add a blank space of x pixels high, THEN draw the text.
Quote from: 'Angry Native'
Utter, pretentious, BBC-self-loving, wasteful drivel. NOT worth the licence fee in any shape or form. How about giving us a 6mth long story of a several fictitious families of different species of dinosaurs, in the vein of Walking With Dinosaurs.
Quote from: Stupot on Tue 10/08/2010 13:47:26
If it's not on the menu then you can't really argue if they don't let you have it...
Quote from: mog.net on Fri 06/08/2010 15:55:26
I really don't want to ask for help in the recruit a team cause more will just pile on top of mine so I want to ask here Icey topic
Quote from: icey games on Thu 05/08/2010 20:22:12
sorry snake ass
Quote from: icey games on Thu 05/08/2010 20:24:04
i wanted to hear how they looked from there makers.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.136 seconds with 20 queries.