Skip to content

Commit

Permalink
Cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanpmartell committed Aug 29, 2024
1 parent 7bfd387 commit 11ae7da
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.TOKEN }}
default_bump: minor
default_bump: patch

- name: Create a GitHub release
uses: actions/create-release@v1
Expand Down
18 changes: 9 additions & 9 deletions LittleWarGameClient/Handlers/SettingsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ internal class SettingsHandler
private const int defaultUpdateInterval = 1;
private const double defaultVolume = 1.0;
private readonly DateTime defaultUpdateLastChecked = DateTime.MinValue;
private const Keys defaultOptionsMenu = Keys.F10;
private const Keys defaultFriendsMenu = Keys.F9;
private const Keys defaultChatHistoryMenu = Keys.F11;
private const Keys defaultOptionsMenuHotkey = Keys.F10;
private const Keys defaultFriendsMenuHotkey = Keys.F9;
private const Keys defaultChatHistoryMenuHotkey = Keys.F11;
private const Keys defaultFullscreenHotkey = Keys.F8;
private readonly Ini settings;
private readonly SettingsHelper helper;
Expand Down Expand Up @@ -66,9 +66,9 @@ private Ini CreateDefaultIniFile()
},
new Section("Hotkeys")
{
new Property("optionsMenu", defaultOptionsMenu.ToString()),
new Property("friendsMenu", defaultFriendsMenu.ToString()),
new Property("chatHistoryMenu", defaultChatHistoryMenu.ToString()),
new Property("optionsMenu", defaultOptionsMenuHotkey.ToString()),
new Property("friendsMenu", defaultFriendsMenuHotkey.ToString()),
new Property("chatHistoryMenu", defaultChatHistoryMenuHotkey.ToString()),
new Property("fullscreen", defaultFullscreenHotkey.ToString())
},
new Section("Audio")
Expand Down Expand Up @@ -161,7 +161,7 @@ internal void SetOptionsMenuHotkey(Keys value)
[Hotkey(FuncToCall = "OptionsMenuHotkeyFunc", JSFuncToCall = "addOptionsMenuHotkey")]
public Keys GetOptionsMenuHotkey()
{
return helper.GetVariable("Hotkeys", "optionsMenu", defaultOptionsMenu);
return helper.GetVariable("Hotkeys", "optionsMenu", defaultOptionsMenuHotkey);
}

internal void SetFriendsMenuHotkey(Keys value)
Expand All @@ -172,7 +172,7 @@ internal void SetFriendsMenuHotkey(Keys value)
[Hotkey(FuncToCall = "FriendsHotkeyFunc", JSFuncToCall = "addFriendsMenuHotkey")]
public Keys GetFriendsMenuHotkey()
{
return helper.GetVariable("Hotkeys", "friendsMenu", defaultFriendsMenu);
return helper.GetVariable("Hotkeys", "friendsMenu", defaultFriendsMenuHotkey);
}

internal void SetChatHistoryMenuHotkey(Keys value)
Expand All @@ -183,7 +183,7 @@ internal void SetChatHistoryMenuHotkey(Keys value)
[Hotkey(FuncToCall = "ChatHistoryHotkeyFunc", JSFuncToCall = "addChatHistoryHotkey")]
public Keys GetChatHistoryMenuHotkey()
{
return helper.GetVariable("Hotkeys", "chatHistoryMenu", defaultChatHistoryMenu);
return helper.GetVariable("Hotkeys", "chatHistoryMenu", defaultChatHistoryMenuHotkey);
}

internal void SetFullscreenHotkey(Keys value)
Expand Down
7 changes: 0 additions & 7 deletions LittleWarGameClient/Helpers/WebInteropHelper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using CefSharp;
using CefSharp.WinForms;
using System.Runtime.Serialization;
using System.Text.Json;
using System.Text.Json.Serialization;

Expand Down Expand Up @@ -71,17 +70,11 @@ internal static void JSMessageReceived(object? sender, JavascriptMessageReceived

internal enum ButtonType
{
[EnumMember(Value = "FullScreen")]
FullScreen,
[EnumMember(Value = "Exit")]
Exit,
[EnumMember(Value = "MouseLock")]
MouseLock,
[EnumMember(Value = "InitComplete")]
InitComplete,
[EnumMember(Value = "VolumeChanging")]
VolumeChanging,
[EnumMember(Value = "VolumeChanged")]
VolumeChanged
}
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
**Littlewargame client made for Windows 7+**
# **Littlewargame client made for Windows 7+**

It contains additional improvements to the web-based client such as borderless windowed mode, additional hotkeys, not being tied to your web browser to play and cursor lock to window not lagging.

The client also supports the Steam overlay, as well as multiple profiles.

This project is completely open source. Feel free to fork and make pull requests, additionally please report any issues [here](https://github.com/ivanpmartell/LittleWarGameClient/issues).

# Important
## Important

If updating from versions below 0.4.0:

Versions 0.4.0+ are not compatible with previous versions. Extract to an empty folder. Do not simply replace files with updated files.
Unfortunately this means that saved data from previous version cannot be carried over. Make sure to backup your data, e.g. downloaded replays

# Download
## Download

Grab the `lwg_clientx64.zip` file from the latest release. Click [here](https://github.com/ivanpmartell/LittleWarGameClient/releases/latest) for easier access to the download.

# Profiles
## Profiles

To run with a certain profile add the command line argument `-profile` and the name you want the profile to have:

`LittleWarGameClient.exe -profile name`

This will let you run multiple instance of the game at the same time.
This will also let you run multiple instance of the game at the same time.

0 comments on commit 11ae7da

Please sign in to comment.