private static void ConstructIntersections() { int randomWalkLength = 10000000; Timer workTime = new Timer(); for (int i = 0; i < 5; i++) { RandomWalk r1 = new RandomWalk(randomWalkLength, true); workTime.WriteTime(); RandomWalk r2 = new RandomWalk(randomWalkLength, true, false, r1.GetSpace().ElementAt(r1.GetSpace().Count / 2), null); workTime.WriteTime(); Console.WriteLine("Taking the intersection..."); System.Drawing.Bitmap b = Space.DrawToBitmap(Space.GetIntersection(r1.GetSpace(), r2.GetSpace()), true, Palette.GetNeighborhood(Color.WhiteSmoke, 100), Palette.GetNeighborhood(Color.DeepSkyBlue,10)); workTime.WriteTime(); b.Save(@"C:\Users\kylan_000\Desktop\Test Projects\Random Bitmaps\RandomArt.2014\" + "Space " + "Random Walk " + DateTime.Now.Month + "-" + DateTime.Now.Day + "-" + DateTime.Now.Year + " " + DateTime.Now.Hour + "h" + DateTime.Now.Minute + "m" + DateTime.Now.Second + "s" + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp); r1 = null; r2 = null; } Console.WriteLine("Press any key to exit..."); Console.ReadKey(); }
public kitDebug(string name) : base(name) { enabled = true; base.BackColor = Color.Transparent; tmrUpdate = new Timer("tmrUpdate"); tmrUpdate.Interval = 500; tmrUpdate.Elapsed += new EventHandler(tmrUpdate_Elapsed); lblFps = new Label("lblFps"); lblFps.Location = new Point(0, 0); lblFps.Font = Graphics.FontManager.LoadFont("tahoma", 10); lblFps.Text = "FPS"; lblFps.AutoSize = true; btnTest = new Button("btnTest"); btnTest.Location = new Point(0, 40); btnTest.Size = new Size(40, 20); btnTest.Text = "Test!"; Skins.SkinManager.LoadButtonGui(btnTest); btnTest.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnTest_Click); this.AddWidget(tmrUpdate); this.AddWidget(lblFps); this.AddWidget(btnTest); }
public override void Deserialize(GenericReader reader) { SpeechTimer = new InternalTimer(this); SpeechTimer.Start(); base.Deserialize(reader); int version = reader.ReadInt(); }
public DriftHUD() { this.Tick += OnTick; this._scaleformDisplayTimer = new Timer(1200); this._scaleformFadeTimer = new Timer(2000); this._msgTimer = new Timer(5000); this._scaleform = new Scaleform(Function.Call<int>(Hash.REQUEST_SCALEFORM_MOVIE, "MP_BIG_MESSAGE_FREEMODE")); Config.LoadUserConfig(out UserSettings); }
public HUDText(string text, int value, Entity ent, Vector3 position, Color mainColor, Color textColor, GTA.Font font = GTA.Font.Monospace, Vector3? startOffset = null) { this.text = text; this.value = value; this.entity = ent; this.position = position; this.mainColor = mainColor; this.textColor = textColor; this.font = font; this.startOffset = startOffset; this.moveOffset = new PointF(0.0f, 0.005f); this.displayTimer = new Timer(100); this.fadeTimer = new Timer(1000); this.display = true; displayTimer.Start(); }
public WispNewPlayerQuest() : base(AIType.AI_Melee, FightMode.Aggressor, 22, 1, 0.2, 1.0) { Name = "a wisp"; SetStr(90, 100); SetDex(90, 100); SetInt(15, 25); Blessed = true; CantWalk = true; Body = 165; Hue = 0x901; SpeechHue = 61; SpeechTimer = new InternalTimer(this); SpeechTimer.Start(); }
public BattleLog(string name) : base(name) { lblLog = new Label("lblLog"); lblLog.BackColor = Color.Transparent; lblLog.Size = new Size(this.Size.Width, this.Size.Height); lblLog.Font = Graphics.FontManager.LoadFont("PMU", 16); lblLog.Location = new Point(0, -4); this.Resized += new EventHandler(BattleLog_Resized); tmrHide = new Timer("tmrHide"); tmrHide.Interval = 5000; tmrHide.Elapsed += new EventHandler(tmrHide_Elapsed); tmrHide.Start(); this.AddWidget(tmrHide); this.WidgetPanel.AddWidget(lblLog); }
public TeleportCameraScript() { currentPosition = Player.Character.Position; inCameraMode = false; cameraActivated = false; zoomIn = false; zoomOut = false; zoom = 1000.0f; direction = MoveDirection.None; GTA.Timer gfxupdate = new Timer(1); gfxupdate.Tick += (s, o) => { onUpdate(); }; gfxupdate.Start(); PerFrameDrawing += TeleportCameraScript_PerFrameDrawing; KeyDown += TeleportCameraScript_KeyDown; KeyUp += TeleportCameraScript_KeyUp; BindConsoleCommand("room", (o) => { Game.Console.Print(Player.Character.CurrentRoom.ToString()); }); BindConsoleCommand("savepos", Client_ScriptCommand); BindConsoleCommand("saveall", Client_SaveAllCommand); BindConsoleCommand("disablevehicles", (o) => { World.CarDensity = 999.0f; //World.GetAllVehicles().ToList().ForEach(op => op.Delete()); }); BindConsoleCommand("tp2wp", (o) => { Blip wp = GTA.Game.GetWaypoint(); if (wp != null) { var pos = wp.Position; Player.TeleportTo(pos.X, pos.Y); } }); }
public winUpdates() : base("winUpdates") { this.Windowed = true; //this.TitleBar.Text = "News and Updates"; this.TitleBar.CloseButton.Visible = false; //this.TitleBar.BackgroundImageSizeMode = ImageSizeMode.StretchImage; this.TitleBar.BackgroundImage = SkinManager.LoadGuiElement("News", "titlebar.png"); this.Size = new Size(390, 300); this.Location = new Point(5, 160); this.BackgroundImageSizeMode = ImageSizeMode.StretchImage; this.BackgroundImage = SkinManager.LoadGui("News"); lblTitle = new Label("lblTitle"); lblTitle.AutoSize = true; lblTitle.Font = Graphics.FontManager.LoadFont("tahoma", 16); lblTitle.Location = new Point(5, 5); lblTitle.Text = "Latest News"; lblUpdates = new Label("lblUpdates"); lblUpdates.AutoSize = false; lblUpdates.Font = Graphics.FontManager.LoadFont("tahoma", 14); lblUpdates.Location = new Point(5, 25); lblUpdates.Size = new System.Drawing.Size(this.Width - (this.Location.X * 2), 200); lblUpdates.AutoScroll = true; lblUpdates.Text = "Receiving latest news from server..."; tmrUpdateNews = new Timer("tmrUpdateNews"); tmrUpdateNews.Interval = 500; tmrUpdateNews.Elapsed += new EventHandler(tmrUpdateNews_Elapsed); tmrUpdateNews.Start(); this.AddWidget(lblTitle); this.AddWidget(lblUpdates); this.AddWidget(tmrUpdateNews); }
public ActiveTextMonitor() { this.Tick += OnTick; _timer = new Timer(155); _hudText = new List<HUDText>(); }
public winScreenshotOptions() : base("winScreenshotOptions") { this.Windowed = true; this.ShowInWindowSwitcher = false; this.TitleBar.Text = "Screenshot Options"; this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 12); this.TitleBar.CloseButton.Visible = false; this.AlwaysOnTop = true; this.BackColor = Color.White; this.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; this.BorderWidth = 2; this.BorderColor = Color.Black; this.Size = new Size(200, 150); this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size); chkCaptureRegion = new CheckBox("chkCaptureRegion"); chkCaptureRegion.BackColor = Color.Transparent; chkCaptureRegion.Location = new Point(5, 5); chkCaptureRegion.Font = Graphics.FontManager.LoadFont("tahoma", 12); chkCaptureRegion.Size = new Size(200, 15); chkCaptureRegion.Text = "Only capture visible area"; chkCaptureAttributes = new CheckBox("chkCaptureAttributes"); chkCaptureAttributes.BackColor = Color.Transparent; chkCaptureAttributes.Location = new Point(5, 20); chkCaptureAttributes.Font = Graphics.FontManager.LoadFont("tahoma", 12); chkCaptureAttributes.Size = new Size(200, 15); chkCaptureAttributes.Text = "Capture Attributes"; chkCaptureAttributes.Checked = true; chkCaptureMapGrid = new CheckBox("chkCaptureMapGrid"); chkCaptureMapGrid.BackColor = Color.Transparent; chkCaptureMapGrid.Location = new Point(5, 35); chkCaptureMapGrid.Font = Graphics.FontManager.LoadFont("tahoma", 12); chkCaptureMapGrid.Size = new Size(200, 15); chkCaptureMapGrid.Text = "Capture Map Grid"; chkCaptureMapGrid.Checked = true; btnTakeScreenshot = new Button("btnTakeScreenshot"); btnTakeScreenshot.Size = new Size(70, 20); btnTakeScreenshot.Location = new Point(5, 70); btnTakeScreenshot.Font = Graphics.FontManager.LoadFont("tahoma", 12); btnTakeScreenshot.Text = "Save!"; btnTakeScreenshot.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnTakeScreenshot_Click); btnCancel = new Button("btnCancel"); btnCancel.Size = new Size(70, 20); btnCancel.Location = new Point(80, 70); btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 12); btnCancel.Text = "Cancel"; btnCancel.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnCancel_Click); lblSaved = new Label("lblSaved"); lblSaved.AutoSize = true; lblSaved.Font = Graphics.FontManager.LoadFont("tahoma", 12); lblSaved.Location = new Point(5, btnTakeScreenshot.Y + btnTakeScreenshot.Height + 5); lblSaved.Text = "Saved!"; lblSaved.Visible = false; tmrHideInfo = new Timer("tmrHideInfo"); tmrHideInfo.Interval = 2000; tmrHideInfo.Elapsed += new EventHandler(tmrHideInfo_Elapsed); this.AddWidget(chkCaptureRegion); this.AddWidget(chkCaptureAttributes); this.AddWidget(chkCaptureMapGrid); this.AddWidget(btnTakeScreenshot); this.AddWidget(btnCancel); this.AddWidget(lblSaved); this.AddWidget(tmrHideInfo); this.LoadComplete(); }
public winLogin() : base("winLogin") { this.Windowed = true; this.ShowInWindowSwitcher = false; this.Size = new Size(500, 150); this.Location = new Point(DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size).X, 5); //this.TitleBar.Text = "Login"; this.TitleBar.CloseButton.Visible = false; this.TitleBar.BackgroundImage = SkinManager.LoadGuiElement("Login Menu", "titlebar.png"); this.BackgroundImageSizeMode = ImageSizeMode.StretchImage; this.BackgroundImage = SkinManager.LoadGui("Login Menu"); btnLogin = new Button("btnLogin"); btnLogin.Location = new Point(360, 27); btnLogin.Size = new System.Drawing.Size(134, 32); btnLogin.BorderStyle = SdlDotNet.Widgets.BorderStyle.None; btnLogin.BackColor = Color.Transparent; btnLogin.BackgroundImage = SkinManager.LoadGuiElement("Login Menu", "buttons/login.png"); btnLogin.HighlightType = HighlightType.Image; btnLogin.HighlightSurface = SkinManager.LoadGuiElement("Login Menu", "buttons/login-h.png"); btnLogin.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnLogin_Click); lblUsername = new Label("lblUsername"); lblUsername.Font = Graphics.FontManager.LoadFont("Tahoma", 16); lblUsername.Text = "Username"; lblUsername.AutoSize = true; lblUsername.Location = new Point(30, 30); lblPassword = new Label("lblPassword"); lblPassword.Font = Graphics.FontManager.LoadFont("Tahoma", 16); lblPassword.Text = "Password"; lblPassword.AutoSize = true; lblPassword.Location = new Point(30, 60); txtUsername = new TextBox("txtUsername"); txtUsername.Size = new System.Drawing.Size(180, 16); txtUsername.Location = new Point(130, 30); txtUsername.Text = IO.Options.SavedAccount; txtPassword = new TextBox("txtPassword"); txtPassword.Location = new Point(130, 60); txtPassword.Size = new System.Drawing.Size(180, 16); txtPassword.Text = IO.Options.SavedPassword; txtPassword.PasswordChar = '*'; chkSavePassword = new CheckBox("chkSavePassword"); chkSavePassword.Text = "Save Password?"; chkSavePassword.Size = new System.Drawing.Size(200, 16); chkSavePassword.Location = new Point(130, 80); chkSavePassword.BackColor = Color.Transparent; if (!string.IsNullOrEmpty(IO.Options.SavedPassword)) { chkSavePassword.Checked = true; } btnClear = new Button("btnClear"); btnClear.Location = new Point(360, 59); btnClear.Size = new System.Drawing.Size(134, 32); btnClear.BorderStyle = SdlDotNet.Widgets.BorderStyle.None; btnClear.BackColor = Color.Transparent; btnClear.BackgroundImage = SkinManager.LoadGuiElement("Login Menu", "buttons/clear.png"); btnClear.HighlightType = HighlightType.Image; btnClear.HighlightSurface = SkinManager.LoadGuiElement("Login Menu", "buttons/clear-h.png"); btnClear.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnClear_Click); lblServerStatus = new Label("lblServerStatus"); lblServerStatus.AntiAlias = true; lblServerStatus.Font = Graphics.FontManager.LoadFont("tahoma", 10); lblServerStatus.ForeColor = Color.Turquoise; lblServerStatus.AutoSize = true; lblServerStatus.Text = "Checking..."; lblServerStatus.Location = new Point(90, 107); tmrServerChecker = new Timer("tmrServerChecker"); tmrServerChecker.Interval = 500; tmrServerChecker.Name = "serverChecker"; tmrServerChecker.Elapsed += new EventHandler(tmrServerChecker_Elapsed); this.AddWidget(lblUsername); this.AddWidget(lblPassword); this.AddWidget(btnLogin); this.AddWidget(txtPassword); this.AddWidget(txtUsername); this.AddWidget(chkSavePassword); this.AddWidget(btnClear); this.AddWidget(lblServerStatus); this.AddWidget(tmrServerChecker); tmrServerChecker.Start(); }
public winMovePanel() : base("winMovePanel") { this.Windowed = true; this.ShowInWindowSwitcher = false; this.Size = new System.Drawing.Size(200, 230); this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0); this.AlwaysOnTop = true; this.TitleBar.CloseButton.Visible = true; this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10); this.TitleBar.Text = "Move Panel"; pnlMoveList = new Panel("pnlMoveList"); pnlMoveList.Size = new System.Drawing.Size(200, 230); pnlMoveList.Location = new Point(0, 0); pnlMoveList.BackColor = Color.White; pnlMoveList.Visible = true; pnlMoveEditor = new Panel("pnlMoveEditor"); pnlMoveEditor.Size = new System.Drawing.Size(580, 380); pnlMoveEditor.Location = new Point(0, 0); pnlMoveEditor.BackColor = Color.White; pnlMoveEditor.Visible = false; pnlAttackerAnim = new Panel("pnlAttackerAnim"); pnlAttackerAnim.Size = new System.Drawing.Size(234, 140); pnlAttackerAnim.Location = new Point(346, 60); pnlAttackerAnim.BackColor = Color.White; pnlAttackerAnim.Visible = true; pnlTravelingAnim = new Panel("pnlTravelingAnim"); pnlTravelingAnim.Size = new System.Drawing.Size(234, 140); pnlTravelingAnim.Location = new Point(346, 60); pnlTravelingAnim.BackColor = Color.White; pnlTravelingAnim.Visible = false; pnlDefenderAnim = new Panel("pnlDefenderAnim"); pnlDefenderAnim.Size = new System.Drawing.Size(234, 140); pnlDefenderAnim.Location = new Point(346, 60); pnlDefenderAnim.BackColor = Color.White; pnlDefenderAnim.Visible = false; lbxMoveList = new ListBox("lbxMoveList"); lbxMoveList.Location = new Point(10, 10); lbxMoveList.Size = new Size(180, 140); for (int i = 0; i < 10; i++) { lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Moves.MoveHelper.Moves[(i + 1) + 10 * currentTen].Name); lbxMoveList.Items.Add(lbiItem); } lbxMoveList.SelectItem(0); btnBack = new Button("btnBack"); btnBack.Location = new Point(10, 160); btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnBack.Size = new System.Drawing.Size(64, 16); btnBack.Visible = true; btnBack.Text = "<--"; btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click); btnForward = new Button("btnForward"); btnForward.Location = new Point(126, 160); btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnForward.Size = new System.Drawing.Size(64, 16); btnForward.Visible = true; btnForward.Text = "-->"; btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click); btnEdit = new Button("btnEdit"); btnEdit.Location = new Point(10, 190); btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnEdit.Size = new System.Drawing.Size(64, 16); btnEdit.Visible = true; btnEdit.Text = "Edit"; btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click); btnCancel = new Button("btnCancel"); btnCancel.Location = new Point(126, 190); btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnCancel.Size = new System.Drawing.Size(64, 16); btnCancel.Visible = true; btnCancel.Text = "Cancel"; btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click); btnEditorCancel = new Button("btnEditorCancel"); btnEditorCancel.Location = new Point(10, 334); btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnEditorCancel.Size = new System.Drawing.Size(64, 16); btnEditorCancel.Visible = true; btnEditorCancel.Text = "Cancel"; btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click); btnEditorOK = new Button("btnEditorOK"); btnEditorOK.Location = new Point(100, 334); btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnEditorOK.Size = new System.Drawing.Size(64, 16); btnEditorOK.Visible = true; btnEditorOK.Text = "OK"; btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click); lblName = new Label("lblName"); lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblName.Text = "Move Name:"; lblName.AutoSize = true; lblName.Location = new Point(10, 4); txtName = new TextBox("txtName"); txtName.Size = new Size(200, 16); txtName.Location = new Point(10, 16); //txtName.Text = "Loading..."; lblMaxPP = new Label("lblMaxPP"); lblMaxPP.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblMaxPP.Text = "MaxPP: >=1"; lblMaxPP.AutoSize = true; lblMaxPP.Location = new Point(10, 36); nudMaxPP = new NumericUpDown("nudMaxPP"); nudMaxPP.Size = new Size(200, 16); nudMaxPP.Location = new Point(10, 48); nudMaxPP.Minimum = 1; nudMaxPP.Maximum = Int32.MaxValue; lblEffectType = new Label("lblEffectType"); lblEffectType.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblEffectType.Text = "Effect Type:"; lblEffectType.AutoSize = true; lblEffectType.Location = new Point(10, 68); cbEffectType = new ComboBox("cbEffectType"); cbEffectType.Location = new Point(10, 88); cbEffectType.Size = new Size(200, 16); for (int i = 0; i < 7; i++) { //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), ); cbEffectType.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveType), i))); } lblElement = new Label("lblElement"); lblElement.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblElement.Text = "Element:"; lblElement.AutoSize = true; lblElement.Location = new Point(10, 100); cbElement = new ComboBox("cbElement"); cbElement.Location = new Point(10, 118); cbElement.Size = new Size(200, 16); for (int i = 0; i < 19; i++) { //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), ); cbElement.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.PokemonType), i))); } lblMoveCategory = new Label("lblMoveCategory"); lblMoveCategory.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblMoveCategory.Text = "Category:"; lblMoveCategory.AutoSize = true; lblMoveCategory.Location = new Point(10, 132); cbMoveCategory = new ComboBox("cbMoveCategory"); cbMoveCategory.Location = new Point(10, 144); cbMoveCategory.Size = new Size(200, 16); for (int i = 0; i < 3; i++) { //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), ); cbMoveCategory.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveCategory), i))); } lblTargetType = new Label("lblTargetType"); lblTargetType.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblTargetType.Text = "Targets:"; lblTargetType.AutoSize = true; lblTargetType.Location = new Point(10, 164); cbTargetType = new ComboBox("cbTargetType"); cbTargetType.Location = new Point(10, 176); cbTargetType.Size = new Size(200, 16); for (int i = 0; i < 8; i++) { //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), ); cbTargetType.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveTarget), i))); } lblRangeType = new Label("lblRangeType"); lblRangeType.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblRangeType.Text = "RangeType:"; lblRangeType.AutoSize = true; lblRangeType.Location = new Point(10, 196); cbRangeType = new ComboBox("cbRangeType"); cbRangeType.Location = new Point(10, 208); cbRangeType.Size = new Size(200, 16); for (int i = 0; i < 10; i++) { //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "j"); cbRangeType.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveRange), i))); } lblRange = new Label("lblRange"); lblRange.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblRange.Text = "Range: >=0"; lblRange.AutoSize = true; lblRange.Location = new Point(10, 228); nudRange = new NumericUpDown("nudRange"); nudRange.Size = new Size(200, 16); nudRange.Location = new Point(10, 240); nudRange.Minimum = 0; nudRange.Maximum = Int32.MaxValue; lblKeyItem = new Label("lblKeyItem"); lblKeyItem.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblKeyItem.Text = "KeyItem:"; lblKeyItem.AutoSize = true; lblKeyItem.Location = new Point(10, 260); nudKeyItem = new NumericUpDown("nudKeyItem"); nudKeyItem.Size = new Size(100, 16); nudKeyItem.Location = new Point(10, 272); nudKeyItem.Minimum = 0; nudKeyItem.Maximum = MaxInfo.MaxItems; lblData1 = new Label("lblData1"); lblData1.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblData1.Text = "Data1:"; lblData1.AutoSize = true; lblData1.Location = new Point(220, 4); nudData1 = new NumericUpDown("nudData1"); nudData1.Size = new Size(100, 16); nudData1.Location = new Point(220, 16); nudData1.Minimum = Int32.MinValue; nudData1.Maximum = Int32.MaxValue; lblData2 = new Label("lblData2"); lblData2.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblData2.Text = "Data2:"; lblData2.AutoSize = true; lblData2.Location = new Point(220, 36); nudData2 = new NumericUpDown("nudData2"); nudData2.Size = new Size(100, 16); nudData2.Location = new Point(220, 48); nudData2.Minimum = Int32.MinValue; nudData2.Maximum = Int32.MaxValue; lblData3 = new Label("lblData3"); lblData3.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblData3.Text = "Data3:"; lblData3.AutoSize = true; lblData3.Location = new Point(220, 68); nudData3 = new NumericUpDown("nudData3"); nudData3.Size = new Size(100, 16); nudData3.Location = new Point(220, 80); nudData3.Minimum = Int32.MinValue; nudData3.Maximum = Int32.MaxValue; lblAccuracy = new Label("lblAccuracy"); lblAccuracy.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblAccuracy.Text = "Accuracy: >=-1"; lblAccuracy.AutoSize = true; lblAccuracy.Location = new Point(220, 100); nudAccuracy = new NumericUpDown("nudAccuracy"); nudAccuracy.Size = new Size(100, 16); nudAccuracy.Location = new Point(220, 112); nudAccuracy.Minimum = -1; nudAccuracy.Maximum = Int32.MaxValue; lblHitTime = new Label("lblHitTime"); lblHitTime.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblHitTime.Text = "HitTime: >= 1"; lblHitTime.AutoSize = true; lblHitTime.Location = new Point(220, 132); nudHitTime = new NumericUpDown("nudHitTime"); nudHitTime.Size = new Size(100, 16); nudHitTime.Location = new Point(220, 144); nudHitTime.Minimum = 1; nudHitTime.Maximum = Int32.MaxValue; lblExtraEffectData1 = new Label("lblExtraEffectData1"); lblExtraEffectData1.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblExtraEffectData1.Text = "Effect1:"; lblExtraEffectData1.AutoSize = true; lblExtraEffectData1.Location = new Point(220, 164); nudExtraEffectData1 = new NumericUpDown("nudExtraEffectData1"); nudExtraEffectData1.Size = new Size(100, 16); nudExtraEffectData1.Location = new Point(220, 176); nudExtraEffectData1.Minimum = Int32.MinValue; nudExtraEffectData1.Maximum = Int32.MaxValue; lblExtraEffectData2 = new Label("lblExtraEffectData2"); lblExtraEffectData2.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblExtraEffectData2.Text = "Effect2:"; lblExtraEffectData2.AutoSize = true; lblExtraEffectData2.Location = new Point(220, 196); nudExtraEffectData2 = new NumericUpDown("nudExtraEffectData2"); nudExtraEffectData2.Size = new Size(100, 16); nudExtraEffectData2.Location = new Point(220, 208); nudExtraEffectData2.Minimum = Int32.MinValue; nudExtraEffectData2.Maximum = Int32.MaxValue; lblExtraEffectData3 = new Label("lblExtraEffectData3"); lblExtraEffectData3.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblExtraEffectData3.Text = "Effect3:"; lblExtraEffectData3.AutoSize = true; lblExtraEffectData3.Location = new Point(220, 228); nudExtraEffectData3 = new NumericUpDown("nudExtraEffectData3"); nudExtraEffectData3.Size = new Size(100, 16); nudExtraEffectData3.Location = new Point(220, 240); nudExtraEffectData3.Minimum = Int32.MinValue; nudExtraEffectData3.Maximum = Int32.MaxValue; chkPerPlayer = new CheckBox("chkPerPlayer"); chkPerPlayer.Location = new Point(220, 260); chkPerPlayer.Size = new System.Drawing.Size(95, 17); chkPerPlayer.BackColor = Color.Transparent; chkPerPlayer.Font = Graphics.FontManager.LoadFont("tahoma", 10); chkPerPlayer.Text = "PerPlayer"; chkHitFreeze = new CheckBox("chkHitFreeze"); chkHitFreeze.Location = new Point(220, 280); chkHitFreeze.Size = new System.Drawing.Size(95, 17); chkHitFreeze.BackColor = Color.Transparent; chkHitFreeze.Font = Graphics.FontManager.LoadFont("tahoma", 10); chkHitFreeze.Text = "HitFreeze"; lblSound = new Label("lblSound"); lblSound.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblSound.Text = "Sound:"; lblSound.AutoSize = true; lblSound.Location = new Point(340, 4); nudSound = new NumericUpDown("nudSound"); nudSound.Size = new Size(100, 16); nudSound.Location = new Point(340, 16); nudSound.Minimum = 0; nudSound.Maximum = Int32.MaxValue; nudSound.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudSound_ValueChanged); btnAttackerAnim = new Button("btnAttackerAnim"); btnAttackerAnim.Location = new Point(340, 36); btnAttackerAnim.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnAttackerAnim.Size = new System.Drawing.Size(64, 16); btnAttackerAnim.Text = "Attacker"; btnAttackerAnim.Click += new EventHandler<MouseButtonEventArgs>(btnAttackerAnim_Click); btnTravelingAnim = new Button("btnTravelingAnim"); btnTravelingAnim.Location = new Point(420, 36); btnTravelingAnim.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnTravelingAnim.Size = new System.Drawing.Size(64, 16); btnTravelingAnim.Text = "Traveling"; btnTravelingAnim.Click += new EventHandler<MouseButtonEventArgs>(btnTravelingAnim_Click); btnDefenderAnim = new Button("btnDefenderAnim"); btnDefenderAnim.Location = new Point(500, 36); btnDefenderAnim.Font = Graphics.FontManager.LoadFont("tahoma", 10); btnDefenderAnim.Size = new System.Drawing.Size(64, 16); btnDefenderAnim.Text = "Defender"; btnDefenderAnim.Click += new EventHandler<MouseButtonEventArgs>(btnDefenderAnim_Click); lblAttackerAnimIndex = new Label("lblAttackerAnimIndex"); lblAttackerAnimIndex.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblAttackerAnimIndex.Text = "Animation:"; lblAttackerAnimIndex.AutoSize = true; lblAttackerAnimIndex.Location = new Point(0, 10); nudAttackerAnimIndex = new NumericUpDown("nudAttackerAnimIndex"); nudAttackerAnimIndex.Size = new Size(100, 16); nudAttackerAnimIndex.Location = new Point(0, 22); nudAttackerAnimIndex.Minimum = Int32.MinValue; nudAttackerAnimIndex.Maximum = Int32.MaxValue; nudAttackerAnimIndex.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudAttackerAnimIndex_ValueChanged); lblAttackerAnimTime = new Label("lblAttackerAnimTime"); lblAttackerAnimTime.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblAttackerAnimTime.Text = "FrameTime: (1-1000)"; lblAttackerAnimTime.AutoSize = true; lblAttackerAnimTime.Location = new Point(0, 42); nudAttackerAnimTime = new NumericUpDown("nudAttackerAnimTime"); nudAttackerAnimTime.Size = new Size(100, 16); nudAttackerAnimTime.Location = new Point(0, 54); nudAttackerAnimTime.Minimum = 1; nudAttackerAnimTime.Maximum = 1000; lblAttackerAnimCycle = new Label("lblAttackerAnimCycle"); lblAttackerAnimCycle.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblAttackerAnimCycle.Text = "Cycles: (1-10)"; lblAttackerAnimCycle.AutoSize = true; lblAttackerAnimCycle.Location = new Point(0, 74); nudAttackerAnimCycle = new NumericUpDown("nudAttackerAnimCycle"); nudAttackerAnimCycle.Size = new Size(100, 16); nudAttackerAnimCycle.Location = new Point(0, 86); nudAttackerAnimCycle.Minimum = 1; nudAttackerAnimCycle.Maximum = 10; lblTravelingAnimType = new Label("lblTravelingAnimType"); lblTravelingAnimType.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblTravelingAnimType.Text = "Anim Type:"; lblTravelingAnimType.AutoSize = true; lblTravelingAnimType.Location = new Point(0, 10); cbTravelingAnimType = new ComboBox("cbTravelingAnimType"); cbTravelingAnimType.Location = new Point(0, 22); cbTravelingAnimType.Size = new Size(200, 16); for (int i = 0; i < 8; i++) { //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "j"); cbTravelingAnimType.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveAnimationType), i))); } lblTravelingAnimIndex = new Label("lblTravelingAnimIndex"); lblTravelingAnimIndex.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblTravelingAnimIndex.Text = "Animation:"; lblTravelingAnimIndex.AutoSize = true; lblTravelingAnimIndex.Location = new Point(0, 42); nudTravelingAnimIndex = new NumericUpDown("nudTravelingAnimIndex"); nudTravelingAnimIndex.Size = new Size(100, 16); nudTravelingAnimIndex.Location = new Point(0, 54); nudTravelingAnimIndex.Minimum = Int32.MinValue; nudTravelingAnimIndex.Maximum = Int32.MaxValue; nudTravelingAnimIndex.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudTravelingAnimIndex_ValueChanged); lblTravelingAnimTime = new Label("lblTravelingAnimTime"); lblTravelingAnimTime.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblTravelingAnimTime.Text = "FrameTime: (1-1000)"; lblTravelingAnimTime.AutoSize = true; lblTravelingAnimTime.Location = new Point(0, 74); nudTravelingAnimTime = new NumericUpDown("nudTravelingAnimTime"); nudTravelingAnimTime.Size = new Size(100, 16); nudTravelingAnimTime.Location = new Point(0, 86); nudTravelingAnimTime.Minimum = 1; nudTravelingAnimTime.Maximum = 1000; lblTravelingAnimCycle = new Label("lblTravelingAnimCycle"); lblTravelingAnimCycle.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblTravelingAnimCycle.Text = "Cycles: (1-10)"; lblTravelingAnimCycle.AutoSize = true; lblTravelingAnimCycle.Location = new Point(0, 106); nudTravelingAnimCycle = new NumericUpDown("nudTravelingAnimCycle"); nudTravelingAnimCycle.Size = new Size(100, 16); nudTravelingAnimCycle.Location = new Point(0, 118); nudTravelingAnimCycle.Minimum = 1; nudTravelingAnimCycle.Maximum = 10; lblDefenderAnimIndex = new Label("lblDefenderAnimIndex"); lblDefenderAnimIndex.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblDefenderAnimIndex.Text = "Animation:"; lblDefenderAnimIndex.AutoSize = true; lblDefenderAnimIndex.Location = new Point(0, 10); nudDefenderAnimIndex = new NumericUpDown("nudDefenderAnimIndex"); nudDefenderAnimIndex.Size = new Size(100, 16); nudDefenderAnimIndex.Location = new Point(0, 22); nudDefenderAnimIndex.Minimum = Int32.MinValue; nudDefenderAnimIndex.Maximum = Int32.MaxValue; nudDefenderAnimIndex.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudDefenderAnimIndex_ValueChanged); lblDefenderAnimTime = new Label("lblDefenderAnimTime"); lblDefenderAnimTime.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblDefenderAnimTime.Text = "FrameTime: (1-1000)"; lblDefenderAnimTime.AutoSize = true; lblDefenderAnimTime.Location = new Point(0, 42); nudDefenderAnimTime = new NumericUpDown("nudDefenderAnimTime"); nudDefenderAnimTime.Size = new Size(100, 16); nudDefenderAnimTime.Location = new Point(0, 54); nudDefenderAnimTime.Minimum = 1; nudDefenderAnimTime.Maximum = 1000; lblDefenderAnimCycle = new Label("lblDefenderAnimCycle"); lblDefenderAnimCycle.Font = Graphics.FontManager.LoadFont("Tahoma", 10); lblDefenderAnimCycle.Text = "Cycles: (1-10)"; lblDefenderAnimCycle.AutoSize = true; lblDefenderAnimCycle.Location = new Point(0, 74); nudDefenderAnimCycle = new NumericUpDown("nudDefenderAnimCycle"); nudDefenderAnimCycle.Size = new Size(100, 16); nudDefenderAnimCycle.Location = new Point(0, 86); nudDefenderAnimCycle.Minimum = 1; nudDefenderAnimCycle.Maximum = 10; btnPreview = new Button("btnPreview"); btnPreview.Location = new Point(220, 300); btnPreview.Font = Graphics.FontManager.LoadFont("tahoma", 20); btnPreview.Size = new System.Drawing.Size(96, 32); btnPreview.Visible = true; btnPreview.Text = "Preview"; btnPreview.Click += new EventHandler<MouseButtonEventArgs>(btnPreview_Click); picPreview = new PictureBox("picPreview"); picPreview.Size = new Size(196, 128); picPreview.BackColor = Color.Transparent; picPreview.Location = new Point(340, 200); picPreview.Image = new SdlDotNet.Graphics.Surface(196, 128); tmrPreview = new Timer("tmrPreview"); tmrPreview.Elapsed += new EventHandler(tmrPreview_Elapsed); //moveAnim = new Graphics.Renderers.Moves.FixedMoveAnimation(0, 0); //this.AddWidget(lbxItems); pnlMoveList.AddWidget(lbxMoveList); pnlMoveList.AddWidget(btnBack); pnlMoveList.AddWidget(btnForward); pnlMoveList.AddWidget(btnEdit); pnlMoveList.AddWidget(btnCancel); pnlMoveEditor.AddWidget(lblName); pnlMoveEditor.AddWidget(txtName); pnlMoveEditor.AddWidget(lblMaxPP); pnlMoveEditor.AddWidget(nudMaxPP); pnlMoveEditor.AddWidget(lblEffectType); pnlMoveEditor.AddWidget(cbEffectType); pnlMoveEditor.AddWidget(lblElement); pnlMoveEditor.AddWidget(cbElement); pnlMoveEditor.AddWidget(lblMoveCategory); pnlMoveEditor.AddWidget(cbMoveCategory); pnlMoveEditor.AddWidget(lblTargetType); pnlMoveEditor.AddWidget(cbTargetType); pnlMoveEditor.AddWidget(lblRangeType); pnlMoveEditor.AddWidget(cbRangeType); pnlMoveEditor.AddWidget(lblRange); pnlMoveEditor.AddWidget(nudRange); pnlMoveEditor.AddWidget(lblKeyItem); pnlMoveEditor.AddWidget(nudKeyItem); pnlMoveEditor.AddWidget(lblData1); pnlMoveEditor.AddWidget(nudData1); pnlMoveEditor.AddWidget(lblData2); pnlMoveEditor.AddWidget(nudData2); pnlMoveEditor.AddWidget(lblData3); pnlMoveEditor.AddWidget(nudData3); pnlMoveEditor.AddWidget(lblAccuracy); pnlMoveEditor.AddWidget(nudAccuracy); pnlMoveEditor.AddWidget(lblHitTime); pnlMoveEditor.AddWidget(nudHitTime); pnlMoveEditor.AddWidget(lblExtraEffectData1); pnlMoveEditor.AddWidget(nudExtraEffectData1); pnlMoveEditor.AddWidget(lblExtraEffectData2); pnlMoveEditor.AddWidget(nudExtraEffectData2); pnlMoveEditor.AddWidget(lblExtraEffectData3); pnlMoveEditor.AddWidget(nudExtraEffectData3); pnlMoveEditor.AddWidget(chkPerPlayer); pnlMoveEditor.AddWidget(chkHitFreeze); pnlMoveEditor.AddWidget(lblSound); pnlMoveEditor.AddWidget(nudSound); pnlMoveEditor.AddWidget(btnAttackerAnim); pnlMoveEditor.AddWidget(btnTravelingAnim); pnlMoveEditor.AddWidget(btnDefenderAnim); pnlAttackerAnim.AddWidget(lblAttackerAnimIndex); pnlAttackerAnim.AddWidget(nudAttackerAnimIndex); pnlAttackerAnim.AddWidget(lblAttackerAnimTime); pnlAttackerAnim.AddWidget(nudAttackerAnimTime); pnlAttackerAnim.AddWidget(lblAttackerAnimCycle); pnlAttackerAnim.AddWidget(nudAttackerAnimCycle); pnlTravelingAnim.AddWidget(lblTravelingAnimType); pnlTravelingAnim.AddWidget(cbTravelingAnimType); pnlTravelingAnim.AddWidget(lblTravelingAnimIndex); pnlTravelingAnim.AddWidget(nudTravelingAnimIndex); pnlTravelingAnim.AddWidget(lblTravelingAnimTime); pnlTravelingAnim.AddWidget(nudTravelingAnimTime); pnlTravelingAnim.AddWidget(lblTravelingAnimCycle); pnlTravelingAnim.AddWidget(nudTravelingAnimCycle); pnlDefenderAnim.AddWidget(lblDefenderAnimIndex); pnlDefenderAnim.AddWidget(nudDefenderAnimIndex); pnlDefenderAnim.AddWidget(lblDefenderAnimTime); pnlDefenderAnim.AddWidget(nudDefenderAnimTime); pnlDefenderAnim.AddWidget(lblDefenderAnimCycle); pnlDefenderAnim.AddWidget(nudDefenderAnimCycle); pnlMoveEditor.AddWidget(pnlAttackerAnim); pnlMoveEditor.AddWidget(pnlTravelingAnim); pnlMoveEditor.AddWidget(pnlDefenderAnim); pnlMoveEditor.AddWidget(btnPreview); pnlMoveEditor.AddWidget(picPreview); pnlMoveEditor.AddWidget(tmrPreview); pnlMoveEditor.AddWidget(btnEditorCancel); pnlMoveEditor.AddWidget(btnEditorOK); this.AddWidget(pnlMoveList); this.AddWidget(pnlMoveEditor); //this.LoadComplete(); }