mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Minor UX tweaks
This commit is contained in:
parent
e95186f550
commit
cc9283ed96
@ -140,11 +140,11 @@ switch (toLower _mode) do {
|
|||||||
case "onmousezchanged": {
|
case "onmousezchanged": {
|
||||||
_args params ["_ctrl","_zChange"];
|
_args params ["_ctrl","_zChange"];
|
||||||
|
|
||||||
// Scroll to change zoom, modifier for focus
|
// Scroll to change speed, modifier for zoom
|
||||||
if (GVAR(ctrlKey)) then {
|
if (GVAR(ctrlKey)) then {
|
||||||
GVAR(camFocus) = (GVAR(camFocus) + _zChange) max 0;
|
GVAR(camZoom) = ((GVAR(camZoom) + _zChange * 0.1) max 0.01) min 2;
|
||||||
} else {
|
} else {
|
||||||
GVAR(camZoom) = ((GVAR(camZoom) + (_zChange * 0.1)) max 0.01) min 2;
|
GVAR(camSpeed) = (GVAR(camSpeed) + _zChange * 0.2) max 0.05;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
case "onmousemoving": {
|
case "onmousemoving": {
|
||||||
|
@ -20,16 +20,21 @@ private ["_display","_elements","_show"];
|
|||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
_display = GETUVAR(GVAR(display),displayNull);
|
_display = GETUVAR(GVAR(display),displayNull);
|
||||||
_elements = [IDC_COMP,IDC_HELP,IDC_MAP,IDC_TOOL,IDC_UNIT];
|
_elements = [IDC_COMP,IDC_TOOL,IDC_UNIT];
|
||||||
_show = [GVAR(showComp),GVAR(showHelp),GVAR(showMap),GVAR(showTool),GVAR(showUnit)];
|
_show = [GVAR(showComp),GVAR(showTool),GVAR(showUnit)];
|
||||||
|
|
||||||
// Hide/show interface elements as appropriate
|
// Hide/show interface elements as appropriate
|
||||||
if (GVAR(showInterface)) then {
|
if (GVAR(showInterface)) then {
|
||||||
|
// Hide while map is open to prevent active element weirdness
|
||||||
{
|
{
|
||||||
(_display displayCtrl _x) ctrlShow (_show select _forEachIndex);
|
(_display displayCtrl _x) ctrlShow ([(_show select _forEachIndex),false] select GVAR(showMap));
|
||||||
} forEach _elements;
|
} forEach _elements;
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
(_display displayCtrl _x) ctrlShow GVAR(showInterface);
|
(_display displayCtrl _x) ctrlShow GVAR(showInterface);
|
||||||
} forEach _elements;
|
} forEach _elements;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Map and help operate seperate from interface
|
||||||
|
(_display displayCtrl IDC_HELP) ctrlShow GVAR(showHelp);
|
||||||
|
(_display displayCtrl IDC_MAP) ctrlShow GVAR(showMap);
|
||||||
|
Loading…
Reference in New Issue
Block a user