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
#include "stdafx.h"

#include "Headers/GUIText.h"
#include "Platform/Video/Headers/GFXDevice.h"

namespace Divide {
GUIText::GUIText(U64 guiID,
                 const stringImpl& text,
                 const vec2<F32>& relativePosition,
                 const stringImpl& font,
                 const vec3<F32>& colour,
                 CEGUI::Window* parent,
                 U32 fontSize)
    : GUIElement(guiID, parent, GUIType::GUI_TEXT),
      TextLabel(text, font, colour, fontSize),
      _position(relativePosition)
{
}

void GUIText::draw(GFXDevice& context) const {
    if (!text().empty()) {
        static vectorImpl<GUITextBatchEntry> entry(1);
        entry[0]._textLabel = this;
        entry[0]._position.set(getPosition());
        entry[0]._stateHash = getStateBlockHash();
        Attorney::GFXDeviceGUI::drawText(context, entry);
    }
}

vec2<F32> GUIText::getPosition() const {
    return vec2<F32>(_position.width, _position.height);
}

// Return true if input was consumed
bool GUIText::mouseMoved(const GUIEvent &event) { return false; }

// Return true if input was consumed
bool GUIText::onMouseUp(const GUIEvent &event) { return false; }

// Return true if input was consumed
bool GUIText::onMouseDown(const GUIEvent &event) { return false; }
};

Commits for Divide-Framework/trunk/Source Code/GUI/GUIText.cpp

Diff revisions: vs.
Revision Author Commited Message
909 Diff Diff IonutCava picture IonutCava Thu 29 Jun, 2017 23:57:18 +0000

[Ionut]
- Rework RenderTarget class
— RTAttachment now deal with textures directly
— RT size needs to be specified upfront
- Application class is no longer a Singleton but passed around in the PlatformContext

902 Diff Diff IonutCava picture IonutCava Sun 25 Jun, 2017 16:56:57 +0000

[Ionut]
- Rework input system a bit for easier maintenance and readability
- Toggle AntTweakBar display using CTRL+F11

890 Diff Diff IonutCava picture IonutCava Sun 14 May, 2017 20:54:59 +0000

[Ionut]
- Add pre-compiled header support
- Initial code for per-stage tessellation computation

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.

794 Diff Diff IonutCava picture IonutCava Tue 22 Nov, 2016 16:44:26 +0000

[IonutCava]
- Change SDL_GL_Context management from a pool-based system to a thread_local variable type System
- Reworked SceneGraphNode child access for safer and faster iteration.
— Added a forEachChild with multiple overloads to apply a lambda expression over every child of the target SGN
- Slight optimization to Text rendering by batching all labels due for rendering and submitting them at all at once

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

732 Diff Diff IonutCava picture IonutCava Fri 17 Jun, 2016 14:46:33 +0000

[IonutCava]
- Fixed visibility issues with empty GUIText elements.
- Update GLSL copyright notice
- Small corrections to selection code

721 Diff Diff IonutCava picture IonutCava Wed 08 Jun, 2016 15:47:49 +0000

[IonutCava]
- Spelling: change all references from our code of “color” to the PROPER British version of “colour” because it sounds 100x better

720 IonutCava picture IonutCava Mon 06 Jun, 2016 15:51:06 +0000

[IonutCava]
- PVS-Studio guided static analysis fixes and optimizations
- Added a flag to SceneState to bypass the Save/Load system not needed for certain types of scenes (menus, cinematics, etc)