Tablet gesture

  • #1, by mzidangameWednesday, 23. December 2015, 12:19 5 years ago
    What is the 'right click' tablet gesture?

    Newbie

    9 Posts


  • #2, by SimonSSunday, 27. December 2015, 19:44 5 years ago
    Who rightclicks on a tablet ? It would be better to change the interface accordingly.

    Thread Captain

    1369 Posts

  • #3, by mzidangameSunday, 27. December 2015, 20:23 5 years ago
    Could you direct me to a script which allows to drag an item by holding the left mouse button, and to drop/release it on release?
    and perhaps another script to release a dragged item by simply holding the left mouse button?

    Newbie

    9 Posts

  • #4, by SimonSSunday, 27. December 2015, 20:37 5 years ago
    Wrote one some time ago, don't know if it works well:

    -- Simple Drag And Drop Handler
    -- (c) Simon Scheckel 2015

    local state_mousedown = false
    function dragDropHandler(eventType, mousePosition)
    if eventType == eEvtMouseLeftButtonUp or eventType == eEvtMouseLeftButtonHold then
    -- generateEvent(eEvtMouse)
    state_mousedown = false
    elseif eventType == eEvtMouseLeftButtonDown then
    state_mousedown = true
    if game.CurrentObject:getId().tableId == eObjects and game.CurrentObject.IsItem then
    game.UsedItem = game.CurrentObject
    game.UsedItemPicked = true
    end
    elseif eventType == eEvtMouseMove and state_mousedown == false then
    game.UsedItem = emptyObject
    game.UsedItemPicked = false
    elseif eventType == eEvtMouseMove then
    if game.UsedItem:getId().id ~= -1 and game.CurrentObject:getId().tableId == eObjects then
    -- setCursorPos(game.CurrentObject.Polygon[1])
    end
    end
    end

    registerEventHandler("mouseEvent", "dragDropHandler", { eEvtMouseLeftButtonUp, eEvtMouseLeftButtonDown, eEvtMouseMove, eEvtMouseLeftButtonHold})
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26

    Thread Captain

    1369 Posts

  • #5, by mzidangameSunday, 27. December 2015, 21:32 5 years ago
    thanks

    Newbie

    9 Posts

Write post