Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11270 for code


Ignore:
Timestamp:
Nov 7, 2016, 3:59:00 PM (7 years ago)
Author:
dmoritz
Message:

Speaker added

Location:
code/branches/Dialog_HS16
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Dialog_HS16/data/levels/missionOne.oxw

    r11261 r11270  
    3232    name="narrative"
    3333    targets="simpleNotification,dialogue"
    34     size=3
     34    size=3,1
    3535    displayTime=3.9
    3636    position="0.2, 0, 0.1, 0"
     
    371371
    372372    <DistanceTrigger name="spawndelaytrigger0" position="800,700,600" target="Pawn" distance=10 stayActive="true" delay=2/>
    373     <Dialogue message="Press (F3) to see your mission briefing.">
     373    <Dialogue speaker="ABC: " message=" Press (F3) to see your mission briefing.">
    374374        <events>
    375375            <trigger>
  • code/branches/Dialog_HS16/src/modules/notifications/NotificationDispatcher.h

    r11261 r11270  
    126126            virtual const std::string& createNotificationMessage(void)
    127127                { return BLANKSTRING; }
    128             virtual const std::string& createNotificationSpeaker(void)
    129                 { return BLANKSTRING; }
     128           
    130129
    131130    };
  • code/branches/Dialog_HS16/src/modules/notifications/NotificationManager.h

    r11261 r11270  
    7777            inline const std::string & getMessage(void) const
    7878                { return this->message_; }
    79 
    8079            /**
    8180            @brief Get the sender of the Notification.
     
    9493        private:
    9594            std::string message_; //!< The Notification message.
    96             std::string sender_; //!< The sender of the notifications.
     95            std::string sender_;//!< The sender of the notifications.
    9796            NotificationMessageType type_; //!< The type of the notification.
    9897
  • code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.cc

    r11261 r11270  
    1616
    1717        this->setSyncMode(ObjectDirection::None);
    18 
    19 
    2018        }
    2119
     
    2826        SUPER(Dialogue, XMLPort, xmlelement, mode);
    2927
     28        XMLPortParam(Dialogue, "speaker", setSpeaker, getSpeaker, xmlelement, mode);
    3029        XMLPortParam(Dialogue, "message", setMessage, getMessage, xmlelement, mode);
    31         //XMLPortParam(Dialogue, "speaker", setSpeaker, getSpeaker, xmlelement, mode);
    3230       
    3331    }
     32    const std::string& Dialogue::createNotificationMessage(void)
     33                {       
     34                        dialogue_ = speaker_ + message_;
     35                        return this->dialogue_ ;
     36                }
    3437}
  • code/branches/Dialog_HS16/src/modules/notifications/dispatchers/Dialogue.h

    r11261 r11270  
    2121            const std::string& getMessage(void)
    2222                { return this->message_; }
    23          //   const std::string& getSpeaker(void)
    24             //  {return this->speaker_;}
     23                const std::string& getSpeaker(void)
     24                        {return this->speaker_;}
    2525
    2626    protected:
    27         virtual const std::string& createNotificationMessage(void)
    28                 { return this->message_; }
    29        // virtual const std::string& createNotificationSpeaker(void)
    30         //              { return this->speaker_; }
     27        virtual const std::string& createNotificationMessage(void);
     28               
     29       
    3130    private:
    3231                std::string message_;
    33         //      std::string speaker_;
     32                std::string speaker_;
     33                std::string dialogue_;
    3434
     35                void setSpeaker(const std::string& speaker)
     36                { this->speaker_ = speaker;}
    3537                void setMessage(const std::string& message)
    3638                { this->message_ = message; }
    37            // void setSpeaker(const std::string& speaker)
    38             //  { this->speaker_ = speaker;}
     39           
    3940        } ;       
    4041
Note: See TracChangeset for help on using the changeset viewer.