void AddDownload() { string str = "DOWNLOAD COMPLETE"; SHGUIview a1 = new SHGUItempview(2.5f); a1.AddSubView(new SHGUIframe((int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2) - 1, (int)(SHGUI.current.resolutionY / 2) - 2, (int)(SHGUI.current.resolutionX / 2) + (int)(str.Length / 2) + 1, (int)(SHGUI.current.resolutionY / 2), 'z')); SHGUIprompter prom = new SHGUIprompter((int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2), (int)(SHGUI.current.resolutionY / 2) - 1, 'z'); prom.SetInput("^Cz████████████^W1█^W1████"); a1.AddSubView(prom); queue.Add(a1); SHGUIview a = new SHGUItempview(2.5f); SHGUIview b = new SHGUIblinkview(.2f); a.AddSubView(b); b.AddSubView(new SHGUIframe((int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2) - 1, (int)(SHGUI.current.resolutionY / 2) - 2, (int)(SHGUI.current.resolutionX / 2) + (int)(str.Length / 2) + 1, (int)(SHGUI.current.resolutionY / 2), 'z')); b.AddSubView(new SHGUItext(str, (int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2), (int)(SHGUI.current.resolutionY / 2) - 1, 'w')); queue.Add(a); }
void AddIntermezzoInternal(float time = 3.5f, bool red = false, bool reverse = false, bool onlypulse = false) { int x = (SHGUI.current.resolutionX / 2); int y = (SHGUI.current.resolutionY / 2); SHGUIview a = new SHGUItempview(time); var rect = new SHGUItvscramb(x, y, 32, 12); if (red) { rect.color = 'r'; } if (reverse) { rect.SetReverse(); } if (onlypulse) { rect.SetOnlyPulse(); } a.AddSubView(rect); queue.Add(a); }
public APPshrlgame() { queue = new List <SHGUIview> (); //AddIntermezzoMid (); //AddIntermezzoOut (); AddIntro(); queue.Add(new APPshrltalk()); SHGUItempview t = new SHGUItempview(1.5f); t.AddSubView(new APPshrlmenu(false)); queue.Add(t); AddDownload(); queue.Add(new APPshrlmenu()); AddIntermezzoIn(); queue.Add(new APPshrl("shrlTESTLEVEL")); AddIntermezzoMid(); queue.Add(new APPshrl("shrlTESTLEVEL")); AddIntermezzoOut(); queue.Add(new APPshrltalk()); allowCursorDraw = false; }
override public void Update() { base.Update(); if (fade < .99f) { return; } if (currentView != null && currentView is SHGUIguruchatwindow) { (currentView as SHGUIguruchatwindow).x = 32 - (int)((currentView as SHGUIguruchatwindow).width / 2); (currentView as SHGUIguruchatwindow).y = 11 - (int)((currentView as SHGUIguruchatwindow).height / 2); } if (Random.value > .97f) { for (int i = 0; i < 1; ++i) { SHGUItempview t = new SHGUItempview(.5f); string number = "0"; if (Random.value > .5f) { number = "1"; } t.AddSubView(new SHGUItext(number, Random.Range(0, 64), Random.Range(0, 24), 'w')); background.AddSubView(t); } } background.hidden = true; ShowNextItemWhenReady(); }
//FUNCTIONS public void Log(string msg) { SHGUItempview t = new SHGUItempview(1f); t.PunchIn(1f); t.overrideFadeOutSpeed = 100000f; t.AddSubView(new SHGUItext(msg, 0, 0, 'z')); parent.AddSubView(t); }
void AddTextParticle(string text, int x, int y, char color) { SHGUIview temp = new SHGUItempview(.1f); temp.fade = 1f; SHGUItext t = new SHGUItext(text, x, y, color); temp.AddSubView(t); t.fade = 1f; AddSubView(temp); }
public void Popup(string msg, int originx, int originy, bool overrideLast = true) { if (lastPopup != null && overrideLast) { lastPopup.Kill(); } int X = camerax + originx + 2; int Y = cameray + originy; SHGUItempview pop = new SHGUItempview(.75f); SHGUIview text = new SHGUItext(msg, X, Y, 'w'); pop.AddSubView(new SHGUIrect(X, Y, X + msg.Length - 1, Y, 'z', ' ', 2)); pop.AddSubView(text); this.AddSubViewBottom(pop); lastPopup = pop; }
void AddIntro() { SHGUIview a = new SHGUItempview(3f); SHGUIview b = new SHGUIblinkview(.3f); a.AddSubView(b); string str = "NEW SMS"; b.AddSubView(new SHGUItext(str, (int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2), (int)(SHGUI.current.resolutionY / 2) - 1, 'w')); queue.Add(a); }
void AddFigletTextParticle(string text, int x, int y, char color) { //centered X SHGUIview temp = new SHGUItempview(.4f); int halflen = (text.Length - 1) * 3; temp.fade = 1f; SHGUItext t = new SHGUItext(SHGUI.current.GetASCIIartFromFont(text), x - halflen, y, color); temp.AddSubView(t); t.fade = 1f; AddSubView(temp); lastFigletParticle = temp; }