diff options
| author | Amir Rajan <[email protected]> | 2021-08-07 00:13:33 -0500 |
|---|---|---|
| committer | Amir Rajan <[email protected]> | 2021-08-07 00:13:33 -0500 |
| commit | a503afe87619ff82201c0a43818fa1c3f070a548 (patch) | |
| tree | 0b228a6456d17f6d0c6ea54c9ecd6a045ddbdf59 /samples/01_rendering_basics/01_labels/app | |
| parent | bea150381f495630f92f89d23d5f3445ec289b2d (diff) | |
| download | dragonruby-game-toolkit-contrib-a503afe87619ff82201c0a43818fa1c3f070a548.tar.gz dragonruby-game-toolkit-contrib-a503afe87619ff82201c0a43818fa1c3f070a548.zip | |
Samples folder synced.
Diffstat (limited to 'samples/01_rendering_basics/01_labels/app')
| -rw-r--r-- | samples/01_rendering_basics/01_labels/app/main.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/samples/01_rendering_basics/01_labels/app/main.rb b/samples/01_rendering_basics/01_labels/app/main.rb index 8a5e866..837954f 100644 --- a/samples/01_rendering_basics/01_labels/app/main.rb +++ b/samples/01_rendering_basics/01_labels/app/main.rb @@ -2,12 +2,12 @@ APIs listing that haven't been encountered in a previous sample apps: -- args.outputs.labels: An array. Values in this array generate labels on +- args.outputs.labels: An array. Values in this array generate labels the screen. - args.grid.(left|right|top|bottom): Pixel value for the boundaries of the virtual 720 p screen (Dragon Ruby Game Toolkits's virtual resolution is always 1280x720). - Numeric#shift_(left|right|up|down): Shifts the Numeric in the correct direction - by adding or subtracting. + by adding or subracting. =end @@ -27,7 +27,7 @@ APIs listing that haven't been encountered in a previous sample apps: # The tick method is called by DragonRuby every frame # args contains all the information regarding the game. def tick args - tick_instructions args, "Sample app shows different versions of label sizes and alignments. And how to use hashes instead of arrays." + tick_instructions args, "Sample app shows different version of label sizes and alignments. And how to use hashes instead of arrays." # Here are some examples of simple labels, with the minimum number of parameters # Note that the default values for the other parameters are 0, except for Alpha which is 255 and Font Style which is the default font args.outputs.labels << [400, 620, "Here is a label with just an x, y, and text"] @@ -67,7 +67,7 @@ def tick args g: 0, b: 200, a: 255, - font: "manaspc.ttf" }.label + font: "manaspc.ttf" }.label! # Primitives can hold anything, and can be given a label in the following forms args.outputs.primitives << [690 + 150, 330 - 80, "Custom font (.primitives Array)", 0, 1, 125, 0, 200, 255, "manaspc.ttf" ].label @@ -81,7 +81,7 @@ def tick args g: 0, b: 200, a: 255, - font: "manaspc.ttf" }.label + font: "manaspc.ttf" }.label! end def tick_instructions args, text, y = 715 |
