diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-14 02:54:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-14 02:54:44 +0300 |
commit | 84499779fcf0c8b5392a88f1c9311775e692ebef (patch) | |
tree | f390326a50eed73d8f8c62107979a4d81093ce52 /src/gui/widgets/itemcontainer.cpp | |
parent | 4ee30f47b491de0ace9b692072fd286cf12c7828 (diff) | |
download | manaplus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.gz manaplus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.bz2 manaplus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.xz manaplus-84499779fcf0c8b5392a88f1c9311775e692ebef.zip |
Improve a bit some gui controls speed.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 08c26d152..19f35ff02 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -226,11 +226,13 @@ void ItemContainer::draw(gcn::Graphics *graphics) for (int j = 0; j < mGridRows; j++) { + const int intY0 = j * BOX_HEIGHT; + int itemIndex = j * mGridColumns - 1; for (int i = 0; i < mGridColumns; i++) { int itemX = i * BOX_WIDTH; - int itemY = j * BOX_HEIGHT; - const int itemIndex = j * mGridColumns + i; + int itemY = intY0; + itemIndex ++; if (mShowMatrix[itemIndex] < 0) continue; |