Skip to content

Commit

Permalink
KOTOR: Add hud method for showing the container
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius committed May 10, 2018
1 parent 62263ee commit 56d5b1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engines/kotor/gui/ingame/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ void HUD::setPosition(float x, float y) {
_minimap->setPosition(x, y);
}

void HUD::showContainer() {
_container.reset(new ContainerMenu());
sub(*_container, kStartCodeNone, true, false);
}

void HUD::initWidget(Engines::Widget &widget) {
// Don't know what these two are doing, but they spawn over the complete screen blocking the 3d picking.
if (widget.getTag() == "LBL_MAP")
Expand Down
4 changes: 4 additions & 0 deletions src/engines/kotor/gui/ingame/hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include "src/engines/kotor/gui/gui.h"

#include "src/engines/kotor/gui/ingame/container.h"
#include "src/engines/kotor/gui/ingame/menu.h"
#include "src/engines/kotor/gui/ingame/minimap.h"

Expand All @@ -50,8 +51,11 @@ class HUD : public GUI {

void setPosition(float x, float y);

void showContainer();

private:
Menu _menu;
Common::ScopedPtr<ContainerMenu> _container;

Common::ScopedPtr<Minimap> _minimap;

Expand Down

0 comments on commit 56d5b1f

Please sign in to comment.