Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes for 1.76 debug console #735

Merged
merged 5 commits into from
Sep 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions addons/diagnostic/fnc_initExtendedDebugConsole.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ _debugConsole ctrlSetPosition [
_debugConsole ctrlCommit 0;

// --- adjust positions of all but a few controls
#define EXCLUDE [0, IDC_RSCDEBUGCONSOLE_LINK, IDC_RSCDEBUGCONSOLE_TITLE, IDC_RSCDEBUGCONSOLE_EXPRESSIONBACKGROUND, IDC_RSCDEBUGCONSOLE_EXPRESSIONTEXT, IDC_RSCDEBUGCONSOLE_EXPRESSION]
#define EXCLUDE [0, IDC_RSCDEBUGCONSOLE_LINK, IDC_RSCDEBUGCONSOLE_TITLE, IDC_RSCDEBUGCONSOLE_EXPRESSIONBACKGROUND, IDC_RSCDEBUGCONSOLE_EXPRESSIONTEXT, IDC_RSCDEBUGCONSOLE_EXPRESSION, IDC_RSCDEBUGCONSOLE_EXPRESSIONOUTPUT, IDC_RSCDEBUGCONSOLE_EXPRESSIONOUTPUTBACKGROUND]

{
if (ctrlParentControlsGroup _x == _debugConsole && {!(ctrlIDC _x in EXCLUDE)}) then {
Expand All @@ -37,7 +37,7 @@ _title ctrlSetText localize LSTRING(ExtendedDebugConsole);
private _expression = _display displayCtrl IDC_RSCDEBUGCONSOLE_EXPRESSION;

private _position = ctrlPosition _expression;
_position set [3, safezoneH - 19.25 * GUI_GRID_H];
_position set [3, safezoneH - 20.25 * GUI_GRID_H];

_expression ctrlSetPosition _position;
_expression ctrlCommit 0;
Expand All @@ -60,6 +60,17 @@ _position set [3, safezoneH - 18.25 * GUI_GRID_H];
_expressionBackground ctrlSetPosition _position;
_expressionBackground ctrlCommit 0;

// --- EXPRESSION box output
{
private _expressionOutput = _display displayCtrl _x;

_position = ctrlPosition _expressionOutput;
_position set [1, (_position select 1) + safezoneH - 26.05 * GUI_GRID_H];

_expressionOutput ctrlSetPosition _position;
_expressionOutput ctrlCommit 0;
} forEach [IDC_RSCDEBUGCONSOLE_EXPRESSIONOUTPUT, IDC_RSCDEBUGCONSOLE_EXPRESSIONOUTPUTBACKGROUND];

// --- PREV button
private _prevButton = _display ctrlCreate ["RscButtonMenu", IDC_DEBUGCONSOLE_PREV, _debugConsole];

Expand Down Expand Up @@ -96,7 +107,7 @@ _prevButton ctrlEnable (_statementIndex < count _prevStatements - 1);
_nextButton ctrlEnable (_statementIndex > 0);

// --- EXEC buttons
private _execButtonLocal = _display displayCtrl IDC_OK;
private _execButtonLocal = _display displayCtrl IDC_RSCDEBUGCONSOLE_BUTTONEXECUTELOCAL;
_execButtonLocal ctrlAddEventHandler ["MouseButtonUp", {
_this call FUNC(logStatement);
false
Expand Down