diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
commit | 6352e8e3196f78388b6c771073f9e03eaa612673 (patch) | |
tree | e23772f79a7fbc41bc9108951e9e136857484bf4 /source/frontend/StarCodexInterface.hpp | |
parent | 6741a057e5639280d85d0f88ba26f000baa58f61 (diff) |
everything everywhere
all at once
Diffstat (limited to 'source/frontend/StarCodexInterface.hpp')
-rw-r--r-- | source/frontend/StarCodexInterface.hpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/source/frontend/StarCodexInterface.hpp b/source/frontend/StarCodexInterface.hpp new file mode 100644 index 0000000..0f4b549 --- /dev/null +++ b/source/frontend/StarCodexInterface.hpp @@ -0,0 +1,67 @@ +#ifndef STAR_CODEX_INTERFACE_HPP +#define STAR_CODEX_INTERFACE_HPP + +#include "StarPane.hpp" +#include "StarPlayerCodexes.hpp" + +namespace Star { + +STAR_CLASS(Player); +STAR_CLASS(JsonRpcInterface); +STAR_CLASS(StackWidget); +STAR_CLASS(ListWidget); +STAR_CLASS(LabelWidget); +STAR_CLASS(ButtonWidget); +STAR_CLASS(ButtonGroupWidget); +STAR_CLASS(Codex); + +STAR_CLASS(CodexInterface); +class CodexInterface : public Pane { +public: + CodexInterface(PlayerPtr player); + + virtual void show() override; + virtual void tick() override; + + void showTitles(); + void showSelectedContents(); + void showContents(String const& codexId); + void showContents(CodexConstPtr codex); + + void forwardPage(); + void backwardPage(); + + bool showNewCodex(); + +private: + void updateSpecies(); + void setupPageText(); + void updateCodexList(); + + StackWidgetPtr m_stack; + + ListWidgetPtr m_bookList; + + CodexConstPtr m_currentCodex; + size_t m_currentPage; + + ButtonGroupWidgetPtr m_speciesTabs; + LabelWidgetPtr m_selectLabel; + LabelWidgetPtr m_titleLabel; + LabelWidgetPtr m_pageContent; + LabelWidgetPtr m_pageLabelWidget; + LabelWidgetPtr m_pageNumberWidget; + ButtonWidgetPtr m_prevPageButton; + ButtonWidgetPtr m_nextPageButton; + ButtonWidgetPtr m_backButton; + + String m_selectText; + String m_currentSpecies; + + PlayerPtr m_player; + List<PlayerCodexes::CodexEntry> m_codexList; +}; + +} + +#endif |