hedgewars/uUtils.pas
changeset 15968 91c487e7d11d
parent 15961 4ad8dd66d9d5
child 15975 2146cb7be36f
--- a/hedgewars/uUtils.pas	Wed Jun 28 18:57:00 2023 +0200
+++ b/hedgewars/uUtils.pas	Wed Jun 28 21:14:56 2023 +0200
@@ -50,6 +50,8 @@
 function  EnumToStr(const en : TSprite) : shortstring; overload;
 function  EnumToStr(const en : TMapGen) : shortstring; overload;
 function  EnumToStr(const en : TWorldEdge) : shortstring; overload;
+function  EnumToStr(const en : TMsgStrId) : shortstring; overload;
+function  EnumToStr(const en : TGoalStrId) : shortstring; overload;
 
 function  Min(a, b: LongInt): LongInt; inline;
 function  MinD(a, b: double) : double; inline;
@@ -379,6 +381,15 @@
 EnumToStr := GetEnumName(TypeInfo(TWorldEdge), ord(en))
 end;
 
+function EnumToStr(const en: TMsgStrId) : shortstring; overload;
+begin
+EnumToStr := GetEnumName(TypeInfo(TMsgStrId), ord(en))
+end;
+
+function EnumToStr(const en: TGoalStrId) : shortstring; overload;
+begin
+EnumToStr := GetEnumName(TypeInfo(TGoalStrId), ord(en))
+end;
 
 function Min(a, b: LongInt): LongInt;
 begin