Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: familiars in Outfit Window #39

Closed
wants to merge 16 commits into from
68 changes: 66 additions & 2 deletions data/styles/40-outfitwindow.otui
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,28 @@ OutfitWindow < MainWindow
anchors.right: parent.right
text: Show Mount

FlatPanel
id: showFamiliar
height: 22
padding: 5
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
self:setHeight(0)
self:setPadding(0)
end

CheckBox
id: check
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
text: Show Familiar
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
end

FlatPanel
id: showWings
height: 22
Expand Down Expand Up @@ -288,6 +310,15 @@ OutfitWindow < MainWindow
cell-size: 64 64
flow: true

UICreature
id: familiarui
anchors.centerIn: parent
size: 256 256
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
end

UICreature
id: creature
anchors.centerIn: parent
Expand Down Expand Up @@ -499,7 +530,40 @@ OutfitWindow < MainWindow
anchors.bottom: parent.bottom
anchors.left: prev.right
anchors.right: parent.right


Panel
id: familiar
height: 20
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
self:setHeight(0)
end

CheckBox
id: check
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
image-source: /images/ui/outfits/checkbox_round
text-offset: 15 0
text: familiar:
width: 84
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
end

FlatPanel
id: name
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: prev.right
anchors.right: parent.right
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
end

Panel
id: wings
height: 20
Expand Down Expand Up @@ -730,7 +794,7 @@ OutfitWindow < MainWindow
anchors.bottom: separator.top
margin-top: 5
margin-bottom: 5
image-source: /images/ui/panel_flat
image-source: /images/ui/panel_side
image-border: 1
padding: 4
padding-right: 15
Expand Down
1 change: 1 addition & 0 deletions modules/game_features/features.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ controller:registerEvents(g_game, {

if version >= 1260 then
g_game.enableFeature(GameThingQuiver);
g_game.enableFeature(GamePlayerFamiliars);
end

if version >= 1264 then
Expand Down
Loading