[↑]
SmileBASIC4 Replica Reference
XCTRLSTYLE
1. Set the maximum number of controllers connections, operation style, and functions

XCTRLSTYLE MaxNumberOfConnections,OperationStyle[,MotionSensorUseFlag,IRSensorUseFlag[,ConnectionDialogFlag]]

・Depending on the setting operation style, the types of controllers that can be connected, the expected Joy-Con holding method, the types of buttons and Stick that can be acquired, and the controller functions that can be used vary.
・The operation result on the connection confirmation display can be confirmed with the RESULT function (1: Success, -1: Cancel).
・Calls from subprograms are ignored.

Arguments

MaxNumberOfConnections

Specify the maximum number of controllers you want to connect

・The range of values that can be specified varies depending on the operation style.

Full 1 to 2
dual-controller grip 1 to 2
held horizontally 2 to 4
held vertically 2 to 4

OperationStyle

Operation style to be set: 0 to 3

Number Style Name Available Controllers
0 Full handheld mode, dual-controller grip, Pro Controller
1 dual-controller grip dual-controller grip
2 held horizontally Joy-Con (L)/(R) held horizontally, Pro Controller
3 held vertically Joy-Con (L)/(R) held vertically

MotionSensorUseFlag

Specify 1 if you want to use motion sensors (accelerometer, gyroscope) or 0 if you do not use it.

・0, if not specified.

IRSensorUseFlag

Specify 1 if you want to use IR Motion Camera, 0 if you do not use it.

・0, if not specified.
・When using IR Motion Camera, the operation style must be 1 (dual-controller grip).

ConnectionDialogFlag

Specify whether to always display the controller connection display

・If 1 is specified, the controller connection display will be displayed.
・If 0 is specified, the controller connection display is displayed only when the setting is changed.
・0, if not specified.

2. Reset the controller operation style to the startup state

XCTRLSTYLE 0

・If only 0 is specified, the controller operation style is reset to the startup state.
・Same as specifying XCTRLSTYLE 1,0,0,0.
・The operation result on the connection confirmation display can be confirmed with the RESULT function (1: Success, -1: Cancel).
・Calls from subprograms are ignored.

Argument

0 (zero)

Specify only numeric zero

・An error occurs if a different value is specified.

3. Obtaining the current maximum controller connections and operation style

XCTRLSTYLE OUT MaxNumberOfConnections,OperationStyle

Return Value

MaxNumberOfConnections

Maximum number of controllers that can be connected

Operation style

OperationStyle

0 Full
1 dual-controller grip
2 held horizontally
3 held vertically
4. Configure Toy-Con connection settings

XCTRLSTYLE MaxNumberOfConnections,100,Toy-ConTypeLeft1,Toy-ConTypeRight1[,ConnectionDialogFlag ]
XCTRLSTYLE MaxNumberOfConnections,100,Toy-ConTypeLeft1,Toy-ConTypeRight1,Toy-ConTypeLeft2,Toy-ConTypeRight2[,ConnectionDialogFlag ]

・When using Toy-Con, use an exclusive use style for the operation style.
・Information as a normal Joy-Con can be acquired as equivalent to dual-controller grip in BUTTON, STICK, ACCEL, GYROA, GYROV.
・IR Motion Camera commands cannot be used while Toy-Con is in use.
・The operation result on the connection confirmation display can be confirmed with the RESULT function (1:Success, -1:Cancel).
・Calls from subprograms are ignored.

Arguments

MaxNumberOfConnections

Specify the maximum number of controllers you want to connect: 1 to 2

100

When using Toy-Con, specify 100 for the operation style

Toy-ConType

Set the type of Toy-Con to be recognized separately

Left Right
0 Toy-Con Recognition OFF Toy-Con Recognition OFF
1 × Piano
2 × House
3 △ Motorbike △ Motorbike
4 △ Fishing Rod △ Fishing Rod
5 × Robot
6 Visor ×
7 △ Car △ Car
8 △ Plane △ Plane
9 △ Submarine △ Submarine
10 7,8,9 All of Them 7,8,9 All of Them

・Values marked with x cannot be specified.
・The visor can only be specified on the left.
・Piano, house and robot can only be specified on the right.
・Types marked with △ must be specified for both left and right.
・10 is automatically switched to 7,8,9 by attaching the Vehicle Toy-Con Key.

ConnectionDialogFlag

Specify whether to always show the controller connection display

・If 1 is specified, the controller connection display will be displayed.
・If 0 is specified, the controller connection display is displayed only when the setting is changed.
・0, if not specified.

About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|