vsTASKER 7 User Manual
×
Menu
Index

GDI Map

 
The GDI Map Sprite mimic the vsTASKER 2D terrain display on the HMI.
It will load the libraries defined in plugins SIM, the same way as the OpenGL viewer does.
Only one GDI Map can be instanciated on one HMI.
 
 
On the HMI grid, add a GDI Map:
or
 
 
Give it a name, resize it so that it get a good size of the HMI.
Then, open the Database Plugin Editor window and check that for the SIM, the requested libraries are set.
If some are missing (like Scenario for example), add them (can be found in /lib/vc<your environment>/def...)
 
 
Compile and run.
(if you just do that on the existing scenario, /samples/console/elecwfare, you would get the following):
 
 
Like for the GUI map, entity labels can be repositioned on the GdiMap using the mouse (select, hold and drag). The selection area is predefined
and defaulted to 100 pixels width and 50 pixels height.
 
To change theses values, you must individually (for each entity) specify the new width and height value. It can be computed in a task or wherever part of the code you like, according to the characters length displayed (moreover if you replaced the default dll/lib)
 
Method 1: (for version 6.0.23 and above)
 
Vt_Entity* my_ent = S:findEntity("my_entity");
my_ent->storage.set(ENT_LABEL_WIDTH, 200); // defined in vt_hmi.h
 
Method 2: (for version 7 and above)
 
Vt_Entity* my_ent = S:findEntity("my_entity");
my_ent->db->label.width = 200;