Menu

Show posts

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

Messages - Atelier

#1161
The Rumpus Room / Re: Happy Birthday Thread!
Mon 16/08/2010 10:04:19
Happy birthday Gord and Khris :) Have a great day.

#1162
Thanks for all the really kind comments everyone. I now have more luck than a lucky leprechaun wearing a lucky leprechaun charm!
#1163
Capital letters. I thought for a moment you were going to ask which day a week started on := But everybody knows the start of the week is Sunday.

Edit: Whuh?? Wikipedia crippled my brain.
#1164
This is the code (there's one extra parameter, Colour, which I omitted earlier for clarity):

Code: ags

//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;
}


Then I use the above for practically everything:

Code: ags

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);
...


In actuality the code works perfectly - but there are no spaces separating any of the chunks of text, so it can look quite messy or hard to read.

Quote from: Khris on Fri 13/08/2010 11:02:56
Btw, wouldn't it work to simply call Add("    ");?

Yeah, this is something I tried, however only works if I wanted to add a gap after a line of text. (I can't call Add before I release the actual surface).
#1165
Thanks Joe and Khris for the replies. Your code works Khris, however something odd happens. Sometimes I call Add twice, ie:

Code: ags

Add("Line one.", true);
Add("Line two.");


It appears if I do this, one right after another (with the first set to true), the top line doesn't appear. There is however a space of 15 pixels added. Or, as is the case, this has bigger implications:

Code: ags

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


Basically, the lines with 'true' in them don't appear if there's something added right after it (yet there is a space where there should be).

Atelier
#1166
I hope you can help me with something which has been puzzling me for a long time. Before the problem, here's the code:

Code: ags

//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.


Bool Space is an optional parameter, defaulted as false. So when I call the function above, and set Space to true, I want a blank area to be added just before DrawStringWrapped is called.

So where the arrows are, I want to do this:

Code: ags

if (Space == true) ... //Add a blank space of x pixels high, THEN draw the text.


Obviously, the ... part is what I'm asking for your help with :=

Cheers
Atelier
#1167
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.

Lol what an idiot. But great news Dualnames.
#1168
You could do something with Dialog.DisplayOptions(), then set a bool to true after it's been called. Then just check that bool for whatever it is.
#1169
GAH?! But I was so secretive and everything := How come?
#1170
I feel the secret has been kept long enough.

In correspondence with Dualnames he has, indeed, assigned me as the new MAGS host. I've already been shown the ropes; instructed on keeping the MAGS site maintained, how to handle dates, the voting, the thread, etc. In comparison to others I haven't been here very long (1.3 years), yet I will do my best and keep normal procedure the same =D

Atelier
#1171
Difficult decision. I also vote for Domithan, otherwise it just wouldn't be fair ::)
#1172
General Discussion / Re: Fast Food Rants?
Tue 10/08/2010 17:37:40
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...

Stupot, I'm afraid I have overwhelming evidence otherwise ;)

I was idly looking at the news when this fitting video came up. It seems people really do take food so seriously! It made me laugh so hard, I can't understand why somebody would lose their temper like that over factory meat.
#1173
Domithan, I'm actually glad you entered. There's nothing more bitter than winning by default :D

Moreover, the first three lines are perfect. Just from those handful of words you create a sprawling gothic castle with dark dusty corridors (in my mind, anyway). Something very Macbethesque.
#1174
There definitely won't be any more for this year Vince :-\ But given the reception from critics, it's highly likely there'll be a second series come Summer 2011!

Spoiler

Although, that all depends on how explosive that explosive ending really was =3.
[close]
#1175
Sorry for the double post.

But the third and final episode of Sherlock was shown on BBC last night. Catch it here:
http://www.bbc.co.uk/iplayer/episode/b00tffft/Sherlock_The_Great_Game/

Spoiler

How can they be so brutal to us? That ending was cruel!
[close]
One of BBCs best series this year. Perhaps it will be rewarded with a BAFTA?
#1176
I actually hate cats but for the sake of this poem I love them!

Sleeping Cat

The fat,
mouse gorged,
tabby cat,


Was drinking the sun,
On the farmhouse wall.

And nobody could move him.
          Not the dog.
         Not the farmer.
        Not the boy.
       Not the girl.
      And even not
     The milkman.

And yet for want

of a delicate butterfly
fluttering by
amongst the rye


The fat,
mouse gorged,
tabby cat,


Doth pounce.
#1177
Oh, then good job. :D By lollipop I assume you mean the magic wand?
#1178
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

I see. So King Iceygames is exempt from all the forum rules.

In fact, for an example, I remember Bulbapuck posting a thread in gen-gen called "Let's Make A Game!" Bulbapuck is a respected member of the community but even so his thread got folded into the proper RAT thread.

Nice shading on Amber by the way. But did you just use the bevel tool?
#1179
Quote from: icey games on Thu 05/08/2010 20:22:12
sorry snake ass

LOL!

Quote from: icey games on Thu 05/08/2010 20:24:04
i wanted to hear how they looked from there makers.

PM them? Please use your brain cell...
#1180
Critics' Lounge / Re: Website C&C!
Wed 04/08/2010 20:19:00
Wow, that's actually a really cool website. But I feel scroll arrows should be placed together, if possible. If not then a scroll bar should be arranged (keeping graphics the same though). It's awkward traversing the whole screen.
SMF spam blocked by CleanTalk