{"id":68,"date":"2021-07-05T11:44:40","date_gmt":"2021-07-05T11:44:40","guid":{"rendered":"https:\/\/blogs.scummvm.org\/av-dx\/?p=68"},"modified":"2021-07-05T11:44:40","modified_gmt":"2021-07-05T11:44:40","slug":"best-of-both-layouts-week-4-progress","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/av-dx\/2021\/07\/05\/best-of-both-layouts-week-4-progress\/","title":{"rendered":"Best of both layouts (Week 4 progress)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Task 1 : Switching between list and grid<\/h2>\n\n\n\n<p>The list layout has been a part of the GUI for a long time, and its not being replaced this time either. There should be a button to toggle between grid and list view.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"691\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-19-54-1024x691.png\" alt=\"\" class=\"wp-image-70\" srcset=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-19-54-1024x691.png 1024w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-19-54-300x202.png 300w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-19-54-768x518.png 768w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-19-54.png 1487w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Buttons will appear on the bottom (top on lowres displays)<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<figure class=\"wp-block-gallery columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"309\" height=\"153\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-19-56.png\" alt=\"\" data-id=\"71\" data-link=\"https:\/\/blogs.scummvm.org\/av-dx\/?attachment_id=71\" class=\"wp-image-71\" srcset=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-19-56.png 309w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-19-56-300x149.png 300w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"203\" height=\"119\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-20-09.png\" alt=\"\" data-id=\"72\" data-full-url=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-20-09.png\" data-link=\"https:\/\/blogs.scummvm.org\/av-dx\/?attachment_id=72\" class=\"wp-image-72\" \/><\/figure><\/li><\/ul><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>But this would originally switch out only the display method , i.e., switch out the ListWidget with the GridWidget. The button layout would stay the same.<\/p>\n\n\n\n<p>But List requires more buttons that I had previously moved into the tray like Start Game, Load Game, Edit Game. So what I instead had to do was create 2 different Dialogs which derived from a common Launcher Dialog, and a Launcher Dialog Chooser object which selected which dialog must be opened. This is a similar setup to what is done with Save\/Load dialogs.<\/p>\n\n\n\n<p>After that I restored the button layout for List view to its original form (+ the switching buttons).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"568\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-35-55-1024x568.png\" alt=\"\" class=\"wp-image-73\" srcset=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-35-55-1024x568.png 1024w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-35-55-300x166.png 300w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-35-55-768x426.png 768w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-35-55-1536x852.png 1536w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-35-55-1568x869.png 1568w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-35-55.png 1948w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Task 2 : Visual Changes<\/h2>\n\n\n\n<p>Few smaller visual changes were made to the grid<\/p>\n\n\n\n<p>An autoscroll for partially offscreen entries, so that the tray is not drawn outside the window, in future this may have a short sliding pseudoanimation to make the autoscroll and tray popup less jarring to the user.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"347\" height=\"293\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-22-32-1.png\" alt=\"\" class=\"wp-image-79\" srcset=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-22-32-1.png 347w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-22-32-1-300x253.png 300w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><figcaption>Selecting a offscreen entry&#8230;.<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"332\" height=\"372\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-22-41-1.png\" alt=\"\" class=\"wp-image-80\" srcset=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-22-41-1.png 332w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-22-41-1-268x300.png 268w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><figcaption>&#8230;autoscrolls and then opens a tray<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>I had already reserved two lines in my layouts but I wasn&#8217;t using them. Hence, grid in earlier screenshots may look bit more &#8220;spaced&#8221;.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"263\" height=\"255\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-24-36.png\" alt=\"\" class=\"wp-image-76\" \/><figcaption>Take single line title<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"250\" height=\"262\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-26-04.png\" alt=\"\" class=\"wp-image-77\" \/><figcaption>&#8230;Split into two lines<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"251\" height=\"268\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-27-19.png\" alt=\"\" class=\"wp-image-78\" \/><figcaption>&#8230;and then, Centered<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n<\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"815\" height=\"364\" src=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-42-22-1.png\" alt=\"\" class=\"wp-image-83\" srcset=\"https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-42-22-1.png 815w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-42-22-1-300x134.png 300w, https:\/\/blogs.scummvm.org\/av-dx\/wp-content\/uploads\/sites\/6\/2021\/07\/Screenshot-from-2021-07-05-16-42-22-1-768x343.png 768w\" sizes=\"auto, (max-width: 815px) 100vw, 815px\" \/><figcaption>A tooltip containing the full title on hover<\/figcaption><\/figure>\n\n\n\n<p>The final change was that the tray closes up when navigating to the launcher buttons, leaving the entry selected, so that things like &#8220;Remove Game&#8221;, &#8220;About&#8221;, &#8220;Options&#8221; can be pressed without needing to explicitly close the tray. (Can&#8217;t really convey with screenshots)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">In other news&#8230;<\/h4>\n\n\n\n<p>I got my second dose of COVID vaccine yesterday, so a bit late for the blog post. But I&#8217;m feeling good and will soon start preparation for the first phase of evaluations coming up.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Task 1 : Switching between list and grid The list layout has been a part of the GUI for a long time, and its not being replaced this time either. There should be a button to toggle between grid and list view. But this would originally switch out only the display method , i.e., switch&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.scummvm.org\/av-dx\/2021\/07\/05\/best-of-both-layouts-week-4-progress\/\">Continue reading <span class=\"screen-reader-text\">Best of both layouts (Week 4 progress)<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":85,"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/posts\/68\/revisions\/85"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/av-dx\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}