Commit Graph

126 Commits

Author SHA1 Message Date
DArcy Rush
8eb34f3cfa Replace 'Always show Healthbars' checkbox with dropdown
The player can now cycle between;
-Standard: Health and Status bars display only on mouse hover.
-Show On Damage: Health shows on damaged actors, Status always shows.
-Always Show: Health and Status bars are always displayed.
2015-11-29 21:52:31 +00:00
Kevin Azzam
64ed164295 Make "select all units" work across screen/map again 2015-11-19 00:21:16 +01:00
abcdefg30
d7c0d4197c Fix a possible crash in WorldInteractionControllerWidget 2015-10-05 17:23:42 +02:00
Joppy Furr
07273fa666 Add support for Tiberian Sun style right-click-and-drag scrolling
This patch introduces support for the right-click-and-drag scrolling that
is available in Tiberian Sun and Red Alert 2. It can be enabled by
selecting "Joystick" scrolling in the Input settings.

The speed of the scroll is proportional to the product of the distance of
the drag, and the Scroll Speed selected in the Input settings menu.

A side-effect of this is that events previously tied to right clicks on
the world are now based on the release of the click rather than the press.

The "Middle-Mouse Scrolling:" option is renamed
to "Mouse Scrolling Method:"
2015-10-04 16:22:55 +13:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
atlimit8
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -05:00
deniz1a
ef143e5f8a Freezes map after game ends.
Adds newline.

Disables keyboard hotkeys for units after game ends.
2015-07-25 18:56:23 +03:00
Matija Hustić
34d0518b29 Fixed regression from last PR. 2015-06-21 20:15:06 +01:00
reaperrr
c23ee1be2e Remove Selectable boolean from Selectable trait
Add work-around for ta/td bridge huts since they need actor Bounds to
be targetable by C4/engineer repair.
2015-06-17 20:13:59 +02:00
Matija Hustić
e965a0d3f0 Touched up selection functionality. 2015-06-08 15:03:09 +01:00
Oliver Brakmann
da16142412 Enable unit selection keys for spectators and in replays.
Only work in per-player views.
2015-05-20 18:56:14 +02:00
Oliver Brakmann
9895aee6f2 Disable unit selection by double-clicking for enemy units 2015-05-20 18:28:34 +02:00
Paul Chote
49624e335c Remove legacy DIY view -> world conversions. 2015-03-31 20:59:52 +01:00
RoosterDragon
1515ac54f6 Enforce a line length limit. 2015-03-19 17:20:34 +00:00
Bynnar18
0abe8f9b2b Fixes issues with support powers and adds property to all IOrderGenerator classes to determine priority over selection in the left-click order scheme. 2015-03-01 14:58:19 -06:00
Bynnar18
7b46b76329 Fixed left-click orders and implemented a selection deadzone. 2015-03-01 14:58:19 -06:00
Bynnar18
36d59d6b1d Restored faulty left-click logic for now. 2015-03-01 14:58:18 -06:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
atimoschenkow
831f19e993 A selection box is drawn if the mouse exits the radar widget while dragging the viewport.
These changes prevent this side effect.
2015-01-04 17:06:50 +01:00
Oliver Brakmann
4e3f565354 Fix broken orders when actors are selected.
Fixes an oversight in #6949.
2014-11-15 21:00:52 +01:00
Paul Chote
f5c09121ad Remove buggy classic mouse orders. Closes #3153. 2014-11-15 09:40:25 +13:00
Oliver Brakmann
eff54a614b Fix selection glitch in observer mode
Fixes #6421.
2014-09-07 00:52:55 +02:00
Paul Chote
13656710ca Fix unit selection hotkeys for players. Fixes #5753.
This also explicitly disables them for spectators.
2014-07-29 23:32:47 +12:00
Oliver Brakmann
ad2327828d Make actors outside map borders selectable for their owner
PR #5967 only made planes not lose their selection when they strayed
outside the map border. This PR makes it possible to select them when
they already are outside the map.  It also ensures that the selection
decorations are drawn.  Rank designations, however, will disappear when
a unit leaves the map.

Fixes #5651 for real, then.
2014-07-26 11:05:41 +02:00
Paul Chote
e5b863f926 Merge pull request #5698 from Mailaender/sonar
Added the sonar pulse to reveal sub marines
2014-07-09 10:44:47 +12:00
Paul Chote
802b6a652c Revert "new PauseState to differentiate game and editor pausing"
This reverts commit d1e18cad7a.
2014-07-08 10:42:00 +12:00
Matthias Mailänder
5cdf0e6a67 generalize MoveFlash as parametrized SpriteEffect 2014-07-07 15:23:14 +02:00
Matthias Mailänder
d1e18cad7a new PauseState to differentiate game and editor pausing 2014-07-06 08:24:08 +02:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
bbd1331536 Clean up actor selection in WorldInteractionControllerWidget. 2014-06-27 19:20:44 +12:00
Paul Chote
7d24053f52 Introduce Order.SuppressVisualFeedback to cleanly disable flashes. 2014-06-26 23:14:13 +12:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
Paul Chote
d8e5177a36 Merge pull request #5405 from RoosterDragon/min-max
Added MinBy, MaxBy, etc.
2014-06-09 17:42:01 +12:00
Matthias Mailänder
3a1c41c8ce move pixel doubling and health bar hotkeys to shared widget
closes #5572
2014-06-07 12:26:58 +02:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
RoosterDragon
0ea3509ee4 Added MinBy, MaxBy, MinByOrDefault and MaxByOrDefault methods and replaced calls of the style OrderBy[Descending]().First[OrDefault]() which is not as performant. 2014-05-23 08:23:42 +01:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
a31cdec87a Move control group logic into its own logic class. 2014-03-22 22:32:41 +13:00
Pizzaoverhead
7be3078115 Adds selecting of all units matching the current type across the screen or map using Ctrl + T. 2014-02-20 21:59:23 +00:00
Matthias Mailänder
7d19e25627 don't crash on empty orders 2013-12-30 08:44:14 +01:00
Matthias Mailänder
08166c0a64 added a new hotkey to select all units on screen
closes #4182
2013-12-06 11:26:52 +01:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
fb4e1b4805 Fix FlashTarget crash 2013-11-11 23:49:00 +13:00
Paul Chote
a1f876b13c Use selection priority in double-click selection logic. Fixes #4053. 2013-11-09 16:39:30 +13:00
Matthias Mailänder
6f8e78761c StyleCop cleanup 2013-11-02 23:18:23 +01:00
Matthias Mailänder
21b7d0eadb loop all orders only once 2013-11-02 23:18:19 +01:00
Matthias Mailänder
6b0238a6cc don't stack flashes and filter non unit actor related orders 2013-11-02 18:29:54 +01:00
Matthias Mailänder
e0e3f1155a avoid additional layers of abstraction 2013-11-02 18:12:46 +01:00
Matthias Mailänder
be1ab707c5 separate TargetFlash from DrawLineToTarget 2013-11-02 18:03:55 +01:00