public static List<colorstring> MonsterDescriptionBox(Actor a,bool mouselook,int max_string_length) { ActorType type = a.type; List<string> text = MonsterDescriptionText(type).GetWordWrappedList(max_string_length,false); Color box_edge_color = Color.Green; Color box_corner_color = Color.Yellow; Color text_color = Color.Gray; int widest = 20; // length of "[=] Hide description" foreach(string s in text){ if(s.Length > widest){ widest = s.Length; } } if(mouselook){ if(a.name.Length > widest){ widest = a.name.Length; } if(a.WoundStatus().Length > widest){ widest = a.WoundStatus().Length; } } widest += 2; //one space on each side List<colorstring> box = new List<colorstring>(); box.Add(new colorstring("+",box_corner_color,"".PadRight(widest,'-'),box_edge_color,"+",box_corner_color)); if(mouselook){ box.Add(new colorstring("|",box_edge_color) + a.name.PadOuter(widest).GetColorString(Color.White) + new colorstring("|",box_edge_color)); box.Add(new colorstring("|",box_edge_color) + a.WoundStatus().PadOuter(widest).GetColorString(Color.White) + new colorstring("|",box_edge_color)); box.Add(new colorstring("|",box_edge_color,"".PadRight(widest),Color.Gray,"|",box_edge_color)); } foreach(string s in text){ box.Add(new colorstring("|",box_edge_color) + s.PadOuter(widest).GetColorString(text_color) + new colorstring("|",box_edge_color)); } if(!mouselook){ box.Add(new colorstring("|",box_edge_color,"".PadRight(widest),Color.Gray,"|",box_edge_color)); box.Add(new colorstring("|",box_edge_color) + "[=] Hide description".PadOuter(widest).GetColorString(text_color) + new colorstring("|",box_edge_color)); } box.Add(new colorstring("+",box_corner_color,"".PadRight(widest,'-'),box_edge_color,"+",box_corner_color)); return box; }