Commit Graph

840 Commits

Author SHA1 Message Date
Matthias Mailänder
636e1b5102 Merge pull request #6441 from pchote/paste
Support pasting clipboard text into TextFields.
2014-09-13 15:02:15 +02:00
ImagoTrigger
eb2124bb89 Adds ability to paste text (ctrl/cmd+v) into chat. 2014-09-13 09:41:59 +12:00
Oliver Brakmann
eff54a614b Fix selection glitch in observer mode
Fixes #6421.
2014-09-07 00:52:55 +02:00
Paul Chote
674998c0ee Merge pull request #6335 from obrakmann/fix6311
Fix end game window conflicting with ingame menu
2014-09-03 18:54:51 +12:00
Oliver Brakmann
2f4c81b7c9 Fix end game window conflicting with ingame menu
Fixes #6311
2014-08-24 17:00:18 +02:00
Paul Chote
944cfd83e2 Merge pull request #6281 from mizipzor/tab-completion
Added tab completion to in-game and lobby chat.
2014-08-24 17:29:38 +12:00
huwpascoe
baecedc7b8 Cursor Doubling
Cursor now doubles with pixel doubling, enabled by a new checkbox in the
settings menu.
2014-08-21 20:08:38 +01:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
Alexander Fast
034625c2ea Added tab completion to in-game chat.
Both player names and chat commands can be completed.
Names of local players and bots are not candidates for completion.
If a completed name is the first word ": " is appended to the end.
The hotkey for toggling team/all chat has been moved to left Alt.
2014-08-19 17:19:32 +02:00
Oliver Brakmann
819eb64011 Add end game dialog 2014-08-08 13:35:49 +02:00
Oliver Brakmann
7546e8237e Make CheckboxWidget honour GetText() 2014-08-08 13:35:49 +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
90403ad40b Fix mouseover filtering in cloned widgets. 2014-07-26 18:20:06 +12:00
Paul Chote
4fb9e59402 Allow ImageWidget to filter mouse events. 2014-07-26 18:20:06 +12:00
Paul Chote
d8b6eac64e Fix mouse event filtering in BackgroundWidget. 2014-07-26 18:20:06 +12:00
Pavlos Touboulidis
b88b87b899 Improve game loop
Environment.TickCount was replaced with Game.RunTime that's based on
Stopwatch for increased accuracy.
2014-07-10 04:06:29 +03: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
d4627479b5 fix a NullReferenceException in preview.Map 2014-07-07 09:18:24 +02:00
Matthias Mailänder
d1e18cad7a new PauseState to differentiate game and editor pausing 2014-07-06 08:24:08 +02:00
RoosterDragon
3a30748f05 Reduce working set by releasing buffers for sheets.
Sheets carry a managed buffer of data that allows updates to be made without having to constantly fetch and set data to the texture memory of the video card. This is useful for things like SheetBuilder which make small progressive changes to sheets.

However these buffers are often large and are kept alive because sheets are referenced by the sprites that use them. If this buffer is explicitly null'ed when it is no longer needed then the GC can reclaim it. Sometimes a buffer need not even be created because the object using the sheet only works on the texture directly anyway.

In practise, this reduced memory consumed by such buffers from ~165 MiB to ~112 MiB (at the start of a new RA skirmish mission).
2014-07-02 17:25:56 +01:00
Paul Chote
a30c8b53a7 Add support for diamond cell grids. 2014-06-30 23:44:23 +12:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
5560f276ca Map: Rename IsInMap -> Contains. 2014-06-27 22:07:03 +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
Paul Chote
177dd02cd1 Merge pull request #5628 from pavlos256/smooth-scrolling
Add smooth scrolling to the ScrollPanelWidget
2014-06-23 21:46:50 +12:00
Pavlos Touboulidis
628c524494 Add smooth scrolling to the ScrollPanelWidget 2014-06-21 16:41:56 +03:00
Paul Chote
5760e665d3 Clean up map previews. Fixes #5665. 2014-06-21 21:15:11 +12:00
Paul Chote
a6cb60e583 Merge pull request #5646 from Mailaender/replay-dropdown-polish
Polished the Replay Browser dropdowns
2014-06-21 01:23:33 +12:00
RoosterDragon
22abf9b4c4 Remove and sort usings. 2014-06-18 21:43:35 +01:00
Matthias Mailänder
88480e0dc2 make it clear that this does not need to match content height 2014-06-16 10:17:30 +02:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
ScottNZ
6b85660d7d Compact lambda expressions in some (not all) places 2014-06-15 22:14:38 +12:00
Matthias Mailänder
8f64835898 StyleCop 2014-06-15 10:51:57 +02:00
Matthias Mailänder
fe0d7ab00e Merge pull request #5627 from pchote/frozen-cloak-fix
Invalidate FrozenActors that don’t have any sprites.
2014-06-14 11:41:49 +02:00
Paul Chote
96477b7c1a Invalidate FrozenActors that don’t have any sprites. Fixes #4809. 2014-06-13 21:07:39 +12:00
Pavlos Touboulidis
db53f8e648 Add developer shortcut to reload chrome files
Hitting Ctrl+Shift+C will re-initialize the chrome provider,
reloading all chrome files instantly. Useful when changing the
UI.

Note: A new "RootWidget" was created to trap top-level (global)
shortcuts instead of putting everything in Widget.
2014-06-13 11:31:09 +03:00
Paul Chote
e0c59511fb Merge pull request #5152 from Mailaender/auto-l10n
Automated translation string extraction
2014-06-12 10:31:07 +12:00
RoosterDragon
9dbbc23967 Make map preview generation fast.
- Change Map.LoadMapTiles and Map.LoadResourceTiles to read the whole stream into memory before processing individual bytes. This removes the cost of significant overhead from repeated calls to ReadUInt8/16.
- Remove significant UI jank caused by the map chooser by not including the placeholder widget. The maps render fast enough that it is no longer worthwhile and it was causing a lot of flushes which were the source of the jank.
- Trigger async generation for all maps when the chooser is loaded. This means in practice all previews will be ready by the time the user begins to scroll the selection. Since generation is fast, there is no issue with scrolling straight to the bottom and having to wait for the backlog to clear.
2014-06-10 11:46:39 +01:00
Matthias Mailänder
c9a49538d6 translatable tooltips 2014-06-10 09:18:46 +02: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
0c8bdff5be Formatting fixes.
Spaces to tabs, indents, etc.
2014-05-26 18:10:59 +01:00
Chris Forbes
5eb61dbdd2 Merge pull request #5411 from RoosterDragon/general-clean
General Cleanup
2014-05-25 11:03:03 +12: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
a0db80cb6a Changes to reduce allocations in the main loop.
Targeted some methods that generated allocated a lot of memory in the main game loop:
- Actor.Render - Changed LINQ calls into equivalent loops. No allocation for delegates.
- Animation.Render - Returned an array rather than a yield expression. The array uses less memory than the complier generated enumerable.
- FrozenActor and FrozenUnderFog - Materialize the footprint into an array: The enumerable is not-trivial to evaluate is and evaluated many times inside the Tick function. The memory needed is minimal. Changed LINQ into equivalent loops to prevent delegate allocation. Should result in overall much faster calls.
- Widget.GetEventBounds - Changed LINQ calls into equivalent loops.
- MobileInfo.CanEnterCell - Changed LINQ calls into equivalent loops. Don't materialize list of blocking actors every time, instead enumerate them and only when they need to be checked.
- FrozenUnderFog.TickRender - Generate the renderables lazily and also remove a no-op Select call.
2014-05-23 14:48:11 +01:00