{"id":47,"date":"2023-06-16T20:43:57","date_gmt":"2023-06-16T20:43:57","guid":{"rendered":"https:\/\/blogs.scummvm.org\/ankushdutt\/?p=47"},"modified":"2023-06-18T10:11:22","modified_gmt":"2023-06-18T10:11:22","slug":"dlc-downloader-gui","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/ankushdutt\/2023\/06\/16\/dlc-downloader-gui\/","title":{"rendered":"DLC Downloader GUI"},"content":{"rendered":"<p>This week I worked on the GUI for downloading DLC packages. Since I could automate the process of producing the ready-to-upload package for Android, I needed to test if we could conveniently download the downloadable game packages from Play Store servers. For this, we require an in-launcher GUI, which users can use to browse available downloadable games and download any game. I will refer to this new GUI as downloader GUI.<\/p>\n<p>There are currently 11 freeware games that ScummVM is allowed to distribute. And we plan to make them downloadable through our downloader GUI.<\/p>\n<p><span style=\"font-size: 32px;font-weight: bold;letter-spacing: -0.0415625em;font-family: 'Inter var', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif\">Mockup<\/span><\/p>\n<p>I first created a mockup design for our new downloader GUI based on the ScummVM theme and asset. Here is a video feed of the same:<\/p>\n<div style=\"width: 580px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-47-1\" width=\"580\" height=\"329\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/webm\" src=\"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-content\/uploads\/sites\/67\/2023\/06\/Screencast-from-09-06-23-035837-PM-IST.webm?_=1\" \/><a href=\"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-content\/uploads\/sites\/67\/2023\/06\/Screencast-from-09-06-23-035837-PM-IST.webm\">https:\/\/blogs.scummvm.org\/ankushdutt\/wp-content\/uploads\/sites\/67\/2023\/06\/Screencast-from-09-06-23-035837-PM-IST.webm<\/a><\/video><\/div>\n<p>You can find the Figma link <a href=\"https:\/\/www.figma.com\/file\/ypKuiIwpCjhlE8ipTgRs38\/ScummVM-Game-Downloader-GUI?type=design&amp;node-id=0%3A1&amp;t=pPjagTKoachIYwNF-1\">here<\/a>.<\/p>\n<h4>Keep It Simple, Stupid<\/h4>\n<p>Our current GUI is limited. Current widgets will unfortunately not be able to structure and display the elements the way I want. For example, there is no multiline support; the grouped list can&#8217;t have a button and an icon, etc. So, it&#8217;s not possible to recreate the above design without modifying or creating new widgets, which might take a lot of time.<\/p>\n<p>Sev has recommended getting things done pragmatically and keeping it simple initially &#8211;<\/p>\n<blockquote><p>simple list, with the installed games graying out. And one button &#8220;Download&#8221; aside, similar to how the launcher now works<\/p><\/blockquote>\n<p>and so, I did exactly that this week.<\/p>\n<p>After this, I will do the most important thing &#8211; implement the downloading mechanism, i.e., retrieve list of DLCs, request a DLC to download, handle broken downloads, etc.<\/p>\n<p>If there is time, we can implement the new functionalities of widgets according to our needs.<\/p>\n<p><span style=\"font-size: 32px;font-weight: bold;letter-spacing: -0.0415625em;font-family: 'Inter var', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif\">The GUI<\/span><\/p>\n<p>ScummVM&#8217;s GUI is composed of Widgets and Dialogs.<\/p>\n<p>Widgets are the building blocks of our user interface. There are implementations of how the widget should be drawn, how it should look, what text\/images it should contain, etc. Dialogs are modals that provide the space to draw and display widgets.<\/p>\n<p>There are also STX (ScummVM Theme XML) files that contain the layout specifications. We can describe the actual positioning and layout of widgets and dialogs here.<\/p>\n<h4>Current Progress<\/h4>\n<p>I have created a &#8220;Download Games&#8221; button on the launcher that opens the Download Games dialog. In this dialog, users will be able to browse the available downloadable games. Here is how it looks currently:<\/p>\n<div style=\"width: 580px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-47-2\" width=\"580\" height=\"389\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/webm\" src=\"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-content\/uploads\/sites\/67\/2023\/06\/Screencast-from-14-06-23-115019-AM-IST.webm?_=2\" \/><a href=\"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-content\/uploads\/sites\/67\/2023\/06\/Screencast-from-14-06-23-115019-AM-IST.webm\">https:\/\/blogs.scummvm.org\/ankushdutt\/wp-content\/uploads\/sites\/67\/2023\/06\/Screencast-from-14-06-23-115019-AM-IST.webm<\/a><\/video><\/div>\n<p>I have also implemented the functionality where already downloaded games are grayed out. To know if a game is already downloaded, we are scanning game entries in scummvm.ini for unique &#8220;download&#8221; keys.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I worked on the GUI for downloading DLC packages. Since I could automate the process of producing the ready-to-upload package for Android, I needed to test if we could conveniently download the downloadable game packages from Play Store servers. For this, we require an in-launcher GUI, which users can use to browse available [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":9,"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":58,"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/posts\/47\/revisions\/58"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ankushdutt\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}