public Tab(int scrollpos, List<Text> lines, string title, PTextBox box) { this.scrollpos = scrollpos; this.lines = lines; Title = title; tabRect = new Rect(new Rectangle(0, 0, 150, 25), Skin.skindict["tabBG"]); tabRect.Colour = Color.SteelBlue; tabText = new Text(Config.ClientSize, tabRect.Bounds.Size, Point.Empty); tabText.textFont = PTextBox.boxFont; tabText.Shadow = false; tabText.Update(title); pb = box; }
protected override void OnLoad(EventArgs e) { lua = new Lua(); lua.DoString("luanet=nil"); Skin.luaInit(); /* Type ty = typeof(Config); foreach (MethodInfo mi in ty.GetMethods()) { lua.RegisterFunction(mi.Name,this , mi); Console.WriteLine(mi.Name); }*/ conn = new Client.Connection(); conn.recvPacket += new Action<short, Client.RecievePacket>(conn_recvPacket); Pulse.Client.PacketWriter.sendCheckVersion(conn.Bw); this.Closing += new EventHandler<System.ComponentModel.CancelEventArgs>(Game_Closing); base.OnLoad(e); AudioManager.initBass(); GL.Enable(EnableCap.Texture2D); GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); if (Skin.MaskBursts) { Animation preloadBursts = new Animation(new Rectangle(1, 1, 1, 1), 1, "burst", 10, false, true); } blackOverlay.Colour = new Color4(0.0f, 0.0f, 0.0f, 0.2f); toasts = new Queue<toast>(); toasttexture = new Rect(new Rectangle(0, 0, Config.ResWidth, 50), Skin.skindict["toast"]); volumeTexture = new Rect(new Rectangle((int)(Config.ResWidth * 0.26), 727, (int)(Config.ResWidth * 0.5), 43), Skin.skindict["volumecontrol"]); int toSet = (int)((Config.Volume / 100d) * (Config.ResWidth * 0.5)); volumeRect = new Rect(new Rectangle((int)(Config.ResWidth * 0.37), 739, toSet, 25)); volumeRect.Colour = Color4.Orange; t = new Text(new Size(Width, Height), new Size(Config.ResWidth, 50), new Point(50, 0)); this.Icon = DefaultSkin.pulseicon; SongLibrary.loadSongInfo(); SongLibrary.cacheSongInfo(); //for newly added songs while game wasn't onint diff = 0; m = new MediaPlayer(this); screens.Add("menuScreen", new MenuScreen(this, "Pulse Menu")); screens.Add("selectScreen", new SelectScreen(this, "Song Select")); screens.Add("sSScreen", new ScoreSelectScreen(this, "Score Select Screen")); screens.Add("editScreen", new EditorScreen(this, "Edit Mode")); screens.Add("timingScreen", new TimingScreen(this, "Timing Screen")); screens.Add("ingameScreen", new IngameScreen(this, "ingame")); screens["ingameScreen"].Hide(); screens["timingScreen"].Hide(); screens["editScreen"].Hide(); screens["selectScreen"].Hide(); screens["sSScreen"].Hide(); screens["menuScreen"].Show(); Active = screens["menuScreen"]; GL.ClearColor(Color4.SlateGray); fpsText = new Text(new Size(Width, Height), new Size(150, 35), new Point(Config.ResWidth - 120, 733)); fpsText.Update("fps: " + this.TargetRenderFrequency); fpsText.Colour = Color.Yellow; fpsText.Shadow = true; int tipIndex = new Random().Next(Tips.tips.Length); addToast(Tips.tips[tipIndex]); if (!Directory.Exists("skin")) { Directory.CreateDirectory("skin"); } fsw = new FileSystemWatcher("skin"); fsw.EnableRaisingEvents = true; fsw.Created += new FileSystemEventHandler(fsw_Created); pbox = new PTextBox(game, new Rectangle(0, 768 - 300, Utils.getMX(1024), 290), "", ircl); pbox.minimize(0); // Thread check = new Thread(new ThreadStart(game.checkVersions)); // check.IsBackground = true; // check.Start(); Account.tryLoadAcc(); int x = 5; SongLibrary.findByMD5(" ", ref x); userScreen = new UserDisplayScreen(this); // n = new Notice(new Point(0, 200), 5000, "ASHASHASHASHASHASHASHASHASHASHASHASHASHASHASHASDFK;J"); }