Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
clintbellanger committed Oct 7, 2012
2 parents 7e9f928 + af15d2d commit 16098bd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mods/default/languages/engine.gl.po
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-21 15:57+0300\n"
"PO-Revision-Date: 2012-09-22 14:10+0200\n"
"PO-Revision-Date: 2012-10-06 13:42+0200\n"
"Last-Translator: Adrián Chaves Fernández <adriyetichaves@gmail.com>\n"
"Language-Team: Galician <kde-i18n-doc@kde.org>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -419,15 +419,15 @@ msgstr "Suprimir"

#: ../../../src/InputState.cpp:81
msgid "lmb"
msgstr "Botón esquerdo"
msgstr "B.E."

#: ../../../src/InputState.cpp:82
msgid "mmb"
msgstr "Botón central"
msgstr "B.C."

#: ../../../src/InputState.cpp:83
msgid "rmb"
msgstr "Botón dereito"
msgstr "B.D."

#: ../../../src/InputState.cpp:84
msgid "wheel up"
Expand All @@ -439,11 +439,11 @@ msgstr "Roda abaixo"

#: ../../../src/InputState.cpp:86
msgid "mbx1"
msgstr "Botón 1"
msgstr "B. 1"

#: ../../../src/InputState.cpp:87
msgid "mbx2"
msgstr "Botón 2"
msgstr "B. 2"

#: ../../../src/ItemManager.cpp:512
#, c-format
Expand Down
10 changes: 10 additions & 0 deletions src/MenuActionBar.cpp
Expand Up @@ -51,6 +51,8 @@ MenuActionBar::MenuActionBar(PowerManager *_powers, StatBlock *_hero, SDL_Surfac
src.h = ICON_SIZE_SMALL;
drag_prev_slot = -1;
default_M1 = 0;
last_mouse.x = 0;
last_mouse.y = 0;

clear();

Expand Down Expand Up @@ -441,6 +443,13 @@ void MenuActionBar::drop(Point mouse, int power_index, bool rearranging) {
}
}

/**
* Return the power to the last clicked on slot
*/
void MenuActionBar::actionReturn(int power_index) {
drop(last_mouse, power_index, 0);
}

/**
* CTRL-click a hotkey to clear it
*/
Expand Down Expand Up @@ -500,6 +509,7 @@ int MenuActionBar::checkDrag(Point mouse) {
drag_prev_slot = i;
power_index = hotkeys[i];
hotkeys[i] = 0;
last_mouse = mouse;
return power_index;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/MenuActionBar.h
Expand Up @@ -58,6 +58,7 @@ class MenuActionBar : public Menu {

WidgetLabel *labels[16];
int default_M1;
Point last_mouse;

public:

Expand All @@ -72,6 +73,7 @@ class MenuActionBar : public Menu {
int checkDrag(Point mouse);
void checkMenu(Point mouse, bool &menu_c, bool &menu_i, bool &menu_p, bool &menu_l);
void drop(Point mouse, int power_index, bool rearranging);
void actionReturn(int power_index);
void remove(Point mouse);
void set(int power_id[12]);
void clear();
Expand Down
8 changes: 8 additions & 0 deletions src/MenuManager.cpp
Expand Up @@ -628,6 +628,14 @@ void MenuManager::logic() {
dragging = false;
}

} else {
if (drag_src == DRAG_SRC_VENDOR) vendor->itemReturn(drag_stack);
else if (drag_src == DRAG_SRC_STASH) stash->itemReturn(drag_stack);
else if (drag_src == DRAG_SRC_INVENTORY) inv->itemReturn(drag_stack);
else if (drag_src == DRAG_SRC_ACTIONBAR) act->actionReturn(drag_power);
drag_src = -1;
dragging = false;
closeAll(true);
}

// handle equipment changes affecting hero stats
Expand Down

0 comments on commit 16098bd

Please sign in to comment.