ui Keyboard

ui Keyboard

The keyboard widget is used with editbox widgets. When a user presses an editbox the keyboard will be displayed. All that is required is to add just ONE ui_keyboard object to a room that has the editbox widgets. The keyboard widget allows you to change the background colors, key colors and such. You can change which keys are displayed and assigned.These are the colors you can assign on ui_keyboard

//key colors
uiKeyBackColor=c_silver;
uiKeyBackColor2=c_silver;
uiKeyTextColor=c_black;
uiKeyDownColor=c_yellow;

//special keys
uiSKeyBackColor=c_dkgray;
uiSKeyBackColor2=c_dkgray;
uiSKeyTextColor=c_yellow;
uiSKeyDownColor=c_teal;

Note: On mobile it is advised that you place on your game startup the following: It will make the keyboard more responsive to quick touches.

device_mouse_dbclick_enable(false); //if you are on mobile you should use this for entire game! it will disable right-click on dbl-click

The only other item that you may want to change is the keyboard panel height. This is a special number, as it is a ratio, so change the number +/- 20 at a time to see the effect.

uiKeyboardHeight=270; //height of keyboard is a ratio to 600 pixels.

There are 3 rows to the keyboard, and 3 lines of keys. To change the keys this array[1,2,3] must be defined.

uiRowStartX[1]=10;
uiRowStartY[1]=1;
uiRowSpacingX[1]=10;
uiRow[1]=’qwertyuiop’;
uiRowShift[1]=’QWERTYUIOP’;
uiRowAlt[1]=’1234567890′;

You need to make sure the # of keys are identical for each index and row.

You may also like...