Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functionality added & more customization options (SFX) + Folder fix + small fixes #203

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Simi5599
Copy link

When pairing a controller from the controller applet an example text was shown. I blanked it and left a comment instead.

Removed the "explain test" from the controller applet
Readme was not consistent with lastest update (the readme featured the password when this feature was removed in previous versions)
@Simi5599
Copy link
Author

I also removed from the README.md the password feature because password functionality was removed in a previous build

With this commit i added new functionalities and customizations to uLaunch, more are planned to be implemented in the next future.

Features added:

- BGM music in the user selection screen
- SFX when an user is selected in the user selection screen
- SFX when scrolling users in the user selection screen

- SFX when scrolling titles in the main menu

- SFX when opening the quick menu
- SFX when closing the quick menu
- SFX when scrolling the quick menu
@Simi5599 Simi5599 changed the title Removed explain text from controller section + Removed password details from Readme.md New functionality added & more customization options + small fixes Apr 28, 2023
@Simi5599
Copy link
Author

Simi5599 commented Apr 28, 2023

With this commit i added new functionalities and customizations to uLaunch, more are planned to be implemented in the next future.

Features added:

  • BGM music in the user selection screen

  • SFX when an user is selected in the user selection screen

  • SFX when scrolling users in the user selection screen

  • SFX when scrolling titles in the main menu

  • SFX when opening the quick menu

  • SFX when closing the quick menu

  • SFX when scrolling the quick menu

This features can be used to create better themes for uLaunch.

We may also need to update the theme wifi in order to reflect changes

@XorTroll
Copy link
Owner

I haven't checked this all yet, but I'd suggest you to make separate PRs if you are pushing so many different changes ;)

@XorTroll
Copy link
Owner

Will make this way less messy for both of us

@XorTroll
Copy link
Owner

I'd also suggest you to discuss these changes/TODOs with me since I may not be willing to add certain stuff or would like to do it in a different way (like via Discord server/DMs)

@Simi5599
Copy link
Author

Ok, we will discuss my TODO in your discord, now i am pushing a bugfix for an SFX issue on the home.
Sorry for the long pull request, i am not very familiar with github

Now the title select sfx will be triggered only if a button is pressed
Now the theme menu have some sfx when going back or scrolling though the themes
Now the theme menu have some sfx when going back or scrolling though the themes
@Simi5599 Simi5599 changed the title New functionality added & more customization options + small fixes New functionality added & more customization options (SFX) + small fixes Apr 28, 2023
@Simi5599 Simi5599 changed the title New functionality added & more customization options (SFX) + small fixes New functionality added & more customization options (SFX) + Folder fix + small fixes Apr 29, 2023
@Simi5599
Copy link
Author

Had to put the folder fix in this pr because github does not let me create a new pr

2 issues were fixed:

1) If the user was in a folder and removes every title (from the folder) then an error screen was appearing (title launch error) and the user returns to the home screen

2) If the user moved an item from a folder to the home the item was not respecting it's original position leading then to issues when adding other elements to folders
@Simi5599
Copy link
Author

With the last 2 commit i made the folder functionality more reliable, should work perfectly now

http / https auto added + Added the possibility to open directly google without entering the url
@Dracrius
Copy link

Dracrius commented May 30, 2023

This and the other PR's should get pulled into master as the project seems to have become stale and lacks development. This isn't surprising with no PR's getting accepted in the last 3 years.

I have started working from Simi5599 last commit as the fixes for folders are needed asap as they are completely useless in the current release! I'd love to add my own PR's but if fixes and improvements need to be pre-approved before we even write them you are just stifling innovation. While I do agree each PR should be a single feature or fix since the project is open source you should be open to things being done a different way then you may have done it.

There is no reason not to accept the docker implementation and the Korean translation for instance. This project is the start of the perfect frontend replacement but if others can not contribute it is dead in the water as a LOT of features are missing.

The quick menu will not close when an action is triggered. Still not working with settings and themes menus
@@ -384,6 +384,13 @@ namespace cfg {
ofs.close();
}

void DeleteRecord(const TitleRecord record){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

) { in the function

(sorry if I get too annoying with this details, otherwise I can merge this and change them myself)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problems, i will change it now according to your style :)

@@ -5,6 +5,10 @@

namespace ui {

namespace quickmenu_utils{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a variable like this I'd make it a private static (inside an anonymous namespace in a source file) and then use functions like IgnoreQuickMenuInputs(const u32 count) and ResetQuickMenuInputsToIgnore or whatever for it

@@ -56,7 +64,12 @@ namespace ui {
}

inline void Toggle() {
this->on = !this->on;
if(ui::quickmenu_utils::quickMenuInputsToIgnore>0){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also make this function not inline anymore, since it's not a trivial thing anymore

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing this :) , you're right

HidLaControllerSupportArg arg = {};
hidLaCreateControllerSupportArg(&arg);
arg.enable_explain_text = true;
for(u32 i = 0; i < 8; i++) {
strcpy(arg.explain_text[i], "Test explain text");
strcpy(arg.explain_text[i], ""); //Controller explain test here
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make a string for this in the translation JSON actually, maybe myself or in a new PR

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the original switch menu there is not any text if i remember correctly, maybe themes can make advantage of this is some ways but it will be a new functionality

if(option == 0) {
friendsLaShowMyProfileForHomeMenu(uid);
}
else if(option == 1) {
ui::quickmenu_utils::quickMenuInputsToIgnore=0; //Menu can close if i am logging out
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= on assignments (same for the rest of the changes, although not that important)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry i did not understood that

}
if(open_browser){
UL_RC_ASSERT(dmi::menu::SendCommand(dmi::DaemonMessage::OpenWebPage, [&](dmi::menu::MenuScopedStorageWriter &writer) {
if(!(std::strstr(url,"http://") || std::strstr(url,"https://"))){ //If the URL does not contain http or https the browser will give en error, so i am automatically addinh http (not every website supports https and if a website supports https it will redirect)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments like this one could be a bit more clear (plus the typos too, again not that big of a deal)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, done :)

if(std::strlen(url)<493){ //we want to avoid a buffer overflow when using strcat
char http_prefix[]="http://";
char new_url[url_size]="";
std::strcat(new_url,http_prefix);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it might be easier and cleaner to just use std::string for these string operations

@@ -8,6 +8,10 @@ extern ui::MenuApplication::Ref g_MenuApplication;

namespace ui {

namespace quickmenu_utils{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in another comment, I'd make this an anonymous namespace (also keeping the name style for global variables) and modify it with helper functions rather than using externs

// B only valid for toggling off
// A = something selected in the menu
if(this->on) {
if((keys_down & HidNpadButton_L) || (keys_down & HidNpadButton_R) || (keys_down & HidNpadButton_ZL) || (keys_down & HidNpadButton_ZR)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again about the comments, I'd rewrite some of these to be clearer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants