Hey leute ich habe ein kleines problem ich habe ein Info Menü gemacht wo ich Lizenzen Preise und Fahrzeug Preise, Kofferaum, ... auflisten lasse aber jetzt möchte ich was über die StructuredText reinschreiben da das aber 2 Unterschiedliche Dialog arten sind also einmal Life_RscListNBox und Life_RscStructuredText. wir kriege ich das hin Skript ist im Anhang.
Spoiler anzeigen
Code
#include "..\..\script_macros.hpp"
/*
File: fn_info_change.sqf
Date: 23-02-2019
Author: Deathman aka Tobias Reichel
Helping: BlackFisch & moeck
*/
disableSerialization;
private _display = findDisplay 4000;
if (isNull _display) exitWith {hint "Nix Dialog da!"};
private _listbox = _display displayCtrl 4001;
private _textbox = _display displayCtrl 4002;
private __textboxst = _display displayCtrl 4003;
private _type = _listbox lbData (lbCurSel _listbox);
lnbclear _textbox;
switch (_type) do {
case "license": {
private _id = _textbox lnbAddRow ["Lizenz", "Preis"];
_textbox lnbsetColor [[_id,0],[1,0.6,0,1]];
_textbox lnbsetColor [[_id,1],[1,0.6,0,1]];
{
private _LicenceDisplayPrice = getNumber(_x >> "price");
private _id = _textbox lnbAddRow [ getText(_x >> "displayName"), format ["%1€",[_LicenceDisplayPrice]call life_fnc_numbertext]];
private _LicenceDisplayIllegal = if (getNumber(_x >> "illegal") isEqualTo 0) then {false} else {true};
_textbox lnbsetColor [[_id,0], if(_LicenceDisplayIllegal) then {[1,0,0,1]} else {[1,1,1,1]}];
} forEach ("true" configClasses (missionConfigFile >> "Licenses"));
};
case "cars": {
private _id = _textbox lnbAddRow ["Fahrzeugname", "Preis", "Kofferraum"];
_textbox lnbsetColor [[_id,0],[1,0.6,0,1]];
_textbox lnbsetColor [[_id,1],[1,0.6,0,1]];
_textbox lnbsetColor [[_id,2],[1,0.6,0,1]];
{
private _VehicleDisplayPrice = getNumber(_x >> "price");
private _VehicleDisplaySpace = getNumber(_x >> "vItemSpace");
private _id = _textbox lnbAddRow [FETCH_CONFIG2(getText,"CfgVehicles",(configName _x),"displayName"), format ["%1€",[_VehicleDisplayPrice]call life_fnc_numbertext],format ["%1",[_VehicleDisplaySpace]call life_fnc_numbertext]];
} forEach ("true" configClasses (missionConfigFile >> "LifeCfgVehicles"));
};
case "Gameserver": {
_infotext = "<t align='left' size=1.5 shadow='0'>Gameserver</t><br />
<t align='left' shadow='0' color='#b70c0c'>Name:</t><t> [GER]Retro-Life | 150.000$ Start | BETA-PHASE | Reborn</t><br />
<t align='left' shadow='0' color='#b70c0c'>IP:</t><t> 185.244.195.33</t><br />
<t align='left' shadow='0' color='#b70c0c'>Port:</t><t> 2302</t><br />
<br />
<t align='left' shadow='0'>Teamspeak 3</t><br />
<t align='left' shadow='0' color='#b70c0c'>Name:</t><t> Retro Life/Dreamlife</t><br />
<t align='left' shadow='0' color='#b70c0c'>IP:</t><t> ts.retro-life.net</t><br />
<br />
<t align='left' shadow='0'>Sonstiges</t><br />
<t align='left' shadow='0' color='#b70c0c'>Webiste:</t><t href='http://retro-life.net/'> Retro-Life.net</t><br />
<t align='left' shadow='0' color='#b70c0c'>Forum:</t><t href='http://retro-life.net/forum/'> Retro-Life Forum</t><br />
<br />
<t align='left' shadow='0'>Restartzeiten</t><br />
<t align='left' shadow='0' color='#b70c0c'>Uhrzeiten:</t><t> 0:00, 6:00, 12:00, 18:00</t><br />
";
};
};
_textboxst ctrlSetStructuredText parseText format["%1",_infotext];
_textboxst ctrlCommit 0;
Alles anzeigen
So hätte ich es gemacht aber das klappt net so ganz
INFO: Hier mit untersage ich die nutzung von meinem Skript und deren veröffentlichung auf irgend ein forum