Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lobby Manager #1194

Merged
merged 38 commits into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
765055d
add slot list manager tool
commy2 Sep 24, 2018
77a4f06
add slot list manager tool
commy2 Sep 24, 2018
466cbd8
slot list manager
commy2 Sep 30, 2018
a28e941
Slot list manager pl translation (#998)
veteran29 Oct 3, 2018
0a13b00
Merge remote-tracking branch 'origin' into slotlist-manager
commy2 Oct 5, 2018
2ee93ca
Travis
commy2 Oct 5, 2018
d061534
Merge branch 'slotlist-manager' of https://github.com/CBATeam/CBA_A3 …
commy2 Oct 5, 2018
98f99ce
finish order changing logic
commy2 Oct 6, 2018
dfe29dc
OK button pass 1
commy2 Oct 6, 2018
ea65187
finish ok button
commy2 Oct 6, 2018
897c5d5
add rename slot logic
commy2 Oct 6, 2018
4007516
remove unused
commy2 Oct 6, 2018
a8d889d
Merge branch 'master' of https://github.com/CBATeam/CBA_A3 into slotl…
commy2 Oct 12, 2018
c37eaaa
reset cursor, auto select edit box
commy2 Oct 12, 2018
383ff37
add side colored icons
commy2 Oct 12, 2018
51f03d5
add side colored icons
commy2 Oct 12, 2018
9bad948
stash
commy2 Oct 14, 2018
e24a81f
Merge remote-tracking branch 'origin' into slotlist-manager
commy2 Oct 21, 2018
0973146
Revert "stash"
commy2 Oct 21, 2018
c0742e9
fix some unit duplication issues
commy2 Oct 21, 2018
0461cb1
Merge branch 'master' into lobby-manager
mharis001 Jul 30, 2019
2ffc9fb
Redesign Lobby Manager
mharis001 Jul 31, 2019
d56a26e
use stringkeys where we already have 4 copies of in the base game
commy2 Aug 2, 2019
67d50ce
German translation for loading screen
commy2 Aug 2, 2019
1371f5f
delete unused base classes
commy2 Aug 2, 2019
d471fea
unscheduled
commy2 Aug 2, 2019
aab691a
SPACE!
commy2 Aug 2, 2019
ac65bd0
Merge branch 'master' into lobby-manager
mharis001 Jan 15, 2020
1a67e61
Minor cleanup, Remove selection restoring
mharis001 Jan 15, 2020
aef99fc
Improve single unit groups handling
mharis001 Jan 15, 2020
02d09bd
Add frame delaying to unit cut/paste, Fix leader selecting
mharis001 Jan 16, 2020
b8aa11d
Merge branch 'master' into lobby-manager
mharis001 May 31, 2020
5f04141
Fixes after merge
mharis001 May 31, 2020
842de2a
Add warning label
mharis001 May 30, 2021
fccec4e
Use isNotEqualTo
mharis001 May 30, 2021
3ee9f7f
Reset cursor to end of text
mharis001 May 30, 2021
afab0ab
Add German translation
mharis001 Jun 1, 2021
f230ca8
Use LLSTRING
mharis001 Jun 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons/ui/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ class CfgFunctions {
};

PATHTO_FNC(addPauseMenuOption);
PATHTO_FNC(progressBar);
PATHTO_FNC(getFov);
PATHTO_FNC(getAspectRatio);
PATHTO_FNC(getFov);
PATHTO_FNC(getUISize);
PATHTO_FNC(notify);
PATHTO_FNC(openLobbyManager);
PATHTO_FNC(progressBar);
};
};
};
19 changes: 19 additions & 0 deletions addons/ui/Display3DEN.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class Display3DEN {
class Controls {
class MenuStrip: ctrlMenuStrip {
class Items {
class Tools {
items[] += {QGVAR(LobbyManager)};
};
class GVAR(LobbyManager) {
text = CSTRING(LobbyManager);
data = QGVAR(LobbyManager);
shortcuts[] = {INPUT_CTRL_OFFSET + DIK_L};
action = QUOTE(call (uiNamespace getVariable 'CBA_fnc_openLobbyManager'));
enable = 1;
opensNewWindow = 1;
};
};
};
};
};
109 changes: 109 additions & 0 deletions addons/ui/LobbyManager.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
class GVAR(LobbyManager) {
idd = -1;
enableDisplay = 1;
movingEnable = 1;
class controlsBackground {
class Disable: ctrlStaticBackgroundDisable {};
class DisableTiles: ctrlStaticBackgroundDisableTiles {};
};
class controls {
class Background: ctrlStaticBackground {
x = (getResolution select 2) * 0.5 * pixelW - (140/2) * GRID_3DEN_W;
y = 0.5 - (120/2 - 5) * GRID_3DEN_H;
w = 140 * GRID_3DEN_W;
h = (120 - 10) * GRID_3DEN_H;
};
class BackgroundButtons: ctrlStaticFooter {
x = (getResolution select 2) * 0.5 * pixelW - (140/2) * GRID_3DEN_W;
y = 0.5 + (120/2 - 10 - 2) * GRID_3DEN_H;
w = 140 * GRID_3DEN_W;
h = 7 * GRID_3DEN_H;
};
class Title: ctrlStaticTitle {
text = CSTRING(LobbyManager);
x = (getResolution select 2) * 0.5 * pixelW - (140/2) * GRID_3DEN_W;
y = 0.5 - (120/2 - 5) * GRID_3DEN_H;
w = 140 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
};
mharis001 marked this conversation as resolved.
Show resolved Hide resolved
class Slots: ctrlTree {
idc = IDC_LM_SLOTS;
x = (getResolution select 2) * 0.5 * pixelW - (140/2 - 1) * GRID_3DEN_W;
y = 0.5 - (120/2 - 10 - 1) * GRID_3DEN_H;
w = 88 * GRID_3DEN_W;
h = (120 - 10 - 5 - 7 - 2) * GRID_3DEN_H;
sizeEx = 3.96 * (1 / (getResolution select 3)) * pixelGrid * 0.5;
colorBackground[] = {0, 0, 0, 0.3};
disableKeyboardSearch = 1;
};
class CallsignLabel: ctrlStatic {
text = "$STR_3DEN_Group_Attribute_Callsign_displayName";
tooltip = "$STR_3DEN_Group_Attribute_Callsign_tooltip";
x = (getResolution select 2) * 0.5 * pixelW + (140/2 - 50) * GRID_3DEN_W;
y = 0.5 - (120/2 - 10 - 1) * GRID_3DEN_H;
w = 49 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
};
class Callsign: ctrlEdit {
idc = IDC_LM_CALLSIGN;
onLoad = QUOTE((_this select 0) ctrlEnable false);
x = (getResolution select 2) * 0.5 * pixelW + (140/2 - 50) * GRID_3DEN_W;
y = 0.5 - (120/2 - 10 - 1 - 5) * GRID_3DEN_H;
w = 49 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
colorDisabled[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0.25};
};
class DescriptionLabel: CallsignLabel {
text = "$STR_3DEN_Object_Attribute_Description_displayName";
tooltip = "$STR_3DEN_Object_Attribute_Description_tooltip";
y = 0.5 - (120/2 - 10 - 1 - 10) * GRID_3DEN_H;
};
class Description: Callsign {
idc = IDC_LM_DESCRIPTION;
y = 0.5 - (120/2 - 10 - 1 - 5 - 10) * GRID_3DEN_H;
};
class MoveUp: ctrlButtonPictureKeepAspect {
idc = IDC_LM_MOVE_UP;
text = QPATHTOF(arrow_up_ca.paa);
tooltip = CSTRING(MoveUp);
x = (getResolution select 2) * 0.5 * pixelW + (140/2 - 50) * GRID_3DEN_W;
y = 0.5 + (120/2 - 10 - 7 - 1) * GRID_3DEN_H;
w = 5 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
colorBackground[] = {0, 0, 0, 0};
};
class MoveDown: MoveUp {
idc = IDC_LM_MOVE_DOWN;
text = QPATHTOF(arrow_down_ca.paa);
tooltip = CSTRING(MoveDown);
x = (getResolution select 2) * 0.5 * pixelW + (140/2 - 50 + 5) * GRID_3DEN_W;
};
class Collapse: ctrlButtonCollapseAll {
idc = IDC_LM_COLLAPSE;
x = (getResolution select 2) * 0.5 * pixelW + (140/2 - 50 + 10) * GRID_3DEN_W;
y = 0.5 + (120/2 - 10 - 7 - 1) * GRID_3DEN_H;
w = 5 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
};
class Expand: ctrlButtonExpandAll {
idc = IDC_LM_EXPAND;
x = (getResolution select 2) * 0.5 * pixelW + (140/2 - 50 + 15) * GRID_3DEN_W;
y = 0.5 + (120/2 - 10 - 7 - 1) * GRID_3DEN_H;
w = 5 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
};
class ButtonOK: ctrlButtonOK {
x = (getResolution select 2) * 0.5 * pixelW + (140/2 - 50 - 2) * GRID_3DEN_W;
y = 0.5 + (120/2 - 10 - 1) * GRID_3DEN_H;
w = 25 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
};
class ButtonCancel: ctrlButtonCancel {
x = (getResolution select 2) * 0.5 * pixelW + (140/2 - 25 - 1) * GRID_3DEN_W;
y = 0.5 + (120/2 - 10 - 1) * GRID_3DEN_H;
w = 25 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
};
};
};
4 changes: 0 additions & 4 deletions addons/ui/RscTitles.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
class RscText;
class RscProgress;
class RscMapControl;

class RscTitles {
class GVAR(ProgressBar) {
onLoad = uiNamespace setVariable ['GVAR(ProgressBar)', _this select 0];
Expand Down
Binary file added addons/ui/arrow_down_ca.paa
Binary file not shown.
Binary file added addons/ui/arrow_up_ca.paa
Binary file not shown.
45 changes: 38 additions & 7 deletions addons/ui/config.cpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,54 @@
#include "script_component.hpp"
#include "script_component.hpp"

class CfgPatches {
class ADDON {
author = "$STR_CBA_Author";
name = CSTRING(component);
url = "$STR_CBA_URL";
name = CSTRING(Component);
units[] = {};
requiredVersion = 1;
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"cba_common", "cba_arrays"};
version = VERSION;
authors[] = {"Dr Eyeball", "commy2"};
author = "$STR_CBA_Author";
authors[] = {"Dr Eyeball", "commy2", "mharis001"};
url = "$STR_CBA_URL";
VERSION_CONFIG;
};
};

// UI base classes
class RscText;
class RscEdit;
class RscTitle;
class RscListBox;
class RscProgress;
class RscMapControl;
class RscButtonMenu;
class RscButtonMenuOK;
class RscControlsGroup;
class RscButtonMenuCancel;

class ctrlTree;
class ctrlEdit;
class ctrlStatic;
class ctrlStaticTitle;
class ctrlStaticFooter;
class ctrlMenuStrip;
class ctrlButtonOK;
class ctrlButtonCancel;
class ctrlButtonPicture;
class ctrlButtonExpandAll;
class ctrlButtonCollapseAll;
class ctrlButtonPictureKeepAspect;
class ctrlStaticBackground;
class ctrlStaticBackgroundDisable;
class ctrlStaticBackgroundDisableTiles;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hate this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result of following BI's format for making "3DEN dialogs".


#include "CfgEventHandlers.hpp"
#include "CfgFunctions.hpp"
#include "RscTitles.hpp"
#include "CfgUIGrids.hpp"
#include "RscDisplayOptionsLayout.hpp"
#include "Display3DEN.hpp"
#include "LobbyManager.hpp"

//-----------------------------------------------------------------------------
// TODO: Delete these rsc/_flexiMenu_RscShortcutButton classes soon and transfer properties to menu classes, if any.
Expand Down
2 changes: 0 additions & 2 deletions addons/ui/fnc_initDisplayMultiplayerSetup.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "script_component.hpp"

#define SEPARATORS "@"

params ["_display"];

private _fnc_update = {
Expand Down
Loading