Skip to content

Commit

Permalink
Merge pull request #735 from CBATeam/176debugconsole
Browse files Browse the repository at this point in the history
changes for 1.76 debug console
  • Loading branch information
Killswitch00 committed Sep 7, 2017
2 parents ee61966 + 9c1435f commit e13c687
Showing 1 changed file with 14 additions and 3 deletions.
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

0 comments on commit e13c687

Please sign in to comment.