Now lolibar has this code:
foreach (FolderItem item in UserPinnedFolder.Items())
{
if (item.IsLink)
{
ShellLinkObject lnk = (ShellLinkObject)item.GetLink;
// Skip URL type shortcuts, which don't end up with .exe, like P5R: steam://rungameid/1687950
if (lnk.Path.EndsWith(".exe"))
{
_UserPinned.Add(lnk, item.Name);
}
}
}
It skips url lnks, cause logic after (AddPinnedAppsToContainer method) can't handle them properly. I think there should be another if statement for item.IsBrowsable check, which should be what I think is. In that case, UserPinned dict will be class with 3 parameters instead of dict<ShellLinkObject, string> and then it will be properly handled in drawing logic. Also, for drawing logic InitializedApps dict should be converted into the class as well, since there are many properties inside to operate with, so store it in dict = bad code.
This change probably need to improve the vision of AddPinnedAppsToContainer() method as well, since in LolibarMod it looks junky:
var AppsContainer = new LolibarContainer()
{
Parent = Lolibar.BarLeftContainer,
};
AppsContainer.Create();
LolibarProcess.AddPinnedAppsToContainer
(
parent: AppsContainer.GetBody(),
appContainerTitleState: LolibarEnums.AppContainerTitleState.OnlyActive,
appTitleMaxLength: 24
);
I want something like:
var AppsContainer = new LolibarContainer()
{
Parent = Lolibar.BarLeftContainer,
};
AppsContainer.Create();
// This a new trick here
AppsContainer.HandlePinnedApps(LolibarEnums.AppContainerTitleState.OnlyActive, 24);
Now lolibar has this code:
It skips url lnks, cause logic after (AddPinnedAppsToContainer method) can't handle them properly. I think there should be another
ifstatement foritem.IsBrowsablecheck, which should be what I think is. In that case, UserPinned dict will be class with 3 parameters instead of dict<ShellLinkObject, string> and then it will be properly handled in drawing logic. Also, for drawing logicInitializedAppsdict should be converted into the class as well, since there are many properties inside to operate with, so store it in dict = bad code.This change probably need to improve the vision of AddPinnedAppsToContainer() method as well, since in LolibarMod it looks junky:
I want something like: