TOUCH


 [Features] The position and state of touch panel where it was touched are returned.

 [Format] TOUCH(n)

 [Explanation]
    The position and state of touch panel where it was touched are returned.
    n=0 The number of the present touches. on=1 or more.  off=0.
    n=1 Movement of flick X. (No.1)
    n=2 Movement of flick Y. (No.1)
    n=3 Touch No.1 ID.
    n=4 No.1 X coordinate.
    n=5 No.1 Y coordinate.
    Below, each 3 are increasing with the number of the multi-touch.
    n=6 Touch No.2 ID.
    n=7 No.2 X coordinate.
    n=8 No.2 Y coordinate.

    Normal single touch can be got with this.
    touchOn: touch(0)>0
    Coordinate: x=touch(4)  y=touch(5)
    [Movement of flick] support only for No.1.

    'n' correspondence table was changed from version275.
    The table by the old version are as follows.
    n: 0.X  1.Y  2.Number of touches  3.X-Movement  4.Y-Movement

    Multi-touch support.
    Since each touch is assigned ID number, by getting 'touch(3+tn*3)',
    please write the program which each touch is distinguished by those ID.
    The correspondence between touch-ID and 'n',
     when multiple on/off touching are repeated, it change at any time.
    For example of using multi-touch, please refer to the included sample program.

 [e.g.]  Sample program.
    'smp_touch2.bas'
    2 points multiple touch that distinguish by left and right separation.(ID unused)
    'smp_touch4.bas'
    4 points more multiple touch that distinguish by touch-ID.



  TAP


 [Features] It will be in a waiting state until be inputted by a tap.

 [Format] TAP [n]

 [Explanation]
    If 'n' is specified, it will become the waiting for input for n seconds.
    If omitted, waiting time will become infinite.

 [e.g.]  It wait for input for two minutes, and display a tapped coordinate.
    10 tap 120
    20 print touch(0);touch(1)



  INP


 [Features]  The input state of Hardware keyboard of a 'keycode' is read.

 [Format] INP(keycode)

 [Explanation]
    Return value.  on:-1  off:0

 [e.g.]



  STICK


 [Features] To read the direction of the virtual pad.

 [Format] STICK(n)

 [Explanation]
    n=0 Horizontal direction.
    n=1 Vertical direction.
    Return(-1,0,1)
    Virtual pad can be selected by menu[Softkey].
    In Virtual pad, by command [ init"kb:n" ],  change is possible [n=3 8way-input] [n=4 4way-input].
    The sensitivity of a touch may differ depending on the model.
    Bluetooth, NVIDIA-Shield, Xperia-Play, the controllers are supported. (c.f. item-Operation)
    It corresponds also to the arrow key of a hardware keyboard.

 [e.g.]
    x = stick(0)



  STRIG


 [Features] To read the state of the button on the virtual pad.

 [Format] STRIG(n)

 [Explanation]
    n: Button number.
    Return(off:0,on:1orMore)
    When pressed in the state of the first, '2' returns.
    Once '2' is read, it will be set to '1',
     and subsequent 'on-state' will return '1'.
    And Bluetooth, NVIDIA-Shield, Xperia-Play, the controllers are supported. (c.f. item-Operation)
    It corresponds also to the [X],[Z] key of a hardware keyboard.

 [e.g.]
    bt = strig(0)


  UI_INPUT$


 [Features] With input from the UI.dialog, and returns the input string.

 [Format] UI_INPUT$("Message","Default-text")

 [Explanation]
    The peculiar character of each country can be inputted.
    Determined by the input and [OK].
    Because when back button is pushed, dialog disappears,
    it is necessary to push and cancel by back button once again then.

 [e.g.]
    a$=ui_input$("Name","")


  UI_SELECT


 [Features] A selection number is returned by the item selection from UI dialog.

 [Format] UI_SELECT("One-dimensional character array name","Message")

 [Explanation]
    It have to declare 'One-dimensional character array' beforehand.
    And it substitutes the item name in order from number '0'.
    To specify the declared array name and the message,
     and call then, List-style dialog will appear.
    The list is displayed until it hits empty data.
    Touch and select then the number will be returned.
    When Cancel is pushed, -1 is returned.

 [e.g.] [smp_uisel.bas]
    100 dim item$(6)
    110 item$(0)="Red"
    120 item$(1)="Blue"
    130 item$(2)="Yellow"
    140 item$(3)="Green"
    150 num=ui_select("item$","Color")
    160 print num,item$(num)



  UI_MSG


 [Features]  Arbitrary message sentence are displayed several seconds by UI(toast).

 [Format] UI_MSG "message"

 [Explanation]

 [e.g.]
    ui_msg"Completed."


  UI_TEXT


 [Features]  Arbitrary sentence are displayed by dialog.

 [Format] UI_TEXT "String|TextFilename" [,TextColor] [,BackColor] [,FontSize]

 [Explanation]
    When string is specified, directly display it,
    when the end of the string is extension".txt", it is distinguished from a text file,
     and the text file is loaded and displayed.
    It can be display a long sentence by scrolling.
    The text display is affected by encoding specified by [init"enc:"].
    It can specify TextColor, BackColor and FontSize.

 [e.g.]
    ui_text st$,col(13),,24
    ui_text "help.txt"