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

Bug fix where ActiveGameIndex is not set correctly on program Startup #36

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

Conversation

neimex23
Copy link
Contributor

@neimex23 neimex23 commented Sep 28, 2024

Hey good, I hope you are well. After a lot of time coding and very little because university things I started adding functionalities for ASC 3.0 after my new interface was finished.

I have a problem with the combobox that we used to set the active splitter did'nt set on Startup,

BEFORE HCM INTERFACE IMPLEMENT

LoadAutoSplitterSettings.Invoke(AutoSplitterInstance, [profCtrl, this]);
List<string> GameList = (List<string>)GetGames.Invoke(AutoSplitterInstance, null);
foreach (string i in GameList) comboBoxGame.Items.Add(i);
comboBoxGame.SelectedIndex = (int)GetSplitterEnable.Invoke(AutoSplitterInstance, null);
PracticeModeCheck.Checked = (bool)GetPracticeMode.Invoke(AutoSplitterInstance, null);

AFTER HCM INTERFACE IMPLEMENT

AutoSplitterCoreModule.AutoSplitterRegisterInterface(InterfaceASC);
comboBoxGame.Items.Clear();
foreach (string game in InterfaceASC.GameList)
{
    comboBoxGame.Items.Add(game);
}

 LoadAutoSplitterHotKeys();

You added
interfaceASC.ActiveGameIndex = GetSplitterEnable(); on ASC in RegisterHitCounterManagerInterface() Function
but the problem for manage this by the function is that called before fill ComboBox on HCM, then this raises an OutOfRange exception in the comboBox, to fix this im added GetActiveGameIndexMethod Function.
Remember that now ASC Fill ObservableCollection GameList after AutoSplitterRegisterInterface is invocated.

I dont know why PracticeMode still working but if it works that's enough, maybe is manage by other function.

I have the solution for V2.X but i cant do a PR because
There is a commits before or affter in the current branch so I can't do it without breaking everything

Im attach the files that i change
HitCounterManagerV2-Fix.zip

@neimex23
Copy link
Contributor Author

Now ASC has the possibility to uploading and downloading profiles directly from a folder in the google drive and implement associated functions to handle profiles and splits effectively.

Implemented Functions:

  • GetProfiles(): Retrieves all profiles from HCM.
  • ProfileName(): Obtains the name of the current profile.
  • GetSplits(): Retrieves all splits for the current profile.

Enhanced Profile Creation:

To be able to enter the splits that are downloaded from drive I created a custom serialization that has as structure the name of the profile and the splits

  • Modified NewProfile(string profileTitle) to create a new profile using the provided parameter.
  • Maintains the existing window behavior when profiles are created in HCM.

The idea is after establishing the profile to go through a list that I have of splits and add them with

  • AddSplit(string SplitTitle);

Sin título
Sin título2
Roadmap.txt

Im still working in other functions like autohitcounter maybe i should edit some other function on HCM
I hope to release this in a few months after some beta testing, 
I got carried away by the size of this KEKW update. 
I'll leave you the roadmap so you have an idea of ​​how things are going.
I'll let you know when everything is official to do a new release of HCM, THX for all

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.

1 participant