java.lang.Object
polimi.ingsw.am21.codex.view.TUI.utils.CLIGridPosition
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getStringColumn
(int horizontalOffset) Gets the cursor column, considering the visible section PLEASE NOTE: This method does not account for modifiers offsetsint
getStringRow
(int verticalOffset) Gets the cursor row, considering the visible sectionint
getTranslatedColumn
(int horizontalOffset) Gets the grid column, considering the visible sectionint
getTranslatedRow
(int verticalOffset) Gets the grid row, considering the visible section
-
Field Details
-
HEIGHT_OFFEST
public static final int HEIGHT_OFFEST- See Also:
-
WIDTH_OFFSET
public static final int WIDTH_OFFSET- See Also:
-
-
Constructor Details
-
CLIGridPosition
- Parameters:
modelPosition
- The position of the card in the model
-
-
Method Details
-
getTranslatedRow
public int getTranslatedRow(int verticalOffset) Gets the grid row, considering the visible section- Parameters:
verticalOffset
- The vertical offset of the grid (+1 shows the page under, -1 shows the page above)
-
getTranslatedColumn
public int getTranslatedColumn(int horizontalOffset) Gets the grid column, considering the visible section- Parameters:
horizontalOffset
- The horizontal offset of the grid (+1 shows the page to the right, -1 shows the page to the left)
-
getStringRow
public int getStringRow(int verticalOffset) Gets the cursor row, considering the visible section- Parameters:
verticalOffset
- The vertical offset of the grid (+1 shows the page under, -1 shows the page above)
-
getStringColumn
public int getStringColumn(int horizontalOffset) Gets the cursor column, considering the visible section PLEASE NOTE: This method does not account for modifiers offsets- Parameters:
horizontalOffset
- The horizontal offset of the grid (+1 shows the page to the right, -1 shows the page to the left)
-