Skip to content

Conversation

@PabstMirror
Copy link
Contributor

Allows quick numbering by holding alt when placing a marker
no dialog, just get a incrementally numbered mark

20250716181812_1

Comment on lines +49 to +51
if (GVAR(quickNumberMarks) == 0) exitWith {};
if (!cba_events_alt) exitWith {}; // not available before mission start
if (_marker != "") exitWith {}; // editing an existing marker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (GVAR(quickNumberMarks) == 0) exitWith {};
if (!cba_events_alt) exitWith {}; // not available before mission start
if (_marker != "") exitWith {}; // editing an existing marker
if (!cba_events_alt) exitWith {}; // not available before mission start
if (GVAR(quickNumberMarks) isEqualTo 0) exitWith {};
if (_marker isNotEqualTo "") exitWith {}; // editing an existing marker

if (_marker != "") exitWith {}; // editing an existing marker

private _description = _display displayCtrl IDC_INSERT_MARKER;
private _number = if ((GVAR(quickNumberMarks) == 1) || {currentChannel != 1}) then {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private _number = if ((GVAR(quickNumberMarks) == 1) || {currentChannel != 1}) then {
private _number = if ((GVAR(quickNumberMarks) isEqualTo 1) || {currentChannel isNotEqualTo 1}) then {

GVAR(currentMarkerConfigName) = QGVAR(textOnly);
} else {
// try to update our local marker index when placing a text-only marker with a number
if ((GVAR(quickNumberMarks) == 2) && {currentChannel == 1}) exitWith {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((GVAR(quickNumberMarks) == 2) && {currentChannel == 1}) exitWith {};
if ((GVAR(quickNumberMarks) isEqualTo 2) && {currentChannel isEqualTo 1}) exitWith {};

} else {
// try to update our local marker index when placing a text-only marker with a number
if ((GVAR(quickNumberMarks) == 2) && {currentChannel == 1}) exitWith {};
if ((markerType _newestMarker) != QGVAR(textOnly)) exitWith {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((markerType _newestMarker) != QGVAR(textOnly)) exitWith {};
if ((markerType _newestMarker) isNotEqualTo QGVAR(textOnly)) exitWith {};

Comment on lines +82 to +87
private _count = count _text;
private _isNumber = true;
if (_count > 6) exitWith {};
for "_i" from 0 to (_count - 1) do {
if !((_text select [_i, 1]) in "0123456789") exitWith { _isNumber = false; };
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private _count = count _text;
private _isNumber = true;
if (_count > 6) exitWith {};
for "_i" from 0 to (_count - 1) do {
if !((_text select [_i, 1]) in "0123456789") exitWith { _isNumber = false; };
};
if (_count > 6) exitWith {};
private _isNumber = _text regexMatch ".*?[0-9].*+/o";

Whether the /o part, meaning "optimize", is faster or slower, has to be tested.

PabstMirror and others added 2 commits October 29, 2025 22:51
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Release Notes: **IMPROVED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants