-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
416 additions
and
98 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
//Check for any keyboard input | ||
var _index = undefined; | ||
if (keyboard_check_released(ord("1"))) _index = 0; | ||
if (keyboard_check_released(ord("2"))) _index = 1; | ||
if (keyboard_check_released(ord("3"))) _index = 2; | ||
if (keyboard_check_released(ord("4"))) _index = 3; | ||
|
||
//If we've pressed a button, select that option | ||
if (_index != undefined) chatterbox_select(box, _index); | ||
if (chatterbox_is_stopped(box)) | ||
{ | ||
//If we're stopped then don't respond to user input | ||
} | ||
else if (chatterbox_is_waiting(box)) | ||
{ | ||
//If we're in a "waiting" state then let the user press <space> to advance dialogue | ||
if (keyboard_check_released(vk_space)) | ||
{ | ||
chatterbox_continue(box); | ||
} | ||
} | ||
else | ||
{ | ||
//If we're not waiting then we have some options! | ||
|
||
//Check for any keyboard input | ||
var _index = undefined; | ||
if (keyboard_check_released(ord("1"))) _index = 0; | ||
if (keyboard_check_released(ord("2"))) _index = 1; | ||
if (keyboard_check_released(ord("3"))) _index = 2; | ||
if (keyboard_check_released(ord("4"))) _index = 3; | ||
|
||
//If we've pressed a button, select that option | ||
if (_index != undefined) chatterbox_select(box, _index); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
chatterbox_load("testcase_action.yarn"); | ||
chatterbox_add_function("testcaseAction", testcase_action_function); | ||
//Note that <<testcaseAction>> is added as a Chatterbox function in testcase_action_function() | ||
box = chatterbox_create(); | ||
chatterbox_goto(box, "Start"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
var _x = 10; | ||
var _y = 10; | ||
|
||
var _i = 0; | ||
repeat(array_length(box.content)) | ||
if (chatterbox_is_stopped(box)) | ||
{ | ||
draw_text(_x, _y, box.content[_i]); | ||
_y += 20; | ||
++_i; | ||
draw_text(_x, _y, "(Chatterbox stopped)"); | ||
} | ||
|
||
_y += 20; | ||
|
||
var _i = 0; | ||
repeat(array_length(box.option)) | ||
else | ||
{ | ||
draw_text(_x, _y, string(_i+1) + ") " + string(box.option[_i])); | ||
var _i = 0; | ||
repeat(chatterbox_get_content_count(box)) | ||
{ | ||
draw_text(_x, _y, chatterbox_get_content(box, _i)); | ||
_y += 20; | ||
++_i; | ||
} | ||
|
||
_y += 20; | ||
++_i; | ||
|
||
if (chatterbox_is_waiting(box)) | ||
{ | ||
draw_text(_x, _y, "(Press Space)"); | ||
} | ||
else | ||
{ | ||
var _i = 0; | ||
repeat(chatterbox_get_option_count(box)) | ||
{ | ||
draw_text(_x, _y, string(_i+1) + ") " + chatterbox_get_option(box, _i)); | ||
_y += 20; | ||
++_i; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
var _index = undefined; | ||
if (keyboard_check_released(ord("1"))) _index = 0; | ||
if (keyboard_check_released(ord("2"))) _index = 1; | ||
if (keyboard_check_released(ord("3"))) _index = 2; | ||
if (keyboard_check_released(ord("4"))) _index = 3; | ||
if (_index != undefined) chatterbox_select(box, _index); | ||
if (chatterbox_is_waiting(box)) | ||
{ | ||
if (keyboard_check_released(vk_space)) chatterbox_continue(box); | ||
} | ||
else | ||
{ | ||
var _index = undefined; | ||
if (keyboard_check_released(ord("1"))) _index = 0; | ||
if (keyboard_check_released(ord("2"))) _index = 1; | ||
if (keyboard_check_released(ord("3"))) _index = 2; | ||
if (keyboard_check_released(ord("4"))) _index = 3; | ||
if (_index != undefined) chatterbox_select(box, _index); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
var _x = 10; | ||
var _y = 10; | ||
|
||
var _i = 0; | ||
repeat(array_length(box.content)) | ||
if (chatterbox_is_stopped(box)) | ||
{ | ||
draw_text(_x, _y, box.content[_i]); | ||
_y += 20; | ||
++_i; | ||
draw_text(_x, _y, "(Chatterbox stopped)"); | ||
} | ||
|
||
_y += 20; | ||
|
||
var _i = 0; | ||
repeat(array_length(box.option)) | ||
else | ||
{ | ||
draw_text(_x, _y, string(_i+1) + ") " + string(box.option[_i])); | ||
var _i = 0; | ||
repeat(chatterbox_get_content_count(box)) | ||
{ | ||
draw_text(_x, _y, chatterbox_get_content(box, _i)); | ||
_y += 20; | ||
++_i; | ||
} | ||
|
||
_y += 20; | ||
++_i; | ||
|
||
if (chatterbox_is_waiting(box)) | ||
{ | ||
draw_text(_x, _y, "(Press Space)"); | ||
} | ||
else | ||
{ | ||
var _i = 0; | ||
repeat(chatterbox_get_option_count(box)) | ||
{ | ||
draw_text(_x, _y, string(_i+1) + ") " + chatterbox_get_option(box, _i)); | ||
_y += 20; | ||
++_i; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
var _index = undefined; | ||
if (keyboard_check_released(ord("1"))) _index = 0; | ||
if (keyboard_check_released(ord("2"))) _index = 1; | ||
if (keyboard_check_released(ord("3"))) _index = 2; | ||
if (keyboard_check_released(ord("4"))) _index = 3; | ||
if (_index != undefined) chatterbox_select(box, _index); | ||
if (chatterbox_is_waiting(box)) | ||
{ | ||
if (keyboard_check_released(vk_space)) chatterbox_continue(box); | ||
} | ||
else | ||
{ | ||
var _index = undefined; | ||
if (keyboard_check_released(ord("1"))) _index = 0; | ||
if (keyboard_check_released(ord("2"))) _index = 1; | ||
if (keyboard_check_released(ord("3"))) _index = 2; | ||
if (keyboard_check_released(ord("4"))) _index = 3; | ||
if (_index != undefined) chatterbox_select(box, _index); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.