mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-14 02:13:41 +00:00
disable some player controls in gui mode
This commit is contained in:
parent
14ddcc1204
commit
4949576984
1 changed files with 26 additions and 22 deletions
|
|
@ -97,6 +97,8 @@ namespace MWInput
|
||||||
|
|
||||||
void toggleSpell()
|
void toggleSpell()
|
||||||
{
|
{
|
||||||
|
if (windows.isGuiMode()) return;
|
||||||
|
|
||||||
DrawState state = player.getDrawState();
|
DrawState state = player.getDrawState();
|
||||||
if (state == DrawState_Weapon || state == DrawState_Nothing)
|
if (state == DrawState_Weapon || state == DrawState_Nothing)
|
||||||
{
|
{
|
||||||
|
|
@ -108,11 +110,12 @@ namespace MWInput
|
||||||
player.setDrawState(DrawState_Nothing);
|
player.setDrawState(DrawState_Nothing);
|
||||||
std::cout << "Player does not have any kind of attack ready now.\n";
|
std::cout << "Player does not have any kind of attack ready now.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleWeapon()
|
void toggleWeapon()
|
||||||
{
|
{
|
||||||
|
if (windows.isGuiMode()) return;
|
||||||
|
|
||||||
DrawState state = player.getDrawState();
|
DrawState state = player.getDrawState();
|
||||||
if (state == DrawState_Spell || state == DrawState_Nothing)
|
if (state == DrawState_Spell || state == DrawState_Nothing)
|
||||||
{
|
{
|
||||||
|
|
@ -124,7 +127,6 @@ namespace MWInput
|
||||||
player.setDrawState(DrawState_Nothing);
|
player.setDrawState(DrawState_Nothing);
|
||||||
std::cout << "Player does not have any kind of attack ready now.\n";
|
std::cout << "Player does not have any kind of attack ready now.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void screenshot()
|
void screenshot()
|
||||||
|
|
@ -184,11 +186,13 @@ namespace MWInput
|
||||||
|
|
||||||
void toggleAutoMove()
|
void toggleAutoMove()
|
||||||
{
|
{
|
||||||
|
if (windows.isGuiMode()) return;
|
||||||
player.setAutoMove (!player.getAutoMove());
|
player.setAutoMove (!player.getAutoMove());
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleWalking()
|
void toggleWalking()
|
||||||
{
|
{
|
||||||
|
if (windows.isGuiMode()) return;
|
||||||
player.toggleRunning();
|
player.toggleRunning();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue