I'm still planning on a more ambitious navigation mod, but this is a simple interim change to the existing navigation model that allows you to use the up/down keys to navigate directly to an avatar. This means that if you open your card hand & need to cast a spell that targets the enemy avatar, you can simply hit the up key a couple of times instead of navigating left (through potentially a huge number of cards if you're in a long, drawn out match).
This commit is contained in:
@@ -158,6 +158,23 @@ bool CardSelector::CheckUserInput(JButton key)
|
||||
lasts[oldowner] = SelectorMemory(oldactive);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// active card hasn't changed - that means we're probably at an edge of the battlefield.
|
||||
// check if we're not already a selected avatar - if not, select one depending whether we're going up/down.
|
||||
GuiAvatar* avatar = dynamic_cast<GuiAvatar*>(active);
|
||||
if (!avatar)
|
||||
{
|
||||
if (key == JGE_BTN_DOWN)
|
||||
{
|
||||
active = duel->GetAvatars()->GetSelf();
|
||||
}
|
||||
else if (key == JGE_BTN_UP)
|
||||
{
|
||||
active = duel->GetAvatars()->GetOpponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (active != oldactive) {
|
||||
{ CardView* c = dynamic_cast<CardView*>(oldactive); if (c) c->zoom = 1.0f; }
|
||||
{ CardView* c = dynamic_cast<CardView*>(active); if (c) c->zoom = 1.4f; }
|
||||
|
||||
Reference in New Issue
Block a user