Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2009, 9:01:17 PM (15 years ago)
Author:
danielh
Message:
  • Added helper method to HumanController to get it's ControllableEntity as a Pawn
  • Removed tooltip, added default (empty) values for text and image from BaseItem
  • Fixed tolua in BaseItem.h
  • Added object to PickupCollection for the current UsableItem
  • Moved most inventory logic from Lua to PickupInventory (still slow)

TODO

  • Re-use of CEGUI item windows, destroying and creating them on each update is slow, very slow
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.h

    r2972 r3001  
    3939#include "core/BaseObject.h"
    4040
    41 namespace CEGUI { class Window; }
     41namespace CEGUI { class Window; class WindowManager; class Image; }
    4242
    4343// tolua_begin
    4444namespace orxonox
    4545{
    46     class EquipmentItem;
    47     class PassiveItem;
    48     class UsableItem;
     46// tolua_end
     47    class _OrxonoxExport BaseItem;
    4948
    5049    /**
    5150        @brief Static class for the inventory GUI window.
    5251        @author Daniel 'Huty' Haggenmueller
    53     */
     52    */
     53// tolua_begin
    5454    class _OrxonoxExport PickupInventory
    5555    {
     
    7070        static unsigned int getPassiveCount(); // tolua_export
    7171
    72         static EquipmentItem* getEquipmentItem(unsigned int i); // tolua_export
    73         static UsableItem* getUsableItem(unsigned int i); // tolua_export
    74         static PassiveItem* getPassiveItem(unsigned int i); // tolua_export
     72        static unsigned int getCurrentUsableIndex(); // tolua_export
     73        static bool isCurrentUsable(const BaseItem* item); // tolua_export
     74        static void selectUsable(unsigned int i); // tolua_export
    7575
    76         static std::string getImagesetForEquipment(unsigned int i); // tolua_export
    77         static std::string getImagesetForUsable(unsigned int i); // tolua_export
    78         static std::string getImagesetForPassive(unsigned int i); // tolua_export
     76        static BaseItem* getEquipmentItem(unsigned int i); // tolua_export
     77        static BaseItem* getUsableItem(unsigned int i); // tolua_export
     78        static BaseItem* getPassiveItem(unsigned int i); // tolua_export
     79
     80        static std::string getImageForItem(const BaseItem* item); // tolua_export
     81
     82        static void clearInventory(CEGUI::WindowManager* winMgr, int equipCount, int usableCount); // tolua_export
     83        static void updateTabs(CEGUI::WindowManager* winMgr, CEGUI::Window* equipWindow, CEGUI::Window* usableWindow); // tolua_export
     84
     85        static void updateEquipment(CEGUI::WindowManager* winMgr, CEGUI::Window* target);
     86        static void updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target);
     87
     88        static void addItem(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, BaseItem* item, const std::string& titleColour, int x, int y); // tolua_export
    7989    }; // tolua_export
    8090} // tolua_export
Note: See TracChangeset for help on using the changeset viewer.