mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -04:00
Quick fix for last commit.
This commit is contained in:
parent
5e5ee2a1cd
commit
d2bd5f148e
@ -77,6 +77,7 @@ namespace ClassicalSharp {
|
|||||||
};
|
};
|
||||||
okayIndex = buttons.Length - 1;
|
okayIndex = buttons.Length - 1;
|
||||||
game.Events.HackPermissionsChanged += CheckHacksAllowed;
|
game.Events.HackPermissionsChanged += CheckHacksAllowed;
|
||||||
|
CheckHacksAllowed( null, null );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckHacksAllowed( object sender, EventArgs e ) {
|
void CheckHacksAllowed( object sender, EventArgs e ) {
|
||||||
@ -85,9 +86,9 @@ namespace ClassicalSharp {
|
|||||||
buttons[i].Disabled = false;
|
buttons[i].Disabled = false;
|
||||||
}
|
}
|
||||||
LocalPlayer p = game.LocalPlayer;
|
LocalPlayer p = game.LocalPlayer;
|
||||||
bool globalHacks = p.CanAnyHacks && p.HacksEnabled;
|
bool noGlobalHacks = !p.CanAnyHacks || !p.HacksEnabled;
|
||||||
buttons[3].Disabled = !globalHacks || !p.CanSpeed;
|
buttons[3].Disabled = noGlobalHacks || !p.CanSpeed;
|
||||||
buttons[5].Disabled = !globalHacks || !p.CanPushbackBlocks;
|
buttons[5].Disabled = noGlobalHacks || !p.CanPushbackBlocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonWidget Make( int x, int y, string text, Action<Game, Widget> onClick,
|
ButtonWidget Make( int x, int y, string text, Action<Game, Widget> onClick,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user