Add more proof of concept and findings

This commit is contained in:
SilentSpike 2017-12-24 19:02:40 +00:00
parent ff761788f3
commit 4aa03b7545
2 changed files with 37 additions and 5 deletions

View File

@ -57,6 +57,9 @@ if (_init) then {
GVAR(iconsToDraw) = []; GVAR(iconsToDraw) = [];
GVAR(projectilesToDraw) = []; GVAR(projectilesToDraw) = [];
// Context menu toggles
GVAR(uiBulletCam) = false;
// RMB tracking is used for follow camera mode // RMB tracking is used for follow camera mode
GVAR(holdingRMB) = false; GVAR(holdingRMB) = false;
@ -119,11 +122,15 @@ if (_init) then {
// Destroy the display // Destroy the display
SPEC_DISPLAY closeDisplay 1; SPEC_DISPLAY closeDisplay 1;
// Context menu no longer exists
SETUVAR(GVAR(context),nil);
// Stop tracking everything // Stop tracking everything
GVAR(uiVisible) = nil; GVAR(uiVisible) = nil;
GVAR(uiHelpVisible) = nil; GVAR(uiHelpVisible) = nil;
GVAR(uiMapVisible) = nil; GVAR(uiMapVisible) = nil;
GVAR(uiWidgetVisible) = nil; GVAR(uiWidgetVisible) = nil;
GVAR(uiBulletCam) = nil;
GVAR(holdingRMB) = nil; GVAR(holdingRMB) = nil;
GVAR(uiMapHighlighted) = nil; GVAR(uiMapHighlighted) = nil;
GVAR(curList) = nil; GVAR(curList) = nil;

View File

@ -21,9 +21,31 @@ class GVAR(contextMenu): CtrlMenu {
itemSpacingW = 0; itemSpacingW = 0;
colorBackground[] = {0.1,0.1,0.1,1}; colorBackground[] = {0.1,0.1,0.1,1};
class Items { class Items {
items[] = {"Toggles"}; items[] = {"List","Camera","View"};
class Toggles { class List {
text = "Toggles"; text = "Entity List";
items[] = {
"ListAI"
};
};
class ListAI {
text = "Show AI";
};
class Camera {
text = "Camera";
items[] = {
"BulletCam"
};
};
class BulletCam {
text = "Bullet Camera";
action = QUOTE(GVAR(uiBulletCam) = !GVAR(uiBulletCam));
data = QGVAR(uiBulletCam); // You need data attribute for checkbox apparently
type = "CheckBox";
default = 0; // Need to use commands to initalise this, but they seemingly don't work
};
class View {
text = "$STR_3DEN_Display3DEN_MenuBar_View_text";
items[] = { items[] = {
"ToggleLight", "ToggleLight",
"ToggleInfo", "ToggleInfo",
@ -32,13 +54,13 @@ class GVAR(contextMenu): CtrlMenu {
}; };
}; };
class ToggleLight { class ToggleLight {
text = "Toggle Lights"; text = "$STR_3DEN_Display3DEN_MenuBar_ToggleFlashlight_text";
action = QUOTE([ARR_2(displayNull, DIK_L)] call FUNC(ui_handleKeyDown)); action = QUOTE([ARR_2(displayNull, DIK_L)] call FUNC(ui_handleKeyDown));
shortcuts[] = { DIK_L }; shortcuts[] = { DIK_L };
picture="\a3\3DEN\Data\Displays\Display3DEN\ToolBar\flashlight_off_ca.paa"; picture="\a3\3DEN\Data\Displays\Display3DEN\ToolBar\flashlight_off_ca.paa";
}; };
class ToggleInfo { class ToggleInfo {
text = "Toggle Widget"; text = "Toggle Unit Info";
action = QUOTE([ARR_2(displayNull, DIK_I)] call FUNC(ui_handleKeyDown)); action = QUOTE([ARR_2(displayNull, DIK_I)] call FUNC(ui_handleKeyDown));
shortcuts[] = { DIK_I }; shortcuts[] = { DIK_I };
}; };
@ -51,6 +73,9 @@ class GVAR(contextMenu): CtrlMenu {
text = "Toggle Projectiles"; text = "Toggle Projectiles";
action = QUOTE([ARR_2(displayNull, DIK_P)] call FUNC(ui_handleKeyDown)); action = QUOTE([ARR_2(displayNull, DIK_P)] call FUNC(ui_handleKeyDown));
shortcuts[] = { DIK_P }; shortcuts[] = { DIK_P };
data = QGVAR(drawProjectiles);
type = "CheckBox";
default = 0;
}; };
class Default { class Default {
enable = 0; enable = 0;