From db4f88261d76f586e00046103647eeac1fbee730 Mon Sep 17 00:00:00 2001 From: jaynus Date: Tue, 13 Jan 2015 16:47:23 -0800 Subject: [PATCH] nametags fixed. --- addons/nametags/$PBOPREFIX$ | 1 + addons/nametags/CfgEventHandlers.hpp | 2 +- addons/nametags/XEH_postInit.sqf | 1 - addons/nametags/XEH_preInit.sqf | 1 + addons/nametags/functions/fnc_setText.sqf | 6 ++++-- addons/nametags/script_component.hpp | 8 ++++---- 6 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 addons/nametags/$PBOPREFIX$ diff --git a/addons/nametags/$PBOPREFIX$ b/addons/nametags/$PBOPREFIX$ new file mode 100644 index 0000000000..d0e4754193 --- /dev/null +++ b/addons/nametags/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\nametags \ No newline at end of file diff --git a/addons/nametags/CfgEventHandlers.hpp b/addons/nametags/CfgEventHandlers.hpp index 8d2422059a..e75956f440 100644 --- a/addons/nametags/CfgEventHandlers.hpp +++ b/addons/nametags/CfgEventHandlers.hpp @@ -6,6 +6,6 @@ class Extended_PreInit_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { - postInit = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index b512e8b133..a7c084a73e 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -1,7 +1,6 @@ #include "script_component.hpp" // by commy2 and CAA-Picard - if (!hasInterface) exitWith {}; GVAR(ShowNamesTime) = -10; diff --git a/addons/nametags/XEH_preInit.sqf b/addons/nametags/XEH_preInit.sqf index 440aa2231d..940135dd47 100644 --- a/addons/nametags/XEH_preInit.sqf +++ b/addons/nametags/XEH_preInit.sqf @@ -1,5 +1,6 @@ #include "script_component.hpp" + PREP(canShow); PREP(doShow); PREP(drawNameTagIcon); diff --git a/addons/nametags/functions/fnc_setText.sqf b/addons/nametags/functions/fnc_setText.sqf index 1c740f76b0..e7d1b748b1 100644 --- a/addons/nametags/functions/fnc_setText.sqf +++ b/addons/nametags/functions/fnc_setText.sqf @@ -11,13 +11,15 @@ Nothing */ -#define GVAR(TextIDC) 11123 +#include "script_component.hpp" + +#define TextIDC 11123 private["_text", "_ctrl"]; disableSerialization; _text = _this select 0; -_ctrl = (uiNamespace getVariable QGVAR(dialog)) displayCtrl GVAR(TextIDC); +_ctrl = (uiNamespace getVariable QGVAR(dialog)) displayCtrl TextIDC; _ctrl ctrlSetStructuredText parseText _text; _ctrl ctrlCommit 0; diff --git a/addons/nametags/script_component.hpp b/addons/nametags/script_component.hpp index 5def4b85b4..6cffb95618 100644 --- a/addons/nametags/script_component.hpp +++ b/addons/nametags/script_component.hpp @@ -1,12 +1,12 @@ -#define COMPONENT NameTags +#define COMPONENT nametags #include "\z\ace\addons\main\script_mod.hpp" -#ifdef DEBUG_ENABLED_NameTags +#ifdef DEBUG_ENABLED_NAMETAGS #define DEBUG_MODE_FULL #endif -#ifdef DEBUG_SETTINGS_NameTags - #define DEBUG_SETTINGS DEBUG_SETTINGS_NameTags +#ifdef DEBUG_SETTINGS_NAMETAGS + #define DEBUG_SETTINGS DEBUG_SETTINGS_NAMETAGS #endif #include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file