Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1186 closed enhancement (fixed)

[PATCH] Hotkey to toggle silhouettes

Reported by: historic_bruno Owned by: Mitchell K
Priority: If Time Permits Milestone: Alpha 10
Component: Core engine Keywords: patch simple
Cc: mk12360@… Patch:

Description

Silhouettes are the player-colored shape of a unit when it's obstructed by something else. Sometimes they can be distracting, so a hotkey to turn this feature on/off would be nice :)

Attachments (2)

task 1186.patch (2.3 KB ) - added by Daniele 12 years ago.
First attempt for ticket task
Render-Silhouettes-Hotkey.patch (3.1 KB ) - added by Mitchell K 12 years ago.
uses javascript/xml to handle hotkey press

Download all attachments as: .zip

Change History (17)

comment:1 by Philip Taylor, 12 years ago

Hotkeys sound too easy for someone to accidentally press, and then get very confused a while later when they realise they can't see any silhouettes any more and have no idea how to get them back. Maybe putting it in the (not-yet-existent) advanced options menu would be better, so people probably only trigger it on purpose.

comment:2 by historic_bruno, 12 years ago

I agree in principle, but we have other hotkeys that are much worse, namely the GUI show/hide key :P

comment:3 by Erik Johansson, 12 years ago

Well, now you need to press Alt+G to hide the GUI. In my opinion that's not something you're too likely to press by accident. But true, things like that are probably most appropriate to go in an advanced options menu eventually :)

by Daniele, 12 years ago

Attachment: task 1186.patch added

First attempt for ticket task

comment:4 by Daniele, 12 years ago

Keywords: patch added
Summary: Hotkey to toggle silhouettes[PATCH] Hotkey to toggle silhouettes

comment:5 by Kieran P, 12 years ago

Keywords: review added

comment:6 by Kieran P, 12 years ago

Owner: set to Daniele

comment:7 by Kieran P, 12 years ago

Milestone: BacklogAlpha 10

comment:8 by Jonathan Waller, 12 years ago

Hi, thanks for the patch, it looks like a reasonable approach. A couple of comments:

You should initialize m_Silhouettes, the other booleans are done near line 424 in Renderer.cpp.

We would prefer it if you could handle the hotkey press in the javascript GUI scripts. The wireframe is a slight anomaly in being handled by the C++. Try looking at the fancyWater setting to see how to interface with the javascript.

comment:9 by Daniele, 12 years ago

Sure, i'll go for it today or tomorrow

comment:10 by Mitchell K, 12 years ago

Cc: mk12360@… added
Owner: changed from Daniele to Mitchell K
Status: newassigned

I've implemented it in the javascript/xml. I've also made it load the default value from default.cfg.

I wasn't exactly sure where to put it in there, since there isn't really a render settings section, so I added it after fancywater, shadows, shadowpcf and vsync (system settings). I put the actual hotkey in the system settings hotkeys as well (after wireframe). I didn't name it "silhouettes.toggle" since that doesn't really seem to be used consistently anyway (but if you wanted it that way, all that would be changed is line 117 of default.cfg and line 59 of session.xml).

It also wasnt clear where to put the action in session.xml, so I added it by the menu and chat toggling actions.

by Mitchell K, 12 years ago

uses javascript/xml to handle hotkey press

comment:11 by Kieran P, 12 years ago

Keywords: simple, patch, review → patch, review, simple

comment:12 by Kieran P, 12 years ago

Keywords: patch, review, simple → patch review simple
Milestone: Alpha 10Alpha 11

comment:13 by ben, 12 years ago

Resolution: fixed
Status: assignedclosed

In 11779:

Adds config and hotkey options for toggling unit silhouettes, based on patches by Ello and mk12. Fixes #1186.

comment:14 by historic_bruno, 12 years ago

Keywords: review removed
Milestone: Alpha 11Alpha 10

comment:15 by ben, 12 years ago

In 11782:

Adds silhouettes option to in-game settings menu. Refs #1186

Note: See TracTickets for help on using tickets.