From 1447b1bed8793695081bfd711c97578581c2766f Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 6 Dec 2020 22:18:08 +0100 Subject: [PATCH 1/6] Fix Multiple Issues With Timestamps --- addons/markers/XEH_PREP.hpp | 1 + .../functions/fnc_initInsertMarker.sqf | 96 +++++++++---------- .../functions/fnc_onButtonClickConfirm.sqf | 37 ++++--- .../fnc_onCheckedChangedTimestamp.sqf | 13 +-- .../functions/fnc_onLBSelChangedColor.sqf | 1 - .../functions/fnc_onLBSelChangedShape.sqf | 1 - .../markers/functions/fnc_removeTimestamp.sqf | 46 +++++++++ addons/markers/initSettings.sqf | 26 +---- addons/markers/script_component.hpp | 30 +++--- addons/markers/stringtable.xml | 4 +- 10 files changed, 140 insertions(+), 115 deletions(-) create mode 100644 addons/markers/functions/fnc_removeTimestamp.sqf diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp index 3cf9dfc600b..9d358e2f8ab 100644 --- a/addons/markers/XEH_PREP.hpp +++ b/addons/markers/XEH_PREP.hpp @@ -17,3 +17,4 @@ PREP(movePFH); PREP(canTimestamp); PREP(onButtonClickConfirm); PREP(onCheckedChangedTimestamp); +PREP(removeTimestamp); diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 1560040bc97..945893c058b 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\A3\ui_f\hpp\defineResincl.inc" /* * Author: BIS, commy2, Timi007 * Sets up the marker placement @@ -26,30 +25,28 @@ //Can't place markers when can't interact if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith { - _display closeDisplay 2; //emulate "Cancel" button + _display closeDisplay 2; //emulate "Cancel" button }; //BIS Controls: - private _text = _display displayctrl IDC_INSERT_MARKER; - private _picture = _display displayctrl IDC_INSERT_MARKER_PICTURE; - private _channel = _display displayctrl IDC_INSERT_MARKER_CHANNELS; - private _buttonOK = _display displayctrl IDC_OK; - private _buttonCancel = _display displayctrl IDC_CANCEL; - private _description = _display displayctrl 1100; - private _title = _display displayctrl 1001; - private _descriptionChannel = _display displayctrl 1101; + private _text = _display displayctrl IDC_INSERT_MARKER; + private _picture = _display displayctrl IDC_INSERT_MARKER_PICTURE; + private _channel = _display displayctrl IDC_INSERT_MARKER_CHANNELS; + private _buttonOK = _display displayctrl IDC_OK; + private _buttonCancel = _display displayctrl IDC_CANCEL; + private _description = _display displayctrl 1100; + private _title = _display displayctrl 1001; + private _descriptionChannel = _display displayctrl 1101; //ACE Controls: - // _sizeX = _display displayctrl 1200; - // _sizeY = _display displayctrl 1201; - private _aceTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; - private _aceTimestampText = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT; - private _aceShapeLB = _display displayctrl IDC_ACE_INSERT_MARKER_SHAPE; - private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; - private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; - private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; - - private _mapDisplay = displayParent _display; + private _ctrlTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; + private _ctrlTimestampText = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT; + private _aceShapeLB = _display displayctrl IDC_ACE_INSERT_MARKER_SHAPE; + private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; + private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; + private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; + + private _mapDisplay = displayParent _display; if (isNull _mapDisplay) exitWith {ERROR("No Map");}; private _mapCtrl = _mapDisplay displayCtrl IDC_MAP; @@ -93,17 +90,9 @@ _display displayAddEventHandler ["KeyDown", {(_this select 1) in [200, 208]}]; private _hasTimestamp = false; - if !((markerText GVAR(editingMarker)) isEqualTo "") then { + if !(markerText GVAR(editingMarker) isEqualTo "") then { // fill text input with text from marker which is being edited - - private _originalText = markerText GVAR(editingMarker); - private _timeIndex = _originalText find (TIMESTAMP_SPACE + "["); - if (_timeIndex > 0 ) then { - // Shave off timestamp - _hasTimestamp = true; - _originalText = _originalText select [0,_timeIndex]; - }; - + private _originalText = markerText GVAR(editingMarker) call FUNC(removeTimestamp); _text ctrlSetText _originalText; }; @@ -114,7 +103,7 @@ private _pos = ctrlposition _text; _pos params ["_posX", "_posY", "_posW", "_posH"]; _posX = _posX + 0.01; - _posY = _posY min ((safeZoneH + safeZoneY) - (8 * _posH + 8 * BORDER)); //prevent buttons being placed below bottom edge of screen + _posY = _posY min ((safeZoneH + safeZoneY) - (8 * _posH + 8 * BORDER)); //prevent buttons being placed below bottom edge of screen _pos set [0, _posX]; _pos set [1, _posY]; _text ctrlSetPosition _pos; @@ -143,31 +132,33 @@ if (GVAR(timestampEnabled)) then { _timestampOffset = _posH + BORDER; - _pos set [0, _posX]; - _pos set [1, _posY + 1 * _posH + 2 * BORDER]; - _pos set [2, _posW - _posH]; - _pos set [3, _posH]; - _aceTimestampText ctrlSetStructuredText parseText format ["%1", LLSTRING(Timestamp)]; - _aceTimestampText ctrlSetPosition _pos; - _aceTimestampText ctrlCommit 0; + private _left = _posX; + private _top = _posY + 1 * _posH + 2 * BORDER; + private _width = _posH * safeZoneH / safeZoneW; + private _height = _posH; - _pos set [0, _posX + _posW - _posH]; - _pos set [2, _posH]; - _pos set [3, _posH]; - _aceTimestamp ctrlSetPosition _pos; - _aceTimestamp ctrlCommit 0; + _ctrlTimestamp ctrlSetPosition [_left, _top, _width, _height]; + _ctrlTimestamp ctrlCommit 0; + + _ctrlTimestampText ctrlSetStructuredText parseText format ["%1", LLSTRING(Timestamp)]; + + _left = _left + _width; + _width = _posW - _width; + _top = _top + 0.1 * _height; + _ctrlTimestampText ctrlSetPosition [_left, _top, _width, _height]; + _ctrlTimestampText ctrlCommit 0; if !([ACE_player] call FUNC(canTimestamp)) then { - _aceTimestamp ctrlEnable false; - _aceTimestamp ctrlSetTooltip LLSTRING(TimestampTooltipNoWatch); + _ctrlTimestamp ctrlEnable false; + _ctrlTimestamp ctrlSetTooltip LLSTRING(TimestampTooltipNoWatch); } else { - _aceTimestamp cbSetChecked (GETUVAR(GVAR(timestampChecked),false) || _hasTimestamp); + _ctrlTimestamp cbSetChecked (GETUVAR(GVAR(timestampChecked),false) || _hasTimestamp); }; } else { - _aceTimestampText ctrlEnable false; - _aceTimestampText ctrlShow false; - _aceTimestamp ctrlEnable false; - _aceTimestamp ctrlShow false; + _ctrlTimestampText ctrlEnable false; + _ctrlTimestampText ctrlShow false; + _ctrlTimestamp ctrlEnable false; + _ctrlTimestamp ctrlShow false; }; //--- Shape @@ -268,9 +259,8 @@ //////////////////// // init marker timestamp cb - - _buttonOK ctrlAddEventHandler ['ButtonClick', FUNC(onButtonClickConfirm)]; - _aceTimestamp ctrlAddEventHandler ['CheckedChanged', FUNC(onCheckedChangedTimestamp)]; + _buttonOK ctrlAddEventHandler ["ButtonClick", FUNC(onButtonClickConfirm)]; + _ctrlTimestamp ctrlAddEventHandler ["CheckedChanged", FUNC(onCheckedChangedTimestamp)]; //////////////////// // init marker shape lb diff --git a/addons/markers/functions/fnc_onButtonClickConfirm.sqf b/addons/markers/functions/fnc_onButtonClickConfirm.sqf index caa49a0e1c4..12c6f37d060 100644 --- a/addons/markers/functions/fnc_onButtonClickConfirm.sqf +++ b/addons/markers/functions/fnc_onButtonClickConfirm.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\a3\ui_f\hpp\defineResincl.inc" /* * Author: Freddo * When the confirm button is pressed. @@ -21,22 +20,34 @@ private _display = ctrlParent _buttonOk; private _description = _display displayctrl IDC_INSERT_MARKER; private _aceTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; -// Handle timestamp -if (cbChecked _aceTimestamp && {[ACE_player] call FUNC(canTimestamp)}) then { +// handle timestamp +if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then { private _time = daytime; - private _ampm = switch (true) do { - case (GVAR(timestampHourFormat) == 24): {""}; - case (_time < 12): {" am"}; - case (_time > 12): {SUB(_time,12); " pm"}; + + // add timestamp suffix + private _periodPostfix = ""; + if (GVAR(timestampHourFormat) == 12) then { + if (floor _time == 0) exitWith { + _time = _time + 12; + _periodPostfix = " am"; + }; + + if (floor _time == 12) exitWith { + _periodPostfix = " pm"; + }; + + if (_time < 12) then { + _periodPostfix = " am"; + } else { + _time = _time - 12; + _periodPostfix = " pm"; + }; }; - _description ctrlSetText format [ // Add timestamp suffix - "%1%2[%2%3]", + _description ctrlSetText format [ + "%1 [%2%3]", ctrlText _description, - TIMESTAMP_SPACE, [_time, GVAR(timestampFormat)] call BIS_fnc_timeToString, - _ampm + _periodPostfix ]; }; - -nil diff --git a/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf b/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf index 23a3b8c73dc..5980e875cdc 100644 --- a/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf +++ b/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf @@ -1,8 +1,7 @@ #include "script_component.hpp" -#include "\a3\ui_f\hpp\defineResincl.inc" /* - * Author: Freddo - * When the timestamp checkbox is toggled + * Author: Freddo, commy2 + * When the timestamp checkbox is toggled. * * Arguments: * 0: Checkbox @@ -12,12 +11,10 @@ * None * * Example: - * [_cbTimestamp,1] call ACE_markers_fnc_onCheckedChangedTimestamp + * [controlNull, 1] call ACE_markers_fnc_onCheckedChangedTimestamp; * * Public: No */ -params ["_cbTimestamp", "_checked"]; +params ["", "_checked"]; -SETUVAR(GVAR(timestampChecked),(_checked == 1)); - -nil +uiNamespace setVariable [QGVAR(timestampChecked), _checked == 1] diff --git a/addons/markers/functions/fnc_onLBSelChangedColor.sqf b/addons/markers/functions/fnc_onLBSelChangedColor.sqf index df45213b8e4..ceb3cfe0b52 100644 --- a/addons/markers/functions/fnc_onLBSelChangedColor.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedColor.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\a3\ui_f\hpp\defineResincl.inc" /* * Author: commy2 * When the color list box is changed. diff --git a/addons/markers/functions/fnc_onLBSelChangedShape.sqf b/addons/markers/functions/fnc_onLBSelChangedShape.sqf index 25e6b54468a..5dfbbabd014 100644 --- a/addons/markers/functions/fnc_onLBSelChangedShape.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedShape.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\a3\ui_f\hpp\defineResincl.inc" /* * Author: commy2 * When the shape list box is changed. diff --git a/addons/markers/functions/fnc_removeTimestamp.sqf b/addons/markers/functions/fnc_removeTimestamp.sqf new file mode 100644 index 00000000000..9ebc5bd2040 --- /dev/null +++ b/addons/markers/functions/fnc_removeTimestamp.sqf @@ -0,0 +1,46 @@ +#include "script_component.hpp" +/* + * Author: commy2 + * Removes timestamp from end of a string. + * + * Arguments: + * 0: Marker text string + * + * Return Value: + * Input with timestamp removed + * + * Example: + * "abc [12:00 am]" call ace_markers_fnc_removeTimestamp // "abc" + * "[13:37]" call ace_markers_fnc_removeTimestamp // "" + * "xyz [123]" call ace_markers_fnc_removeTimestamp // "xyz [123]" + * + * Public: No + */ +#define DIGITS "0123456789" + +params ["_original"]; + +// @todo, 2.02 reverse command will support STRING types +private _string = toArray _original; +reverse _string; +_string = toString _string; + +if (_string select [0, 1] != "]") exitWith {_original}; + +private _timestampLength = (_string find "[") + 1; +_string = _string select [0, _timestampLength]; + +// @todo +_string = toArray _string; +reverse _string; +_string = toString _string; + +if (_string select [0, 1] != "[") exitWith {_original}; + +if !(_string select [1, 1] in DIGITS) exitWith {_original}; +if !(_string select [2, 1] in DIGITS) exitWith {_original}; +if (_string select [3, 1] != ":") exitWith {_original}; +if !(_string select [4, 1] in DIGITS) exitWith {_original}; +if !(_string select [5, 1] in DIGITS) exitWith {_original}; + +[_original select [0, count _original - _timestampLength], " "] call CBA_fnc_rightTrim // return diff --git a/addons/markers/initSettings.sqf b/addons/markers/initSettings.sqf index 35d1cca4bbd..e7346bf2448 100644 --- a/addons/markers/initSettings.sqf +++ b/addons/markers/initSettings.sqf @@ -37,14 +37,8 @@ private _categoryName = format ["ACE %1", localize ELSTRING(map,Module_DisplayNa [LSTRING(TimestampHourFormat), LSTRING(TimestampHourFormatDescription)], [_categoryName, LLSTRING(Module_DisplayName)], [ - [ - 24, - 12 - ], - [ - LSTRING(TimestampHourFormat24), - LSTRING(TimestampHourFormat12) - ], + [24, 12], + [LSTRING(TimestampHourFormat24), LSTRING(TimestampHourFormat12)], 0 ] ] call CBA_fnc_addSetting; @@ -55,25 +49,15 @@ private _formatDescription = [ LLSTRING(TimestampFormatDescription2), LLSTRING(TimestampFormatDescription3), LLSTRING(TimestampFormatDescription4) -] joinString "\n"; +] joinString endl; [ QGVAR(timestampFormat), "LIST", [LSTRING(timestampFormat), _formatDescription], [_categoryName, LLSTRING(Module_DisplayName)], [ - [ - "HH", - "HH:MM", - "HH:MM:SS", - "HH:MM:SS:MM" - ], - [ - "HH", - "HH:MM", - "HH:MM:SS", - "HH:MM:SS:MM" - ], + ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], + ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], 1 ] ] call CBA_fnc_addSetting; diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp index a40e5571356..ab0a10961b9 100644 --- a/addons/markers/script_component.hpp +++ b/addons/markers/script_component.hpp @@ -15,6 +15,7 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" +#include "\a3\ui_f\hpp\defineResincl.inc" #define CHANNEL_NAMES [ \ localize "str_channel_global", \ @@ -24,19 +25,16 @@ localize "str_channel_vehicle" \ ] -// 129 just looks like a space -#define TIMESTAMP_SPACE (toString [129]) - -#define MOVE_RESTRICTION_NOBODY -1 -#define MOVE_RESTRICTION_ALL 0 -#define MOVE_RESTRICTION_ADMINS 1 -#define MOVE_RESTRICTION_GROUP_LEADERS 2 -#define MOVE_RESTRICTION_GROUP_LEADERS_ADMINS 3 -#define MOVE_RESTRICTION_OWNER 4 - -#define IDC_ACE_INSERT_MARKER_TIMESTAMP 1210 -#define IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT 1211 -#define IDC_ACE_INSERT_MARKER_SHAPE 1220 -#define IDC_ACE_INSERT_MARKER_COLOR 1221 -#define IDC_ACE_INSERT_MARKER_ANGLE 1230 -#define IDC_ACE_INSERT_MARKER_ANGLE_TEXT 1231 +#define MOVE_RESTRICTION_NOBODY -1 +#define MOVE_RESTRICTION_ALL 0 +#define MOVE_RESTRICTION_ADMINS 1 +#define MOVE_RESTRICTION_GROUP_LEADERS 2 +#define MOVE_RESTRICTION_GROUP_LEADERS_ADMINS 3 +#define MOVE_RESTRICTION_OWNER 4 + +#define IDC_ACE_INSERT_MARKER_TIMESTAMP 1210 +#define IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT 1211 +#define IDC_ACE_INSERT_MARKER_SHAPE 1220 +#define IDC_ACE_INSERT_MARKER_COLOR 1221 +#define IDC_ACE_INSERT_MARKER_ANGLE 1230 +#define IDC_ACE_INSERT_MARKER_ANGLE_TEXT 1231 diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 3b0fed2a04f..1848e4fa418 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -159,8 +159,8 @@ Active une interface permettant d'apposer un horodatage sur les marqueurs. - Add Timestamp: - Ajouter l'horodatage + Timestamp + Horodatage Watch Required From 3c599c6f5d4166d894bef3c4433d8460f41141ab Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 7 Dec 2020 13:25:43 +0100 Subject: [PATCH 2/6] simplify --- addons/markers/functions/fnc_initInsertMarker.sqf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 945893c058b..7d91173c878 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -89,11 +89,11 @@ // prevent vanilla key input _display displayAddEventHandler ["KeyDown", {(_this select 1) in [200, 208]}]; - private _hasTimestamp = false; - if !(markerText GVAR(editingMarker) isEqualTo "") then { + private _markerText = markerText GVAR(editingMarker); + if (_markerText != "") then { // fill text input with text from marker which is being edited - private _originalText = markerText GVAR(editingMarker) call FUNC(removeTimestamp); - _text ctrlSetText _originalText; + _markerText = _markerText call FUNC(removeTimestamp); + _text ctrlSetText _markerText; }; //Focus on the text input @@ -152,7 +152,7 @@ _ctrlTimestamp ctrlEnable false; _ctrlTimestamp ctrlSetTooltip LLSTRING(TimestampTooltipNoWatch); } else { - _ctrlTimestamp cbSetChecked (GETUVAR(GVAR(timestampChecked),false) || _hasTimestamp); + _ctrlTimestamp cbSetChecked (uiNamespace getVariable [QGVAR(timestampChecked), false]); }; } else { _ctrlTimestampText ctrlEnable false; From 891a597fc0edd850186e0715f2e28bc96e7d3307 Mon Sep 17 00:00:00 2001 From: Frank Plowman Date: Tue, 5 Jan 2021 23:16:13 +0000 Subject: [PATCH 3/6] initial commit.\nadd scale control to the ACE marker placement dialog. --- AUTHORS.txt | 1 + addons/markers/InsertMarker.hpp | 6 +++ addons/markers/XEH_PREP.hpp | 1 + addons/markers/XEH_postInit.sqf | 1 + .../functions/fnc_initInsertMarker.sqf | 44 ++++++++++++++++--- addons/markers/functions/fnc_mapDrawEH.sqf | 6 +-- .../functions/fnc_onSliderPosChangedScale.sqf | 28 ++++++++++++ addons/markers/functions/fnc_placeMarker.sqf | 3 +- addons/markers/functions/fnc_setMarkerJIP.sqf | 3 +- .../functions/fnc_setMarkerNetwork.sqf | 3 +- addons/markers/script_component.hpp | 2 + addons/markers/stringtable.xml | 3 ++ 12 files changed, 88 insertions(+), 13 deletions(-) create mode 100755 addons/markers/functions/fnc_onSliderPosChangedScale.sqf diff --git a/AUTHORS.txt b/AUTHORS.txt index 4781fdb531d..d4210fe2401 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -166,3 +166,4 @@ xrufix Zakant zGuba Fyuran +Frank diff --git a/addons/markers/InsertMarker.hpp b/addons/markers/InsertMarker.hpp index ed2d562220d..9dd8005ce05 100644 --- a/addons/markers/InsertMarker.hpp +++ b/addons/markers/InsertMarker.hpp @@ -35,5 +35,11 @@ class RscDisplayInsertMarker { class MarkerAngleText: RscText { idc = IDC_ACE_INSERT_MARKER_ANGLE_TEXT; }; + class MarkerScale: RscXSliderH { + idc = IDC_ACE_INSERT_MARKER_SCALE; + }; + class MarkerScaleText: RscText { + idc = IDC_ACE_INSERT_MARKER_SCALE_TEXT; + }; }; }; diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp index 3cf9dfc600b..a072b683711 100644 --- a/addons/markers/XEH_PREP.hpp +++ b/addons/markers/XEH_PREP.hpp @@ -6,6 +6,7 @@ PREP(onLBSelChangedChannel); PREP(onLBSelChangedColor); PREP(onLBSelChangedShape); PREP(onSliderPosChangedAngle); +PREP(onSliderPosChangedScale); PREP(placeMarker); PREP(sendMarkersJIP); PREP(setMarkerJIP); diff --git a/addons/markers/XEH_postInit.sqf b/addons/markers/XEH_postInit.sqf index 7f644691d3f..25e8317b75b 100644 --- a/addons/markers/XEH_postInit.sqf +++ b/addons/markers/XEH_postInit.sqf @@ -15,6 +15,7 @@ if (isMultiplayer && {!isServer} && {hasInterface}) then { GVAR(mapDisplaysWithDrawEHs) = []; GVAR(currentMarkerPosition) = []; GVAR(currentMarkerAngle) = 0; +GVAR(currentMarkerScale) = 1; GVAR(currentMarkerColorConfigName) = ""; GVAR(currentMarkerConfigName) = ""; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 1560040bc97..7698541da71 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -48,6 +48,8 @@ private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; + private _aceScaleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE; + private _aceScaleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE_TEXT; private _mapDisplay = displayParent _display; if (isNull _mapDisplay) exitWith {ERROR("No Map");}; @@ -114,7 +116,7 @@ private _pos = ctrlposition _text; _pos params ["_posX", "_posY", "_posW", "_posH"]; _posX = _posX + 0.01; - _posY = _posY min ((safeZoneH + safeZoneY) - (8 * _posH + 8 * BORDER)); //prevent buttons being placed below bottom edge of screen + _posY = _posY min ((safeZoneH + safeZoneY) - (11 * _posH + 11 * BORDER)); //prevent buttons being placed below bottom edge of screen _pos set [0, _posX]; _pos set [1, _posY]; _text ctrlSetPosition _pos; @@ -129,9 +131,9 @@ //--- Description _pos set [1, _posY - 1 * _posH]; if (GVAR(timestampEnabled)) then { - _pos set [3,7 * _posH + 7 * BORDER]; + _pos set [3,9 * _posH + 9 * BORDER]; } else { - _pos set [3,6 * _posH + 6 * BORDER]; + _pos set [3,10 * _posH + 10 * BORDER]; }; _description ctrlEnable false; _description ctrlSetPosition _pos; @@ -196,16 +198,28 @@ _aceAngleSliderText ctrlSetPosition _pos; _aceAngleSliderText ctrlCommit 0; + //--- Scale + _pos set [1, _posY + 5 * _posH + 6 * BORDER + _timestampOffset]; + _pos set [2, _posW]; + _aceScaleSlider ctrlSetPosition _pos; + _aceScaleSlider ctrlCommit 0; + + //--- Scale Text + _pos set [1, _posY + 6 * _posH + 7 * BORDER + _timestampOffset]; + _pos set [2, _posW]; + _aceScaleSliderText ctrlSetPosition _pos; + _aceScaleSliderText ctrlCommit 0; + private _offsetButtons = 0; if (isMultiplayer) then { - _pos set [1,_posY + 5 * _posH + 7 * BORDER + _timestampOffset]; + _pos set [1,_posY + 7 * _posH + 9 * BORDER + _timestampOffset]; _pos set [3,_posH]; _descriptionChannel ctrlSetStructuredText parseText format ["%1:", localize "str_a3_cfgvehicles_modulerespawnposition_f_arguments_marker_0"]; _descriptionChannel ctrlSetPosition _pos; _descriptionChannel ctrlCommit 0; - _pos set [1,_posY + 6 * _posH + 7 * BORDER + _timestampOffset]; + _pos set [1,_posY + 8 * _posH + 9 * BORDER + _timestampOffset]; _pos set [3,_posH]; _channel ctrlSetPosition _pos; _channel ctrlCommit 0; @@ -244,11 +258,11 @@ _channel ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedChannel)}]; - _offsetButtons = 7 * _posH + 8 * BORDER; + _offsetButtons = 9 * _posH + 10 * BORDER; } else { _descriptionChannel ctrlShow false; _channel ctrlShow false; - _offsetButtons = 5 * _posH + 7 * BORDER; + _offsetButtons = 7 * _posH + 9 * BORDER; }; //--- ButtonOK @@ -331,4 +345,20 @@ //Update now and add eventHandler: [_aceAngleSlider, _curSelAngle] call FUNC(onSliderPosChangedAngle); _aceAngleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}]; + + //////////////////// + // init marker scale slider + _aceScaleSlider sliderSetRange [0.5, 2.0]; + + if !(GVAR(editingMarker) isEqualTo "") then { + //get the original scale + GVAR(currentMarkerScale) = markerSize GVAR(editingMarker); + }; + + private _curSelScale = GETGVAR(currentMarkerScale,1); + _aceScaleSlider sliderSetPosition _curSelScale; + + //Update now and add eventHandler: + [_aceScaleSlider, _curSelScale] call FUNC(onSliderPosChangedScale); + _aceScaleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedScale)}]; }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/markers/functions/fnc_mapDrawEH.sqf b/addons/markers/functions/fnc_mapDrawEH.sqf index 5f3c6aed15b..02540b699fe 100644 --- a/addons/markers/functions/fnc_mapDrawEH.sqf +++ b/addons/markers/functions/fnc_mapDrawEH.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: PabstMirror - * Draws the current temp marker. Allows rotation. + * Draws the current temp marker. Allows rotation and scale. * * Arguments: * 0: TheMap @@ -25,8 +25,8 @@ if (GVAR(currentMarkerConfigName) == "" || {GVAR(currentMarkerColorConfigName) = ERROR("Bad Data"); }; -private _sizeX = 1; -private _sizeY = 1; +private _sizeX = GVAR(currentMarkerScale); +private _sizeY = GVAR(currentMarkerScale); private _textureConfig = configFile >> "CfgMarkers" >> GVAR(currentMarkerConfigName); private _texture = getText (_textureConfig >> "icon"); diff --git a/addons/markers/functions/fnc_onSliderPosChangedScale.sqf b/addons/markers/functions/fnc_onSliderPosChangedScale.sqf new file mode 100755 index 00000000000..7e025061253 --- /dev/null +++ b/addons/markers/functions/fnc_onSliderPosChangedScale.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" +/* + * Author: frankplow + * Scale Slider Pos changed + * + * Arguments: + * 0: Slider (idc 1420) + * 1: Slider Data (scale: 0.5...2.0) + * + * Return Value: + * None + * + * Example: + * [Slider, 1.5] call ace_markers_fnc_onSliderPosChangedScale; + * + * Public: No + */ + +params ["_ctrl", "_data"]; +TRACE_2("params",_ctrl,_data); + +private _scale = _data * 100; +_scale = round _scale; +_scale = _scale / 100; + +((ctrlParent _ctrl) displayCtrl IDC_ACE_INSERT_MARKER_SCALE_TEXT) ctrlSetText format [localize LSTRING(MarkerScale), _scale]; + +GVAR(currentMarkerScale) = _data; diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf index a1b136aad51..b4f38c42322 100644 --- a/addons/markers/functions/fnc_placeMarker.sqf +++ b/addons/markers/functions/fnc_placeMarker.sqf @@ -58,7 +58,8 @@ if (_closeNum isEqualTo 1) then { GETGVAR(currentMarkerConfigName,""), GETGVAR(currentMarkerColorConfigName,""), GETGVAR(currentMarkerPosition,[]), - GETGVAR(currentMarkerAngle,0) + GETGVAR(currentMarkerAngle,0), + GETGVAR(currentMarkerScale,1) ] ]] call CBA_fnc_globalEvent; diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf index 9c9aea9fd71..b8d2d99dbc0 100644 --- a/addons/markers/functions/fnc_setMarkerJIP.sqf +++ b/addons/markers/functions/fnc_setMarkerJIP.sqf @@ -25,7 +25,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); if (_index != -1) then { private _data = _allMapMarkersProperties select _index; - _data params ["_markerClassname", "_colorClassname", "_pos", "_dir"]; + _data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; private _config = (configfile >> "CfgMarkers") >> _markerClassname; @@ -47,6 +47,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); _x setMarkerPosLocal _pos; _x setMarkerDirLocal _dir; + _x setMarkerSizeLocal _scale; }; false } count allMapMarkers; diff --git a/addons/markers/functions/fnc_setMarkerNetwork.sqf b/addons/markers/functions/fnc_setMarkerNetwork.sqf index eb0b547bb0f..a8e8453525e 100644 --- a/addons/markers/functions/fnc_setMarkerNetwork.sqf +++ b/addons/markers/functions/fnc_setMarkerNetwork.sqf @@ -19,7 +19,7 @@ params ["_marker", "_data"]; TRACE_2("params",_marker,_data); -_data params ["_markerClassname", "_colorClassname", "_pos", "_dir"]; +_data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; private _config = configfile >> "CfgMarkers" >> _markerClassname; @@ -41,6 +41,7 @@ _marker setMarkerColorLocal configName _config; _marker setMarkerPosLocal _pos; _marker setMarkerDirLocal _dir; +_marker setMarkerSizeLocal [_scale, _scale]; // save properties on server machine for JIP, marker editing ready if (isMultiplayer && {isServer}) then { diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp index a40e5571356..8d867b52a29 100644 --- a/addons/markers/script_component.hpp +++ b/addons/markers/script_component.hpp @@ -40,3 +40,5 @@ #define IDC_ACE_INSERT_MARKER_COLOR 1221 #define IDC_ACE_INSERT_MARKER_ANGLE 1230 #define IDC_ACE_INSERT_MARKER_ANGLE_TEXT 1231 +#define IDC_ACE_INSERT_MARKER_SCALE 1240 +#define IDC_ACE_INSERT_MARKER_SCALE_TEXT 1241 diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 3b0fed2a04f..fa9d1e2bd04 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -1,6 +1,9 @@ + + Scale: %1 + Direction: %1° Drehung: %1° From 0f939b189b7a838c961878c5f980306ebb6d2c67 Mon Sep 17 00:00:00 2001 From: Frank Plowman Date: Tue, 5 Jan 2021 23:16:13 +0000 Subject: [PATCH 4/6] Add scale controls to the marker placement dialog --- AUTHORS.txt | 1 + addons/markers/InsertMarker.hpp | 6 +++ addons/markers/XEH_PREP.hpp | 1 + addons/markers/XEH_postInit.sqf | 1 + .../functions/fnc_initInsertMarker.sqf | 44 ++++++++++++++++--- addons/markers/functions/fnc_mapDrawEH.sqf | 6 +-- .../functions/fnc_onSliderPosChangedScale.sqf | 28 ++++++++++++ addons/markers/functions/fnc_placeMarker.sqf | 3 +- addons/markers/functions/fnc_setMarkerJIP.sqf | 3 +- .../functions/fnc_setMarkerNetwork.sqf | 3 +- addons/markers/script_component.hpp | 2 + addons/markers/stringtable.xml | 3 ++ 12 files changed, 88 insertions(+), 13 deletions(-) create mode 100755 addons/markers/functions/fnc_onSliderPosChangedScale.sqf diff --git a/AUTHORS.txt b/AUTHORS.txt index 4781fdb531d..d4210fe2401 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -166,3 +166,4 @@ xrufix Zakant zGuba Fyuran +Frank diff --git a/addons/markers/InsertMarker.hpp b/addons/markers/InsertMarker.hpp index ed2d562220d..9dd8005ce05 100644 --- a/addons/markers/InsertMarker.hpp +++ b/addons/markers/InsertMarker.hpp @@ -35,5 +35,11 @@ class RscDisplayInsertMarker { class MarkerAngleText: RscText { idc = IDC_ACE_INSERT_MARKER_ANGLE_TEXT; }; + class MarkerScale: RscXSliderH { + idc = IDC_ACE_INSERT_MARKER_SCALE; + }; + class MarkerScaleText: RscText { + idc = IDC_ACE_INSERT_MARKER_SCALE_TEXT; + }; }; }; diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp index 3cf9dfc600b..a072b683711 100644 --- a/addons/markers/XEH_PREP.hpp +++ b/addons/markers/XEH_PREP.hpp @@ -6,6 +6,7 @@ PREP(onLBSelChangedChannel); PREP(onLBSelChangedColor); PREP(onLBSelChangedShape); PREP(onSliderPosChangedAngle); +PREP(onSliderPosChangedScale); PREP(placeMarker); PREP(sendMarkersJIP); PREP(setMarkerJIP); diff --git a/addons/markers/XEH_postInit.sqf b/addons/markers/XEH_postInit.sqf index 7f644691d3f..25e8317b75b 100644 --- a/addons/markers/XEH_postInit.sqf +++ b/addons/markers/XEH_postInit.sqf @@ -15,6 +15,7 @@ if (isMultiplayer && {!isServer} && {hasInterface}) then { GVAR(mapDisplaysWithDrawEHs) = []; GVAR(currentMarkerPosition) = []; GVAR(currentMarkerAngle) = 0; +GVAR(currentMarkerScale) = 1; GVAR(currentMarkerColorConfigName) = ""; GVAR(currentMarkerConfigName) = ""; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 1560040bc97..7698541da71 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -48,6 +48,8 @@ private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; + private _aceScaleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE; + private _aceScaleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE_TEXT; private _mapDisplay = displayParent _display; if (isNull _mapDisplay) exitWith {ERROR("No Map");}; @@ -114,7 +116,7 @@ private _pos = ctrlposition _text; _pos params ["_posX", "_posY", "_posW", "_posH"]; _posX = _posX + 0.01; - _posY = _posY min ((safeZoneH + safeZoneY) - (8 * _posH + 8 * BORDER)); //prevent buttons being placed below bottom edge of screen + _posY = _posY min ((safeZoneH + safeZoneY) - (11 * _posH + 11 * BORDER)); //prevent buttons being placed below bottom edge of screen _pos set [0, _posX]; _pos set [1, _posY]; _text ctrlSetPosition _pos; @@ -129,9 +131,9 @@ //--- Description _pos set [1, _posY - 1 * _posH]; if (GVAR(timestampEnabled)) then { - _pos set [3,7 * _posH + 7 * BORDER]; + _pos set [3,9 * _posH + 9 * BORDER]; } else { - _pos set [3,6 * _posH + 6 * BORDER]; + _pos set [3,10 * _posH + 10 * BORDER]; }; _description ctrlEnable false; _description ctrlSetPosition _pos; @@ -196,16 +198,28 @@ _aceAngleSliderText ctrlSetPosition _pos; _aceAngleSliderText ctrlCommit 0; + //--- Scale + _pos set [1, _posY + 5 * _posH + 6 * BORDER + _timestampOffset]; + _pos set [2, _posW]; + _aceScaleSlider ctrlSetPosition _pos; + _aceScaleSlider ctrlCommit 0; + + //--- Scale Text + _pos set [1, _posY + 6 * _posH + 7 * BORDER + _timestampOffset]; + _pos set [2, _posW]; + _aceScaleSliderText ctrlSetPosition _pos; + _aceScaleSliderText ctrlCommit 0; + private _offsetButtons = 0; if (isMultiplayer) then { - _pos set [1,_posY + 5 * _posH + 7 * BORDER + _timestampOffset]; + _pos set [1,_posY + 7 * _posH + 9 * BORDER + _timestampOffset]; _pos set [3,_posH]; _descriptionChannel ctrlSetStructuredText parseText format ["%1:", localize "str_a3_cfgvehicles_modulerespawnposition_f_arguments_marker_0"]; _descriptionChannel ctrlSetPosition _pos; _descriptionChannel ctrlCommit 0; - _pos set [1,_posY + 6 * _posH + 7 * BORDER + _timestampOffset]; + _pos set [1,_posY + 8 * _posH + 9 * BORDER + _timestampOffset]; _pos set [3,_posH]; _channel ctrlSetPosition _pos; _channel ctrlCommit 0; @@ -244,11 +258,11 @@ _channel ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedChannel)}]; - _offsetButtons = 7 * _posH + 8 * BORDER; + _offsetButtons = 9 * _posH + 10 * BORDER; } else { _descriptionChannel ctrlShow false; _channel ctrlShow false; - _offsetButtons = 5 * _posH + 7 * BORDER; + _offsetButtons = 7 * _posH + 9 * BORDER; }; //--- ButtonOK @@ -331,4 +345,20 @@ //Update now and add eventHandler: [_aceAngleSlider, _curSelAngle] call FUNC(onSliderPosChangedAngle); _aceAngleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}]; + + //////////////////// + // init marker scale slider + _aceScaleSlider sliderSetRange [0.5, 2.0]; + + if !(GVAR(editingMarker) isEqualTo "") then { + //get the original scale + GVAR(currentMarkerScale) = markerSize GVAR(editingMarker); + }; + + private _curSelScale = GETGVAR(currentMarkerScale,1); + _aceScaleSlider sliderSetPosition _curSelScale; + + //Update now and add eventHandler: + [_aceScaleSlider, _curSelScale] call FUNC(onSliderPosChangedScale); + _aceScaleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedScale)}]; }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/markers/functions/fnc_mapDrawEH.sqf b/addons/markers/functions/fnc_mapDrawEH.sqf index 5f3c6aed15b..02540b699fe 100644 --- a/addons/markers/functions/fnc_mapDrawEH.sqf +++ b/addons/markers/functions/fnc_mapDrawEH.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: PabstMirror - * Draws the current temp marker. Allows rotation. + * Draws the current temp marker. Allows rotation and scale. * * Arguments: * 0: TheMap @@ -25,8 +25,8 @@ if (GVAR(currentMarkerConfigName) == "" || {GVAR(currentMarkerColorConfigName) = ERROR("Bad Data"); }; -private _sizeX = 1; -private _sizeY = 1; +private _sizeX = GVAR(currentMarkerScale); +private _sizeY = GVAR(currentMarkerScale); private _textureConfig = configFile >> "CfgMarkers" >> GVAR(currentMarkerConfigName); private _texture = getText (_textureConfig >> "icon"); diff --git a/addons/markers/functions/fnc_onSliderPosChangedScale.sqf b/addons/markers/functions/fnc_onSliderPosChangedScale.sqf new file mode 100755 index 00000000000..7e025061253 --- /dev/null +++ b/addons/markers/functions/fnc_onSliderPosChangedScale.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" +/* + * Author: frankplow + * Scale Slider Pos changed + * + * Arguments: + * 0: Slider (idc 1420) + * 1: Slider Data (scale: 0.5...2.0) + * + * Return Value: + * None + * + * Example: + * [Slider, 1.5] call ace_markers_fnc_onSliderPosChangedScale; + * + * Public: No + */ + +params ["_ctrl", "_data"]; +TRACE_2("params",_ctrl,_data); + +private _scale = _data * 100; +_scale = round _scale; +_scale = _scale / 100; + +((ctrlParent _ctrl) displayCtrl IDC_ACE_INSERT_MARKER_SCALE_TEXT) ctrlSetText format [localize LSTRING(MarkerScale), _scale]; + +GVAR(currentMarkerScale) = _data; diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf index a1b136aad51..b4f38c42322 100644 --- a/addons/markers/functions/fnc_placeMarker.sqf +++ b/addons/markers/functions/fnc_placeMarker.sqf @@ -58,7 +58,8 @@ if (_closeNum isEqualTo 1) then { GETGVAR(currentMarkerConfigName,""), GETGVAR(currentMarkerColorConfigName,""), GETGVAR(currentMarkerPosition,[]), - GETGVAR(currentMarkerAngle,0) + GETGVAR(currentMarkerAngle,0), + GETGVAR(currentMarkerScale,1) ] ]] call CBA_fnc_globalEvent; diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf index 9c9aea9fd71..b8d2d99dbc0 100644 --- a/addons/markers/functions/fnc_setMarkerJIP.sqf +++ b/addons/markers/functions/fnc_setMarkerJIP.sqf @@ -25,7 +25,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); if (_index != -1) then { private _data = _allMapMarkersProperties select _index; - _data params ["_markerClassname", "_colorClassname", "_pos", "_dir"]; + _data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; private _config = (configfile >> "CfgMarkers") >> _markerClassname; @@ -47,6 +47,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); _x setMarkerPosLocal _pos; _x setMarkerDirLocal _dir; + _x setMarkerSizeLocal _scale; }; false } count allMapMarkers; diff --git a/addons/markers/functions/fnc_setMarkerNetwork.sqf b/addons/markers/functions/fnc_setMarkerNetwork.sqf index eb0b547bb0f..a8e8453525e 100644 --- a/addons/markers/functions/fnc_setMarkerNetwork.sqf +++ b/addons/markers/functions/fnc_setMarkerNetwork.sqf @@ -19,7 +19,7 @@ params ["_marker", "_data"]; TRACE_2("params",_marker,_data); -_data params ["_markerClassname", "_colorClassname", "_pos", "_dir"]; +_data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; private _config = configfile >> "CfgMarkers" >> _markerClassname; @@ -41,6 +41,7 @@ _marker setMarkerColorLocal configName _config; _marker setMarkerPosLocal _pos; _marker setMarkerDirLocal _dir; +_marker setMarkerSizeLocal [_scale, _scale]; // save properties on server machine for JIP, marker editing ready if (isMultiplayer && {isServer}) then { diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp index a40e5571356..8d867b52a29 100644 --- a/addons/markers/script_component.hpp +++ b/addons/markers/script_component.hpp @@ -40,3 +40,5 @@ #define IDC_ACE_INSERT_MARKER_COLOR 1221 #define IDC_ACE_INSERT_MARKER_ANGLE 1230 #define IDC_ACE_INSERT_MARKER_ANGLE_TEXT 1231 +#define IDC_ACE_INSERT_MARKER_SCALE 1240 +#define IDC_ACE_INSERT_MARKER_SCALE_TEXT 1241 diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 3b0fed2a04f..fa9d1e2bd04 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -1,6 +1,9 @@ + + Scale: %1 + Direction: %1° Drehung: %1° From 3461bd8f23a3752fb4bc8a8c1badcb3a7020dfd5 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 26 Feb 2021 22:27:58 -0600 Subject: [PATCH 5/6] fix merge --- addons/markers/script_component.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp index ab0a10961b9..8da334153d0 100644 --- a/addons/markers/script_component.hpp +++ b/addons/markers/script_component.hpp @@ -38,3 +38,5 @@ #define IDC_ACE_INSERT_MARKER_COLOR 1221 #define IDC_ACE_INSERT_MARKER_ANGLE 1230 #define IDC_ACE_INSERT_MARKER_ANGLE_TEXT 1231 +#define IDC_ACE_INSERT_MARKER_SCALE 1240 +#define IDC_ACE_INSERT_MARKER_SCALE_TEXT 1241 From b009f3beb90a213b07acc44e64e6a94ff195ca41 Mon Sep 17 00:00:00 2001 From: jonpas Date: Tue, 20 Apr 2021 12:31:43 +0200 Subject: [PATCH 6/6] Apply suggestions from code review --- addons/markers/functions/fnc_onSliderPosChangedScale.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/markers/functions/fnc_onSliderPosChangedScale.sqf b/addons/markers/functions/fnc_onSliderPosChangedScale.sqf index 7e025061253..8f386729d06 100755 --- a/addons/markers/functions/fnc_onSliderPosChangedScale.sqf +++ b/addons/markers/functions/fnc_onSliderPosChangedScale.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: frankplow - * Scale Slider Pos changed + * Applies scale from on slider position change. * * Arguments: * 0: Slider (idc 1420) @@ -11,7 +11,7 @@ * None * * Example: - * [Slider, 1.5] call ace_markers_fnc_onSliderPosChangedScale; + * [slider, 1.5] call ace_markers_fnc_onSliderPosChangedScale * * Public: No */