Commit Graph

48 Commits

Author SHA1 Message Date
Paul Chote
224377f078 Track visibility modifiers on FrozenActors. 2018-12-17 22:19:26 +01:00
Paul Chote
9ec22e48a6 Revert "Re-active Edge-Scrolling for inverted Mouse-Scrolling"
This reverts commit c4867d4030db1edc6400e6f3f62ca64905607a3c.
2018-08-18 16:51:51 +02:00
Kanar
dc46dd1f26 Re-active Edge-Scrolling for inverted Mouse-Scrolling 2018-03-30 23:47:32 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
47fa9e496d Fix tooltips not showing for frozen actors with dead backing actors.
This also documents some old bugs.
2018-01-01 16:01:44 +01:00
Paul Chote
6f5d035e79 Introduce IMouseBounds and split/rework mouse rectangles.
The render bounds for an actor now include the area covered
by bibs, shadows, and any other widgets. In many cases this
area is much larger than we really want to consider for
tooltips and mouse selection.

An optional Margin is added to Selectable to support cases
like infantry, where we want the mouse area of the actor
to be larger than the drawn selection box.
2017-12-11 19:45:07 +01:00
RoosterDragon
7a7eed4fb7 Add FirstEnabledTraitOrDefault helper method.
This avoids the allocations caused by LINQ when using traits.FirstOrDefault(Exts.IsTraitEnabled). This is important in FrozenActorLayer.RefreshState which is called very often. We apply the new helper method to all areas using the old pattern. An overload that takes an array allows arrays to be enumerated without causing allocations.
2017-12-10 13:39:24 +00:00
Paul Chote
2f79173044 Migrate hotkey consumers to HotkeyManager. 2017-12-08 01:29:15 +01:00
Paul Chote
811427adc4 Add HotkeyReference.IsActivatedBy method. 2017-12-08 01:29:15 +01:00
Paul Chote
c4237d6a1a Rename NamedHotkey to HotkeyReference. 2017-12-08 01:29:15 +01:00
Paul Chote
b3b2efa781 Move hardcoded viewport keys into yaml. 2017-09-10 21:30:55 +02:00
Paul Chote
22d7031819 Focus the ViewportController on Standard/Inverted scroll modes. 2017-08-10 12:50:00 +02:00
Paul Chote
d0d8062dbf Extract ViewportEdgeScrollMargin settings entry. 2017-08-10 12:44:44 +02:00
reaperrr
d949e17b88 Perform FogObscures as late as possible
FogObscures is more expensive than simpler boolean, player or HasTraitInfo checks, so in these places it makes sense to perform the other checks first.
2017-08-07 09:42:12 +02:00
Paul Chote
cd9ef47f94 Suppress unrelated mouse events while scrolling. 2017-07-08 22:21:04 +02:00
rob-v
f341330d5e Fix Joystick scrolling stuck 2017-07-08 22:21:04 +02:00
Paul Chote
ce233a6cca Reduce edge scrolling threshold and polish cursor hotspots. 2017-06-06 08:53:54 -06:00
rob-v
fc0495ac27 Fix keys scrolling stuck (+ some function double calls) 2017-06-01 23:07:25 +02:00
rob-v
e87a96f2b8 Fix/Disable Edge scroll while standard (middle mouse) scroll 2017-04-10 19:56:53 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
reaperrr
074bb78cbd Made Tooltip trait upgradable 2016-10-23 14:59:18 +02:00
Paul Chote
404d8235c8 Show a tooltip over map resources. 2016-09-25 17:04:17 +01:00
RoosterDragon
2ffea5db54 Change Game.RunTime to a long to prevent overflow. 2016-09-20 19:06:10 +01:00
Oliver Brakmann
f554531bd2 Fix not showing scroll cursor during standard-scrolling
... when edge scrolling was also disabled.
2016-09-02 21:34:47 +02:00
Oliver Brakmann
f5be504640 Add a deadzone for standard scrolling 2016-09-02 21:34:46 +02:00
Oliver Brakmann
a8dc8454cb Fix ignoring deadzone with joystick scrolling
This re-introduces a bug where releasing the RMB button causes an order to be generated for the selected units if the user didn't move their mouse just prior.
2016-09-02 21:34:46 +02:00
Oliver Brakmann
dffb602ed4 Show scroll cursor when standard-scrolling using RMB 2016-08-27 13:56:09 +02:00
Oliver Brakmann
1f2d046d34 Fix issuing orders when releasing RMB after standard-scrolling 2016-08-26 10:42:53 +02:00
Oliver Brakmann
d6a6ed28c8 Fix issuing orders when releasing RMB after joystick-scrolling 2016-08-25 13:25:30 +02:00
Paul Chote
8ef38fc060 Update keyboard scrolling at render rate. 2016-07-09 01:29:17 +01:00
Tamás Viszkok
522e937597 Hotkeys for move viewport to map edge 2016-05-16 20:26:59 +02:00
reaperrr
9cca92942e Merge pull request #11130 from viszkoktamas/viewportBookmark
Add hotkeys for save areas of the map
2016-05-16 18:37:56 +02:00
Viszkok Tamás
a89376daf0 Added hotkeys for save areas of the map 2016-05-16 14:01:49 +02:00
Paul Chote
9d02c53638 Expose separate middle and right mouse scroll config. 2016-04-17 21:27:20 -04:00
Oliver Brakmann
07ec56fd22 Merge pull request #10821 from obrakmann/pr10559-squashed
Added mousewheel zooming
2016-02-24 22:37:00 +01:00
Philipp Schärer
ea74499ec2 Added mousewheel zooming 2016-02-24 22:22:32 +01:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
atlimit8
b07cd683e8 Easier actor selection in game by actor bounds center 2015-12-23 12:09:08 -06:00
Joppy Furr
6ded247d0c Change mouse cursors while joystick scrolling
This patch adds mouse cursors to the joystick scrolling feature.

On Tiberian Sun, which itself had joystick scrolling, the same cursors are
used as in the original game.

As the older games did not have joystick scrolling, I've had to make a
best-effort guess as to what were suitable cursors.
  -> When scrolling in all directions is available, the default arrow
     cursor is used.
  -> When a direction is blocked, the edge-scrolling blocked direction
     cursor is used.
2015-10-16 11:53:53 +13:00
gitTerebi
86c57a270b Add hotkey configuration for scroll keys 2015-10-04 22:04:44 +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
Matthias Mailänder
f4bb55113c fix cloak getting revealed by frozen actor tooltips 2015-09-27 15:05:07 +02: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
RoosterDragon
fb0cab7481 Cache results of TraitsImplementing calls.
If a class is caching the TraitsImplementing enumerable, instead cache the results of enumerating it to an array. The avoids having to enumerate the sequence each time it is needed.
2015-04-25 20:42:27 +01:00
Paul Chote
e5c03413cc Move common widgets from Game to Mods.Common. 2015-03-21 11:53:53 +00:00