mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Only show battery percentage when the mouse has a battery.
This commit is contained in:
@@ -1135,11 +1135,19 @@ namespace GHelper
|
||||
Button b = buttons[i];
|
||||
|
||||
if (m.IsDeviceReady)
|
||||
{
|
||||
if (m.HasBattery())
|
||||
{
|
||||
b.Text = m.GetDisplayName() + "\n" + m.Battery + "%"
|
||||
+ (m.Charging ? "(" + Properties.Strings.Charging + ")" : "");
|
||||
}
|
||||
else
|
||||
{
|
||||
b.Text = m.GetDisplayName();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//Mouse is either not connected or in standby
|
||||
b.Text = m.GetDisplayName() + "\n(" + Properties.Strings.NotConnected + ")";
|
||||
|
||||
Reference in New Issue
Block a user