-
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
14 changed files
with
181 additions
and
20 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
title: Start | ||
--- | ||
A | ||
B | ||
C | ||
D | ||
E | ||
F | ||
<<forcewait>> | ||
G | ||
H | ||
I | ||
J | ||
=== |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ChatterboxLoadFromFile("testcase_fast_forward.yarn"); | ||
box = ChatterboxCreate(); | ||
ChatterboxJump(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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
draw_set_font(fntDefault); | ||
|
||
//Iterate over all text and draw it | ||
var _x = 10; | ||
var _y = 10; | ||
|
||
if (ChatterboxIsStopped(box)) | ||
{ | ||
//If we're stopped then show that | ||
draw_text(_x, _y, "(Chatterbox stopped)"); | ||
} | ||
else | ||
{ | ||
//All the spoken text | ||
var _i = 0; | ||
repeat(ChatterboxGetContentCount(box)) | ||
{ | ||
var _string = ChatterboxGetContent(box, _i); | ||
draw_text(_x, _y, _string); | ||
_y += string_height(_string); | ||
++_i; | ||
} | ||
|
||
//Bit of spacing... | ||
_y += 30; | ||
|
||
if (ChatterboxIsWaiting(box)) | ||
{ | ||
//If we're in a "waiting" state then prompt the user for basic input | ||
draw_text(_x, _y, "(Press Space)"); | ||
} | ||
else | ||
{ | ||
//All the options | ||
var _i = 0; | ||
repeat(ChatterboxGetOptionCount(box)) | ||
{ | ||
var _string = ChatterboxGetOption(box, _i); | ||
|
||
if (ChatterboxGetOptionConditionBool(box, _i)) | ||
{ | ||
draw_text(_x, _y, string(_i+1) + ") " + _string); | ||
} | ||
else | ||
{ | ||
draw_set_colour(c_grey); | ||
draw_text(_x, _y, string(_i+1) + ") " + _string); | ||
draw_set_colour(c_white); | ||
} | ||
|
||
_y += string_height(_string); | ||
++_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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
if (ChatterboxIsStopped(box)) | ||
{ | ||
//Do nothing! | ||
} | ||
else if (ChatterboxIsWaiting(box)) | ||
{ | ||
if (keyboard_check_released(vk_space)) | ||
{ | ||
ChatterboxContinue(box); | ||
} | ||
else if (keyboard_check_released(ord("F"))) | ||
{ | ||
ChatterboxFastForward(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) ChatterboxSelect(box, _index); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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