public void AddTextToQueueBreakLines(string Text, float Delay, char color = 'z', int offset = 0) { SHGUItext TextView = new SHGUItext(Text, frameOffset + offset, 0, color); TextView.BreakCut(SHGUI.current.resolutionX - frameOffset, 100); queue.Add(new scrollmessage(TextView, TextView.CountLines(), Delay, false, .5f)); }
public void AddInteractivePrompterToQueue(string Text, string prefix = "") { SHGUItext TextView = new SHGUItext(Text, frameOffset, 0, 'w'); TextView.BreakCut(SHGUI.current.resolutionX - 2, 100); SHGUIprompter promp = new SHGUIprompter(frameOffset, 0, 'w'); promp.SetInput(Text); promp.SwitchToManualInputMode(); promp.maxLineLength = SHGUI.current.resolutionX - 2 - frameOffset; promp.maxSmartBreakOffset = 0; promp.AddPrefix(prefix); queue.Add(new scrollmessage(promp, TextView.CountLines(), 0)); }
public void AddPrompterToQueue(string Text, float Delay, bool centered = false) { SHGUItext TextView = new SHGUItext(Text, frameOffset, 0, 'z'); TextView.BreakCut(SHGUI.current.resolutionX - 2 - frameOffset, 100); int width = TextView.GetLongestLineLength(); SHGUIprompter promp = new SHGUIprompter(frameOffset, 0, 'w'); promp.SetInput(Text); if (centered) { promp.x = (int)(SHGUI.current.resolutionX / 2) - (int)(promp.GetFirstLineLengthWithoutSpecialSigns() / 2); } promp.maxLineLength = SHGUI.current.resolutionX - 2; promp.maxSmartBreakOffset = 0; queue.Add(new scrollmessage(promp, TextView.CountLines(), Delay)); }