Skip to content

Commit

Permalink
Added night mode to Tablet #133
Browse files Browse the repository at this point in the history
  • Loading branch information
nsgundy committed May 26, 2015
1 parent 392d1f6 commit 4f21678
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion @cTab/addons/cTab/functions/fn_updateInterface.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,16 @@ if (isNil "_mode") then {
if (_displayName in ["cTab_microDAGR_dsp","cTab_microDAGR_dlg"]) exitWith {
if (_nightMode) then {"\cTab\img\microDAGR_background_night_ca.paa"} else {"\cTab\img\microDAGR_background_ca.paa"};
};
if (_displayName in ["cTab_Tablet_dlg"]) exitWith {
if (_nightMode) then {"\cTab\img\tablet_background_night_ca.paa"} else {"\cTab\img\tablet_background_ca.paa"};
};
""
};
if (_background != "") then {
(_display displayCtrl IDC_CTAB_BACKGROUND) ctrlSetText _background;
// call brightness adjustment if this is outside of interface init
if (!_interfaceInit) then {
[[["brightness",[_displayName,"brightness"] call cTab_fnc_getSettings]]] call cTab_fnc_updateInterface;
_settings pushBack ["brightness",[_displayName,"brightness"] call cTab_fnc_getSettings];
};
};
};
Expand Down
Binary file not shown.
4 changes: 3 additions & 1 deletion @cTab/addons/cTab/player_init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ cTabSettings = [];
["mapType","SAT"],
["uavCam",""],
["hCam",""],
["mapTools",true]
["mapTools",true],
["nightMode",2],
["brightness",0.9]
]] call BIS_fnc_setToPairs;

[cTabSettings,"Android",[
Expand Down
2 changes: 1 addition & 1 deletion @cTab/addons/cTab/tablet/cTab_Tablet_controls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class cTab_RscButton_Tablet: cTab_RscButton
class cTab_Tablet_background: cTab_RscPicture
{
idc = IDC_CTAB_BACKGROUND;
text = "\cTab\img\Tablet_background_ca.paa";
text = "";
x = GUI_GRID_X;
y = GUI_GRID_Y;
w = GUI_GRID_W;
Expand Down

0 comments on commit 4f21678

Please sign in to comment.