equal
deleted
inserted
replaced
936 end; |
936 end; |
937 |
937 |
938 procedure RenderWeaponTooltip(atype: TAmmoType); |
938 procedure RenderWeaponTooltip(atype: TAmmoType); |
939 var r: TSDL_Rect; |
939 var r: TSDL_Rect; |
940 i: LongInt; |
940 i: LongInt; |
|
941 ammoname: ansistring; |
|
942 ammocap: ansistring; |
|
943 ammodesc: ansistring; |
941 extra: ansistring; |
944 extra: ansistring; |
942 extracolor: LongInt; |
945 extracolor: LongInt; |
943 begin |
946 begin |
944 // don't do anything if the window shouldn't be shown |
947 // don't do anything if the window shouldn't be shown |
945 if (cReducedQuality and rqTooltipsOff) <> 0 then |
948 if (cReducedQuality and rqTooltipsOff) <> 0 then |
976 begin |
979 begin |
977 extra:= _S''; |
980 extra:= _S''; |
978 extracolor:= 0; |
981 extracolor:= 0; |
979 end; |
982 end; |
980 |
983 |
|
984 if length(trluaammo[Ammoz[atype].NameId]) > 0 then |
|
985 ammoname := trluaammo[Ammoz[atype].NameId] |
|
986 else |
|
987 ammoname := trammo[Ammoz[atype].NameId]; |
|
988 |
|
989 if length(trluaammoc[Ammoz[atype].NameId]) > 0 then |
|
990 ammocap := trluaammoc[Ammoz[atype].NameId] |
|
991 else |
|
992 ammocap := trammoc[Ammoz[atype].NameId]; |
|
993 |
|
994 if length(trluaammod[Ammoz[atype].NameId]) > 0 then |
|
995 ammodesc := trluaammod[Ammoz[atype].NameId] |
|
996 else |
|
997 ammodesc := trammod[Ammoz[atype].NameId]; |
|
998 |
981 // render window and return the texture |
999 // render window and return the texture |
982 WeaponTooltipTex:= RenderHelpWindow(trammo[Ammoz[atype].NameId], trammoc[Ammoz[atype].NameId], trammod[Ammoz[atype].NameId], extra, extracolor, SpritesData[sprAMAmmos].Surface, @r) |
1000 WeaponTooltipTex:= RenderHelpWindow(ammoname, ammocap, ammodesc, extra, extracolor, SpritesData[sprAMAmmos].Surface, @r) |
983 end; |
1001 end; |
984 |
1002 |
985 procedure ShowWeaponTooltip(x, y: LongInt); |
1003 procedure ShowWeaponTooltip(x, y: LongInt); |
986 begin |
1004 begin |
987 // draw the texture if it exists |
1005 // draw the texture if it exists |