Homebrew [Release] Homebrew Launcher with grid layout

  • Thread starter Thread starter mashers
  • Start date Start date
  • Views Views 675,002
  • Replies Replies 4,218
  • Likes Likes 139
When using the title launcher I'm able to browse to unused parts of the grid, and I managed to freeze the launcher by going out of bounds.
 
I've just attached beta 44, which includes the following GitHub commits:
  • Folders and themes now draw in grids instead of the ugly button lists. They will show default icons with the first letter of the folder/theme on top, or if folder.smdh or theme.smdh is placed inside the folder/theme directory then the image inside this smdh will be used as the icon for the grid. This change also removes the 8 folder/theme limit, as the folder/theme grids inherit the paging ability of the other grids so can show as many themes/folders as are on the device.
  • In addition, the “Reboot” icon now changes its text to “Rebooting…” when it has been activated so the user will know the device is in the process of rebooting.
  • Finally, I have created a spinning progress wheel. This isn’t used anywhere yet but is included in this commit.

You could always use Travis-ci.org to automatically compile and release a binary (like I do over at https://github.com/filfat-Studios-AB/3ds.js)
see https://github.com/filfat-Studios-AB/3ds.js/blob/master/.travis.yml and https://github.com/filfat-Studios-AB/3ds.js/blob/master/.travis-deps.sh

You will however need to google around a bit to get GH_TOKEN and api_key encrypted correctly :)
 
When using the title launcher I'm able to browse to unused parts of the grid, and I managed to freeze the launcher by going out of bounds.
Yep, that bug is on the todo list to be fixed :)

You could always use Travis-ci.org to automatically compile and release a binary (like I do over at https://github.com/filfat-Studios-AB/3ds.js)
see https://github.com/filfat-Studios-AB/3ds.js/blob/master/.travis.yml and https://github.com/filfat-Studios-AB/3ds.js/blob/master/.travis-deps.sh

You will however need to google around a bit to get GH_TOKEN and api_key encrypted correctly :)
Thanks, but that sounds really complicated. Probably easier just to attach it to the first post ;)
 
Yep, that bug is on the todo list to be fixed :)


Thanks, but that sounds really complicated. Probably easier just to attach it to the first post ;)
I could always do it for you if you add me as an collaborator, though you will still have to login with your github account on travis-ci.org and enable the repo :)
 
What if you could create a custom border around the icons? For example that the background consists of wood like in this 3DS theme:

animal_crossing_3ds_theme.0.jpg

Sometimes I like these playful graphics :)
 
  • Like
Reactions: JJTapia19
@mashers I've noticed that if the theme foldes name is too long for example Kindom Hearts Pattern Theme when you select it on the theme selector screen it just puts the default theme instead of the selected one. I fixed it by renaming the Theme to KH Theme. Now all the needed info it's displayed on the smdh anyways but it might cause confusion if someone donwloads an old theme with a long name.
 
What about adding an option to add an outline or a shadow to the top screen text to be more flexible with backgrounds?!
That would be an ideal future addition. Until proper TTF fonts are working it's unlikely to happen though, since the current font engine uses bitmap versions of TTF fonts.

What if you could create a custom border around the icons? For example that the background consists of wood like in this 3DS theme:

animal_crossing_3ds_theme.0.jpg

Sometimes I like these playful graphics :)
FANTASTIC idea!!!!! I'll add this feature. The image can be loaded from a png inside the theme folder. Thank you!

@mashers I've noticed that if the theme foldes name is too long for example Kindom Hearts Pattern Theme when you select it on the theme selector screen it just puts the default theme instead of the selected one. I fixed it by renaming the Theme to KH Theme. Now all the needed info it's displayed on the smdh anyways but it might cause confusion if someone donwloads an old theme with a long name.
Hey buddy, was the original title longer than 64 characters by any chance? The config code is hard coded to allow values no longer than that which might explain why it wouldn't store the value of a theme with a name longer than that.
 
  • Like
Reactions: GoYoshi
Hey buddy, was the original title longer than 64 characters by any chance? The config code is hard coded to allow values no longer than that which might explain why it wouldn't store the value of a theme with a name longer than that.
No it wasn't that long. Please try it out to see is you can reproduce it.
Name one of your themes like mine was. "JJTapia19's Kingdom Hearts pattern Theme" then go to your theme selector and try to choose it. It only applies the default theme for some reason. Renaming it shorter seems like a workaround to fix it.:)
 
No it wasn't that long please try it out to see is you can reproduce it.
Name one of your themes like mine was. "JJTapia19's Kingdom Hearts pattern Theme" then go to your theme selector and try to choose it. It only applies the default theme for some reason. Renaming it shorter seems like a workaround to fix it.:)
Hmm ok, I'll try to reproduce the problem. I'll add an issue to the todo list and test it out. Thanks for posting the name of the theme :)
 
  • Like
Reactions: JJTapia19
Ok, I've just realised what's happening. The title of the theme is being truncated to fit on the screen, and the truncated text is what is then used to determine the path to the theme to be loaded. It even gets written to hbl.cfg in its truncated form. There's actually no reason to truncate the text when showing themes and folders as there's no text beneath them, so I'll just make it display the whole string without truncating it and this should solve the problem.
 
  • Like
Reactions: JJTapia19
That would be an ideal future addition. Until proper TTF fonts are working it's unlikely to happen though, since the current font engine uses bitmap versions of TTF fonts.

In PHBank, to draw a simple shadow, I use somthing like this:
Code:
drawText(text, x+1, y+1, colorShadow);
drawText(text, x, y, colorText);
 
  • Like
Reactions: Deleted-236924
In PHBank, to draw a simple shadow, I use somthing like this:
Code:
drawText(text, x+1, y+1, colorShadow);
drawText(text, x, y, colorText);
What language is that? And what is the text API?

Edit - never mind, I just realised what you mean, you're just drawing the text twice. Nice idea!
 
What language is that? And what is the text API?
I don't use that code, it's just a kind of example.

Something like that in your code:
Code:
MADrawText(GFX_BOTTOM, GFX_LEFT, 110+1, (320/2)-(len/2)+1, emptyFolderText, &MAFontRobotoRegular16,lightShadow->r, lightShadow->g, lightShadow->b);
MADrawText(GFX_BOTTOM, GFX_LEFT, 110, (320/2)-(len/2), emptyFolderText, &MAFontRobotoRegular16, light->r, light->g, light->b);

Edit: Yeah, just writing the text twice.
 
I don't use that code, it's just a kind of example.

Code:
MADrawText(GFX_BOTTOM, GFX_LEFT, 110+1, (320/2)-(len/2)+1, emptyFolderText, &MAFontRobotoRegular16,lightShadow->r, lightShadow->g, lightShadow->b);
MADrawText(GFX_BOTTOM, GFX_LEFT, 110, (320/2)-(len/2), emptyFolderText, &MAFontRobotoRegular16, light->r, light->g, light->b);
Yeah, I realised what you meant as soon as I posted ;) I would probably modify MADrawText() and MADrawTextWrap() to take parameters for the shadow colour, transparency and offset. That way any text drawing can be easily changed to include the shadow.
 
Yeah, I realised what you meant as soon as I posted ;) I would probably modify MADrawText() and MADrawTextWrap() to take parameters for the shadow colour, transparency and offset. That way any text drawing can be easily changed to include the shadow.

I am using this from here with @xerpi's sftdlib.
Code:
void sftd_draw_text_pkm(const u16 x, const u16 y, const char* text, ... )
{
    char buffer[256];
    va_list args;
    va_start(args, text);
    vsnprintf(buffer, 256, text, args);
    sftd_draw_text(PHBank::font(), x+1, y+1, RGBA8(0x00, 0x00, 0x00, 0xAF), 12, buffer);
    sftd_draw_text(PHBank::font(), x, y, RGBA8(0xFF, 0xFF, 0xFF, 0xFF), 12, buffer);
    va_end(args);
}

Edit: You understood the idea, everything is fine then. :3
 
Last edited by Gocario,
Ok, I've just realised what's happening. The title of the theme is being truncated to fit on the screen, and the truncated text is what is then used to determine the path to the theme to be loaded. It even gets written to hbl.cfg in its truncated form. There's actually no reason to truncate the text when showing themes and folders as there's no text beneath them, so I'll just make it display the whole string without truncating it and this should solve the problem.
@JJTapia19
Yep, that sorted it. I put a flag in the menu entry to draw the full text. This flag gets checked when drawing the text on the top screen, and if its set then the text wraps to the next line and doesn't get truncated. Now the full text gets written to the hbl.cfg and the theme loads correctly. I'll upload a commit and a new binary shortly.
 
@JJTapia19
Yep, that sorted it. I put a flag in the menu entry to draw the full text. This flag gets checked when drawing the text on the top screen, and if its set then the text wraps to the next line and doesn't get truncated. Now the full text gets written to the hbl.cfg and the theme loads correctly. I'll upload a commit and a new binary shortly.
Thanks! You are the best.
 
  • Like
Reactions: Deleted-236924
@mashers: Still finding a lot of issues/bugs (on b44) with some screens, D-Pad navigation and with rows selection:

- Problem with selecting empty items/icons persists (cursor out of boundaries)... Apparently, HBL freeze/crash issue solves deactivating "D-Pad navigation on corner icons" option, then should be some problem directly related with that.
- Check sign on "Folders option" screen always stays on "3ds" icon, in despite of selecting another folder.
- About folders too: Re-selecting a open folder is possible again, and this is unnecesary.
- Changing between 2 and 3 rows view (in both ways) produces some unexpected visual effects on "Settings" screen, like icons dissapearing or out of their normal boundaries.
- And a very minimal bug: On "Help" and "Settings" screens, "les" word is shown on top screen selecting some icons.

I really hope you fix that soon (on a next release)... If you can as fast as possible, I (and someone, probably) will be very grateful with you! Thanks!
 
Last edited by fmkid,
  • Like
Reactions: JJTapia19
In PHBank, to draw a simple shadow, I use somthing like this:
Code:
drawText(text, x+1, y+1, colorShadow);
drawText(text, x, y, colorText);
Simple? Yes. But it would require twice the power (since we're drawing the font twice).
Actually Minecraft (Java) is a really good example of this, you lose about 35-40% if the chat is full (on a normal sized screen).

Though it's a good option till one of use stop being lazy and implement real shadowing (will have to do it sooner or later for 3DS_UI) :P
 

Site & Scene News

Popular threads in this forum