public void SetMissionText(string text, HSLColor? color = null)
		{
			var luaLabel = Ui.Root.Get("INGAME_ROOT").Get<LabelWidget>("MISSION_TEXT");
			luaLabel.GetText = () => text;

			Color c = color.HasValue ? HSLColor.RGBFromHSL(color.Value.H / 255f, color.Value.S / 255f, color.Value.L / 255f) : Color.White;
			luaLabel.GetColor = () => c;
		}
コード例 #2
0
        public void FloatingText(string text, WPos position, int duration = 30, HSLColor?color = null)
        {
            if (string.IsNullOrEmpty(text) || !world.Map.Contains(world.Map.CellContaining(position)))
            {
                return;
            }

            Color c = color.HasValue ? HSLColor.RGBFromHSL(color.Value.H / 255f, color.Value.S / 255f, color.Value.L / 255f) : Color.White;

            world.AddFrameEndTask(w => w.Add(new FloatingText(position, c, text, duration)));
        }
コード例 #3
0
        public void DisplayMessage(string text, string prefix = "Mission", HSLColor?color = null)
        {
            if (string.IsNullOrEmpty(text))
            {
                return;
            }

            Color c = color.HasValue ? HSLColor.RGBFromHSL(color.Value.H / 255f, color.Value.S / 255f, color.Value.L / 255f) : Color.White;

            Game.AddChatLine(c, prefix, text);
        }