mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
add microdagrwaypoint precision as an option (#6437)
* Make the precision of the mircoDagr less perfekt * Add strings of precision Option to stringtabel * Update stringtable.xml * Create initSettings.sqf * Update ACE_Settings.hpp * Finally * Cleaning * Update initSettings.sqf * Move other settings to sqf, simplify waypointPrecision
This commit is contained in:
parent
61000df120
commit
ab52ff8ddb
@ -1,10 +1,5 @@
|
|||||||
class ACE_Settings {
|
class ACE_Settings {
|
||||||
class GVAR(mapDataAvailable) {
|
class GVAR(mapDataAvailable) {
|
||||||
displayName = CSTRING(MapDataAvailable_DisplayName);
|
movedToSQF = 1;
|
||||||
description = CSTRING(MapDataAvailable_Description);
|
|
||||||
value = 2;
|
|
||||||
typeName = "SCALAR";
|
|
||||||
isClientSettable = 0;
|
|
||||||
values[] = {CSTRING(MapFill_None), CSTRING(MapFill_OnlyRoads), CSTRING(MapFill_Full)};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -9,4 +9,6 @@ PREP_RECOMPILE_END;
|
|||||||
//Functions that are called for each draw of the map:
|
//Functions that are called for each draw of the map:
|
||||||
GVAR(miniMapDrawHandlers) = [];
|
GVAR(miniMapDrawHandlers) = [];
|
||||||
|
|
||||||
|
#include "initSettings.sqf"
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -89,7 +89,7 @@ case (APP_MODE_INFODISPLAY): {
|
|||||||
([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||||
};
|
};
|
||||||
private _2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000;
|
private _2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000;
|
||||||
_rangeText = format ["%1km", _2dDistanceKm toFixed 3];
|
_rangeText = format ["%1km", _2dDistanceKm toFixed GVAR(waypointPrecision)];
|
||||||
private _numASL = (_targetPosLocationASL select 2) + EGVAR(common,mapAltitude);
|
private _numASL = (_targetPosLocationASL select 2) + EGVAR(common,mapAltitude);
|
||||||
_aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber;
|
_aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber;
|
||||||
_aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"};
|
_aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"};
|
||||||
@ -145,7 +145,7 @@ case (APP_MODE_COMPASS): {
|
|||||||
([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||||
};
|
};
|
||||||
private _2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000;
|
private _2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000;
|
||||||
_rangeText = format ["%1km", _2dDistanceKm toFixed 3];
|
_rangeText = format ["%1km", _2dDistanceKm toFixed GVAR(waypointPrecision)];
|
||||||
};
|
};
|
||||||
|
|
||||||
(_display displayCtrl IDC_MODECOMPASS_BEARING) ctrlSetText _bearingText;
|
(_display displayCtrl IDC_MODECOMPASS_BEARING) ctrlSetText _bearingText;
|
||||||
@ -163,7 +163,7 @@ case (APP_MODE_WAYPOINTS): {
|
|||||||
_x params ["_wpName", "_wpPos"];
|
_x params ["_wpName", "_wpPos"];
|
||||||
_wpListBox lbAdd _wpName;
|
_wpListBox lbAdd _wpName;
|
||||||
private _2dDistanceKm = ((getPosASL ACE_player) distance2D _wpPos) / 1000;
|
private _2dDistanceKm = ((getPosASL ACE_player) distance2D _wpPos) / 1000;
|
||||||
_wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", _2dDistanceKm toFixed 3])];
|
_wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", _2dDistanceKm toFixed GVAR(waypointPrecision)])];
|
||||||
} forEach _waypoints;
|
} forEach _waypoints;
|
||||||
|
|
||||||
_currentIndex = (_currentIndex max 0) min (count _waypoints);
|
_currentIndex = (_currentIndex max 0) min (count _waypoints);
|
||||||
|
21
addons/microdagr/initSettings.sqf
Normal file
21
addons/microdagr/initSettings.sqf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// CBA Settings [ADDON: ace_microdagr]:
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(mapDataAvailable), "LIST",
|
||||||
|
[LSTRING(MapDataAvailable_DisplayName), LSTRING(MapDataAvailable_Description)],
|
||||||
|
["ACE Uncategorized", "MicroDAGR"],
|
||||||
|
[[0,1,2],[LSTRING(MapFill_None), LSTRING(MapFill_OnlyRoads), LSTRING(MapFill_Full)],2], // [values, titles, defaultIndex]
|
||||||
|
true, // isGlobal
|
||||||
|
{[QGVAR(mapDataAvailable), _this] call EFUNC(common,cbaSettings_settingChanged)},
|
||||||
|
true // require mission restart
|
||||||
|
] call CBA_settings_fnc_init;
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(waypointPrecision), "LIST",
|
||||||
|
[LSTRING(WaypointPrecision_DisplayName), LSTRING(WaypointPrecision_Description)],
|
||||||
|
["ACE Uncategorized", "MicroDAGR"],
|
||||||
|
[[1, 2, 3], [LSTRING(WaypointPrecision_medium), LSTRING(WaypointPrecision_close), LSTRING(WaypointPrecision_exact)], 2], // [values, titles, defaultIndex]
|
||||||
|
true, // isGlobal
|
||||||
|
{[QGVAR(waypointPrecision), _this] call EFUNC(common,cbaSettings_settingChanged)},
|
||||||
|
false // require mission restart
|
||||||
|
] call cba_settings_fnc_init;
|
@ -497,6 +497,27 @@
|
|||||||
<Chinesesimp>无 (无法检视地图)</Chinesesimp>
|
<Chinesesimp>无 (无法检视地图)</Chinesesimp>
|
||||||
<Chinese>無 (無法檢視地圖)</Chinese>
|
<Chinese>無 (無法檢視地圖)</Chinese>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MicroDAGR_WaypointPrecision_DisplayName">
|
||||||
|
<English>MicroDAGR - Waypoint Precision</English>
|
||||||
|
<German>MicroDAGR - Wegpunkt Genauigkeit</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MicroDAGR_WaypointPrecision_Description">
|
||||||
|
<English>Controls how precise the waypointdistance can be displayed</English>
|
||||||
|
<German>Legt die Genauigkeit der Entfernung von Wegpunkten fest</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MicroDAGR_WaypointPrecision_medium">
|
||||||
|
<English>100m</English>
|
||||||
|
<German>100m</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MicroDAGR_WaypointPrecision_close">
|
||||||
|
<English>10m</English>
|
||||||
|
<German>10m</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MicroDAGR_WaypointPrecision_exact">
|
||||||
|
<English>1m</English>
|
||||||
|
<German>1m</German>
|
||||||
|
</Key>
|
||||||
|
|
||||||
<Key ID="STR_ACE_MicroDAGR_Module_Description">
|
<Key ID="STR_ACE_MicroDAGR_Module_Description">
|
||||||
<English>Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap.</English>
|
<English>Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap.</English>
|
||||||
<Polish>Moduł ten pozwala kontrolować jak duża ilość informacji jest załadowana do przedmiotów MicroDAGR. Mniejsza ilość danych ogranicza widok mapy pokazując mniej rzeczy na minimapie.</Polish>
|
<Polish>Moduł ten pozwala kontrolować jak duża ilość informacji jest załadowana do przedmiotów MicroDAGR. Mniejsza ilość danych ogranicza widok mapy pokazując mniej rzeczy na minimapie.</Polish>
|
||||||
@ -511,7 +532,7 @@
|
|||||||
<Japanese>アイテム上で表示されるデータ量を決定します。設定を減らすと地図上での情報が少なくなります。</Japanese>
|
<Japanese>アイテム上で表示されるデータ量を決定します。設定を減らすと地図上での情報が少なくなります。</Japanese>
|
||||||
<Korean>MicroDAGR에 얼마나 많은 데이터가 들어있는지 정합니다. 적을 수록 지도상에도 비춰지는게 적어집니다.</Korean>
|
<Korean>MicroDAGR에 얼마나 많은 데이터가 들어있는지 정합니다. 적을 수록 지도상에도 비춰지는게 적어집니다.</Korean>
|
||||||
<Chinesesimp>设定有多少数据会显示在微型军用GPS接收器上。这些资料的多寡会反映在迷你地图的显示上。</Chinesesimp>
|
<Chinesesimp>设定有多少数据会显示在微型军用GPS接收器上。这些资料的多寡会反映在迷你地图的显示上。</Chinesesimp>
|
||||||
<Chinese>設定有多少數據會顯示在微型軍用GPS接收器上。這些資料的多寡會反映在迷你地圖的顯示上</Chinese>
|
<Chinese>設定有多少數據會顯示在微型軍用GPS接收器上。這些資料的多寡會反映在迷你地圖的顯示上。</Chinese>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user