Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Results 1 to 10 of 20

Threaded View

  1. #20
    Master kwbs's Avatar
    Join Date
    Jul 2017
    Location
    IL
    Posts
    847
    Rep Power
    306

    Default

    ^
    This is the Linear Compass in PAL {Mod by Pongo}.

    Spoiler: Image
    CLC PAL

    Spoiler: TEXT CODE
    /*---by pongo---*/
    VSPRITE.compass.3d{
    align:"CENTER";valign:"CENTER";
    left: (observe(%map.primary.car_posx);((%map.primary.car_posx - 50) * screen_w / 100));
    right: (observe(%map.primary.car_posx);(screen_w - (%map.primary.car_posx + 50) * screen_w / 100));
    top: (observe(%map.primary.car_posy);((%map.primary.car_posy - 49) * screen_h / 100));
    bottom: (observe(%map.primary.car_posy);(screen_h - (%map.primary.car_posy + 49) * screen_h / 100));
    }

    VSPRITE.compass.2d{
    align:"CENTER";valign:"CENTER";
    left: (observe(%map.primary.car_posx);((%map.primary.car_posx - 50) * screen_w / 100));
    right: (observe(%map.primary.car_posx);(screen_w - (%map.primary.car_posx + 50) * screen_w / 100));
    top: (observe(%map.primary.car_posy);((%map.primary.car_posy - 49) * screen_h / 100));
    bottom: (observe(%map.primary.car_posy);(screen_h - (%map.primary.car_posy + 49) * screen_h / 100));
    }

    As shown above, the position and the structure of Pongo's compass is well centered, both in height between the top and bottom and also between its sides.


    This is the Linear Compass in LUNA {Mod by @frontzosd}.

    Spoiler: Image
    CLC LUNA

    And as we can see here, in the left half, the position and the structure of the compass is neither centered in height between the top and bottom (it touches the top) nor between its sides (too right).

    As we can play and set the position of route's name inside HEADERS ["DISTTEXT.sec_maneuver_dist"], we can side and move the compass up / down / right / left to be centered as shown in the right half.


    Spoiler: linear_fd_portrait TEXT CODE
    /*----by frontzosd-----*/


    TABLE.cockpit_compassf{
    h:41;
    w:300; /*150*/
    left: (screen_w/2 - screen_w/6);
    }


    SPRITE.compass.maskf{
    left:0; top:0; h:100%; w:100%; z:50;
    img:"compassmask_mapangle.bmp"; resize_bmp:1;
    box_align:"stretch"; flex:1;
    alpha:24;
    }

    VBOX.compassf{
    box_align:"stretch";
    }

    SPRITE.compass.markerf{
    img:"linear_compass_marker.bmp";
    box_align:"CENTER";
    z:100;
    }

    SPRITE.compass.linearf{
    attach_sprite_provider:"other.attach_linear_compass(linear_compass_.bmp,navigation.car.heading)";
    box_align:"stretch"; flex:1;
    alpha:20;

    }

    Spoiler: linear_fd_landscape TEXT CODE
    /*-----mod by frontzosd--*/


    TABLE.cockpit_compassf{
    h:41;
    w:250;
    left:5;
    }


    SPRITE.compass.maskf{
    left:0; top:0; h:100%; w:100%; z:50;
    img:"compassmask_mapangle.bmp"; resize_bmp:1;
    box_align:"stretch"; flex:1;
    alpha:20;
    }

    VBOX.compassf{
    box_align:"stretch";
    }

    SPRITE.compass.markerf{
    img:"linear_compass_marker.bmp";
    box_align:"CENTER";
    z:100;
    }

    SPRITE.compass.linearf{
    attach_sprite_provider:"other.attach_linear_compass(linear_compass_.bmp,navigation.car.heading)";
    box_align:"stretch"; flex:1;
    alpha:20;

    }


    I would appreciate knowing which DIMENSIONS are proper to set it.

    Thank You
    Last edited by kwbs; 6th October 2020 at 12:57 PM.

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •