mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 03:54:40 +00:00
first alchemy window layout (not pretty)
This commit is contained in:
parent
51b8a76a68
commit
09c870ad68
@ -1,10 +1,37 @@
|
||||
#include "alchemywindow.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
AlchemyWindow::AlchemyWindow(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_alchemy_window_layout.xml", parWindowManager)
|
||||
{
|
||||
getWidget(mCreateButton, "CreateButton");
|
||||
getWidget(mCancelButton, "CancelButton");
|
||||
|
||||
|
||||
MyGUI::Widget* buttonBox = mCancelButton->getParent();
|
||||
int cancelButtonWidth = mCancelButton->getTextSize().width + 24;
|
||||
mCancelButton->setCoord(buttonBox->getWidth() - cancelButtonWidth,
|
||||
mCancelButton->getTop(), cancelButtonWidth, mCancelButton->getHeight());
|
||||
int createButtonWidth = mCreateButton->getTextSize().width + 24;
|
||||
mCreateButton->setCoord(buttonBox->getWidth() - createButtonWidth - cancelButtonWidth - 4,
|
||||
mCreateButton->getTop(), createButtonWidth, mCreateButton->getHeight());
|
||||
|
||||
mCreateButton->eventMouseButtonClick += MyGUI::newDelegate(this, &AlchemyWindow::onCreateButtonClicked);
|
||||
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &AlchemyWindow::onCancelButtonClicked);
|
||||
|
||||
center();
|
||||
}
|
||||
|
||||
void AlchemyWindow::onCancelButtonClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
mWindowManager.popGuiMode();
|
||||
mWindowManager.popGuiMode();
|
||||
}
|
||||
|
||||
void AlchemyWindow::onCreateButtonClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,13 @@ namespace MWGui
|
||||
{
|
||||
public:
|
||||
AlchemyWindow(WindowManager& parWindowManager);
|
||||
|
||||
protected:
|
||||
MyGUI::Button* mCreateButton;
|
||||
MyGUI::Button* mCancelButton;
|
||||
|
||||
void onCancelButtonClicked(MyGUI::Widget* _sender);
|
||||
void onCreateButtonClicked(MyGUI::Widget* _sender);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,86 @@
|
||||
<MyGUI type="Layout">
|
||||
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 600 500" name="_Main">
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="8 8 60 24">
|
||||
<Property key="Caption" value="#{sName}"/>
|
||||
<Property key="TextAlign" value="Center"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="EditBox" skin="MW_TextEdit" position="76 8 250 24" name="NameEdit"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="8 40 140 24">
|
||||
<Property key="Caption" value="#{sApparatus}"/>
|
||||
<Property key="TextAlign" value="Left"/>
|
||||
</Widget>
|
||||
|
||||
<!-- Apparatus bar -->
|
||||
<Widget type="Widget" skin="" position="8 66 230 50">
|
||||
<Widget type="Widget" skin="MW_Box" position="0 0 50 50">
|
||||
<Widget type="ImageBox" skin="ImageBox" position="4 4 42 42" name="Apparatus1"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Widget" skin="MW_Box" position="60 0 50 50">
|
||||
<Widget type="ImageBox" skin="ImageBox" position="4 4 42 42" name="Apparatus2"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Widget" skin="MW_Box" position="120 0 50 50">
|
||||
<Widget type="ImageBox" skin="ImageBox" position="4 4 42 42" name="Apparatus3"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Widget" skin="MW_Box" position="180 0 50 50">
|
||||
<Widget type="ImageBox" skin="ImageBox" position="4 4 42 42" name="Apparatus4"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="8 124 140 24">
|
||||
<Property key="Caption" value="#{sIngredients}"/>
|
||||
<Property key="TextAlign" value="Left"/>
|
||||
</Widget>
|
||||
|
||||
<!-- Used ingredients bar -->
|
||||
<Widget type="Widget" skin="" position="8 150 230 50">
|
||||
<Widget type="Widget" skin="MW_Box" position="0 0 50 50">
|
||||
<Widget type="ImageBox" skin="ImageBox" position="4 4 42 42" name="Ingredient1"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Widget" skin="MW_Box" position="60 0 50 50">
|
||||
<Widget type="ImageBox" skin="ImageBox" position="4 4 42 42" name="Ingredient2"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Widget" skin="MW_Box" position="120 0 50 50">
|
||||
<Widget type="ImageBox" skin="ImageBox" position="4 4 42 42" name="Ingredient3"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Widget" skin="MW_Box" position="180 0 50 50">
|
||||
<Widget type="ImageBox" skin="ImageBox" position="4 4 42 42" name="Ingredient4"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<!-- Available ingredients -->
|
||||
<Widget type="Widget" skin="MW_Box" position="8 206 300 218" name="box" align="Left Top Stretch">
|
||||
<Widget type="ScrollView" skin="MW_ScrollViewH" position="4 4 292 210" name="ItemView" align="Left Top Stretch">
|
||||
<Property key="CanvasAlign" value="Left Top"/>
|
||||
<Widget type="Button" skin="" name="Items" position="0 0 292 210" name="Items" align="Left Top Stretch"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<!-- Created effects -->
|
||||
<Widget type="TextBox" skin="SandText" position="314 38 200 24">
|
||||
<Property key="Caption" value="#{sCreatedEffects}"/>
|
||||
<Property key="TextAlign" value="Left"/>
|
||||
</Widget>
|
||||
<Widget type="Widget" skin="MW_Box" position="314 64 270 200">
|
||||
<Widget type="Widget" skin="" position="4 4 142 232" name="CreatedEffects"/>
|
||||
</Widget>
|
||||
|
||||
<!-- Buttons -->
|
||||
<Widget type="Widget" skin="" position="314 270 200 24">
|
||||
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="CreateButton">
|
||||
<Property key="Caption" value="#{sCreate}"/>
|
||||
</Widget>
|
||||
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="CancelButton">
|
||||
<Property key="Caption" value="#{sCancel}"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
</Widget>
|
||||
</MyGUI>
|
||||
|
Loading…
Reference in New Issue
Block a user