Joined: 8/24/2011(UTC) Posts: 34 Location: New Zealand
Thanks: 4 times
|
I really like this Command stuff, but could I suggest an improvement? It would be easier to use a fluent style when configuring with code, so if Add and AddTrigger were tweaked to return the Command (i.e. 'this') that would be nice. ;) To clarify, this would mean the code could be written like the following: Code:
Input.Commands["Test"]
.AddTrigger(new CommandTrigger { /* trigger1 */ })
.AddTrigger(new CommandTrigger { /* trigger2 */ })
.AddTrigger(new CommandTrigger { /* trigger3 */ })
.Add(this, trigger => /* command callback */);
Edited by user Sunday, May 6, 2012 4:54:47 AM(UTC)
| Reason: Not specified
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
Done (see v0.9.5.18). Good suggestion!
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.