Skip to content

Commit

Permalink
Spotlight Block - Add component
Browse files Browse the repository at this point in the history
  • Loading branch information
veteran29 committed Feb 21, 2024
1 parent c54d78e commit 8c1b1d9
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
1 change: 1 addition & 0 deletions addons/spotlight_block/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\afm\addons\spotlight_block
45 changes: 45 additions & 0 deletions addons/spotlight_block/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"A3_Ui_F" // minimal required addons so this component loads as early as possible
};
author = "ArmaForces";
authors[] = {"veteran29"};
VERSION_CONFIG;
};
};

#define HIDE_CONTROL \
x = 0; \
y = 0; \
w = 0; \
h = 0

class RscStandardDisplay;
class RscDisplayMain: RscStandardDisplay {
class controls {
class BackgroundSpotlightRight;
class GVAR(BackgroundSpotlightNoDelete): BackgroundSpotlightRight {
HIDE_CONTROL;
};

class Spotlight1;
class GVAR(Spotlight1NoDelete): Spotlight1 {
HIDE_CONTROL;
};
class Spotlight2;
class GVAR(Spotlight2NoDelete): Spotlight2 {
HIDE_CONTROL;
};
class Spotlight3;
class GVAR(Spotlight3NoDelete): Spotlight3 {
HIDE_CONTROL;
};
};
};
14 changes: 14 additions & 0 deletions addons/spotlight_block/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#define COMPONENT spotlight_block
#include "\z\afm\addons\main\script_mod.hpp"

// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE

#ifdef DEBUG_ENABLED_SPOTLIGHT_BLOCK
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_SPOTLIGHT_BLOCK
#define DEBUG_SETTINGS DEBUG_SETTINGS_SPOTLIGHT_BLOCK
#endif

#include "\z\afm\addons\main\script_macros.hpp"

0 comments on commit 8c1b1d9

Please sign in to comment.