13#include "imgui/imgui.h"
14#include "imgui/imgui_internal.h"
88 using InputFrame::InputFrame;
109 void DrawNearSectors(
const matrix4x4f &modelview);
110 void DrawNearSector(
const int sx,
const int sy,
const int sz,
const matrix4x4f &trans);
114 void DrawFarSectors(
const matrix4x4f &modelview);
116 void PutFactionLabels(
const vector3f &secPos);
126 void MouseWheel(
bool up);
138 float m_rotXDefault, m_rotZDefault, m_zoomDefault;
140 float m_rotX, m_rotZ;
141 float m_rotXMovingTo, m_rotZMovingTo;
145 float m_zoomMovingTo;
147 bool m_rotateWithMouseButton =
false;
148 bool m_rotateView =
false;
149 bool m_zoomView =
false;
150 bool m_manualMove =
false;
153 bool m_automaticSystemSelection;
155 bool m_drawUninhabitedLabels;
156 bool m_drawOutRangeLabels;
157 bool m_drawVerticalLines;
161 std::set<const Faction *> m_visibleFactions;
162 std::set<const Faction *> m_hiddenFactions;
164 Uint8 m_detailBoxVisible;
173 std::string m_previousSearch;
175 float m_playerHyperspaceRange;
178 std::vector<SystemPath> m_route;
180 bool m_drawRouteLines;
181 bool m_setupRouteLines;
183 void SetupRouteLines(
const vector3f &playerAbsPos);
184 void GetPlayerPosAndStarSize(
vector3f &playerPosOut,
float ¤tStarSizeOut);
186 std::vector<vector3f> m_farstars;
187 std::vector<Color> m_farstarsColor;
191 bool m_toggledFaction;
200 std::unique_ptr<ImDrawList> m_drawList;
202 std::unique_ptr<Graphics::VertexArray> m_lineVerts;
203 std::unique_ptr<Graphics::VertexArray> m_secLineVerts;
204 std::unique_ptr<Graphics::VertexArray> m_starVerts;
211 std::unique_ptr<Graphics::Drawables::Sphere3D> m_jumpSphere;
226 std::string fontName =
"orbiteer";
229 ImFont *starLabelFont =
nullptr;
230 ImFont *factionHomeFont =
nullptr;
231 ImFont *factionNameFont =
nullptr;
232 ImRect starLabelHoverArea;
233 ImRect factionHomeHoverArea;
234 ImRect factionNameHoverArea;
235 ImU32 highlightColor = IM_COL32(255, 255, 255, 100);
236 ImU32 shadeColor = IM_COL32(25, 51, 82, 200);
240 std::vector<std::unique_ptr<Label>> array;
243 bool m_hideLabels =
false;
nlohmann::json Json
Definition Json.h:8
Definition DeleteEmitter.h:16
Definition Drawables.h:80
Definition Drawables.h:114
Definition PiGuiView.h:11
Definition RefCounted.h:36
Definition SectorView.h:23
void SetHyperspaceTarget(const SystemPath &path)
Definition SectorView.cpp:817
~SectorView() override
Definition SectorView.cpp:38
SectorView::InputBinding InputBindings
void GotoSystem(const SystemPath &path)
Definition SectorView.cpp:838
sigc::signal< void > onHyperspaceTargetChanged
Definition SectorView.h:50
double GetZoomLevel() const
Definition SectorView.cpp:1680
void SetDrawRouteLines(bool value)
Definition SectorView.h:81
void SetLabelsVisibility(bool hideLabels)
Definition SectorView.h:70
const std::string AutoRoute(const SystemPath &start, const SystemPath &target, std::vector< SystemPath > &outRoute) const
Definition SectorView.cpp:1040
void ZoomIn()
Definition SectorView.cpp:1685
void SwitchToPath(const SystemPath &path)
Definition SectorView.cpp:868
vector3f GetCenterSector()
Definition SectorView.cpp:1703
void DrawPiGui() override
Definition SectorView.cpp:738
std::vector< SystemPath > GetRoute()
Definition SectorView.cpp:1035
double GetCenterDistance()
Definition SectorView.cpp:1708
bool MoveRouteItemDown(const std::vector< SystemPath >::size_type element)
Definition SectorView.cpp:996
void SetLabelParams(std::string fontName, int fontSize, float gap, Color highlight, Color shade)
Definition SectorView.cpp:744
void OnSwitchFrom() override
Definition SectorView.cpp:1506
void ResetHyperspaceTarget()
Definition SectorView.cpp:823
void UpdateRouteItem(const std::vector< SystemPath >::size_type element, const SystemPath &path)
Definition SectorView.cpp:1006
void ResetView()
Definition SectorView.cpp:1775
void Update() override
Definition SectorView.cpp:1511
void SaveToJson(Json &jsonObj) override
Definition SectorView.cpp:628
void SetDrawVerticalLines(bool value)
Definition SectorView.h:58
bool MoveRouteItemUp(const std::vector< SystemPath >::size_type element)
Definition SectorView.cpp:986
SystemPath GetCurrent() const
Definition SectorView.h:36
void AddToRoute(const SystemPath &path)
Definition SectorView.cpp:1012
void SetAutomaticSystemSelection(bool value)
Definition SectorView.h:60
vector3f GetPosition() const
Definition SectorView.h:35
void GotoHyperspaceTarget()
Definition SectorView.h:46
void OnSwitchTo() override
Definition SectorView.cpp:1500
const std::set< const Faction * > & GetHiddenFactions()
Definition SectorView.h:63
void GotoSelectedSystem()
Definition SectorView.h:45
void GotoSector(const SystemPath &path)
Definition SectorView.cpp:833
void GotoCurrentSystem()
Definition SectorView.h:44
void SetDrawUninhabitedLabels(bool value)
Definition SectorView.h:57
bool IsCenteredOn(const SystemPath &path)
Definition SectorView.cpp:847
SystemPath GetSelected() const
Definition SectorView.h:37
void ZoomOut()
Definition SectorView.cpp:1694
std::vector< SystemPath > GetNearbyStarSystemsByName(std::string pattern)
Definition SectorView.cpp:1718
void Draw3D() override
Definition SectorView.cpp:658
void SetDrawOutRangeLabels(bool value)
Definition SectorView.h:59
void SetFactionVisible(const Faction *faction, bool visible)
Definition SectorView.cpp:1748
SystemPath GetHyperspaceTarget() const
Definition SectorView.h:39
bool RemoveRouteItem(const std::vector< SystemPath >::size_type element)
Definition SectorView.cpp:1018
void DrawLabels()
Definition SectorView.cpp:754
void ClearRoute()
Definition SectorView.cpp:1029
void SetRotateMode(bool enable)
Definition SectorView.cpp:1766
const std::set< const Faction * > & GetVisibleFactions()
Definition SectorView.h:62
void SetZoomMode(bool enable)
Definition SectorView.cpp:1757
Definition SystemPath.h:13
Definition ConnectionTicket.h:12