mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:23:54 +00:00
Scale magic items frames in the quick keys menu
This commit is contained in:
parent
bfc07afa28
commit
6a625b1dac
2 changed files with 23 additions and 12 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
|
#include <MyGUI_RenderManager.h>
|
||||||
|
|
||||||
#include <components/esm/esmwriter.hpp>
|
#include <components/esm/esmwriter.hpp>
|
||||||
#include <components/esm/quickkeys.hpp>
|
#include <components/esm/quickkeys.hpp>
|
||||||
|
@ -257,7 +258,12 @@ namespace MWGui
|
||||||
mSelected->id = item.getCellRef().getRefId();
|
mSelected->id = item.getCellRef().getRefId();
|
||||||
mSelected->name = item.getClass().getName(item);
|
mSelected->name = item.getClass().getName(item);
|
||||||
|
|
||||||
mSelected->button->setFrame("textures\\menu_icon_select_magic_magic.dds", MyGUI::IntCoord(2, 2, 40, 40));
|
float scale = 1.f;
|
||||||
|
MyGUI::ITexture* texture = MyGUI::RenderManager::getInstance().getTexture("textures\\menu_icon_select_magic_magic.dds");
|
||||||
|
if (texture)
|
||||||
|
scale = texture->getHeight() / 64.f;
|
||||||
|
|
||||||
|
mSelected->button->setFrame("textures\\menu_icon_select_magic_magic.dds", MyGUI::IntCoord(0, 0, 44*scale, 44*scale));
|
||||||
mSelected->button->setIcon(item);
|
mSelected->button->setIcon(item);
|
||||||
|
|
||||||
mSelected->button->setUserString("ToolTipType", "ItemPtr");
|
mSelected->button->setUserString("ToolTipType", "ItemPtr");
|
||||||
|
@ -292,7 +298,12 @@ namespace MWGui
|
||||||
path.insert(slashPos+1, "b_");
|
path.insert(slashPos+1, "b_");
|
||||||
path = MWBase::Environment::get().getWindowManager()->correctIconPath(path);
|
path = MWBase::Environment::get().getWindowManager()->correctIconPath(path);
|
||||||
|
|
||||||
mSelected->button->setFrame("textures\\menu_icon_select_magic.dds", MyGUI::IntCoord(2, 2, 40, 40));
|
float scale = 1.f;
|
||||||
|
MyGUI::ITexture* texture = MyGUI::RenderManager::getInstance().getTexture("textures\\menu_icon_select_magic.dds");
|
||||||
|
if (texture)
|
||||||
|
scale = texture->getHeight() / 64.f;
|
||||||
|
|
||||||
|
mSelected->button->setFrame("textures\\menu_icon_select_magic.dds", MyGUI::IntCoord(0, 0, 44*scale, 44*scale));
|
||||||
mSelected->button->setIcon(path);
|
mSelected->button->setIcon(path);
|
||||||
|
|
||||||
if (mMagicSelectionDialog)
|
if (mMagicSelectionDialog)
|
||||||
|
|
|
@ -17,16 +17,16 @@
|
||||||
|
|
||||||
<Widget type="Widget" skin="" position="15 55 332 128" align="Left Bottom HCenter">
|
<Widget type="Widget" skin="" position="15 55 332 128" align="Left Bottom HCenter">
|
||||||
|
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="0 0 60 59" name="QuickKey1"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="0 0 60 60" name="QuickKey1"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="68 0 60 59" name="QuickKey2"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="68 0 60 60" name="QuickKey2"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="136 0 60 59" name="QuickKey3"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="136 0 60 60" name="QuickKey3"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="204 0 60 59" name="QuickKey4"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="204 0 60 60" name="QuickKey4"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="272 0 60 59" name="QuickKey5"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="272 0 60 60" name="QuickKey5"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="0 67 60 59" name="QuickKey6"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="0 67 60 60" name="QuickKey6"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="68 67 60 59" name="QuickKey7"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="68 67 60 60" name="QuickKey7"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="136 67 60 59" name="QuickKey8"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="136 67 60 60" name="QuickKey8"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="204 67 60 59" name="QuickKey9"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="204 67 60 60" name="QuickKey9"/>
|
||||||
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="272 67 60 59" name="QuickKey10"/>
|
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="272 67 60 60" name="QuickKey10"/>
|
||||||
|
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue