Exemplo n.º 1
0
/**
 * @brief Renders the overlay.
 */
static void uniedit_renderOverlay( double bx, double by, double bw, double bh, void* data )
{
   double x, y;
   (void) bw;
   (void) bh;
   (void) data;

   x = bx + uniedit_mx;
   y = by + uniedit_my;

   if (uniedit_mode == UNIEDIT_NEWSYS)
      toolkit_drawAltText( x, y, "Click to add a new system");
   else if (uniedit_mode == UNIEDIT_JUMP)
      toolkit_drawAltText( x, y, "Click to toggle jump route");
}
Exemplo n.º 2
0
/**
 * @brief Renders the overlay.
 */
static void iar_renderOverlay( Widget* iar, double bx, double by )
{
   double x, y;

   /*
    * Draw Alt text if applicable.
    */
   if ((iar->dat.iar.alts != NULL) &&
         (iar->dat.iar.alt >= 0) &&
         (iar->dat.iar.alts[iar->dat.iar.alt] != NULL)) {

      /* Calculate position. */
      x = bx + iar->x + iar->dat.iar.altx;
      y = by + iar->y + iar->dat.iar.alty;

      /* Draw alt text. */
      toolkit_drawAltText( x, y, iar->dat.iar.alts[iar->dat.iar.alt] );
   }
}