Skip to content

Commit

Permalink
Deleted CursorData.
Browse files Browse the repository at this point in the history
  • Loading branch information
afritz1 committed Jan 1, 2025
1 parent 00ef1b0 commit 3c032e2
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 93 deletions.
2 changes: 0 additions & 2 deletions OpenTESArena/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,6 @@ SET(TES_UI
"${SRC_ROOT}/UI/Button.cpp"
"${SRC_ROOT}/UI/Button.h"
"${SRC_ROOT}/UI/CursorAlignment.h"
"${SRC_ROOT}/UI/CursorData.cpp"
"${SRC_ROOT}/UI/CursorData.h"
"${SRC_ROOT}/UI/FontDefinition.cpp"
"${SRC_ROOT}/UI/FontDefinition.h"
"${SRC_ROOT}/UI/FontLibrary.cpp"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Game/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include "../Stats/CharacterClassLibrary.h"
#include "../Stats/CharacterRaceLibrary.h"
#include "../Time/ClockLibrary.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/GuiUtils.h"
#include "../UI/Surface.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/AutomapPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "../Rendering/ArenaRenderUtils.h"
#include "../Rendering/Renderer.h"
#include "../UI/CursorAlignment.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"
#include "../UI/TextAlignment.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/CharacterEquipmentPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "../Game/Game.h"
#include "../Input/InputActionMapName.h"
#include "../Input/InputActionName.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"

#include "components/debug/Debug.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/CharacterPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "../Input/InputActionMapName.h"
#include "../Input/InputActionName.h"
#include "../Stats/PrimaryAttribute.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"

#include "components/debug/Debug.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/ChooseAttributesPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "../Game/Game.h"
#include "../Input/InputActionName.h"
#include "../Stats/PrimaryAttribute.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"

Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/ChooseClassCreationPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "../Rendering/ArenaRenderUtils.h"
#include "../Rendering/Renderer.h"
#include "../UI/CursorAlignment.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"
#include "../UI/TextAlignment.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/FastTravelSubPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "WorldMapUiModel.h"
#include "WorldMapUiView.h"
#include "../Game/Game.h"
#include "../UI/CursorData.h"

FastTravelSubPanel::FastTravelSubPanel(Game &game)
: Panel(game) { }
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/GameWorldPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "../Rendering/RendererUtils.h"
#include "../Stats/CharacterClassLibrary.h"
#include "../Time/ArenaClockUtils.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../World/MapLogicController.h"
#include "../World/MapType.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/LoadSavePanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "LoadSaveUiView.h"
#include "../Game/Game.h"
#include "../Input/InputActionName.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"

LoadSavePanel::LoadSavePanel(Game &game)
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/MainMenuPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "../Input/InputActionMapName.h"
#include "../Input/InputActionName.h"
#include "../UI/ArenaFontName.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"
#include "../UI/TextBox.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/MessageBoxSubPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "../Math/Rect.h"
#include "../Rendering/Renderer.h"
#include "../UI/CursorAlignment.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"
#include "../UI/TextAlignment.h"
Expand Down
25 changes: 0 additions & 25 deletions OpenTESArena/src/Interface/Panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "../Math/Vector2.h"
#include "../Rendering/Renderer.h"
#include "../UI/CursorAlignment.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"
#include "../UI/TextAlignment.h"
Expand Down Expand Up @@ -113,30 +112,6 @@ bool Panel::isPaused() const
return this->paused;
}

CursorData Panel::getDefaultCursor() const
{
auto &game = this->getGame();
auto &renderer = game.renderer;
auto &textureManager = game.textureManager;

const std::string &paletteFilename = ArenaPaletteName::Default;
const std::optional<PaletteID> paletteID = textureManager.tryGetPaletteID(paletteFilename.c_str());
if (!paletteID.has_value())
{
DebugCrash("Couldn't get palette ID for \"" + paletteFilename + "\".");
}

const std::string &textureFilename = ArenaTextureName::SwordCursor;
const std::optional<TextureBuilderID> textureBuilderID =
textureManager.tryGetTextureBuilderID(textureFilename.c_str());
if (!textureBuilderID.has_value())
{
DebugCrash("Couldn't get texture builder ID for \"" + textureFilename + "\".");
}

return CursorData(*textureBuilderID, *paletteID, CursorAlignment::TopLeft);
}

void Panel::addInputActionListener(const std::string_view actionName, const InputActionCallback &callback)
{
auto &inputManager = this->game.inputManager;
Expand Down
4 changes: 0 additions & 4 deletions OpenTESArena/src/Interface/Panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "components/utilities/BufferView.h"

class Color;
class CursorData;
class FontLibrary;
class Game;
class Rect;
Expand Down Expand Up @@ -57,9 +56,6 @@ class Panel

bool isPaused() const;

// Default cursor used by most panels.
CursorData getDefaultCursor() const;

void addInputActionListener(const std::string_view actionName, const InputActionCallback &callback);
void addMouseButtonChangedListener(const MouseButtonChangedCallback &callback);
void addMouseButtonHeldListener(const MouseButtonHeldCallback &callback);
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/PauseMenuPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "../Game/Game.h"
#include "../Input/InputActionName.h"
#include "../Stats/CharacterClassLibrary.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"
#include "../UI/TextRenderUtils.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/ProvinceMapPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "WorldMapPanel.h"
#include "../Game/Game.h"
#include "../Input/InputActionName.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"
#include "../UI/TextRenderUtils.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/ProvinceSearchSubPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "../Rendering/ArenaRenderUtils.h"
#include "../Rendering/Renderer.h"
#include "../UI/CursorAlignment.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/Surface.h"
#include "../UI/TextAlignment.h"
Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/TextSubPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "../Math/Rect.h"
#include "../Rendering/Renderer.h"
#include "../UI/CursorAlignment.h"
#include "../UI/CursorData.h"
#include "../UI/FontLibrary.h"
#include "../UI/TextBox.h"

Expand Down
1 change: 0 additions & 1 deletion OpenTESArena/src/Interface/WorldMapPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "../Input/InputActionMapName.h"
#include "../Input/InputActionName.h"
#include "../Rendering/ArenaRenderUtils.h"
#include "../UI/CursorData.h"

#include "components/debug/Debug.h"

Expand Down
23 changes: 0 additions & 23 deletions OpenTESArena/src/UI/CursorData.cpp

This file was deleted.

23 changes: 0 additions & 23 deletions OpenTESArena/src/UI/CursorData.h

This file was deleted.

0 comments on commit 3c032e2

Please sign in to comment.