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

Fix updating base classes #337

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
- Added InputList attribute control
- Moved mass attribute from transformation category to state category
- Moved limit speed attribute from special states category to state category
- Fixed updating base classes for RscDebugConsole, EditCodeMulti3, and Display3DEN

## REMOVED
- Customization via userconfig
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
| a1044438870 |
| Artenis |
| Pixelated Grunt | minor ESE improvement |
| Dart | Config |
7 changes: 5 additions & 2 deletions addons/main/GUI/RscDebugConsole.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
class RscControlsGroupNoScrollbars;
class RscButtonMenu;
class RscDebugConsole: RscControlsGroupNoScrollbars
{
class Controls
{
class ButtonSpectatorCamera;
class ButtonFunctions: ButtonSpectatorCamera
class ButtonFunctions: RscButtonMenu
{
idc = -1;
//Dynamically reposition it if Connor's functions viewer is available as well.
onLoad = "_this # 0 ctrlSetText ('ENH_' + localize 'STR_A3_RSCDEBUGCONSOLE_BUTTONFUNCTIONS'); if (isClass (configFile >> 'RscDisplayDebugPublic' >> 'Controls' >> 'DebugConsole' >> 'controls' >> 'CAU_xFuncViewer')) then {_this # 0 ctrlSetPosition [7.5 * (((safeZoneW / safeZoneH) min 1.2) / 40), 21.6 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)]; _this # 0 ctrlCommit 0;}";
x = QUOTE(7.5 * GUI_GRID_W);
y = QUOTE(19.4 * GUI_GRID_H);
w = QUOTE(7.4 * GUI_GRID_W);
h = QUOTE(1 * GUI_GRID_H);
onButtonClick = "ctrlParent (_this # 0) createDisplay 'ENH_FunctionsViewer'";
};
};
Expand Down
13 changes: 8 additions & 5 deletions addons/main/cfg3DEN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ class Cfg3DEN
};
};
//Increase height of edit attribute controls
class Edit;
class Edit: Title
{
class Controls;
};
class EditMulti3: Edit
{
class Controls
class Controls: Controls
{
class Value;
class Background;
Expand All @@ -81,7 +84,7 @@ class Cfg3DEN
};
class EditCodeMulti3: EditMulti3
{
class Controls
class Controls: Controls
{
class Value;
class Background;
Expand All @@ -107,11 +110,11 @@ class Cfg3DEN
};
};
};
class EditCodeMulti5: EditCodeMulti3
class EditCodeMulti5: EditMulti5
{
h = QUOTE((5 + 20 * 3.5) * GRID_H);
class Controls: Controls
{
// Manually apply changes, these aren't inherited for some reason
class Background: Background
{
h = QUOTE((20 * 3.5 + 0.6 * 5) * GRID_H);
Expand Down
30 changes: 29 additions & 1 deletion addons/main/display3DEN/display3DEN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,45 @@ class Display3DEN
{
w = QUOTE(19 * GRID_W);
};
class Version: ctrlButton
// Manually reconfig Version into a button
class Version: ValueX
{
idc = -1;
type = CT_BUTTON;
text = "V";
font = "PuristaLight";

x = QUOTE(ORIGIN_X_STATUSBAR - 15 * GRID_W - SPACE_X);
y = QUOTE(2 * pixelH);
w = QUOTE(4 * GRID_W - 4 * pixelW);
h = QUOTE(4 * GRID_H - 4 * pixelH);
sizeEx = QUOTE(4.32 * SIZEEX_BASE);
offsetX = 0;
offsetY = 0;
offsetPressedX = "pixelW";
offsetPressedY = "pixelH";

colorBackground[] = {0, 0, 0, 0.5};
colorBackgroundDisabled[] = {0, 0, 0, 0.5};
colorBackgroundActive[] = {COLOR_ACTIVE_RGB, 1};
colorBorder[] = {0, 0, 0, 0};
colorDisabled[] = {1, 1, 1, 0.25};
colorFocused[] = {COLOR_ACTIVE_RGB, 1};
colorShadow[] = {0, 0, 0, 0};

onLoad = "_this # 0 ctrlSetToolTip format ['%1.%2', (productVersion select 2) * 0.01 toFixed 2, productVersion select 3]";
onButtonClick = "call ENH_fnc_productInfo";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1};
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1};
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1};

borderSize = 0;
period = 0;
periodFocus = 2;
periodOver = 0.5;
style = "0x02 + 0xC0";
shadow = 1;
};
class TextY: TextX
{
Expand Down