Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7009


Ignore:
Timestamp:
May 29, 2010, 9:56:07 PM (14 years ago)
Author:
dafrick
Message:

Enabled the ChatBox to be closed by pressing the close button in the upper right corner of the frame window.

Location:
code/branches/presentation3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/data/gui/layouts/ChatBox.layout

    r6928 r7009  
    66        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    77        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    8         <Window Type="MenuWidgets/FrameWindow" Name="/ChatBox" >
     8        <Window Type="MenuWidgets/FrameWindow" Name="orxonox/ChatBox" >
    99            <Property Name="Text" Value="Chat" />
    1010            <Property Name="InheritsAlpha" Value="False" />
     
    2525                <Property Name="UnifiedAreaRect" Value="{{0.02,0},{1,-30},{0.98,0},{1,-5}}" />
    2626            </Window>
     27            <Event Name="CloseClicked" Function="ChatBox.ChatBoxCloseButton_clicked"/>
    2728        </Window>
    2829    </Window>
  • code/branches/presentation3/data/gui/scripts/ChatBox.lua

    r6928 r7009  
    22
    33local P = createMenuSheet("ChatBox")
     4
     5function P.ChatBoxCloseButton_clicked(e)
     6    orxonox.ChatInputHandler:getInstance():deactivate()
     7end
     8
    49return P
    510
  • code/branches/presentation3/src/orxonox/CMakeLists.txt

    r6965 r7009  
    5757  FIND_HEADER_FILES
    5858  TOLUA_FILES
     59    ChatInputHandler.h
    5960    LevelManager.h
    6061    MoodManager.h
  • code/branches/presentation3/src/orxonox/ChatInputHandler.h

    r6928 r7009  
    5454#include <util/Singleton.h>
    5555
    56 
    57 namespace orxonox
    58 {
     56namespace orxonox // tolua_export
     57{ // tolua_export
    5958  /* class to handle chat using an InputBuffer */
    60   class _OrxonoxExport ChatInputHandler : public Singleton<ChatInputHandler>,
    61     public ChatListener
    62   {
     59  class _OrxonoxExport ChatInputHandler  // tolua_export
     60    : public Singleton<ChatInputHandler>, public ChatListener
     61  { // tolua_export
    6362    private:
    6463      /** Input buffer, to be used to catch input from the
     
    103102      friend class Singleton<ChatInputHandler>;
    104103
     104      static ChatInputHandler& getInstance(void) { return Singleton<ChatInputHandler>::getInstance(); }  // tolua_export
     105
    105106      /** start listening */
    106107      static void activate_static();
     
    127128
    128129      /** Deactivate the chat window, meaning: hide it. */
    129       void deactivate();
     130      void deactivate();  // tolua_export
    130131
    131   };
     132  };  // tolua_export
    132133
    133134
    134 }
     135}  // tolua_export
    135136
    136137
Note: See TracChangeset for help on using the changeset viewer.