Hi there.
I'm trying to create a menu where the player can change his controls.
It works fine for the normal values and for some specials values like SPACE or ESCAPE.
But for ALT, CTRL, SHIFT, .. I'm stuck.
I guess it's because those controls aren't in the ASCII table (http://www.asciitable.com/).
So, any idea ?
Here is my script to display the commands.
The value is a key[0 to 4] equals to a chr(control).
And because chr(vk_alt) / chr(vk_control) / chr(vk_shift) aren't working (I'm not sure but I think here is the mistake), I don't know how to show "ALT" "CTRL" and "SHIFT" if the player use one of this keyboard.
Any idea?
I'm trying to create a menu where the player can change his controls.
It works fine for the normal values and for some specials values like SPACE or ESCAPE.
But for ALT, CTRL, SHIFT, .. I'm stuck.
I guess it's because those controls aren't in the ASCII table (http://www.asciitable.com/).
So, any idea ?
Here is my script to display the commands.
Code:
var xx = argument0
var yy = argument1
var value = argument2
switch(value)
{
case chr(vk_control):
draw_text(xx, yy, "CTRL");
break;
case chr(vk_space):
draw_text(xx, yy, "SPACE")
break;
case chr(vk_alt):
draw_text(xx, yy, "CTRL");
break;
case chr(vk_shift):
draw_text(xx, yy, "SHIFT");
break;
case chr(vk_escape):
draw_text(xx, yy, "ESC")
break;
default:
draw_text(xx, yy, value);
break;
}
The value is a key[0 to 4] equals to a chr(control).
And because chr(vk_alt) / chr(vk_control) / chr(vk_shift) aren't working (I'm not sure but I think here is the mistake), I don't know how to show "ALT" "CTRL" and "SHIFT" if the player use one of this keyboard.
Any idea?