//---------------------------------------------------------------------------------------------------------------------------------------------------
//
// Copyright (C)2007 DarkWynter Studios. All rights reserved.
//
//---------------------------------------------------------------------------------------------------------------------------------------------------
// {Contact : darkwynter.com for licensing information
//---------------------------------------------------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.CodeDom.Compiler;
using System.CodeDom;
using System.IO;
using System.Xml;
using Microsoft.Xna;
using Microsoft.Xna.Framework;
using DarkWynter.Stream;
using DarkWynter.Engine.Globals;
using DarkWynter.Engine.Utilities;
using DarkWynter.Game;
using DarkWynter.Engine.Globals;
using DarkWynter.Engine.GameObjects;
using DarkWynter.App.Surveys;
using DarkWynter.App.ChallengeSet;
namespace DarkWynter.App
{
public partial class InstructionControl : UserControl
{
public static RichTextBox dialogTextBoxPointer;
public InstructionControl()
{
InitializeComponent();
dialogTextBoxPointer = this.dialogueTextBox;
}
///
/// Keeps the dialogue rolling
///
///
///
public void continueDialogue_Click(object sender, EventArgs e)
{
DarkWynter.App.CompilerControl.challengeList[Statics_Engine.GameSettings.currentChallengeNumber].dialogueCounter++;
// If second problem set
if (DarkWynter.App.CompilerControl.challengeList[Statics_Engine.GameSettings.currentChallengeNumber].dialogueCounter
< DarkWynter.App.CompilerControl.challengeList[Statics_Engine.GameSettings.currentChallengeNumber].dialogueMax)
{
dialogueTextBox.Text +=
DarkWynter.App.CompilerControl.challengeList[Statics_Engine.GameSettings.currentChallengeNumber]
.challengeDialogue[DarkWynter.App.CompilerControl.challengeList[Statics_Engine.GameSettings.currentChallengeNumber].dialogueCounter] + "\r\n";
if (DarkWynter.App.CompilerControl.challengeList[Statics_Engine.GameSettings.currentChallengeNumber].dialogueCounter == 10)
{
CompilerControl.menuStripPointer.Show();
}
}
// Move the scroller down
ScrolltoText();
}
// autoscoll boxNumber keeps track of which one we are changing
public void ScrolltoText()
{
InstructionControl.dialogTextBoxPointer.SelectionStart = InstructionControl.dialogTextBoxPointer.Text.Length;
InstructionControl.dialogTextBoxPointer.SelectionLength = InstructionControl.dialogTextBoxPointer.Text.Length;
InstructionControl.dialogTextBoxPointer.SelectionColor = System.Drawing.Color.Red;
InstructionControl.dialogTextBoxPointer.SelectionFont = new Font("Courier New", 20, FontStyle.Bold);
InstructionControl.dialogTextBoxPointer.ScrollToCaret();
InstructionControl.dialogTextBoxPointer.Select();
}
}
}