Mercurial > projects > mde
comparison mde/input/Input.d @ 107:20f7d813bb0f
Translation: now has a file for each locale, instead of a file for each section. Items updated; all strings translated.
New unittest for Translation; I realised the old one wasn't run anymore.
Changed unittest data and conf dirs.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sun, 30 Nov 2008 17:17:56 +0000 |
parents | 5de5810e3516 |
children | a2ef6b549101 |
comparison
equal
deleted
inserted
replaced
106:7f7b40fed72b | 107:20f7d813bb0f |
---|---|
584 * | 584 * |
585 * It relies on config loaded from a file (dependant on where input bindings are loaded from; | 585 * It relies on config loaded from a file (dependant on where input bindings are loaded from; |
586 * currently conf/input.mtt). */ | 586 * currently conf/input.mtt). */ |
587 debug (mdeUnitTest) unittest { | 587 debug (mdeUnitTest) unittest { |
588 Input ut = new Input(); | 588 Input ut = new Input(); |
589 ut.loadConfig ("unittest/InputConfig"); | 589 ut.loadConfig ("InputConfig"); |
590 | 590 |
591 int[6] counters; // counters for callbacks | 591 int[6] counters; // counters for callbacks |
592 // Should become: [2,2,0,2,1,1] | 592 // Should become: [2,2,0,2,1,1] |
593 | 593 |
594 //BEGIN Set up some callbacks | 594 //BEGIN Set up some callbacks |
595 ut.addButtonCallback (0x03F0, delegate void(inputID id, bool status) { | 595 ut.addButtonCallback (0x03F0, delegate void(inputID id, bool status) { |
596 assert (status == !counters[0]); // true first call, false next | 596 assert (status == !counters[0]); // true first call, false next |
597 counters[0] += 1; | 597 counters[0] += 1; |
598 }); | 598 }); |