Replacing Gwen with Myra in Intersect.Client can be done by following these steps:
Step 1: Clone the Intersect-Engine Repository
First, you need to clone the Intersect-Engine repository from Github. You can do this by opening the terminal and typing the following command:
git clone https://github.com/AscensionGameDev/Intersect-Engine.git
After cloning the repository, navigate to the Intersect.Client folder:
cd Intersect-Engine\Intersect.Client
Step 2: Remove Gwen References
Now it's time to remove all the Gwen references from the project. The easiest way to do this is to use the Visual Studio editor. Open the Intersect.Client project in Visual Studio.
In your Solution Explorer, navigate to the References folder. You should see two references for Gwen.
Right-click each reference and select "Remove".
Step 3: Add Myra Library
Now we need to add the Myra library to the project. You can download the latest version of the Myra library from the Github repository you cloned earlier.
Copy the Myra.dll file to the Intersect.Client\bin\Debug\netcoreapp3.1 folder. After that, right-click the "Dependencies" folder in your Solution Explorer and select "Add Reference...". In the Reference Manager, go to "Browse" and find the Myra.dll file.
Step 4: Use Myra Replace Gwen
Now that the Gwen library is removed and the Myra library is added, we need to do some code changes.
Open the "GameWindow.cs" file in your text editor, and find the "using Gwen" and replace it with:
using Myra;
You also need to change the class that implements the GameWindow class. You should change the class name from "GameWindow" to "MyraGameWindow" and make sure to inherit from the "MyraWidget" class.
In the Intersect.Client\bin\Debug\netcoreapp3.1\Resources\Theme.xml file, replace all the Gwen namespace aliases ("gwen:" prefix) with the Myra namespace alias ("myra:" prefix).
After that, you need to update the code where Gwen was used to use Myra instead.
For example, you can replace GwenButton with a MyraButton, like this:
GwenButton ----> MyraButton
Here's an example of code that needs to be modified:
private GwenButton _playButton;
// change to:
private MyraButton _playButton;
Step 5: Compile and Test
Once you have finished modifying the code and saving the changes, open the "Intersect.Client.sln" file in Visual Studio, and then build the Intersect.Client project.
After build successful, you can run the Intersect.Client project and see that the Myra library is now being used in place of Gwen.
Congratulations, you have successfully replaced Gwen with Myra in the Intersect.Client project.