Ist halt bei mir fürs Z Menü, habe allerdings änderungen im Script hab des schon lange drinne kann dir net genau auflisten was ich geändert habe schaus dir einfach an und vergleich
Code
/*
File: fn_openMap.sqf
Author: Chimps47
*/
disableSerialization;
if(!(createDialog "map_filter")) exitWith {};
_map = findDisplay 38500;
_filterList = _map displayCtrl 1500;
_filterList lbAdd "All";
_filterList lbSetValue[(lbSize _filterList)-1,-1];
_filterList lbSetData[(lbSize _filterList)-1,"ALL"];
{
_filterList lbAdd (_x select 0);
_filterList lbSetValue[(lbSize _filterList)-1,_forEachIndex];
_filterList lbSetData[(lbSize _filterList)-1,str(_x select 1)];
} forEach getArray(missionConfigFile >> "mapAreas" >> "filters");
if(playerSide == civilian && {count life_houses > 0}) then {
_filterList lbAdd "My Houses";
_filterList lbSetValue[(lbSize _filterList)-1,-1];
_houseMkrs = [];
{
_pos = call compile format["%1",_x select 0];
_house = nearestBuilding _pos;
_houseMkrs pushBack format["house_%1",(_house getVariable ["uid",-1])];
} forEach life_houses;
_filterList lbSetData[(lbSize _filterList)-1,str(_houseMkrs)];
};
Alles anzeigen
Code
// mapmarkers
/*
File: fn_mapMarkers.sqf
Author: Chimps47
Map Filter
*/
disableSerialization;
_map = findDisplay 38500;
_filterList = _map displayCtrl 1500;
if(lbCurSel _filterList == -1) exitWith {};
_currentMarkers = _filterList lbData (lbCurSel _filterList);
_mapMarkers = [];
_disallowedMapMarkers = getArray(missionConfigFile >> "mapAreas" >> "exclude");
{if(markerType _x != "Empty" && !(_x in _disallowedMapMarkers)) then {_mapMarkers pushBack _x;};} forEach allMapMarkers;
if(_currentMarkers == "ALL") then
{
{_x setMarkerAlphaLocal 1;} forEach _mapMarkers;
} else {
_currentMarkers = call compile format["%1",_currentMarkers];
{if(!(_x in _currentMarkers)) then {_x setMarkerAlphaLocal 0;} else {_x setMarkerAlphaLocal 1;};} forEach _mapMarkers;
};
lbSort [_filterList, "ASC"];
Alles anzeigen
Code
/*
File: fn_openMap.sqf
Author: Chimps47
*/
disableSerialization;
if(!(createDialog "map_filter")) exitWith {};
_map = findDisplay 38500;
_filterList = _map displayCtrl 1500;
_filterList lbAdd "All";
_filterList lbSetValue[(lbSize _filterList)-1,-1];
_filterList lbSetData[(lbSize _filterList)-1,"ALL"];
{
_filterList lbAdd (_x select 0);
_filterList lbSetValue[(lbSize _filterList)-1,_forEachIndex];
_filterList lbSetData[(lbSize _filterList)-1,str(_x select 1)];
} forEach getArray(missionConfigFile >> "mapAreas" >> "filters");
if(playerSide == civilian && {count life_houses > 0}) then {
_filterList lbAdd "My Houses";
_filterList lbSetValue[(lbSize _filterList)-1,-1];
_houseMkrs = [];
{
_pos = call compile format["%1",_x select 0];
_house = nearestBuilding _pos;
_houseMkrs pushBack format["house_%1",(_house getVariable ["uid",-1])];
} forEach life_houses;
_filterList lbSetData[(lbSize _filterList)-1,str(_houseMkrs)];
};
Alles anzeigen
Dialog :
Code
class map_filter {
idd = 38500;
movingEnable = false;
enableSimulation = true;
onUnload = "[] spawn {{if(markerType _x != ""Empty"") then {_x setMarkerAlphaLocal 1;};} forEach allMapMarkers;};";
class controlsBackground {
class Life_RscTitleBackground: Life_RscPicture {
text = "textures\tablet\browser.paa";
idc = -1;
x = 0.0600728 * safezoneW + safezoneX;
y = -0.265035 * safezoneH + safezoneY;
w = 0.883056 * safezoneW;
h = 1.54367 * safezoneH;
};
};
class controls {
//Speichern
class speichern: life_RscButtonMenu {
idc = -1;
onButtonClick = "[] call SOCK_fnc_syncData;";
x = 0.706366 * safezoneW + safezoneX;
y = 0.666608 * safezoneH + safezoneY;
w = 0.0159974 * safezoneW;
h = 0.0340016 * safezoneH;
tooltip = "Spielstand speichern";
colorBackground[] = {-1,-1,-1,-1};
colorBackgroundFocused[] = {1,1,1,0.12};
colorBackground2[] = {0.75,0.75,0.75,0.2};
color[] = {1,1,1,1};
colorFocused[] = {0,0,0,0};
color2[] = {0,0,0,0};
colorText[] = {1,1,1,1};
colorDisabled[] = {1,0,0,0.1};
};
/* Tablet ausschalten */
class ausschaltentablet: life_RscButtonMenu {
idc = -1;
onButtonClick = "closeDialog 0;";
x = 0.706366 * safezoneW + safezoneX;
y = 0.71761 * safezoneH + safezoneY;
w = 0.0159974 * safezoneW;
h = 0.0340016 * safezoneH;
tooltip = "Tablet ausschalten!";
colorBackground[] = {-1,-1,-1,-1};
colorBackgroundFocused[] = {1,1,1,0.12};
colorBackground2[] = {0.75,0.75,0.75,0.2};
color[] = {1,1,1,1};
colorFocused[] = {0,0,0,0};
color2[] = {0,0,0,0};
colorText[] = {1,1,1,1};
colorDisabled[] = {1,0,0,0.1};
};
class Map : Life_RscMapControl
{
idc = 1400;
x = 0.420014 * safezoneW + safezoneX;
y = 0.312991 * safezoneH + safezoneY;
w = 0.30395 * safezoneW;
h = 0.306014 * safezoneH;
};
class Filter : Life_RscListBox
{
idc = 1500;
sizeEx = 0.035;
onLBSelChanged = "[] spawn life_fnc_mapMarkers;";
x = 0.276037 * safezoneW + safezoneX;
y = 0.312991 * safezoneH + safezoneY;
w = 0.135977 * safezoneW;
h = 0.44202 * safezoneH;
};
};
};
Alles anzeigen