Opened 4 years ago

Last modified 15 months ago

#5670 new defect

"Control all units" checkbox is not greyed out in observer mode

Reported by: Itms Owned by:
Priority: Nice to Have Milestone: Backlog
Component: UI – In-game Keywords:
Cc: Patch: Phab:D2750

Description

In observer mode, the developer tools (Alt+D) "Control all units" checkbox does not work in observer mode, when the user has the default -1 player.

This is done on purpose, but the button is not grayed out, which makes it seem like a bug with the checkbox. It should be greyed out when it is disabled.

This sounds simple to do but Vladislav tells me that there might be some strange stuff in the developer tools code.

Change History (10)

comment:1 by elexis, 4 years ago

Index: binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlayCheckbox.js
===================================================================
--- binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlayCheckbox.js	(revision 23475)
+++ binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlayCheckbox.js	(working copy)
@@ -33,6 +33,9 @@
 	update()
 	{
 		this.checkbox.checked = this.handler.checked();
+
+		if (this.handler.enabled)
+			this.checkbox.enabled = this.handler.enabled();
 	}
 
 	setHidden(hidden)
Index: binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlayCheckboxes.js
===================================================================
--- binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlayCheckboxes.js	(revision 23475)
+++ binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlayCheckboxes.js	(working copy)
@@ -23,6 +23,11 @@
 		});
 	}
 
+	enabled()
+	{
+		return Engine.GetPlayerID() != -1;
+	}
+
 	checked()
 	{
 		let playerState = g_SimState.players[g_ViewedPlayer];

The artwork for the disabled checkbox however is hardly distinguishable from the enabled checkbox.

Edit: also there may be more checkboxes that are disabled for observers.

Last edited 4 years ago by elexis (previous) (diff)

comment:2 by gameboy, 4 years ago

How to solve this problem?

comment:3 by elexis, 4 years ago

I guess by hiding the item if its disabled.

Edit: Or only hide the checkbox. There is the problem that developers often dont know the developer tools and ask for them to work even when they should not (cheats disabled) or can't work (not a player selected). So perhaps a tooltip could clarify that.

Last edited 4 years ago by elexis (previous) (diff)

comment:4 by gameboy, 4 years ago

@elexis  I agree with your idea. Can you realize your idea?

in reply to:  4 comment:5 by Freagarach, 4 years ago

Replying to gameboy:

@elexis  I agree with your idea. Can you realize your idea?

gameboy, you are encouraged to give it a try yourself. (https://trac.wildfiregames.com/wiki/SubmittingPatches)

comment:6 by elexis, 4 years ago

Keywords: simple removed
Milestone: BacklogWork In Progress
Patch: Phab:D2750

comment:7 by Silier, 4 years ago

This is done on purpose
So Promote selected units should be disabled too

comment:8 by Silier, 3 years ago

Owner: set to Vladimir Nikitin

comment:9 by Stan, 20 months ago

Owner: Vladimir Nikitin removed

Backlogging due to lack of progress, lack of review, or users going MIA.

comment:10 by Stan, 15 months ago

Milestone: Work In ProgressBacklog
Note: See TracTickets for help on using tickets.