-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Markers - Add direction/scale reset on Right Mouse Button (#8319)
Co-authored-by: PabstMirror <[email protected]> Co-authored-by: mharis001 <[email protected]> Co-authored-by: jonpas <[email protected]>
- Loading branch information
1 parent
5e56885
commit d3ee39d
Showing
6 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,3 +173,4 @@ zGuba | |
Fyuran <[email protected]> | ||
dabako <[email protected]> | ||
Frank <[email protected]> | ||
10Dozen a.k.a Dusin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
addons/markers/functions/fnc_onSliderMouseButtonUpAngle.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 10Dozen | ||
* Angle slider clicked handler. Resets slider pos to 0 on RMB button up. | ||
* | ||
* Arguments: | ||
* 0: Slider (idc 1210) is expected <CONTROL> | ||
* 1: Button released (0 - Left mouse btn, 1 - Right mouse btn) <NUMBER> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [Slider, 1] call ace_markers_fnc_onSliderMouseButtonUpAngle | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_aceAngleSlider", "_button"]; | ||
TRACE_2("params",_aceAngleSlider,_button); | ||
|
||
if (_button isNotEqualTo 1) exitWith {}; | ||
|
||
_aceAngleSlider sliderSetPosition 0; | ||
[_aceAngleSlider, 0] call FUNC(onSliderPosChangedAngle); |
25 changes: 25 additions & 0 deletions
25
addons/markers/functions/fnc_onSliderMouseButtonUpScale.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 10Dozen | ||
* Scale slider clicked handler. Resets slider pos to 1 on RMB button up. | ||
* | ||
* Arguments: | ||
* 0: Slider (idc 1420) is expected <CONTROL> | ||
* 1: Button released (0 - Left mouse btn, 1 - Right mouse btn) <NUMBER> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [Slider, 1] call ace_markers_fnc_onSliderMouseButtonUpScale | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_aceScaleSlider", "_button"]; | ||
TRACE_2("params",_aceScaleSlider,_button); | ||
|
||
if (_button isNotEqualTo 1) exitWith {}; | ||
|
||
_aceScaleSlider sliderSetPosition 1; | ||
[_aceScaleSlider, 1] call FUNC(onSliderPosChangedScale); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters