ole1986 / a3-admintoolkit

AdminToolkit for Arma 3 (ATK) - Extensions, Moderators, Godmode, Vehicle, global chat
http://www.exilemod.com/topic/7690-admintoolkit-for-arma-3-v222-exile-edition
35 stars 13 forks source link

replace systemChat with some nice looking message system #9

Closed ole1986 closed 8 years ago

ole1986 commented 8 years ago

The idea is to get rid of the systemChat output but also replace it with a flexible info system.

It should inform the admin user about the action being made.

BUT ALSO the ability to info clients who do NOT have the ATK installed. So, it implementationn might take place in mission file?

I am thinking something similar to the Exile Toast messages, but without being dependent on th ExileMod

Warsheep-GER commented 8 years ago

i have some ideas for this . we will talk about all tonight when im at home. ;)

Warsheep-GER commented 8 years ago

/* File: fn_AAN.sqf Author: Karel Moricky

Description: It's showtime!

Parameter(s): _this select 0: STRUCTURED TEXT: Header text _this select 1: STRUCTURED TEXT: Bottom text (moving)

Returns: Nothing */ disableserialization;

_header = _this select 0; _line = _this select 1;

([] call bis_fnc_rscLayer) cutrsc ["rscAAN","plain"]; _display = uinamespace getvariable "BIS_AAN"; _textHeader = _display displayctrl 3001; _textHeader ctrlsetstructuredtext _header;//parsetext "Military press conference
Col. Kane announces the end of the op. Arrowhead"; _textHeader ctrlcommit 0;

_textLine = _display displayctrl 3002; _textLine ctrlsetstructuredtext _line;//"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer pulvinar euismod neque, eget malesuada lectus auctor sit amet. Maecenas ac est ipsum. Vestibulum in sapien turpis. Nunc ultricies, tellus ac lacinia consequat, mi massa sodales eros, vel semper justo enim non erat. Cras vitae urna et erat dapibus sagittis ac porttitor odio. Aliquam adipiscing malesuada libero, vitae suscipit mi interdum at. Vivamus sapien metus, ultricies quis ultricies ultrices, venenatis nec orci. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In egestas congue malesuada. Vestibulum gravida ligula volutpat ipsum auctor vulputate. "; _textLine ctrlcommit 0; _textLinePos = ctrlposition _textLine; _textLinePos set [0,-100]; _textLine ctrlSetPosition _textLinePos; _textLine ctrlcommit 1500;

_textClock = _display displayctrl 3003; while {!isnull _display} do {

_textClock ctrlsettext ([daytime,"HH:MM"] call bis_fnc_timetostring); _textClock ctrlcommit 0; sleep 60; };

ole1986 commented 8 years ago

An example on how to use the AAN by hiding all unnecessary icons, etc.. Still this would be placed into a file located in mission pbo (because all need it):

[parseText "<t size='1.5'>Admin Toolkit Headline</t><br/><t>Some more extra text information</t>", parseText ""] spawn BIS_fnc_AAN;
/* Hide the AAN after X seconds */
[] spawn { sleep 5; (uinamespace getvariable "BIS_AAN") closedisplay 1 };
/* immediately hide the icons, but keep the red bar plus clock */
[] spawn { sleep 0.001;  _all = (allControls (uinamespace getvariable "BIS_AAN")); (_all select 2) ctrlShow false; (_all select 3) ctrlShow false; (_all select 0) ctrlShow false; }
ole1986 commented 8 years ago

As we can not go without adding a function into missionFile (allowing "normal" players) to receive the message response being send from server, I prefer to use the current setup

Ticket closed