Update tutorial to reflect the latest template
This commit is contained in:
@@ -47,7 +47,7 @@ Right now, you're using the `play-clj.ui` library to display a label. This libra
|
||||
Now let's find an image to use as a texture in the game. Find one you'd like to use, such as [this Clojure logo](http://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Clojure_Programming_Language_Logo_Icon_SVG.svg/200px-Clojure_Programming_Language_Logo_Icon_SVG.svg.png), and save it to the `desktop/resources` folder. Next, simply change the line where the label entity is being created, so it creates a texture from that file instead:
|
||||
|
||||
```clojure
|
||||
(conj entities (texture "clojure.png"))
|
||||
(texture "clojure.png")
|
||||
```
|
||||
|
||||
## Size and Position
|
||||
@@ -61,8 +61,8 @@ If you run the code now, you'll see the image in the bottom-left corner. As ment
|
||||
A `texture` contains the underlying Java object. By default, it will be drawn at the bottom-left corner with the size of the image itself. You can change the position and size by simply using `assoc`:
|
||||
|
||||
```clojure
|
||||
(conj entities (assoc (texture "clojure.png")
|
||||
:x 50 :y 50 :width 100 :height 100))
|
||||
(assoc (texture "clojure.png")
|
||||
:x 50 :y 50 :width 100 :height 100)
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
Reference in New Issue
Block a user