4 Less obvious Graphics Markup features that you can use to improve your app
by
on 29-09-2011 at 10:29 AM (19859 Views)
We received some suggestions from Client Team at MXit who designed the Graphics Markup, namely Jaco Loubser. We will highlight some of the lesser know features of MXit Graphics Markup.
1. Tables can be updated in Full Mode or Update Mode
This means that you can either resend the entire screen/tables to the user each time, or you can send the changes (deltas) to the screen. This saves data and can make the user experience smoother and faster.
You the app creator do not need to maintain the state of what to send when, as the SDK will manage this for you if you set appropriate mode type. The default mode is Replace/Full.
A table can have one of the following TableSendModeType modes
- Update mode refers to the incremental table changes that will be sent through to the client to save bandwidth/data/speed.
Note: The update mode is only supported if the client has the following DeviceFeatures flag defined - GamingUpdate- Replace refers to the full mode that requires the entire table is re-sent for each change to the table.
2. Making big clickable buttons without having to use images
You can make a cell's entire body clickable by setting the SelectionMode on the table. For example, you can have 100% width buttons in a menu structure format, where the user can click anywhere on the link to activate the button.
Turning this on means that all cell's that have an action associated with them will be clickable.
-
Table.SelectionRectType (selm) selection rectangle mode. Specifies how the selection rectangle should look for table data cells that have an action that is not empty. Possible values are:Here's an example to illustrate:
- Outline: Draw the outline of a rectangle (with rounded edges) in the current selection background color.
- Fill: Draw a filled rectangle in the current selection background color. If this mode is set, the text in that cell will be drawn in the current selection foreground color.
![]()
The top cell rows are all clickable at any point in their cell, i.e. not just the word.
If there is a clickable link in the table, the link's text will be highlighted as per usual and not the entire cell. The cell's with actions (and no link) will be highlight-able in full.
3. The selection cursor can be placed on a specific cell
It's possible with the SelectionRect setting on a table to place the cursor at a specific location on the table. This means that when you update the table after some submission you can place the cursor at the most likely next location for the user to save him having to click.
4. The selection cursor can be customised
The standard blue selection rectangle isn't the only option you have, using Graphics Markup you can have a custom icon, for example, a picture of a needle can appear if you are about to pop a bubble.
The Table's SelectionFrames property allows you to specify which image strip/sprite frame(s) to use for the cursor selection.
Here's an example from the harsi.solitaire game that makes use of a custom selection icon:
Notice the green selection image used instead of the default cursor drawn by client software.





Notice the green selection image used instead of the default cursor drawn by client software.

