- The domain problem is very simple. RTL language users read their texts in a right-to-left manner, and GUI for these languages is also specialized in a way that they will find intuitive along with their native language.
- ScummVM did not have such GUI before. My first task (now near merge) introduces RTL based GUI, which will be useful for native RTL users.
- PR: https://github.com/scummvm/scummvm/pull/2265
How I solved it:
- To begin with, sev provided a proof of concept by ZvikaZ, which gave me a very good overview of how things "should" look like when finished.
- I began with that proof of concept and slowly worked my way up. For example, after the proof of concept, I reversed the mouse coordinates. Then I checked each menu in the main dialog and worked there. Afterward, I worked with the stacked dialogs and positioning them correctly, reversing the tabs and contents, etc.
- After good progress on GUI, I worked on flipping individual widgets. The widgets worked on here are: Lists, DropDownButtons, Radiobuttons, Checkboxes, Sliders. Sliders are disabled rtl for now because that is more comfortable for the rtl users, as communicated by them. These are very easy to enable/disable because one can just provide an 'rtl = no' in the layout file, which will disable the RTL-ness of an individual widget. For example, because sliders did not need RTL for now, one can simply set rtl=no to each slider type in the layout file and they regain their original behavior.
When I began my task, I didn't really have any experience with big codebase before. I would thus say the task was a big challenge. But, after little progress day by day, I gained more confidence. I still had some challenges which took up a little more time than they should have:
Stacked dialogs positioning:
- For this, I studied the behavior of the LTR GUI and tried to mimic it for RTL. It took me a little more time than I would like to admit, but in the end, I came up with a good solution.
- I struggled with these in the beginning, because I had to keep text stuck to the right (at least for now). But, after a while, I was able to come up with a solution which was very clean and nice! I remember sev even commented "It is clever. I like it." and it made me very happy!
- Although, I should tell you that it was not the best solution. Soon after I came up with my solution, sev came up with a better and cleaner solution, and then rzil came up with an even better one. It was very interesting to see their thought process and definitely made me realize how I could do things better. In the near future, I will always try to see and think if a problem could be solved in a more elegant way.
- This was a problem I could not reach my own solution to. Other problems - I tried, struggled a bit but got to a working solution. This one, however, I just couldn't get it. sev took a very short amount of time to figure it out. This was because I didn't study backend code properly, because I thought my work would be abstracted away from it.
What things I could have done better:
- I definitely could have studied the backends code better and understood it before I got started with my GUI task. I thought backends didn't concern me until my 3rd task but I was wrong. Even if my work does not concern the backends, it is a good idea to understand how everything ties together and understand the basic connecting pieces from backend-frontend, so debugging and fixing things is easier.
- Seeing how rzil has improved my code over a few patches, I could have thought of such solutions in the first place. I try to keep learning, so I will try my best to come up with solutions that are neat and up-to-standards with ScummVM. He has also worked on a PR to my branch, which removed some useless code and centered the alignment code and made it more abstract. It is always nice to see how my code is improved and has made me learn a great deal. Moving forward, I'll try to see things on a bigger picture and think about how code can be improved.
I feel like I did my best in the first task! I think it was a very great idea I got started with my project right away after the result announcements. Even though it is nearing the end of the first month (officially), I am reaching around 2 months with coding in ScummVM and I feel like I am actually contributing a little to this huge project! My mentors and the community of ScummVM have been really helpful throughout the whole time. It was very nice interacting with everyone, and I plan to keep up the (hopefully) good work over to my next 2 tasks (and more maybe!).
Thanks for reading!