SLIDGE has the ability to modify and display data, and everything that it works with is stored within a ds_map data structure. In this example, I'm using a set of styled choice buttons to simulate an on-screen keyboard.
It's possible to re-create this scene in your own game, or to merge the scenes and styles listed below into your own, and then to add something like a "Done" button or something that goes on to the next part of your game.
Data gathered through this keyboard is available by checking the ds_map "global.register" for the value of "name_input."
You can also use the handy SLIDGE function to do this:
playerName = ds_map_lookup(global.register, "name_input", "");
And of course you can incorporate the data into the SLIDGE engine simply by placing the code tag [r=name_input] anywhere in which you'd prefer the data to appear. If the data is not set, nothing will be drawn.
**BEFORE modifying anything in %localappdata%, make backups!!! This is your game data we're messing with here!**
{{youtube>3rF9zwgrlwQ}}
Scenes File Data:
"keyboard" : {
"Entries" : "0",
"endAction" : "",
"0" : {
"textboxes" : [{
"typed" : "1",
"label" : "[r=markedName]",
"normal" : {},
"animate" : 1.000000,
"text" : "[r=name_input]",
"avi" : "",
"x" : "640",
"style" : "keyboard_input",
"y" : "360"
}
],
"sound" : "",
"background" : "",
"choices" : [{
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=Q",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "Q",
"sprite" : "",
"x" : 405.000000,
"condition" : "",
"button" : {
"key" : "Q"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=W",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "W",
"sprite" : "",
"x" : 454.500000,
"condition" : "",
"button" : {
"key" : "W"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=E",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "E",
"sprite" : "",
"x" : 504.000000,
"condition" : "",
"button" : {
"key" : "E"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=R",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "R",
"sprite" : "",
"x" : 553.500000,
"condition" : "",
"button" : {
"key" : "R"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=T",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "T",
"sprite" : "",
"x" : 603.000000,
"condition" : "",
"button" : {
"key" : "T"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=Y",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "Y",
"sprite" : "",
"x" : 652.500000,
"condition" : "",
"button" : {
"key" : "Y"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=U",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "U",
"sprite" : "",
"x" : 702.000000,
"condition" : "",
"button" : {
"key" : "U"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=I",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "I",
"sprite" : "",
"x" : 751.500000,
"condition" : "",
"button" : {
"key" : "I"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=O",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "O",
"sprite" : "",
"x" : 801.000000,
"condition" : "",
"button" : {
"key" : "O"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=P",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "P",
"sprite" : "",
"x" : 850.500000,
"condition" : "",
"button" : {
"key" : "P"
},
"y" : 430.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=A",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "A",
"sprite" : "",
"x" : 420.000000,
"condition" : "",
"button" : {
"key" : "A"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=S",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "S",
"sprite" : "",
"x" : 469.500000,
"condition" : "",
"button" : {
"key" : "S"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=D",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "D",
"sprite" : "",
"x" : 519.000000,
"condition" : "",
"button" : {
"key" : "D"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=F",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "F",
"sprite" : "",
"x" : 568.500000,
"condition" : "",
"button" : {
"key" : "F"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=G",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "G",
"sprite" : "",
"x" : 618.000000,
"condition" : "",
"button" : {
"key" : "G"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=H",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "H",
"sprite" : "",
"x" : 667.500000,
"condition" : "",
"button" : {
"key" : "H"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=J",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "J",
"sprite" : "",
"x" : 717.000000,
"condition" : "",
"button" : {
"key" : "J"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=K",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "K",
"sprite" : "",
"x" : 766.500000,
"condition" : "",
"button" : {
"key" : "K"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=L",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "L",
"sprite" : "",
"x" : 816.000000,
"condition" : "",
"button" : {
"key" : "L"
},
"y" : 478.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=Z",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "Z",
"sprite" : "",
"x" : 445.500000,
"condition" : "",
"button" : {
"key" : "Z"
},
"y" : 522.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=X",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "X",
"sprite" : "",
"x" : 495.000000,
"condition" : "",
"button" : {
"key" : "X"
},
"y" : 522.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=C",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "C",
"sprite" : "",
"x" : 544.500000,
"condition" : "",
"button" : {
"key" : "C"
},
"y" : 522.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=V",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "V",
"sprite" : "",
"x" : 594.000000,
"condition" : "",
"button" : {
"key" : "V"
},
"y" : 522.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=B",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "B",
"sprite" : "",
"x" : 643.500000,
"condition" : "",
"button" : {
"key" : "B"
},
"y" : 522.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=N",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "N",
"sprite" : "",
"x" : 693.000000,
"condition" : "",
"button" : {
"key" : "N"
},
"y" : 522.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+=M",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "M",
"sprite" : "",
"x" : 742.500000,
"condition" : "",
"button" : {
"key" : "M"
},
"y" : 522.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]+= ",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "Spc",
"sprite" : "",
"x" : 792.000000,
"condition" : "",
"button" : {
"key" : "vk_space"
},
"y" : 522.000000
}, {
"pin" : 1.000000,
"link" : "",
"ripple" : "0",
"normal" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key"
},
"command" : "r[name_input]-=1",
"hover" : {
"label" : "",
"avi" : "",
"style" : "Keyboard_key_hover"
},
"text" : "DEL",
"sprite" : "",
"x" : "925.50",
"condition" : "",
"button" : {
"key" : "vk_backspace"
},
"y" : "431"
}
],
"skipChoice" : "0",
"timer" : "-1",
"characters" : []
}
}
_styles File Data:
**textbox:**
"keyboard_input" : {
"label" : {
"color" : [0.000000, 0.000000, 0.000000],
"font" : "ft_slidge_default",
"opacity" : 1.000000,
"data" : [-320.000000, -69.000000, 320.000000, -50.000000],
"labelAlign" : 1.000000,
"active" : 0.000000
},
"continue" : {
"sprite" : "",
"opacity" : 1.000000,
"data" : [320.000000, 50.000000],
"active" : 1.000000
},
"shape" : {
"color" : [255.000000, 255.000000, 255.000000],
"opacity" : 0.800000,
"data" : [-320.000000, -19.000000, 320.000000, 22.000000],
"radius" : 37.777778,
"type" : 1.000000,
"active" : 1.000000
},
"textarea" : {
"color" : [0.000000, 0.000000, 0.000000],
"textAlign" : 0.000000,
"font" : "ft_slidge_default",
"opacity" : 1.000000,
"data" : [-308.000000, -17.000000, 306.000000, 22.000000],
"type" : 0.000000,
"active" : 1.000000
},
"background" : {
"data" : [-320.000000, -50.000000]
},
"avatar" : {
"data" : [-320.000000, -50.000000],
"width" : 0.000000,
"type" : -1.000000,
"height" : 0.000000
}
}
**Choice:**
"Keyboard_key" : {
"label" : {
"color" : [0.000000, 0.000000, 0.000000],
"font" : "",
"opacity" : 1.000000,
"data" : [-320.000000, -69.000000, 320.000000, -50.000000],
"labelAlign" : 1.000000,
"active" : 0.000000
},
"continue" : {
"sprite" : "",
"data" : [320.000000, 50.000000]
},
"shape" : {
"color" : [255.000000, 255.000000, 255.000000],
"opacity" : 0.800000,
"data" : [-18.000000, -23.000000, 26.000000, 21.000000],
"radius" : 37.777778,
"type" : 1.000000,
"active" : 1.000000
},
"textarea" : {
"color" : [0.000000, 0.000000, 0.000000],
"textAlign" : 1.000000,
"font" : "ft_slidge_default",
"opacity" : 1.000000,
"data" : [-17.000000, -21.000000, 27.000000, 21.000000],
"type" : 0.000000,
"active" : 1.000000
},
"background" : {
"data" : [-320.000000, -50.000000]
},
"avatar" : {
"data" : [-320.000000, -50.000000],
"width" : 0.000000,
"type" : -1.000000,
"height" : 0.000000
}
},
"Keyboard_key_hover" : {
"label" : {
"color" : [0.000000, 0.000000, 0.000000],
"font" : "",
"opacity" : 1.000000,
"data" : [-320.000000, -69.000000, 320.000000, -50.000000],
"labelAlign" : 1.000000,
"active" : 0.000000
},
"continue" : {
"sprite" : "",
"data" : [320.000000, 50.000000]
},
"shape" : {
"color" : [1.000000, 255.000000, 255.000000],
"opacity" : 0.800000,
"data" : [-18.000000, -23.000000, 26.000000, 21.000000],
"radius" : 37.777778,
"type" : 1.000000,
"active" : 1.000000
},
"textarea" : {
"color" : [0.000000, 0.000000, 0.000000],
"textAlign" : 1.000000,
"font" : "ft_slidge_default",
"opacity" : 1.000000,
"data" : [-17.000000, -21.000000, 27.000000, 21.000000],
"type" : 0.000000,
"active" : 1.000000
},
"background" : {
"data" : [-320.000000, -50.000000]
},
"avatar" : {
"data" : [-320.000000, -50.000000],
"width" : 0.000000,
"type" : -1.000000,
"height" : 0.000000
}
}