osb/source/windowing/StarGuiTypes.cpp

30 lines
720 B
C++
Raw Permalink Normal View History

2023-06-20 04:33:09 +00:00
#include "StarGuiTypes.hpp"
namespace Star {
bool ImageStretchSet::fullyPopulated() const {
return inner.size() && begin.size() && end.size();
}
GuiDirection otherDirection(GuiDirection direction) {
switch (direction) {
case GuiDirection::Horizontal:
return GuiDirection::Vertical;
case GuiDirection::Vertical:
return GuiDirection::Horizontal;
default:
starAssert(false);
return (GuiDirection)-1;
}
}
EnumMap<GuiDirection> const GuiDirectionNames{
{GuiDirection::Horizontal, "horizontal"}, {GuiDirection::Vertical, "vertical"},
};
String rarityBorder(Rarity rarity) {
2023-06-27 10:23:44 +00:00
return strf("/interface/inventory/itemborder{}.png", RarityNames.getRight(rarity).toLower());
2023-06-20 04:33:09 +00:00
}
}