book & scroll windows

actorid
scrawl 13 years ago
parent c0e12d0e56
commit 0e6b82284f

@ -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

@ -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)
{
}

@ -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

@ -109,9 +109,6 @@ MWGui::JournalWindow::JournalWindow (WindowManager& parWindowManager)
//std::list<std::string> 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<std::string> list = formatText();
//displayLeftText(list.front());
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(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());

@ -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);

@ -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)
{
}

@ -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

@ -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);

@ -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;

@ -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)

@ -20,6 +20,7 @@
<List file="openmw_journal_skin.xml" />
<List file="openmw_map_window_skin.xml" />
<List file="openmw_dialogue_window_skin.xml" />
<List file="openmw_scroll_skin.xml" />
<List file="openmw_settings.xml" />
</MyGUI>
</MyGUI>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="" layer="Windows" align="Left|Top" position="0 0 512 256" name="_Main">
<Widget type="ImageBox" skin="ImageBox" position_real="0 0 1 1" align="Top|Right" name="BookImage">
<Property key="ImageTexture" value="textures\tx_menubook.dds"/>
<Widget type="Button" skin="Next_btn" position="251 220 128 32" name="NextPageBTN"/>
<Widget type="Button" skin="Prev_btn" position="165 220 128 32" name="PrevPageBTN"/>
<Widget type="Button" skin="Take_btn" position="75 220 128 32" name="TakeButton"/>
<Widget type="Button" skin="Close_btn" position="360 220 128 32" name="CloseButton"/>
<Widget type="EditBox" skin="MW_BookPage" position_real="0.15 0.1 0.3 0.8" name = "LeftText"/>
<Widget type="EditBox" skin="MW_BookPage" position_real="0.55 0.1 0.3 0.8" name = "RightText"/>
</Widget>
</Widget>
</MyGUI>

@ -7,11 +7,8 @@
<Widget type="ImageBox" skin="ImageBox" position_real="0 0 1 1" align="Top|Right" name="JImage">
<Property key="ImageTexture" value="textures\tx_menubook.dds"/>
<Widget type="Button" skin="Next_btn" position="370 220 64 32" name="NextPageBTN">
</Widget>
<Widget type="Button" skin="Prev_btn" position="80 220 128 32" name="PrevPageBTN">
</Widget>
<Widget type="Button" skin="Next_btn" position="370 220 128 32" name="NextPageBTN"/>
<Widget type="Button" skin="Prev_btn" position="80 220 128 32" name="PrevPageBTN"/>
<Widget type="EditBox" skin="MW_BookPage" position_real="0.15 0.1 0.3 0.8" name = "LeftText"/>
<Widget type="EditBox" skin="MW_BookPage" position_real="0.55 0.1 0.3 0.8" name = "RightText"/>

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Skin">
<Skin name="Next_btn" size="64 32" texture="textures\tx_menubook_next_idle.dds">
<BasisSkin type="MainSkin" offset="0 0 64 32" align="ALIGN_VSTRETCH">
<State name="normal" offset="0 0 64 32"/>
<Skin name="Next_btn" size="128 32" texture="textures\tx_menubook_next_idle.dds">
<BasisSkin type="MainSkin" offset="0 0 128 32" align="ALIGN_VSTRETCH">
<State name="normal" offset="0 0 128 32"/>
</BasisSkin>
</Skin>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="" layer="Windows" position="0 0 512 512" name="_Main">
<Widget type="ImageBox" skin="ImageBox" position_real="0 0 1 1" name="ScrollImage">
<Property key="ImageTexture" value="textures\scroll.dds"/>
<Widget type="Button" skin="Take_btn" position="12 18 128 32" name="TakeButton"/>
<Widget type="Button" skin="Close_btn" position="418 24 128 32" name="CloseButton"/>
</Widget>
</Widget>
</MyGUI>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Skin">
<Skin name="Take_btn" size="128 32" texture="textures\tx_menubook_take_idle.dds">
<BasisSkin type="MainSkin" offset="0 0 128 32" align="ALIGN_VSTRETCH">
<State name="normal" offset="0 0 128 32"/>
</BasisSkin>
</Skin>
<Skin name="Close_btn" size="128 32" texture="textures\tx_menubook_close_idle.dds">
<BasisSkin type="MainSkin" offset="0 0 128 32" align="ALIGN_VSTRETCH">
<State name="normal" offset="0 0 128 32"/>
</BasisSkin>
</Skin>
</MyGUI>
Loading…
Cancel
Save