Add group system

Initial commit, not tested in multiplayer yet. Some revisions still left
to do.
This commit is contained in:
ebaydayz
2016-10-27 16:06:33 -04:00
parent f92d84f720
commit f770b0a85d
73 changed files with 1195 additions and 21 deletions

View File

@@ -266,6 +266,171 @@ class CfgInGameUI
};
};
};
// Hide group hotbar
class CommandBar {
left = "-0.032 + SafeZoneX";
top = "(SafeZoneH + SafeZoneY) - (1 - 0.851)";
width = 0;
height = 0;
imageDefaultWeapons = "ca\ui\data\clear_empty.paa";
imageNoWeapons = "ca\ui\data\clear_empty.paa";
imageCommander = "ca\ui\data\clear_empty.paa";
imageDriver = "ca\ui\data\clear_empty.paa";
imageGunner = "ca\ui\data\clear_empty.paa";
imageCargo = "ca\ui\data\clear_empty.paa";
dimm = 0.3;
colorRedTeam[] = {0,0,0,0};
colorBlueTeam[] = {0,0,0,0};
colorGreenTeam[] = {0,0,0,0};
colorYellowTeam[] = {0,0,0,0};
colorWhiteTeam[] = {0,0,0,0};
class prevPage {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class nextPage {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class UnitInfo {
class GroupIcon {
x = 0;
y = 0;
w = 0;
h = 0;
};
class HcGroupText {
x = 0;
y = 0;
w = 0;
h = 0;
font = "Zeppelin32";
SizeEx = 0;
};
class UnitBackground {
x = 0;
y = 0;
w = 0;
h = 0;
textureNormal = "ca\ui\data\clear_empty.paa";
textureSelected = "ca\ui\data\clear_empty.paa";
texturePlayer = "ca\ui\data\clear_empty.paa";
textureFocus = "ca\ui\data\clear_empty.paa";
};
class UnitFocus {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class UnitIcon {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
colorPlayer[] = {0,0,0,0};
colorNoAmmo[] = {0,0,0,0};
colorWounded[] = {0,0,0,0};
colorWoundedFade[] = {0,0,0,0};
colorNoFuel[] = {0,0,0,0};
};
class Semaphore {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class CommandBackground {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class CommandText {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
font = "Zeppelin32";
SizeEx = 0;
};
class UnitSpecialRole {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
};
class VehicleNumberBackground {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class VehicleNumberText {
x = 0;
y = 0;
w = 0;
h = 0;
colorText[] = {0,0,0,0};
font = "Zeppelin32";
SizeEx = 0;
};
class UnitRole {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
};
class UnitNumberBackground {
x = 0;
y = 0;
w = 0;
h = 0;
color[] = {0,0,0,0};
texture = "ca\ui\data\clear_empty.paa";
};
class UnitNumberText {
x = 0;
y = 0;
w = 0;
h = 0;
colorText[] = {0,0,0,0};
font = "Zeppelin32";
SizeEx = 0;
};
class CombatMode {
x = 0;
y = 0;
w = 0;
h = 0;
textureMCareless = "ca\ui\data\clear_empty.paa";
textureMSafe = "ca\ui\data\clear_empty.paa";
textureMAware = "ca\ui\data\clear_empty.paa";
textureMCombat = "ca\ui\data\clear_empty.paa";
textureMStealth = "ca\ui\data\clear_empty.paa";
};
};
};
};
class CfgVoice {

View File

@@ -259,6 +259,7 @@ class CfgWeapons
#include "Tools\Flashlight.hpp"
#include "Tools\FlashlightRed.hpp"
#include "Tools\Radio.hpp"
#include "Item\ItemKeyKit.hpp"
#include "Item\ItemKeys.hpp"

View File

@@ -0,0 +1,11 @@
class ItemRadio : ItemCore
{
class ItemActions
{
class Groups
{
text = $STR_EPOCH_GROUPS_KEY;
script = "spawn dayz_openGroupDialog;";
};
};
};

View File

@@ -0,0 +1,227 @@
class DZ_GroupText: RscText {
idc = -1;
type = 0;
style = 0x00;
sizeEx = .025;
shadow = 2;
colorBackground[] = {1,1,1,0};
colorText[] = {1,1,1,1};
};
class DZ_GroupDynamicText: RscStructuredText {
access = 0;
type = 13;
colorText[] = {1,1,1,1};
class Attributes {
font = "Zeppelin32";
color = "#ffffff";
align = "center";
shadow = true;
};
};
class DZ_GroupListBox: RscListBox {
type = 5;
style = 69;
text = "";
colorBackground[] = {0, 0, 0, 0};
colorSelectBackground[] = {0, 0, 0, 1.0};
colorSelectBackground2[] = {0, 0, 0, 0.8};
colorText[] = {0.95, 0.95, 0.95, 1};
colorScrollbar[] = {.2, .2, .2, 1};
arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa";
arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa";
wholeHeight = .45;
rowHeight = .04;
colorActive[] = {0,0,0,1};
colorDisabled[] = {0,0,0,.3};
sizeEx = .023;
soundSelect[] = {"",.1,1};
soundExpand[] = {"",.1,1};
soundCollapse[] = {"",.1,1};
class ScrollBar;
};
class DZ_GroupButton: RscButton {
idc = -1;
periodFocus = 1.2;
periodOver = .8;
period = .4;
size = .023;
sizeEx = .023;
text = "";
type = 16;
action = "";
x = .317;
w = .14;
h = .05 * safezoneH;
color[] = {0.95, 0.95, 0.95, 1.0};
color2[] = {0.95, 0.95, 0.95, 1};
colorDisabled[] = {1, 1, 1, 0.25};
colorText[] = {0.95, 0.95, 0.95, 1};
colorBackground[] = {1, 1, 1, 1};
colorbackground2[] = {1, 1, 1, 0.4};
colorBackgroundActive[] = {0.5, 0.5, 0.5, 1};
colorBackgroundDisabled[] = {0.1, 0.1, 0.1, 0.5};
colorShadow[] = {0.95, 0.95, 0.95, 1};
colorBorder[] = {0.95, 0.95, 0.95, 1};
animTextureNormal = "\z\addons\dayz_code\gui\grey\ui_button_normal_ca.paa";
animTextureDisabled = "\z\addons\dayz_code\gui\grey\ui_button_disabled_ca.paa";
animTextureOver = "\z\addons\dayz_code\gui\grey\ui_button_over_ca.paa";
animTextureFocused = "\z\addons\dayz_code\gui\grey\ui_button_focus_ca.paa";
animTexturePressed = "\z\addons\dayz_code\gui\grey\ui_button_down_ca.paa";
animTextureDefault = "\z\addons\dayz_code\gui\grey\ui_button_default_ca.paa";
animTextureNoShortcut = "\z\addons\dayz_code\gui\grey\ui_button_normal_ca.paa";
textureNoShortcut = "";
class HitZone {
left = .002;
top = .003;
right = .002;
bottom = .016;
};
class ShortcutPos {
left = -.006;
top = -.007;
w = .0392157;
h = .0522876;
};
class TextPos {
left = .002;
top = .0325;
right = .002;
bottom = .005;
};
class Attributes {
font = "Zeppelin32";
color = "#E5E5E5";
align = "center";
shadow = "1";
};
class AttributesImage {
font = "Zeppelin32";
color = "#E5E5E5";
align = "left";
};
};
class DZ_GroupDialog {
idd = 80000;
movingEnable = 1;
enableSimulation = 1;
class ControlsBackground {
class Window {
idc = -1;
type = 0;
style = 48;
font = "Zeppelin32";
sizeEx = .023;
colorBackground[] = {};
colorText[] = {};
text = "\z\addons\dayz_code\gui\grey\ui_background_controls_ca.paa";
moving = 1;
x = .0;
y = .1;
w = 1.0;
h = .65;
};
class Title: DZ_GroupText {
text = $STR_EPOCH_GROUPS;
sizeEx = .04;
x = .35;
y = .112;
w = .3;
h = .05;
};
class Players: DZ_GroupText {
text = $STR_EPOCH_PLAYERS;
x = .1075;
y = .165;
w = .3;
h = .050;
};
class MyGroup: DZ_GroupText {
text = $STR_EPOCH_MY_GROUP;
x = .5675;
y = .165;
w = .3;
h = .050;
};
class Invite: DZ_GroupDynamicText {
idc = 9;
style = 0;
size = .025;
x = .2735;
y = .4915;
w = .235;
h = .075;
};
};
class controls {
class Players: DZ_GroupListBox {
idc = 1;
onLBSelChanged = "(_this select 0) call dayz_selectPlayer;";
x = .04;
y = .21;
w = .235;
h = .425;
};
class MyGroup: DZ_GroupListBox {
idc = 2;
onLBSelChanged = "(_this select 0) call dayz_selectGroupMember;";
x = .5;
y = .21;
w = .235;
h = .425;
};
class Close: DZ_GroupButton {
idc = -1;
text = $STR_UI_CLOSE;
onButtonClick = "findDisplay 80000 closeDisplay 2;";
x = .03;
y = .6525;
};
class Invite: DZ_GroupButton {
idc = 3;
text = $STR_EPOCH_INVITE;
onButtonClick = "(_this select 0) call dayz_inviteToGroup;";
y = .184;
};
class Kick: DZ_GroupButton {
idc = 4;
text = $STR_EPOCH_KICK;
onButtonClick = "(_this select 0) call dayz_kickFromGroup;";
y = .239;
};
class Disband: DZ_GroupButton {
idc = 5;
text = $STR_EPOCH_DISBAND;
onButtonClick = "(_this select 0) call dayz_disbandGroup;";
y = .294;
};
class Promote: DZ_GroupButton {
idc = 10;
text = $STR_EPOCH_PROMOTE;
onButtonClick = "(_this select 0) call dayz_promotePlayer;";
y = .349;
};
class Leave: DZ_GroupButton {
idc = 6;
text = $STR_EPOCH_LEAVE;
onButtonClick = "(_this select 0) call dayz_leaveGroup;";
y = .405;
};
class Accept: DZ_GroupButton {
idc = 7;
text = $STR_EPOCH_ACCEPT;
onButtonClick = "(_this select 0) call dayz_joinGroup;";
y = .5265;
};
class Reject: DZ_GroupButton {
idc = 8;
text = $STR_EPOCH_REJECT;
onButtonClick = "(_this select 0) call dayz_rejectGroup;";
y = .5765;
};
};
};

View File

@@ -617,4 +617,135 @@ class RscTitles
};
};
};
class DZ_GroupIcons
{
idd = -1;
movingEnable = 1;
enableSimulation = 1;
enableDisplay = 1;
onLoad = "uiNamespace setVariable ['DZ_GroupIcons',_this select 0];";
duration = 99999999999999999;
fadein = 0;
fadeout = 0;
class controls
{
class Icons: DZ_GroupDynamicText
{
idc = -1;
style = 0x00;
x = .9;
y = .9;
w = .9;
h = .9;
size = .08;
colorBackground[] = {0,0,0,0};
colortext[] = {0,0,0,.7};
class Attributes {
align = "left";
};
};
// Max 100 players per group
class Icon0:Icons {idc = 100;};
class Icon1:Icons {idc = 101;};
class Icon2:Icons {idc = 102;};
class Icon3:Icons {idc = 103;};
class Icon4:Icons {idc = 104;};
class Icon5:Icons {idc = 105;};
class Icon6:Icons {idc = 106;};
class Icon7:Icons {idc = 107;};
class Icon8:Icons {idc = 108;};
class Icon9:Icons {idc = 109;};
class Icon10:Icons {idc = 110;};
class Icon11:Icons {idc = 111;};
class Icon12:Icons {idc = 112;};
class Icon13:Icons {idc = 113;};
class Icon14:Icons {idc = 114;};
class Icon15:Icons {idc = 115;};
class Icon16:Icons {idc = 116;};
class Icon17:Icons {idc = 117;};
class Icon18:Icons {idc = 118;};
class Icon19:Icons {idc = 119;};
class Icon20:Icons {idc = 120;};
class Icon21:Icons {idc = 121;};
class Icon22:Icons {idc = 122;};
class Icon23:Icons {idc = 123;};
class Icon24:Icons {idc = 124;};
class Icon25:Icons {idc = 125;};
class Icon26:Icons {idc = 126;};
class Icon27:Icons {idc = 127;};
class Icon28:Icons {idc = 128;};
class Icon29:Icons {idc = 129;};
class Icon30:Icons {idc = 130;};
class Icon31:Icons {idc = 131;};
class Icon32:Icons {idc = 132;};
class Icon33:Icons {idc = 133;};
class Icon34:Icons {idc = 134;};
class Icon35:Icons {idc = 135;};
class Icon36:Icons {idc = 136;};
class Icon37:Icons {idc = 137;};
class Icon38:Icons {idc = 138;};
class Icon39:Icons {idc = 139;};
class Icon40:Icons {idc = 140;};
class Icon41:Icons {idc = 141;};
class Icon42:Icons {idc = 142;};
class Icon43:Icons {idc = 143;};
class Icon44:Icons {idc = 144;};
class Icon45:Icons {idc = 145;};
class Icon46:Icons {idc = 146;};
class Icon47:Icons {idc = 147;};
class Icon48:Icons {idc = 148;};
class Icon49:Icons {idc = 149;};
class Icon50:Icons {idc = 150;};
class Icon51:Icons {idc = 151;};
class Icon52:Icons {idc = 152;};
class Icon53:Icons {idc = 153;};
class Icon54:Icons {idc = 154;};
class Icon55:Icons {idc = 155;};
class Icon56:Icons {idc = 156;};
class Icon57:Icons {idc = 157;};
class Icon58:Icons {idc = 158;};
class Icon59:Icons {idc = 159;};
class Icon60:Icons {idc = 160;};
class Icon61:Icons {idc = 161;};
class Icon62:Icons {idc = 162;};
class Icon63:Icons {idc = 163;};
class Icon64:Icons {idc = 164;};
class Icon65:Icons {idc = 165;};
class Icon66:Icons {idc = 166;};
class Icon67:Icons {idc = 167;};
class Icon68:Icons {idc = 168;};
class Icon69:Icons {idc = 169;};
class Icon70:Icons {idc = 170;};
class Icon71:Icons {idc = 171;};
class Icon72:Icons {idc = 172;};
class Icon73:Icons {idc = 173;};
class Icon74:Icons {idc = 174;};
class Icon75:Icons {idc = 175;};
class Icon76:Icons {idc = 176;};
class Icon77:Icons {idc = 177;};
class Icon78:Icons {idc = 178;};
class Icon79:Icons {idc = 179;};
class Icon80:Icons {idc = 180;};
class Icon81:Icons {idc = 181;};
class Icon82:Icons {idc = 182;};
class Icon83:Icons {idc = 183;};
class Icon84:Icons {idc = 184;};
class Icon85:Icons {idc = 185;};
class Icon86:Icons {idc = 186;};
class Icon87:Icons {idc = 187;};
class Icon88:Icons {idc = 188;};
class Icon89:Icons {idc = 189;};
class Icon90:Icons {idc = 190;};
class Icon91:Icons {idc = 191;};
class Icon92:Icons {idc = 192;};
class Icon93:Icons {idc = 193;};
class Icon94:Icons {idc = 194;};
class Icon95:Icons {idc = 195;};
class Icon96:Icons {idc = 196;};
class Icon97:Icons {idc = 197;};
class Icon98:Icons {idc = 198;};
class Icon99:Icons {idc = 199;};
class Icon100:Icons {idc = 200;};
};
};
};

View File

@@ -1,3 +1,4 @@
#include "RscGroups.hpp"
#include "RscDisplayCraftingMenu.hpp"
#include "RscDisplayGear.hpp"
#include "RscDisplayGenderSelect.hpp"