{"id":634,"date":"2012-04-01T19:33:27","date_gmt":"2012-04-01T18:33:27","guid":{"rendered":"http:\/\/blogs.kent.ac.uk\/mik\/?p=634"},"modified":"2020-05-15T15:46:55","modified_gmt":"2020-05-15T15:46:55","slug":"joc-26","status":"publish","type":"post","link":"https:\/\/blogs.kcl.ac.uk\/proged\/2012\/04\/01\/joc-26\/","title":{"rendered":"JoC #26: How to display text"},"content":{"rendered":"<p><em>\u00a0 \u00a0 \u00a0 Teamwork is essential; it allows you to blame someone\u00a0else.<\/em><br \/>\n<em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2014 Finagles&#8217; 8th Rule\u00a0<\/em><\/p>\n<p>One of the frequently asked questions is how to display text in Greenfoot scenarios. Today I&#8217;ll answer that question.<\/p>\n<p>I discuss two things: How to display some static text (text that does not change, such as instructions), and how to display text that should change during the program run. We&#8217;ll do that by making our own score counter.<\/p>\n<p><iframe loading=\"lazy\" title=\"The Joy of Code #26: How to display text\" width=\"584\" height=\"329\" src=\"https:\/\/www.youtube.com\/embed\/NjP3MMJnvGc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p style=\"text-align: right\"><a href=\"http:\/\/www.greenfoot.org\/static\/joc\/mov\/JOC-26.mov\">Download video<\/a><\/p>\n<p><strong>Concepts discussed<\/strong>:\u00a0<em>Dynamic images, text display, GreenfootImage, score counting<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 \u00a0 Teamwork is essential; it allows you to blame someone\u00a0else. \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2014 Finagles&#8217; 8th Rule\u00a0 One of the frequently asked questions is how to display text in Greenfoot scenarios. Today I&#8217;ll answer that &hellip; <a href=\"https:\/\/blogs.kcl.ac.uk\/proged\/2012\/04\/01\/joc-26\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":179,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,6],"tags":[58],"class_list":["post-634","post","type-post","status-publish","format-standard","hentry","category-greenfoot-software-tools","category-joy-of-code","tag-image-manipulation"],"_links":{"self":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/users\/179"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/comments?post=634"}],"version-history":[{"count":1,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/634\/revisions"}],"predecessor-version":[{"id":1086,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/634\/revisions\/1086"}],"wp:attachment":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/media?parent=634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/categories?post=634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/tags?post=634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}