Skip to content

Commit

Permalink
Fix layout editor running out of repositionable controls
Browse files Browse the repository at this point in the history
  • Loading branch information
mharis001 committed Aug 7, 2018
1 parent 4965324 commit 13711bb
Showing 1 changed file with 94 additions and 1 deletion.
95 changes: 94 additions & 1 deletion addons/ui/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,103 @@ class CfgPatches {

#include "CfgEventHandlers.hpp"
#include "CfgFunctions.hpp"

#include "RscTitles.hpp"
#include "CfgUIGrids.hpp"

// Fixes Layout Editor only having 22 repositionable controls
class RscDisplayOptionsLayout {
class controlsBackground {
class Element021;
#define ADD_ELEMENT(var1) class Element##var1: Element021 {\
idc = __EVAL(12000 + var1);\
onMouseEnter = "with uinamespace do {['mouseEnter',_this,''] call RscDisplayOptionsLayout_script;};";\
onMouseExit = "with uinamespace do {['mouseExit',_this,''] call RscDisplayOptionsLayout_script;};";\
onMouseHolding = "with uinamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};";\
onMouseMoving = "with uinamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};";\
onMouseButtonDown = "with uinamespace do {['mouseButtonDown',_this,''] call RscDisplayOptionsLayout_script;};";\
onMouseButtonUp = "with uinamespace do {['mouseButtonUp',_this,''] call RscDisplayOptionsLayout_script;};";\
};
ADD_ELEMENT(022);
ADD_ELEMENT(023);
ADD_ELEMENT(024);
ADD_ELEMENT(025);
ADD_ELEMENT(026);
ADD_ELEMENT(027);
ADD_ELEMENT(028);
ADD_ELEMENT(029);
ADD_ELEMENT(030);
ADD_ELEMENT(031);
ADD_ELEMENT(032);
ADD_ELEMENT(033);
ADD_ELEMENT(034);
ADD_ELEMENT(035);
ADD_ELEMENT(036);
ADD_ELEMENT(037);
ADD_ELEMENT(038);
ADD_ELEMENT(039);
ADD_ELEMENT(040);
ADD_ELEMENT(041);
ADD_ELEMENT(042);
ADD_ELEMENT(043);
ADD_ELEMENT(044);
ADD_ELEMENT(045);
ADD_ELEMENT(046);
ADD_ELEMENT(047);
ADD_ELEMENT(048);
ADD_ELEMENT(049);
ADD_ELEMENT(050);
ADD_ELEMENT(051);
ADD_ELEMENT(052);
ADD_ELEMENT(053);
ADD_ELEMENT(054);
ADD_ELEMENT(055);
ADD_ELEMENT(056);
ADD_ELEMENT(057);
ADD_ELEMENT(058);
ADD_ELEMENT(059);
ADD_ELEMENT(060);
ADD_ELEMENT(061);
ADD_ELEMENT(062);
ADD_ELEMENT(063);
ADD_ELEMENT(064);
ADD_ELEMENT(065);
ADD_ELEMENT(066);
ADD_ELEMENT(067);
ADD_ELEMENT(068);
ADD_ELEMENT(069);
ADD_ELEMENT(070);
ADD_ELEMENT(071);
ADD_ELEMENT(072);
ADD_ELEMENT(073);
ADD_ELEMENT(074);
ADD_ELEMENT(075);
ADD_ELEMENT(076);
ADD_ELEMENT(077);
ADD_ELEMENT(078);
ADD_ELEMENT(079);
ADD_ELEMENT(080);
ADD_ELEMENT(081);
ADD_ELEMENT(082);
ADD_ELEMENT(083);
ADD_ELEMENT(084);
ADD_ELEMENT(085);
ADD_ELEMENT(086);
ADD_ELEMENT(087);
ADD_ELEMENT(088);
ADD_ELEMENT(089);
ADD_ELEMENT(090);
ADD_ELEMENT(091);
ADD_ELEMENT(092);
ADD_ELEMENT(093);
ADD_ELEMENT(094);
ADD_ELEMENT(095);
ADD_ELEMENT(096);
ADD_ELEMENT(097);
ADD_ELEMENT(098);
ADD_ELEMENT(099);
};
};

//-----------------------------------------------------------------------------
// TODO: Delete these rsc/_flexiMenu_RscShortcutButton classes soon and transfer properties to menu classes, if any.
class RscShortcutButton;
Expand Down

0 comments on commit 13711bb

Please sign in to comment.