Browse Source

Apply MethodCase config to Rectangle::Contains

Also included Circle and VirtualButton classes due to the shared use.
pull/4779/head
ephphatha 4 years ago committed by Anders Jenbo
parent
commit
c68fcf3cb1
  1. 6
      Source/control.cpp
  2. 6
      Source/controls/plrctrls.cpp
  3. 12
      Source/controls/touch/event_handlers.cpp
  4. 2
      Source/controls/touch/gamepad.cpp
  5. 10
      Source/controls/touch/gamepad.h
  6. 2
      Source/controls/touch/renderers.cpp
  7. 12
      Source/cursor.cpp
  8. 16
      Source/diablo.cpp
  9. 2
      Source/engine/circle.hpp
  10. 2
      Source/engine/rectangle.hpp
  11. 2
      Source/items.cpp
  12. 4
      Source/levels/drlg_l2.cpp
  13. 4
      Source/levels/gendung.cpp
  14. 2
      Source/levels/trigs.cpp
  15. 4
      Source/panels/spell_book.cpp
  16. 6
      Source/player.cpp
  17. 6
      Source/qol/itemlabels.cpp
  18. 10
      Source/qol/stash.cpp
  19. 2
      Source/quests.cpp

6
Source/control.cpp

@ -400,7 +400,7 @@ bool IsLevelUpButtonVisible()
if (stextflag != STORE_NONE || IsStashOpen) { if (stextflag != STORE_NONE || IsStashOpen) {
return false; return false;
} }
if (QuestLogIsOpen && GetLeftPanel().Contains(GetMainPanel().position + Displacement { 0, -74 })) { if (QuestLogIsOpen && GetLeftPanel().contains(GetMainPanel().position + Displacement { 0, -74 })) {
return false; return false;
} }
@ -975,7 +975,7 @@ void CheckChrBtns()
auto buttonId = static_cast<size_t>(attribute); auto buttonId = static_cast<size_t>(attribute);
Rectangle button = ChrBtnsRect[buttonId]; Rectangle button = ChrBtnsRect[buttonId];
button.position = GetPanelPosition(UiPanels::Character, button.position); button.position = GetPanelPosition(UiPanels::Character, button.position);
if (button.Contains(MousePosition)) { if (button.contains(MousePosition)) {
chrbtn[buttonId] = true; chrbtn[buttonId] = true;
chrbtnactive = true; chrbtnactive = true;
} }
@ -993,7 +993,7 @@ void ReleaseChrBtns(bool addAllStatPoints)
chrbtn[buttonId] = false; chrbtn[buttonId] = false;
Rectangle button = ChrBtnsRect[buttonId]; Rectangle button = ChrBtnsRect[buttonId];
button.position = GetPanelPosition(UiPanels::Character, button.position); button.position = GetPanelPosition(UiPanels::Character, button.position);
if (button.Contains(MousePosition)) { if (button.contains(MousePosition)) {
Player &myPlayer = *MyPlayer; Player &myPlayer = *MyPlayer;
int statPointsToAdd = 1; int statPointsToAdd = 1;
if (addAllStatPoints) if (addAllStatPoints)

6
Source/controls/plrctrls.cpp

@ -542,7 +542,7 @@ void AttrIncBtnSnap(AxisDirection dir)
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
button = ChrBtnsRect[i]; button = ChrBtnsRect[i];
button.position = GetPanelPosition(UiPanels::Character, button.position); button.position = GetPanelPosition(UiPanels::Character, button.position);
if (button.Contains(MousePosition)) { if (button.contains(MousePosition)) {
slot = i; slot = i;
break; break;
} }
@ -1689,7 +1689,7 @@ void PerformPrimaryAction()
if (pcurs > CURSOR_HAND && pcurs < CURSOR_FIRSTITEM) { if (pcurs > CURSOR_HAND && pcurs < CURSOR_FIRSTITEM) {
TryIconCurs(); TryIconCurs();
NewCursor(CURSOR_HAND); NewCursor(CURSOR_HAND);
} else if (GetRightPanel().Contains(MousePosition) || GetMainPanel().Contains(MousePosition)) { } else if (GetRightPanel().contains(MousePosition) || GetMainPanel().contains(MousePosition)) {
int inventorySlot = (Slot >= 0) ? Slot : FindClosestInventorySlot(MousePosition); int inventorySlot = (Slot >= 0) ? Slot : FindClosestInventorySlot(MousePosition);
const Size cursorSizeInCells = MyPlayer->HoldItem.isEmpty() ? Size { 1, 1 } : GetInventorySize(MyPlayer->HoldItem); const Size cursorSizeInCells = MyPlayer->HoldItem.isEmpty() ? Size { 1, 1 } : GetInventorySize(MyPlayer->HoldItem);
@ -1725,7 +1725,7 @@ void PerformPrimaryAction()
Slot = jumpSlot; Slot = jumpSlot;
SetCursorPos(mousePos); SetCursorPos(mousePos);
} }
} else if (IsStashOpen && GetLeftPanel().Contains(MousePosition)) { } else if (IsStashOpen && GetLeftPanel().contains(MousePosition)) {
Point stashSlot = (ActiveStashSlot != InvalidStashPoint) ? ActiveStashSlot : FindClosestStashSlot(MousePosition); Point stashSlot = (ActiveStashSlot != InvalidStashPoint) ? ActiveStashSlot : FindClosestStashSlot(MousePosition);
const Size cursorSizeInCells = MyPlayer->HoldItem.isEmpty() ? Size { 1, 1 } : GetInventorySize(MyPlayer->HoldItem); const Size cursorSizeInCells = MyPlayer->HoldItem.isEmpty() ? Size { 1, 1 } : GetInventorySize(MyPlayer->HoldItem);

12
Source/controls/touch/event_handlers.cpp

@ -31,9 +31,9 @@ void SimulateMouseMovement(const SDL_Event &event)
{ {
Point position = ScaleToScreenCoordinates(event.tfinger.x, event.tfinger.y); Point position = ScaleToScreenCoordinates(event.tfinger.x, event.tfinger.y);
bool isInMainPanel = GetMainPanel().Contains(position); bool isInMainPanel = GetMainPanel().contains(position);
bool isInLeftPanel = GetLeftPanel().Contains(position); bool isInLeftPanel = GetLeftPanel().contains(position);
bool isInRightPanel = GetRightPanel().Contains(position); bool isInRightPanel = GetRightPanel().contains(position);
if (IsStashOpen) { if (IsStashOpen) {
if (!spselflag && !isInMainPanel && !isInLeftPanel && !isInRightPanel) if (!spselflag && !isInMainPanel && !isInLeftPanel && !isInRightPanel)
return; return;
@ -234,7 +234,7 @@ bool VirtualDirectionPadEventHandler::HandleFingerDown(const SDL_TouchFingerEven
float y = event.y; float y = event.y;
Point touchCoordinates = ScaleToScreenCoordinates(x, y); Point touchCoordinates = ScaleToScreenCoordinates(x, y);
if (!virtualDirectionPad->area.Contains(touchCoordinates)) if (!virtualDirectionPad->area.contains(touchCoordinates))
return false; return false;
virtualDirectionPad->UpdatePosition(touchCoordinates); virtualDirectionPad->UpdatePosition(touchCoordinates);
@ -301,7 +301,7 @@ bool VirtualButtonEventHandler::HandleFingerDown(const SDL_TouchFingerEvent &eve
float y = event.y; float y = event.y;
Point touchCoordinates = ScaleToScreenCoordinates(x, y); Point touchCoordinates = ScaleToScreenCoordinates(x, y);
if (!virtualButton->Contains(touchCoordinates)) if (!virtualButton->contains(touchCoordinates))
return false; return false;
if (toggles) if (toggles)
@ -343,7 +343,7 @@ bool VirtualButtonEventHandler::HandleFingerMotion(const SDL_TouchFingerEvent &e
Point touchCoordinates = ScaleToScreenCoordinates(x, y); Point touchCoordinates = ScaleToScreenCoordinates(x, y);
bool wasHeld = virtualButton->isHeld; bool wasHeld = virtualButton->isHeld;
virtualButton->isHeld = virtualButton->Contains(touchCoordinates); virtualButton->isHeld = virtualButton->contains(touchCoordinates);
virtualButton->didStateChange = virtualButton->isHeld != wasHeld; virtualButton->didStateChange = virtualButton->isHeld != wasHeld;
return true; return true;

2
Source/controls/touch/gamepad.cpp

@ -219,7 +219,7 @@ void VirtualDirectionPad::UpdatePosition(Point touchCoordinates)
return; return;
} }
if (!area.Contains(position)) { if (!area.contains(position)) {
int x = diff.deltaX; int x = diff.deltaX;
int y = diff.deltaY; int y = diff.deltaY;
double dist = sqrt(x * x + y * y); double dist = sqrt(x * x + y * y);

10
Source/controls/touch/gamepad.h

@ -37,7 +37,7 @@ struct VirtualButton {
{ {
} }
virtual bool Contains(Point point) = 0; virtual bool contains(Point point) = 0;
void Deactivate(); void Deactivate();
}; };
@ -49,9 +49,9 @@ struct VirtualMenuButton : VirtualButton {
{ {
} }
bool Contains(Point point) override bool contains(Point point) override
{ {
return area.Contains(point); return area.contains(point);
} }
}; };
@ -63,9 +63,9 @@ struct VirtualPadButton : VirtualButton {
{ {
} }
bool Contains(Point point) override bool contains(Point point) override
{ {
return area.Contains(point); return area.contains(point);
} }
}; };

2
Source/controls/touch/renderers.cpp

@ -169,7 +169,7 @@ bool InteractsWithCharButton(Point point)
auto buttonId = static_cast<size_t>(attribute); auto buttonId = static_cast<size_t>(attribute);
Rectangle button = ChrBtnsRect[buttonId]; Rectangle button = ChrBtnsRect[buttonId];
button.position = GetPanelPosition(UiPanels::Character, button.position); button.position = GetPanelPosition(UiPanels::Character, button.position);
if (button.Contains(point)) { if (button.contains(point)) {
return true; return true;
} }
} }

12
Source/cursor.cpp

@ -265,7 +265,7 @@ void CheckCursMove()
} }
} }
const Rectangle &mainPanel = GetMainPanel(); const Rectangle &mainPanel = GetMainPanel();
if (mainPanel.Contains(MousePosition) && track_isscrolling()) { if (mainPanel.contains(MousePosition) && track_isscrolling()) {
sy = mainPanel.position.y - 1; sy = mainPanel.position.y - 1;
} }
@ -379,24 +379,24 @@ void CheckCursMove()
cursPosition = { mx, my }; cursPosition = { mx, my };
return; return;
} }
if (mainPanel.Contains(MousePosition)) { if (mainPanel.contains(MousePosition)) {
CheckPanelInfo(); CheckPanelInfo();
return; return;
} }
if (DoomFlag) { if (DoomFlag) {
return; return;
} }
if (invflag && GetRightPanel().Contains(MousePosition)) { if (invflag && GetRightPanel().contains(MousePosition)) {
pcursinvitem = CheckInvHLight(); pcursinvitem = CheckInvHLight();
return; return;
} }
if (IsStashOpen && GetLeftPanel().Contains(MousePosition)) { if (IsStashOpen && GetLeftPanel().contains(MousePosition)) {
pcursstashitem = CheckStashHLight(MousePosition); pcursstashitem = CheckStashHLight(MousePosition);
} }
if (sbookflag && GetRightPanel().Contains(MousePosition)) { if (sbookflag && GetRightPanel().contains(MousePosition)) {
return; return;
} }
if (IsLeftPanelOpen() && GetLeftPanel().Contains(MousePosition)) { if (IsLeftPanelOpen() && GetLeftPanel().contains(MousePosition)) {
return; return;
} }

16
Source/diablo.cpp

@ -218,7 +218,7 @@ void LeftMouseCmd(bool bShift)
{ {
bool bNear; bool bNear;
assert(!GetMainPanel().Contains(MousePosition)); assert(!GetMainPanel().contains(MousePosition));
if (leveltype == DTYPE_TOWN) { if (leveltype == DTYPE_TOWN) {
CloseGoldWithdraw(); CloseGoldWithdraw();
@ -322,23 +322,23 @@ void LeftMouseDown(int wParam)
bool isShiftHeld = (wParam & DVL_MK_SHIFT) != 0; bool isShiftHeld = (wParam & DVL_MK_SHIFT) != 0;
bool isCtrlHeld = (wParam & DVL_MK_CTRL) != 0; bool isCtrlHeld = (wParam & DVL_MK_CTRL) != 0;
if (!GetMainPanel().Contains(MousePosition)) { if (!GetMainPanel().contains(MousePosition)) {
if (!gmenu_is_active() && !TryIconCurs()) { if (!gmenu_is_active() && !TryIconCurs()) {
if (QuestLogIsOpen && GetLeftPanel().Contains(MousePosition)) { if (QuestLogIsOpen && GetLeftPanel().contains(MousePosition)) {
QuestlogESC(); QuestlogESC();
} else if (qtextflag) { } else if (qtextflag) {
qtextflag = false; qtextflag = false;
stream_stop(); stream_stop();
} else if (chrflag && GetLeftPanel().Contains(MousePosition)) { } else if (chrflag && GetLeftPanel().contains(MousePosition)) {
CheckChrBtns(); CheckChrBtns();
} else if (invflag && GetRightPanel().Contains(MousePosition)) { } else if (invflag && GetRightPanel().contains(MousePosition)) {
if (!dropGoldFlag) if (!dropGoldFlag)
CheckInvItem(isShiftHeld, isCtrlHeld); CheckInvItem(isShiftHeld, isCtrlHeld);
} else if (IsStashOpen && GetLeftPanel().Contains(MousePosition)) { } else if (IsStashOpen && GetLeftPanel().contains(MousePosition)) {
if (!IsWithdrawGoldOpen) if (!IsWithdrawGoldOpen)
CheckStashItem(MousePosition, isShiftHeld, isCtrlHeld); CheckStashItem(MousePosition, isShiftHeld, isCtrlHeld);
CheckStashButtonPress(MousePosition); CheckStashButtonPress(MousePosition);
} else if (sbookflag && GetRightPanel().Contains(MousePosition)) { } else if (sbookflag && GetRightPanel().contains(MousePosition)) {
CheckSBook(); CheckSBook();
} else if (!MyPlayer->HoldItem.isEmpty()) { } else if (!MyPlayer->HoldItem.isEmpty()) {
Point currentPosition = MyPlayer->position.tile; Point currentPosition = MyPlayer->position.tile;
@ -396,7 +396,7 @@ void RightMouseDown(bool isShiftHeld)
SetSpell(); SetSpell();
return; return;
} }
if (sbookflag && GetRightPanel().Contains(MousePosition)) if (sbookflag && GetRightPanel().contains(MousePosition))
return; return;
if (TryIconCurs()) if (TryIconCurs())
return; return;

2
Source/engine/circle.hpp

@ -9,7 +9,7 @@ struct Circle {
Point position; Point position;
int radius; int radius;
constexpr bool Contains(Point point) const constexpr bool contains(Point point) const
{ {
Displacement diff = point - position; Displacement diff = point - position;
int x = diff.deltaX; int x = diff.deltaX;

2
Source/engine/rectangle.hpp

@ -31,7 +31,7 @@ struct Rectangle {
{ {
} }
constexpr bool Contains(Point point) const constexpr bool contains(Point point) const
{ {
return point.x >= this->position.x return point.x >= this->position.x
&& point.x < (this->position.x + this->size.width) && point.x < (this->position.x + this->size.width)

2
Source/items.cpp

@ -3740,7 +3740,7 @@ bool DoOil(Player &player, int cii)
void DrawUniqueInfo(const Surface &out) void DrawUniqueInfo(const Surface &out)
{ {
const Point position = GetRightPanel().position - Displacement { SidePanelSize.width, 0 }; const Point position = GetRightPanel().position - Displacement { SidePanelSize.width, 0 };
if (IsLeftPanelOpen() && GetLeftPanel().Contains(position)) { if (IsLeftPanelOpen() && GetLeftPanel().contains(position)) {
return; return;
} }

4
Source/levels/drlg_l2.cpp

@ -1575,7 +1575,7 @@ void PlaceMiniSetRandom(const Miniset &miniset, int rndper)
for (int sy = 0; sy < DMAXY - sh; sy++) { for (int sy = 0; sy < DMAXY - sh; sy++) {
for (int sx = 0; sx < DMAXX - sw; sx++) { for (int sx = 0; sx < DMAXX - sw; sx++) {
if (SetPieceRoom.Contains({ sx, sy })) if (SetPieceRoom.contains({ sx, sy }))
continue; continue;
if (!miniset.matches({ sx, sy })) if (!miniset.matches({ sx, sy }))
continue; continue;
@ -2099,7 +2099,7 @@ void Substitution()
{ {
for (int y = 0; y < DMAXY; y++) { for (int y = 0; y < DMAXY; y++) {
for (int x = 0; x < DMAXX; x++) { for (int x = 0; x < DMAXX; x++) {
if (SetPieceRoom.Contains({ x, y })) if (SetPieceRoom.contains({ x, y }))
continue; continue;
if (GenerateRnd(4) != 0) if (GenerateRnd(4) != 0)
continue; continue;

4
Source/levels/gendung.cpp

@ -613,7 +613,7 @@ std::optional<Point> PlaceMiniSet(const Miniset &miniset, int tries, bool drlg1Q
} }
} }
if (SetPieceRoom.Contains(position)) if (SetPieceRoom.contains(position))
continue; continue;
if (!miniset.matches(position)) if (!miniset.matches(position))
continue; continue;
@ -748,7 +748,7 @@ void DRLG_LPass3(int lv)
bool IsNearThemeRoom(Point testPosition) bool IsNearThemeRoom(Point testPosition)
{ {
for (int i = 0; i < themeCount; i++) { for (int i = 0; i < themeCount; i++) {
if (Rectangle(themeLoc[i].room.position - Displacement { 2 }, themeLoc[i].room.size + 5).Contains(testPosition)) if (Rectangle(themeLoc[i].room.position - Displacement { 2 }, themeLoc[i].room.size + 5).contains(testPosition))
return true; return true;
} }

2
Source/levels/trigs.cpp

@ -762,7 +762,7 @@ void CheckTrigForce()
{ {
trigflag = false; trigflag = false;
if (ControlMode == ControlTypes::KeyboardAndMouse && GetMainPanel().Contains(MousePosition)) { if (ControlMode == ControlTypes::KeyboardAndMouse && GetMainPanel().contains(MousePosition)) {
return; return;
} }

4
Source/panels/spell_book.cpp

@ -194,7 +194,7 @@ void CheckSBook()
// enough to the height of the space given to spell descriptions that we can reuse that value and subtract the // enough to the height of the space given to spell descriptions that we can reuse that value and subtract the
// padding from the end of the area. // padding from the end of the area.
Rectangle iconArea = { GetPanelPosition(UiPanels::Spell, { 11, 18 }), Size { 37, SpellBookDescription.height * 7 - 5 } }; Rectangle iconArea = { GetPanelPosition(UiPanels::Spell, { 11, 18 }), Size { 37, SpellBookDescription.height * 7 - 5 } };
if (iconArea.Contains(MousePosition)) { if (iconArea.contains(MousePosition)) {
spell_id sn = SpellPages[sbooktab][(MousePosition.y - iconArea.position.y) / SpellBookDescription.height]; spell_id sn = SpellPages[sbooktab][(MousePosition.y - iconArea.position.y) / SpellBookDescription.height];
Player &player = *MyPlayer; Player &player = *MyPlayer;
uint64_t spl = player._pMemSpells | player._pISpells | player._pAblSpells; uint64_t spl = player._pMemSpells | player._pISpells | player._pAblSpells;
@ -219,7 +219,7 @@ void CheckSBook()
const int TabWidth = gbIsHellfire ? 61 : 76; const int TabWidth = gbIsHellfire ? 61 : 76;
// Tabs are drawn in a row near the bottom of the panel // Tabs are drawn in a row near the bottom of the panel
Rectangle tabArea = { GetPanelPosition(UiPanels::Spell, { 7, 320 }), Size { 305, 29 } }; Rectangle tabArea = { GetPanelPosition(UiPanels::Spell, { 7, 320 }), Size { 305, 29 } };
if (tabArea.Contains(MousePosition)) { if (tabArea.contains(MousePosition)) {
int hitColumn = MousePosition.x - tabArea.position.x; int hitColumn = MousePosition.x - tabArea.position.x;
// Clicking on the gutter currently activates tab 3. Could make it do nothing by checking for == here and return early. // Clicking on the gutter currently activates tab 3. Could make it do nothing by checking for == here and return early.
if (!gbIsHellfire && hitColumn > TabWidth * 2) { if (!gbIsHellfire && hitColumn > TabWidth * 2) {

6
Source/player.cpp

@ -3528,12 +3528,12 @@ void CheckPlrSpell(bool isShiftHeld, spell_id spellID, spell_type spellType)
if (pcurs != CURSOR_HAND) if (pcurs != CURSOR_HAND)
return; return;
if (GetMainPanel().Contains(MousePosition)) // inside main panel if (GetMainPanel().contains(MousePosition)) // inside main panel
return; return;
if ( if (
(IsLeftPanelOpen() && GetLeftPanel().Contains(MousePosition)) // inside left panel (IsLeftPanelOpen() && GetLeftPanel().contains(MousePosition)) // inside left panel
|| (IsRightPanelOpen() && GetRightPanel().Contains(MousePosition)) // inside right panel || (IsRightPanelOpen() && GetRightPanel().contains(MousePosition)) // inside right panel
) { ) {
if (spellID != SPL_HEAL if (spellID != SPL_HEAL
&& spellID != SPL_IDENTIFY && spellID != SPL_IDENTIFY

6
Source/qol/itemlabels.cpp

@ -96,11 +96,11 @@ void AddItemToLabelQueue(int id, int x, int y)
bool IsMouseOverGameArea() bool IsMouseOverGameArea()
{ {
if ((IsRightPanelOpen()) && GetRightPanel().Contains(MousePosition)) if ((IsRightPanelOpen()) && GetRightPanel().contains(MousePosition))
return false; return false;
if ((IsLeftPanelOpen()) && GetLeftPanel().Contains(MousePosition)) if ((IsLeftPanelOpen()) && GetLeftPanel().contains(MousePosition))
return false; return false;
if (GetMainPanel().Contains(MousePosition)) if (GetMainPanel().contains(MousePosition))
return false; return false;
return true; return true;

10
Source/qol/stash.cpp

@ -70,7 +70,7 @@ Point FindSlotUnderCursor(Point cursorPosition)
InventorySlotSizeInPixels + 1 InventorySlotSizeInPixels + 1
}; };
if (cell.Contains(cursorPosition)) { if (cell.contains(cursorPosition)) {
return point; return point;
} }
} }
@ -174,7 +174,7 @@ void CheckStashCut(Point cursorPosition, bool automaticMove)
}; };
// check which inventory rectangle the mouse is in, if any // check which inventory rectangle the mouse is in, if any
if (cell.Contains(cursorPosition)) { if (cell.contains(cursorPosition)) {
slot = point; slot = point;
break; break;
} }
@ -296,7 +296,7 @@ void CheckStashButtonRelease(Point mousePosition)
Rectangle stashButton = StashButtonRect[StashButtonPressed]; Rectangle stashButton = StashButtonRect[StashButtonPressed];
stashButton.position = GetPanelPosition(UiPanels::Stash, stashButton.position); stashButton.position = GetPanelPosition(UiPanels::Stash, stashButton.position);
if (stashButton.Contains(mousePosition)) { if (stashButton.contains(mousePosition)) {
switch (StashButtonPressed) { switch (StashButtonPressed) {
case 0: case 0:
Stash.PreviousPage(10); Stash.PreviousPage(10);
@ -326,7 +326,7 @@ void CheckStashButtonPress(Point mousePosition)
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
stashButton = StashButtonRect[i]; stashButton = StashButtonRect[i];
stashButton.position = GetPanelPosition(UiPanels::Stash, stashButton.position); stashButton.position = GetPanelPosition(UiPanels::Stash, stashButton.position);
if (stashButton.Contains(mousePosition)) { if (stashButton.contains(mousePosition)) {
StashButtonPressed = i; StashButtonPressed = i;
return; return;
} }
@ -404,7 +404,7 @@ uint16_t CheckStashHLight(Point mousePosition)
InventorySlotSizeInPixels + 1 InventorySlotSizeInPixels + 1
}; };
if (cell.Contains({ mousePosition })) { if (cell.contains(mousePosition)) {
slot = point; slot = point;
break; break;
} }

2
Source/quests.cpp

@ -198,7 +198,7 @@ int QuestLogMouseToEntry()
{ {
Rectangle innerArea = InnerPanel; Rectangle innerArea = InnerPanel;
innerArea.position += Displacement(GetLeftPanel().position.x, GetLeftPanel().position.y); innerArea.position += Displacement(GetLeftPanel().position.x, GetLeftPanel().position.y);
if (!innerArea.Contains(MousePosition) || (EncounteredQuestCount == 0)) if (!innerArea.contains(MousePosition) || (EncounteredQuestCount == 0))
return -1; return -1;
int y = MousePosition.y - innerArea.position.y; int y = MousePosition.y - innerArea.position.y;
for (int i = 0; i < FirstFinishedQuest; i++) { for (int i = 0; i < FirstFinishedQuest; i++) {

Loading…
Cancel
Save