From 56aa87ce8b12f5aa026e323f46ea57eb0e08307f Mon Sep 17 00:00:00 2001 From: voiper Date: Fri, 3 Jul 2015 12:14:41 -0700 Subject: [PATCH 1/2] Removed view distance changing. --- addons/spectator/functions/fnc_camera.sqf | 10 ---- .../spectator/functions/fnc_viewDistance.sqf | 47 ------------------- 2 files changed, 57 deletions(-) delete mode 100644 addons/spectator/functions/fnc_viewDistance.sqf diff --git a/addons/spectator/functions/fnc_camera.sqf b/addons/spectator/functions/fnc_camera.sqf index bc4cea88cc..6f5116e1fe 100644 --- a/addons/spectator/functions/fnc_camera.sqf +++ b/addons/spectator/functions/fnc_camera.sqf @@ -55,7 +55,6 @@ switch _mode do { _cam camCommit 0; showCinemaBorder false; cameraEffectEnableHUD true; - setViewDistance 3000; //variables GVAR(cam) = _cam; @@ -615,15 +614,6 @@ switch _mode do { _layer cutText ["", "PLAIN"]; }; }; - - case (DIK_G): { - _vd = uiNamespace getVariable [QGVAR(vd), findDisplay 12201]; - if (isNull _vd) then { - createDialog QGVAR(vd); - } else { - closeDialog 0; - } - }; case (DIK_H): { _layer = [QGVAR(help)] call BIS_fnc_rscLayer; diff --git a/addons/spectator/functions/fnc_viewDistance.sqf b/addons/spectator/functions/fnc_viewDistance.sqf deleted file mode 100644 index 4112ed2a62..0000000000 --- a/addons/spectator/functions/fnc_viewDistance.sqf +++ /dev/null @@ -1,47 +0,0 @@ -/* - Author: - voiper - - Description: - View distance dialog. - - Arguments: - 0: Mode - 1: Arguemnts - - Example: - ["Init", [dialog]] call ace_spectator_fnc_viewDistance; - - Return Value: - None - - Public: - No -*/ - -#include "script_component.hpp" - -_mode = _this select 0; -_this = _this select 1; - -switch _mode do { - - case "Init": { - _dialog = _this select 0; - _dist = -1; - _text = _dialog displayCtrl 1; - _slider = _dialog displayCtrl 2; - _slider slidersetRange [1000,20000]; - _slider sliderSetSpeed [1000,1000,1000]; - _slider sliderSetPosition viewDistance; - _text ctrlSetText str viewDistance; - }; - - case "Slider": { - _dialog = ctrlParent (_this select 0); - _dist = _this select 1; - _text = _dialog displayCtrl 1; - setViewDistance _dist; - _text ctrlSetText str viewDistance; - }; -}; \ No newline at end of file From 81889aef2d1a5d6a9ed81286a357ebae70a65389 Mon Sep 17 00:00:00 2001 From: voiper Date: Fri, 3 Jul 2015 12:23:49 -0700 Subject: [PATCH 2/2] Viewdistance dialogue remove. --- addons/spectator/UI.hpp | 99 ----------------------------------------- 1 file changed, 99 deletions(-) diff --git a/addons/spectator/UI.hpp b/addons/spectator/UI.hpp index eec38066f9..4405f6c802 100644 --- a/addons/spectator/UI.hpp +++ b/addons/spectator/UI.hpp @@ -81,105 +81,6 @@ class ace_spectator_overlay { }; }; -class ace_spectator_vd { - idd = 12201; - enableSimulation = 1; - enableDisplay = 0; - movingEnable = 0; - - onLoad = "uiNamespace setVariable ['ace_spectator_vd', _this select 0]; ['Init', _this] call ace_spectator_fnc_viewDistance"; - - class Controls { - - class BG: vip_rsc_box { - x = QUOTE(safeZoneX + safeZoneW - RESUNITS_X * 30); - y = QUOTE(safeZoneY + COMPASS_H); - w = QUOTE(RESUNITS_X * 30); - h = QUOTE(COMPASS_H); - colorBackground[] = {0.1,0.1,0.1,1}; - onDestroy = QUOTE(GVAR(mouseBusy) = false; false); - }; - - class TitleFrame: vip_rsc_frame { - x = QUOTE(safeZoneX + safeZoneW - RESUNITS_X * 30); - y = QUOTE(safeZoneY + COMPASS_H); - w = QUOTE(RESUNITS_X * 8); - h = QUOTE(COMPASS_H); - shadow = 2; - colorText[]={1,1,1,1}; - }; - - class Title: vip_rsc_text { - style = ST_CENTER; - x = QUOTE(safeZoneX + safeZoneW - RESUNITS_X * 30); - y = QUOTE(safeZoneY + COMPASS_H); - w = QUOTE(RESUNITS_X * 8); - h = QUOTE(COMPASS_H); - sizeEx = QUOTE(RESUNITS_Y * 2); - font = GUI_FONT_NORMAL; - shadow = 2; - colorText[]={1,1,1,1}; - text = CSTRING(VD_Title); - }; - - class DistanceFrame: TitleFrame { - x = QUOTE(safeZoneX + safeZoneW - RESUNITS_X * 10.5); - w = QUOTE(RESUNITS_X * 5); - }; - - class Distance: Title { - idc = 1; - x = QUOTE(safeZoneX + safeZoneW - RESUNITS_X * 10.5); - w = QUOTE(RESUNITS_X * 5); - text = ""; - }; - - class ButtonExit: vip_rsc_button { - idc = 0; - style = ST_CENTER; - x = QUOTE(safeZoneX + safeZoneW - RESUNITS_X * 5); - y = QUOTE(safeZoneY + COMPASS_H); - w = QUOTE(RESUNITS_X * 5); - h = QUOTE(COMPASS_H); - - colorBackground[] = {1,1,1,1}; - sizeEx = QUOTE(RESUNITS_Y * 2); - font = GUI_FONT_NORMAL; - - text = CSTRING(VD_Button); - - onButtonClick = "closeDialog 0; false"; - onMouseButtonDown = QUOTE(GVAR(mouseBusy) = true; false); - onMouseButtonUp = QUOTE(GVAR(mouseBusy) = false; false); - }; - - class Slider { - idc = 2; - - type = CT_XSLIDER; - style = SL_HORZ; - shadow = 2; - - x = QUOTE(safeZoneX + safeZoneW - RESUNITS_X * 21.5); - y = QUOTE(safeZoneY + COMPASS_H); - w = QUOTE(RESUNITS_X * 9.5); - h = QUOTE(COMPASS_H); - color[] = {1,1,1,1}; - colorActive[] = {1,1,1,1}; - colorDisabled[] = {1,1,1,0.2}; - arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; - border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; - thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa"; - - text = ""; - onSliderPosChanged = "['Slider', _this] call ace_spectator_fnc_viewDistance"; - onMouseButtonDown = QUOTE(GVAR(mouseBusy) = true; false); - onMouseButtonUp = QUOTE(GVAR(mouseBusy) = false; false); - }; - }; -}; - class ace_spectator_map { idd = 12202;