Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
   Copyright (c) 2017 DIVIDE-Studio
   Copyright (c) 2009 Ionut Cava

   This file is part of DIVIDE Framework.

   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software
   and associated documentation files (the "Software"), to deal in the Software
   without restriction,
   including without limitation the rights to use, copy, modify, merge, publish,
   distribute, sublicense,
   and/or sell copies of the Software, and to permit persons to whom the
   Software is furnished to do so,
   subject to the following conditions:

   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED,
   INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
   PARTICULAR PURPOSE AND NONINFRINGEMENT.
   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
   DAMAGES OR OTHER LIABILITY,
   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
   IN CONNECTION WITH THE SOFTWARE
   OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 */

#ifndef _GUI_MESSAGE_BOX_H_
#define _GUI_MESSAGE_BOX_H_

#include "GUIElement.h"
#include "GUIText.h"

namespace CEGUI {
class Window;
class Font;
class EventArgs;
};

namespace Divide {

class GUIMessageBox : public GUIElement {
    friend class GUIInterface;
    friend class SceneGUIElements;

   public:
    enum class MessageType : U32 {
        MESSAGE_INFO = 0,
        MESSAGE_WARNING = 1,
        MESSAGE_ERROR = 2
    };

    bool onConfirm(const CEGUI::EventArgs& /*e*/);
    void setTitle(const stringImpl& titleText);
    void setMessage(const stringImpl& message);
    void setOffset(const vec2<I32>& offsetFromCentre);
    void setMessageType(MessageType type);
    inline void show() {
        setActive(true);
        setVisible(true);
    }

   protected:
    GUIMessageBox(U64 guiID,
                  const stringImpl& name,
                  const stringImpl& title,
                  const stringImpl& message,
                  const vec2<I32>& offsetFromCentre = vec2<I32>(0),
                  CEGUI::Window* parent = nullptr);
    ~GUIMessageBox();

    void setVisible(const bool visible);
    void setActive(const bool active);

   protected:
    vec2<I32> _offsetFromCentre;
    CEGUI::Window* _msgBoxWindow;
};

};  // namespace Divide

#endif

Commits for Divide-Framework/trunk/Source Code/GUI/Headers/GUIMessageBox.h

Diff revisions: vs.
Revision Author Commited Message
1003 Diff Diff IonutCava picture IonutCava Tue 19 Dec, 2017 17:08:06 +0000

[Ionut]
- GUI cleanup

1002 Diff Diff IonutCava picture IonutCava Mon 18 Dec, 2017 17:31:54 +0000

[Ionut]
- Cleanup GUI a bit
- Disable some nVidia GL warnings

966 Diff Diff IonutCava picture IonutCava Mon 06 Nov, 2017 17:10:01 +0000

[Ionut]
- Remove old “add2DRenderFunction” and use command buffers instead
- Allow frame to blit to the screen or a render target of choice

836 Diff Diff IonutCava picture IonutCava Fri 27 Jan, 2017 14:59:56 +0000

[IonutCava]
- Update copyright notice

802 Diff Diff IonutCava picture IonutCava Tue 29 Nov, 2016 17:15:38 +0000

[IonutCava]
- GUI class is no longer a Singleton
- Reduced usage of GFXDevice::instance()

795 Diff Diff IonutCava picture IonutCava Wed 23 Nov, 2016 17:14:33 +0000

[IonutCava]
- Remove ULL. Use U64 instead
- Various small bug fixes and typos.

745 Diff Diff IonutCava picture IonutCava Wed 29 Jun, 2016 20:14:50 +0000

[IonutCava]
- Added on click sounds for buttons
- Added music playlist options for scenes (configurable via XML)
- Cache sound chunks and music files in SDLWrapper.cpp

715 Diff Diff IonutCava picture IonutCava Fri 27 May, 2016 16:19:22 +0000

[IonutCava]
- Added initial Fade In / Fade Out post effect (used for scene transitions for now)
- Added a GUI Interface that handles a list of GUI elements (used by GUI and SceneGUIElements)
- Fixed some race conditions related to multi-threaded scene loading (a lot remain to be fixed)
- Improved per-thread GPU sync system a bit
- Simplified Singleton define macros (although we should get rid of singletons all together)

714 Diff Diff IonutCava picture IonutCava Thu 26 May, 2016 16:26:23 +0000

[IonutCava]
- Initial code for multithreaded scene load:
— Tasks can have a “sync with gpu” flag that will cause them to use a shared context (so they can call GL functions)
- Added per scene GUI lists that get passed to the main GUI class (still need a base class to hold the map and accessors to avoid code duplication)
- Re-enabled threading unit tests

693 IonutCava picture IonutCava Thu 28 Apr, 2016 16:19:35 +0000

[IonutCava]
- Cleanup Time and Profiling code