Commit Graph

21 Commits

Author SHA1 Message Date
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
Pavlos Touboulidis
e0628b5f24 Change IngameChatLogic & MusicPlayerLogic to use the mod's rules, not the map's 2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
d9db1c1854 Revert replacing generic Ui.OpenWindow with static method in MusicPlayerLogic 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
1870e31662 Double clicking a map in the chooser now selects it. 2013-10-31 08:46:16 +13:00
Matthias Mailänder
ad95f48711 merge C&C and RA music player logic
mainly code cleanup, but with the following improvements:
- scroll to current song which fixes #3360 and overlapping label
- use Rules.InstalledMusic & Sound.MusicPlaying everywhere
- separated C&C install logic and log catched exceptions
- save the music settings on back/close
2013-08-03 00:37:04 +02:00
Matthias Mailänder
4470d67617 fixed remove/hide main-menu when sub-menus are closed 2013-04-26 13:50:15 +12:00
Chris Forbes
c30d46c014 #2051 fixed -- Widget.Get() throws by default 2012-04-27 19:39:07 +12:00
Chris Forbes
bf5be88c75 rename Ui.RootWidget to just Ui.Root 2011-12-13 23:46:58 +13:00
Chris Forbes
ed429a3b30 split Widget static bits into Ui static class 2011-12-13 23:38:59 +13:00
Chris Forbes
be8682fc19 move TextAlign out of LabelWidget 2011-10-08 17:20:52 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
c401e9c8fb tidy up ra music player 2011-07-17 10:52:05 +12:00
Chris Forbes
0cb1f98e7e fixed #994 - use FormatTimeSeconds in MusicPlayerLogic 2011-07-14 20:29:06 +12:00
Chris Forbes
99b8c765c7 fixed #996 -- Rules.InstalledMusic 2011-07-14 20:29:05 +12:00
Chris Forbes
1a2dc8ec1c fixed #995 - remove duplication in next/prev song in MusicPlayerLogic.cs 2011-07-14 20:29:05 +12:00
Chris Forbes
14f29eb30e work on #993 -- removed OnMouseUp from MusicPLayerLogic.cs 2011-07-14 20:29:04 +12:00
Paul Chote
193999a040 Move OnMouseUp onto ButtonWidget and drop its unnecessary plumbing. 2011-07-14 20:29:02 +12:00
Chris Forbes
ef03d46f13 eradicate 'delegate' misuse 2011-05-22 22:02:09 +12:00