From 5e198c673009cf8ca9d92cf59848999bc96bbc37 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 22:50:58 +0200 Subject: Basic style fixes. --- src/UI/SlotArea.cpp | 6 +++--- src/UI/Window.cpp | 2 +- src/UI/Window.h | 6 +++--- src/UI/WindowOwner.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/UI') diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 0a9502491..21b6ed0c8 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -36,8 +36,8 @@ cSlotArea::cSlotArea(int a_NumSlots, cWindow & a_ParentWindow) : void cSlotArea::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) { /* - LOGD("Slot area with %d slots clicked at slot number %d, clicked item %s, slot item %s", - GetNumSlots(), a_SlotNum, + LOGD("Slot area with %d slots clicked at slot number %d, clicked item %s, slot item %s", + GetNumSlots(), a_SlotNum, ItemToFullString(a_ClickedItem).c_str(), ItemToFullString(*GetSlot(a_SlotNum, a_Player)).c_str() ); @@ -1280,7 +1280,7 @@ void cSlotAreaEnchanting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickActio } case caLeftClick: - { + { // Left-clicked if (DraggingItem.IsEmpty()) { diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp index b550068b1..6606beda2 100644 --- a/src/UI/Window.cpp +++ b/src/UI/Window.cpp @@ -164,7 +164,7 @@ void cWindow::GetSlots(cPlayer & a_Player, cItems & a_Slots) const void cWindow::Clicked( - cPlayer & a_Player, + cPlayer & a_Player, int a_WindowID, short a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem ) diff --git a/src/UI/Window.h b/src/UI/Window.h index b170a9d78..1872b2c20 100644 --- a/src/UI/Window.h +++ b/src/UI/Window.h @@ -36,12 +36,12 @@ typedef std::vector cSlotAreas; // tolua_begin -/** +/** Represents a UI window. Each window has a list of players that are currently using it When there's no player using a window, it is destroyed. -A window consists of several areas of slots with similar functionality - for example the crafting grid area, or +A window consists of several areas of slots with similar functionality - for example the crafting grid area, or the inventory area. Each area knows what its slots are (GetSlot() function) and can handle mouse clicks. The window acts only as a top-level container for those areas, redirecting the click events to the correct areas. Inventory painting, introduced in 1.5, is handled by the window, too @@ -109,7 +109,7 @@ public: /// Handles a click event from a player void Clicked( - cPlayer & a_Player, int a_WindowID, + cPlayer & a_Player, int a_WindowID, short a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem ); diff --git a/src/UI/WindowOwner.h b/src/UI/WindowOwner.h index e3c73edc4..7a7941e37 100644 --- a/src/UI/WindowOwner.h +++ b/src/UI/WindowOwner.h @@ -6,7 +6,7 @@ #include "Window.h" /* -Being a descendant of cWindowOwner means that the class can own one window. That window can be +Being a descendant of cWindowOwner means that the class can own one window. That window can be queried, opened by other players, closed by players and finally destroyed. Also, a cWindowOwner can be queried for the block coords where the window is displayed. That will be used for entities / players in motion to close their windows when they get too far away from the window "source". -- cgit v1.2.3