mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add back R3F weight text in object_monitorGear
The size of control 1001 was shortened in 1.8.7, so it is better to set it on control 156. The initial text is always blank for that control when cursorTarget isNull. Showing the weight carried when looking at an object or vehicle is not necessary. It cuts off with long vehicle names anyway.
This commit is contained in:
@@ -103,5 +103,13 @@ if (!(isNull (findDisplay 106))) then {
|
||||
(_display displayCtrl (_imageIDCs select _i)) ctrlShow false;
|
||||
(_display displayCtrl (_valueIDCs select _i)) ctrlShow false;
|
||||
};
|
||||
if (isNull _object) then {
|
||||
while {!(isNull (findDisplay 106))} do {
|
||||
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
|
||||
_control = _display displayCtrl 156;
|
||||
_control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",R3F_Weight];
|
||||
uiSleep 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -31,14 +31,8 @@ while {true} do
|
||||
_gearbox_visible = false;
|
||||
#endif
|
||||
|
||||
if(_gearbox_visible) then {
|
||||
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
|
||||
if(_initial_text == "") then {
|
||||
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
|
||||
_initial_text = ctrlText _control ;
|
||||
};
|
||||
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
|
||||
_control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",_initial_text,R3F_Weight];
|
||||
if (_gearbox_visible) then {
|
||||
//Moved code to object_monitorGear.sqf
|
||||
_n = 0;
|
||||
}else{
|
||||
if( _n > R3F_WEIGHT_LONG_DELAY) then {
|
||||
|
||||
@@ -53,7 +53,7 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
diag_log format["No R3F weight config for: %1", _x];
|
||||
//diag_log format["No R3F weight config for: %1", _x];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -13773,13 +13773,13 @@
|
||||
<Czech>Opustili jste %1</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_R3F_WEIGHT_InGearBox">
|
||||
<English>%1 | Weight carried : %2 lb</English>
|
||||
<German>%1 | Getragenes Gewicht : %2 Kg</German>
|
||||
<Russian>%1 | Переносимый вес : %2 Кг</Russian>
|
||||
<Spanish>%1 | Weight carried : %2 Kg</Spanish>
|
||||
<Dutch>%1 | Dragend gewicht : %2 Kg</Dutch>
|
||||
<French>%1 | Poids transporté : %2 Kg</French>
|
||||
<Czech>%1 | Nesená váha : %2 Kg</Czech>
|
||||
<English>Weight carried : %1 lb</English>
|
||||
<German>Getragenes Gewicht : %1 Kg</German>
|
||||
<Russian>Переносимый вес : %1 Кг</Russian>
|
||||
<Spanish>Weight carried : %1 Kg</Spanish>
|
||||
<Dutch>Dragend gewicht : %1 Kg</Dutch>
|
||||
<French>Poids transporté : %1 Kg</French>
|
||||
<Czech>Nesená váha : %1 Kg</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_R3F_WEIGHT_English">
|
||||
<English>lb</English>
|
||||
|
||||
Reference in New Issue
Block a user