diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 79ea262e6..0fc841ce6 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -25,7 +25,7 @@ add_openmw_dir (mwinput add_openmw_dir (mwgui layouts text_input widgets race class birth review window_manager console dialogue dialogue_history window_base stats_window messagebox journalwindow charactercreation - map_window window_pinnable_base cursorreplace tooltips + map_window window_pinnable_base cursorreplace tooltips scrollwindow bookwindow ) add_openmw_dir (mwdialogue diff --git a/apps/openmw/mwgui/bookwindow.cpp b/apps/openmw/mwgui/bookwindow.cpp new file mode 100644 index 000000000..ce816a669 --- /dev/null +++ b/apps/openmw/mwgui/bookwindow.cpp @@ -0,0 +1,15 @@ +#include "bookwindow.hpp" + +using namespace MWGui; + +BookWindow::BookWindow(WindowManager& parWindowManager) : + WindowBase("openmw_book_layout.xml", parWindowManager) +{ + //setVisible(false); + center(); +} + +void BookWindow::open(MWWorld::Ptr book) +{ +} + diff --git a/apps/openmw/mwgui/bookwindow.hpp b/apps/openmw/mwgui/bookwindow.hpp new file mode 100644 index 000000000..57f45f017 --- /dev/null +++ b/apps/openmw/mwgui/bookwindow.hpp @@ -0,0 +1,20 @@ +#ifndef MWGUI_BOOKWINDOW_H +#define MWGUI_BOOKWINDOW_H + +#include "window_base.hpp" + +#include "../mwworld/ptr.hpp" + +namespace MWGui +{ + class BookWindow : public WindowBase + { + public: + BookWindow(WindowManager& parWindowManager); + void open(MWWorld::Ptr book); + }; + +} + +#endif + diff --git a/apps/openmw/mwgui/journalwindow.cpp b/apps/openmw/mwgui/journalwindow.cpp index e67eda777..4030911a0 100644 --- a/apps/openmw/mwgui/journalwindow.cpp +++ b/apps/openmw/mwgui/journalwindow.cpp @@ -109,9 +109,6 @@ MWGui::JournalWindow::JournalWindow (WindowManager& parWindowManager) //std::list list = formatText("OpenMW rgh dsfg sqef srg ZT uzql n ZLIEHRF LQSJH GLOIjf qjfmj hslkdgn jlkdjhg qlr isgli shli uhs fiuh qksf cg ksjnf lkqsnbf ksbf sbfkl zbf kuyzflkj sbgdfkj zlfh ozhjfmo hzmfh lizuf rty qzt ezy tkyEZT RYYJ DG fgh is an open-source implementation of the game engine found in the game Morrowind. This is a dumb test text msodjbg smojg smoig fiiinnn"); //std::list list = formatText(); //displayLeftText(list.front()); - - MyGUI::WindowPtr t = static_cast(mMainWidget); - t->eventWindowChangeCoord += MyGUI::newDelegate(this, &JournalWindow::onWindowResize); } void MWGui::JournalWindow::open() @@ -159,10 +156,6 @@ void MWGui::JournalWindow::open() } } -void MWGui::JournalWindow::onWindowResize(MyGUI::Window* window) -{ -} - void MWGui::JournalWindow::displayLeftText(std::string text) { mLeftTextWidget->eraseText(0,mLeftTextWidget->getTextLength()); diff --git a/apps/openmw/mwgui/journalwindow.hpp b/apps/openmw/mwgui/journalwindow.hpp index 4656c7a48..c5009d654 100644 --- a/apps/openmw/mwgui/journalwindow.hpp +++ b/apps/openmw/mwgui/journalwindow.hpp @@ -19,15 +19,6 @@ namespace MWGui void open(); private: - enum ColorStyle - { - CS_Sub, - CS_Normal, - CS_Super - }; - - void onWindowResize(MyGUI::Window* window); - void displayLeftText(std::string text); void displayRightText(std::string text); diff --git a/apps/openmw/mwgui/scrollwindow.cpp b/apps/openmw/mwgui/scrollwindow.cpp new file mode 100644 index 000000000..ab4065e41 --- /dev/null +++ b/apps/openmw/mwgui/scrollwindow.cpp @@ -0,0 +1,14 @@ +#include "scrollwindow.hpp" + +using namespace MWGui; + +ScrollWindow::ScrollWindow(WindowManager& parWindowManager) : + WindowBase("openmw_scroll_layout.xml", parWindowManager) +{ + setVisible(false); + center(); +} + +void ScrollWindow::open(MWWorld::Ptr scroll) +{ +} diff --git a/apps/openmw/mwgui/scrollwindow.hpp b/apps/openmw/mwgui/scrollwindow.hpp new file mode 100644 index 000000000..d7f5cd686 --- /dev/null +++ b/apps/openmw/mwgui/scrollwindow.hpp @@ -0,0 +1,19 @@ +#ifndef MWGUI_SCROLLWINDOW_H +#define MWGUI_SCROLLWINDOW_H + +#include "window_base.hpp" + +#include "../mwworld/ptr.hpp" + +namespace MWGui +{ + class ScrollWindow : public WindowBase + { + public: + ScrollWindow(WindowManager& parWindowManager); + void open(MWWorld::Ptr scroll); + }; + +} + +#endif diff --git a/apps/openmw/mwgui/window_manager.cpp b/apps/openmw/mwgui/window_manager.cpp index 0f2df53e1..40fc9308d 100644 --- a/apps/openmw/mwgui/window_manager.cpp +++ b/apps/openmw/mwgui/window_manager.cpp @@ -8,6 +8,8 @@ #include "stats_window.hpp" #include "messagebox.hpp" #include "tooltips.hpp" +#include "scrollwindow.hpp" +#include "bookwindow.hpp" #include "../mwmechanics/mechanicsmanager.hpp" #include "../mwinput/inputmanager.hpp" @@ -37,6 +39,8 @@ WindowManager::WindowManager( , mMessageBoxManager(NULL) , console(NULL) , mJournal(NULL) + , mBookWindow(NULL) + , mScrollWindow(NULL) , dialogueWindow(nullptr) , mCharGen(NULL) , playerClass() @@ -84,6 +88,8 @@ WindowManager::WindowManager( mMessageBoxManager = new MessageBoxManager(this); dialogueWindow = new DialogueWindow(*this); mToolTips = new ToolTips(this); + mScrollWindow = new ScrollWindow(*this); + mBookWindow = new BookWindow(*this); // The HUD is always on hud->setVisible(true); diff --git a/apps/openmw/mwgui/window_manager.hpp b/apps/openmw/mwgui/window_manager.hpp index f96660715..13da6c7f0 100644 --- a/apps/openmw/mwgui/window_manager.hpp +++ b/apps/openmw/mwgui/window_manager.hpp @@ -62,6 +62,8 @@ namespace MWGui class JournalWindow; class CharacterCreation; class ToolTips; + class ScrollWindow; + class BookWindow; class TextInputDialog; class InfoBoxDialog; @@ -203,6 +205,8 @@ namespace MWGui Console *console; JournalWindow* mJournal; DialogueWindow *dialogueWindow; + ScrollWindow* mScrollWindow; + BookWindow* mBookWindow; CharacterCreation* mCharGen; diff --git a/files/mygui/CMakeLists.txt b/files/mygui/CMakeLists.txt index 49055d2ed..ef62fb68c 100644 --- a/files/mygui/CMakeLists.txt +++ b/files/mygui/CMakeLists.txt @@ -51,6 +51,9 @@ configure_file("${SDIR}/openmw_interactive_messagebox_layout.xml" "${DDIR}/openm configure_file("${SDIR}/openmw_journal_layout.xml" "${DDIR}/openmw_journal_layout.xml" COPYONLY) configure_file("${SDIR}/openmw_journal_skin.xml" "${DDIR}/openmw_journal_skin.xml" COPYONLY) configure_file("${SDIR}/openmw_tooltips.xml" "${DDIR}/openmw_tooltips.xml" COPYONLY) +configure_file("${SDIR}/openmw_scroll_layout.xml" "${DDIR}/openmw_scroll_layout.xml" COPYONLY) +configure_file("${SDIR}/openmw_scroll_skin.xml" "${DDIR}/openmw_scroll_skin.xml" COPYONLY) +configure_file("${SDIR}/openmw_book_layout.xml" "${DDIR}/openmw_book_layout.xml" COPYONLY) configure_file("${SDIR}/smallbars.png" "${DDIR}/smallbars.png" COPYONLY) configure_file("${SDIR}/transparent.png" "${DDIR}/transparent.png" COPYONLY) configure_file("${SDIR}/EBGaramond-Regular.ttf" "${DDIR}/EBGaramond-Regular.ttf" COPYONLY) diff --git a/files/mygui/core.xml b/files/mygui/core.xml index 7417328cf..c0a29d1f6 100644 --- a/files/mygui/core.xml +++ b/files/mygui/core.xml @@ -20,6 +20,7 @@ + diff --git a/files/mygui/openmw_book_layout.xml b/files/mygui/openmw_book_layout.xml new file mode 100644 index 000000000..ccf494860 --- /dev/null +++ b/files/mygui/openmw_book_layout.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/files/mygui/openmw_journal_layout.xml b/files/mygui/openmw_journal_layout.xml index da4fe658b..5711053ac 100644 --- a/files/mygui/openmw_journal_layout.xml +++ b/files/mygui/openmw_journal_layout.xml @@ -7,11 +7,8 @@ - - - - - + + diff --git a/files/mygui/openmw_journal_skin.xml b/files/mygui/openmw_journal_skin.xml index 0ef87852f..a983ac523 100644 --- a/files/mygui/openmw_journal_skin.xml +++ b/files/mygui/openmw_journal_skin.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/files/mygui/openmw_scroll_layout.xml b/files/mygui/openmw_scroll_layout.xml new file mode 100644 index 000000000..b396931ed --- /dev/null +++ b/files/mygui/openmw_scroll_layout.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/files/mygui/openmw_scroll_skin.xml b/files/mygui/openmw_scroll_skin.xml new file mode 100644 index 000000000..e55396ac4 --- /dev/null +++ b/files/mygui/openmw_scroll_skin.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +