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

Hybrid View

  1. #1
    Master
    Join Date
    Nov 2017
    Location
    Romania
    Posts
    343
    Rep Power
    163

    Default

    The old skin dont have this function :way updown : like new skin And i want to implement this new function in old skin
    Its about next to relief symbol apeear a car and arrow up or down
    Spoiler: code
    local altitude = 0
    local svg = ""
    local delta = 2
    altitudeID = -1
    function sc_way_up_down()
    if MODEL.navigation.current_altitude() > altitude and ((MODEL.navigation.current_altitude() - altitude) * (MODEL.navigation.current_altitude() - altitude >= 0 and 1 or -1)) > delta then
    altitude = MODEL.navigation.current_altitude()
    svg = "ico_height_up.svg"
    ui.vHeightvis = 1
    elseif MODEL.navigation.current_altitude() < altitude and ((altitude - MODEL.navigation.current_altitude()) * (altitude - MODEL.navigation.current_altitude() >= 0 and 1 or -1)) > delta then
    altitude = MODEL.navigation.current_altitude()
    svg = "ico_height_down.svg"
    ui.vHeightvis = 1
    end
    if altitudeID != -1 then
    killDelayed(altitudeID)
    end
    altitudeID = doDelayed(150, function()
    altitudeID = -1
    if altitude - delta <= MODEL.navigation.current_altitude() and MODEL.navigation.current_altitude() <= altitude + delta then
    svg = ""
    ui.vHeightvis = 0
    ui.ui_SideList.height_direction = ""
    end
    end)
    return svg
    end


    I write this function in the old skin ,but require more,its only just half of the job bcs new skin has new encoding
    @kwbs you are right the ico altitude its the same ,in fact this i want to implement in old skin. :ico_height_up and down along with the function itself
    Last edited by cristianyxtl; 12th June 2021 at 12:49 PM.

  2.    Advertissements


 

 

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
  •