From 9f3a0fe8d49231a70cec116aba17642ab268a524 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 11:18:37 +0100 Subject: [PATCH] Removed displayInfo and displayMessage functions. --- .../functions/fnc_displayInformation.sqf | 64 ------------------- .../common/functions/fnc_displayMessage.sqf | 44 ------------- 2 files changed, 108 deletions(-) delete mode 100644 addons/common/functions/fnc_displayInformation.sqf delete mode 100644 addons/common/functions/fnc_displayMessage.sqf diff --git a/addons/common/functions/fnc_displayInformation.sqf b/addons/common/functions/fnc_displayInformation.sqf deleted file mode 100644 index 007e1c3e32..0000000000 --- a/addons/common/functions/fnc_displayInformation.sqf +++ /dev/null @@ -1,64 +0,0 @@ -/** - * fn_gui_displayInformation.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" - -private["_title", "_content","_type","_display","_headerCtrl","_contentCtrl","_contentAmountOfChars","_pos","_icon","_iconCtrl"]; -_title = [_this, 0, "",[""]] call BIS_fnc_Param; -_content = [_this, 1, [""],[[""]]] call BIS_fnc_Param; -_type = [_this, 2, 0, [0]] call BIS_fnc_Param; -_icon = [_this, 3, "",[""]] call BIS_fnc_Param; - -if (_title != "") then { - ("ACE_RscDisplayInformation" call BIS_fnc_rscLayer) cutRsc ['ACE_RscDisplayInformation',"PLAIN"]; - - disableSerialization; - _display = uiNamespace getvariable 'ACE_RscDisplayInformation'; - if (!isnil "_display") then { - _headerCtrl = _display displayCtrl 1; - _headerCtrl ctrlSetText _title; - _iconCtrl = _display displayCtrl 10; - _iconCtrl ctrlSetText _icon; - - _idc = 2; - { - _text = _x; - if (_text != "") then { - _contentCtrl = _display displayCtrl _idc; - _contentCtrl ctrlSetText _text; - - _contentAmountOfChars = count (toArray _text); - _pos = ctrlPosition _contentCtrl; - _pos set [2, _contentAmountOfChars * ((((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)/ 3.3) max (safeZoneW / 11)]; - _contentCtrl ctrlSetPosition _pos; - _contentCtrl ctrlCommit 0; - - - if (_type >0) then { - if (_type == 1) then { - _contentCtrl ctrlSetBackgroundColor [0.7,0.2,0.2,0.8]; - _contentCtrl ctrlSetTextColor [1,1,1,0.9]; - }; - }; - _idc = _idc + 1; - }; - }foreach _content; - - while {(_idc < 7)} do { - _contentCtrl = _display displayCtrl _idc; - _contentCtrl ctrlSetPosition [0,0,0,0]; - _contentCtrl ctrlCommit 0; - - _idc = _idc + 1; - }; - }; -} else { - ("ACE_RscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; -}; \ No newline at end of file diff --git a/addons/common/functions/fnc_displayMessage.sqf b/addons/common/functions/fnc_displayMessage.sqf deleted file mode 100644 index 7b3274cfc4..0000000000 --- a/addons/common/functions/fnc_displayMessage.sqf +++ /dev/null @@ -1,44 +0,0 @@ -/** - * fn_gui_displayMessage.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" - -private["_title", "_content","_type","_display","_headerCtrl","_contentCtrl","_contentAmountOfChars","_pos"]; -_title = [_this, 0, "",[""]] call BIS_fnc_Param; -_content = [_this, 1, "",[""]] call BIS_fnc_Param; -_type = [_this, 2, 0, [0]] call BIS_fnc_Param; - -if (_title != "" && _content != "") then { - ("ACE_RscDisplayMessage" call BIS_fnc_rscLayer) cutRsc ['ACE_RscDisplayMessage',"PLAIN"]; - - disableSerialization; - _display = uiNamespace getvariable 'ACE_RscDisplayMessage'; - if (!isnil "_display") then { - _headerCtrl = _display displayCtrl 1; - _contentCtrl = _display displayCtrl 2; - - _headerCtrl ctrlSetText _title; - _contentCtrl ctrlSetText _content; - - // TODO get a font that has the same width characters for all. Ask Jaynus. - _contentAmountOfChars = count (toArray _content); - _pos = ctrlPosition _contentCtrl; - _pos set [2, _contentAmountOfChars * ((((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)/ 3.3) max (safeZoneW / 11)]; - _contentCtrl ctrlSetPosition _pos; - _contentCtrl ctrlCommit 0; - - if (_type >0) then { - if (_type == 1) then { - _contentCtrl ctrlSetBackgroundColor [0.7,0.2,0.2,0.8]; - _contentCtrl ctrlSetTextColor [1,1,1,0.9]; - }; - }; - }; -}; \ No newline at end of file