Initial commit
This commit is contained in:
BIN
objects/QuestionGUI/.Draw_64.gml.swp
Normal file
BIN
objects/QuestionGUI/.Draw_64.gml.swp
Normal file
Binary file not shown.
12
objects/QuestionGUI/Create_0.gml
Normal file
12
objects/QuestionGUI/Create_0.gml
Normal file
@@ -0,0 +1,12 @@
|
||||
http("http://localhost:10000","GET","",{},function(status,result){
|
||||
var question = json_parse(result);
|
||||
global.questionmap[? "category"] = question.category;
|
||||
global.questionmap[? "question"] = question.question;
|
||||
global.questionmap[? 1] = question.answer1;
|
||||
global.questionmap[? 2] = question.answer2;
|
||||
global.questionmap[? 3] = question.answer3;
|
||||
global.questionmap[? 4] = question.answer4;
|
||||
});
|
||||
|
||||
|
||||
|
||||
19
objects/QuestionGUI/Draw_64.gml
Normal file
19
objects/QuestionGUI/Draw_64.gml
Normal file
@@ -0,0 +1,19 @@
|
||||
if (ds_map_exists(global.questionmap, "category")) {
|
||||
panelpositionx = window_get_width() / 2;
|
||||
panelpositiony = window_get_height() / 2;
|
||||
draw_sprite(questionpanel_final, 0, panelpositionx, panelpositiony);
|
||||
draw_set_font(QuestionCategoryFont);
|
||||
draw_set_colour($FF000000 & $ffffff);
|
||||
var l51DA06A0_0=($FF000000 >> 24);
|
||||
draw_set_alpha(l51DA06A0_0 / $ff);
|
||||
draw_text(120, 140, global.questionmap[? "category"] + "");
|
||||
draw_set_font(QuestionTextyFont);
|
||||
draw_set_colour($FF000000 & $ffffff);
|
||||
var l37C42516_0=($FF000000 >> 24);
|
||||
draw_set_alpha(l37C42516_0 / $ff);
|
||||
draw_text(120, 200, global.questionmap[? "question"] + "");
|
||||
draw_text(120, 480, "1. " + global.questionmap[? 1] + "");
|
||||
draw_text(120, 570, "2. " + global.questionmap[? 2] + "");
|
||||
draw_text(710, 480, "3. " + global.questionmap[? 3] + "");
|
||||
draw_text(710, 570, "4. " + global.questionmap[? 4] + "");
|
||||
}
|
||||
13
objects/QuestionGUI/KeyPress_1.gml
Normal file
13
objects/QuestionGUI/KeyPress_1.gml
Normal file
@@ -0,0 +1,13 @@
|
||||
if keyboard_check(ord("1"))
|
||||
{
|
||||
switch (keyboard_key)
|
||||
{
|
||||
case ord("1"):
|
||||
case ord("2"):
|
||||
case ord("3"):
|
||||
case ord("4"):
|
||||
instance_destroy()
|
||||
instance_create_layer(0,0,"Instances", QuestionGUI)
|
||||
break;
|
||||
}
|
||||
}
|
||||
39
objects/QuestionGUI/QuestionGUI.yy
Normal file
39
objects/QuestionGUI/QuestionGUI.yy
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"spriteId": null,
|
||||
"solid": false,
|
||||
"visible": true,
|
||||
"spriteMaskId": null,
|
||||
"persistent": false,
|
||||
"parentObjectId": null,
|
||||
"physicsObject": false,
|
||||
"physicsSensor": false,
|
||||
"physicsShape": 1,
|
||||
"physicsGroup": 1,
|
||||
"physicsDensity": 0.5,
|
||||
"physicsRestitution": 0.1,
|
||||
"physicsLinearDamping": 0.1,
|
||||
"physicsAngularDamping": 0.1,
|
||||
"physicsFriction": 0.2,
|
||||
"physicsStartAwake": true,
|
||||
"physicsKinematic": false,
|
||||
"physicsShapePoints": [],
|
||||
"eventList": [
|
||||
{"isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":1,"eventType":9,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
],
|
||||
"properties": [
|
||||
{"varType":1,"value":"1","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"panelpositionx","tags":[],"resourceType":"GMObjectProperty",},
|
||||
{"varType":1,"value":"2","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"panelpositiony","tags":[],"resourceType":"GMObjectProperty",},
|
||||
{"varType":1,"value":"0","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"question","tags":[],"resourceType":"GMObjectProperty",},
|
||||
],
|
||||
"overriddenProperties": [],
|
||||
"parent": {
|
||||
"name": "Objects",
|
||||
"path": "folders/Objects.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "QuestionGUI",
|
||||
"tags": [],
|
||||
"resourceType": "GMObject",
|
||||
}
|
||||
Reference in New Issue
Block a user