summaryrefslogtreecommitdiffhomepage
path: root/samples/99_genre_dev_tools
diff options
context:
space:
mode:
author_Tradam <[email protected]>2021-12-16 19:22:26 -0500
committerGitHub <[email protected]>2021-12-16 19:22:26 -0500
commit5954b9beb4d4a3b4f248d72d1851195f030558a8 (patch)
treefecd8aa840a25afdb502915b0fdb4d03b7ed339a /samples/99_genre_dev_tools
parent2f845281f133849256b57bb08fd3e9ae57600784 (diff)
parenteaa29e72939f5edf61735ccbb73c36ee89369f65 (diff)
downloaddragonruby-game-toolkit-contrib-master.tar.gz
dragonruby-game-toolkit-contrib-master.zip
Merge branch 'DragonRuby:master' into masterHEADmaster
Diffstat (limited to 'samples/99_genre_dev_tools')
-rw-r--r--samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb38
-rw-r--r--samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb4
2 files changed, 22 insertions, 20 deletions
diff --git a/samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb b/samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb
index 14456e3..b80e4b8 100644
--- a/samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb
+++ b/samples/99_genre_dev_tools/animation_creator_starting_point/app/main.rb
@@ -72,24 +72,22 @@ class OneBitLowrezPaint
end
def render_instructions
- instructions = <<-S
-* Instructions:
-- All data is stored in the ~canvas~ directory.
-- Hold ~d~ to set the edit mode to erase.
-- Release ~d~ to set the edit mode drawing.
-- Press ~a~ to added a frame to the end.
-- Press ~b~ to select the previous frame.
-- Press ~f~ to select the next frame.
-- Press ~c~ to copy a frame.
-- Press ~v~ to paste a copied frame into the selected frame.
-- Press ~x~ to delete the currently selected frame.
-- Press ~w~ to save the canvas and export all sprites.
-- Press ~l~ to load the canvas.
-S
-
- instructions.strip.each_line.with_index do |l, i|
+ instructions = [
+ "* Hotkeys:",
+ "- d: hold to erase, release to draw.",
+ "- a: add frame.",
+ "- c: copy frame.",
+ "- v: paste frame.",
+ "- x: delete frame.",
+ "- b: go to previous frame.",
+ "- f: go to next frame.",
+ "- w: save to ./canvas directory.",
+ "- l: load from ./canvas."
+ ]
+
+ instructions.each.with_index do |l, i|
outputs.labels << { x: 840, y: 500 - (i * 20), text: "#{l}",
- r: 180, g: 180, b: 180, size_enum: -3 }
+ r: 180, g: 180, b: 180, size_enum: 0 }
end
end
@@ -103,12 +101,12 @@ S
label = { x: b.x + state.buttons_frame_selection.size.half,
y: b.y,
text: "#{i + 1}", r: 180, g: 180, b: 180,
- size_enum: -4, alignment_enum: 1 }.label
+ size_enum: -4, alignment_enum: 1 }.label!
- selection_border = b.merge(r: 40, g: 40, b: 40).border
+ selection_border = b.merge(r: 40, g: 40, b: 40).border!
if i == state.animation_frames_selected_index
- selection_border = b.merge(r: 40, g: 230, b: 200).border
+ selection_border = b.merge(r: 40, g: 230, b: 200).border!
end
[selection_border, label]
diff --git a/samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb b/samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb
index 4238fcd..95ccfdf 100644
--- a/samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb
+++ b/samples/99_genre_dev_tools/tile_editor_starting_point/app/main.rb
@@ -17,15 +17,19 @@
- args.outputs.labels: An array. The values generate a label.
The parameters are [X, Y, TEXT, SIZE, ALIGNMENT, RED, GREEN, BLUE, ALPHA, FONT STYLE]
+ For more information about labels, go to mygame/documentation/02-labels.md.
- args.outputs.sprites: An array. The values generate a sprite.
The parameters are [X, Y, WIDTH, HEIGHT, IMAGE PATH]
+ For more information about sprites, go to mygame/documentation/05-sprites.md.
- args.outputs.solids: An array. The values generate a solid.
The parameters are [X, Y, WIDTH, HEIGHT, RED, GREEN, BLUE]
+ For more information about solids, go to mygame/documentation/03-solids-and-borders.md.
- args.outputs.lines: An array. The values generate a line.
The parameters are [X1, Y1, X2, Y2, RED, GREEN, BLUE]
+ For more information about lines, go to mygame/documentation/04-lines.md.
- args.state.new_entity: Used when we want to create a new object, like a sprite or button.
In this sample app, new_entity is used to create a new button that clears the grid.