{"id":1960,"date":"2021-01-16T00:17:37","date_gmt":"2021-01-16T00:17:37","guid":{"rendered":"https:\/\/castle-engine.io\/wp\/?p=1960"},"modified":"2021-01-16T00:17:37","modified_gmt":"2021-01-16T00:17:37","slug":"demo-of-showing-loading-progress-waitforrenderandcall-utility-new-tcastletouchnavigation","status":"publish","type":"post","link":"https:\/\/castle-engine.io\/wp\/2021\/01\/16\/demo-of-showing-loading-progress-waitforrenderandcall-utility-new-tcastletouchnavigation\/","title":{"rendered":"Demo of showing loading progress, WaitForRenderAndCall utility, new TCastleTouchNavigation"},"content":{"rendered":"<table class=\"thumbnails thumbnails-align-right\"><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/01\/Zrzut-ekranu-z-2021-01-16-01-14-24.png\"\n             class=\"screenshot\"\n             title=\"zombie_fighter demo - loading\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/01\/Zrzut-ekranu-z-2021-01-16-01-14-24-200x117.png\"\n             width=\"200\" height=\"117\" \n            alt=\"zombie_fighter demo - loading\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/01\/Zrzut-ekranu-z-2021-01-16-01-14-35.png\"\n             class=\"screenshot\"\n             title=\"zombie_fighter demo\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/01\/Zrzut-ekranu-z-2021-01-16-01-14-35-200x117.png\"\n             width=\"200\" height=\"117\" \n            alt=\"zombie_fighter demo\"\n          ><\/a><\/td><\/tr><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/01\/Zrzut-ekranu-z-2021-01-16-01-14-37.png\"\n             class=\"screenshot\"\n             title=\"zombie_fighter demo\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/01\/Zrzut-ekranu-z-2021-01-16-01-14-37-200x117.png\"\n             width=\"200\" height=\"117\" \n            alt=\"zombie_fighter demo\"\n          ><\/a><\/td><\/tr><\/table>\n<ol>\n<li>\n<p>We have new <a href=\"https:\/\/castle-engine.io\/apidoc-unstable\/html\/CastleUIState.TUIState.html#WaitForRenderAndCall\">TUIState.WaitForRenderAndCall<\/a> utility, especially useful to implement loading inside TUIState descendant.<\/p>\n<li>\n<p>Our <a href=\"https:\/\/github.com\/castle-engine\/castle-engine\/tree\/master\/examples\/user_interface\/zombie_fighter\">examples\/user_interface\/zombie_fighter<\/a> features now a demo showing loading progress (as a descendant of TUIState, which is our advised approach for loading screens now).<\/p>\n<li>\n<p>Whole <a href=\"https:\/\/github.com\/castle-engine\/castle-engine\/tree\/master\/examples\/user_interface\/zombie_fighter\">examples\/user_interface\/zombie_fighter<\/a> was remade to use editor.<\/p>\n<li>\n<p>We have a new UI control, available from code and in editor: <a href=\"https:\/\/castle-engine.io\/apidoc-unstable\/html\/CastleViewport.TCastleTouchNavigation.html\">TCastleTouchNavigation<\/a>.<\/p>\n<p>This shows controls that you can drag to navigate within a viewport. Thus it allows navigation in a TCastleViewport on touch devices. It is a &#8220;reboot&#8221; of previous TCastleWindowTouch use-case, now expressed as UI control that can have any size, can be attached to any viewport, and in general is consistent with the rest of CGE.<\/p>\n<p>In a typical usage scenario, you just add it as a child of TCastleViewport, set FullSize=true, set Viewport to the parent. Then control the touch interface. It is easiest to call <code>MyTouchNavigation.AutoTouchInterface := true<\/code> to let it be automatically assigned. Set <code>MyTouchNavigation.AutoTouchInterface := ApplicationProperties.TouchDevice<\/code> to let it be automatically assigned, but only on touch devices (that do not have regular keyboard \/ mouse).<\/p>\n<p>See <a href=\"https:\/\/castle-engine.io\/apidoc-unstable\/html\/CastleViewport.TCastleTouchNavigation.html\">TCastleTouchNavigation<\/a> API docs for more info. An example is in <a href=\"https:\/\/github.com\/castle-engine\/castle-engine\/tree\/master\/examples\/mobile\/simple_3d_demo\">examples\/mobile\/simple_3d_demo<\/a>.\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>We have new TUIState.WaitForRenderAndCall utility, especially useful to implement loading inside TUIState descendant. Our examples\/user_interface\/zombie_fighter features now a demo showing loading progress (as a descendant of TUIState, which is our advised approach for loading screens now). Whole examples\/user_interface\/zombie_fighter was remade to use editor. We have a new UI control, available from code and in editor: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/castle-engine.io\/wp\/2021\/01\/16\/demo-of-showing-loading-progress-waitforrenderandcall-utility-new-tcastletouchnavigation\/\" class=\"more-link\">Continue reading  \u27a4<span class=\"screen-reader-text\"> &#8220;Demo of showing loading progress, WaitForRenderAndCall utility, new TCastleTouchNavigation&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1963,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"publish_to_discourse":"1","publish_post_category":"9","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"786","discourse_permalink":"https:\/\/forum.castle-engine.io\/t\/demo-of-showing-loading-progress-waitforrenderandcall-utility-new-tcastletouchnavigation\/282","wpdc_publishing_response":"","wpdc_publishing_error":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-1960","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2021\/01\/Zrzut-ekranu-z-2021-01-16-01-14-37.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9IgYW-vC","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/1960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/comments?post=1960"}],"version-history":[{"count":1,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/1960\/revisions"}],"predecessor-version":[{"id":1964,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/1960\/revisions\/1964"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/media\/1963"}],"wp:attachment":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/media?parent=1960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/categories?post=1960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/tags?post=1960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}