Those 2 lines is all it takes? Flug's method is a little more complex but it is not dark to implement.
To simplify, EasyMatrix works as follows :
- instead of having a queue as in FP, EasyMatrix manages 81 queues
- each queue is characterized by a layer and a level which determine its priority level for display :
a higher layer has priority over a lower layer
in the same layer, a higher level has priority over a lower level
- EasyMatrix manages 9 layers, each layer having 9 levels
- any "message" (image, text, ...) stored in a queue has a special attribute :
"above" : the "message" will be displayed above the "messages" present in the lower priority queues (if there are any)
"exclusive" : the "message" will be displayed in place of any "message" present in the lower priority queues (which will therefore be ignored)
- frame by frame, n times per second (this is configurable), the EasyMatrix engine goes through all the queues to determine what to display while taking into account the priorities. Before calling the .Text method of the DMD(s) to display a frame, EasyMatrix concatenates everything that needs to be displayed into a single variable
dmd_text in the following order :
Layer 9
Level 9 : ([Background +] Font + [Attributes +] Characters)
Level 8 : ([Background +] Font + [Attributes +] Characters)
...
Layer 8
Level 9
Level 8
...
Layer 1
An empty queue is simply ignored. Concatenation stops when EasyMatrix encounters a queue element with the "exclusive" attribute