Give example of connection of CEGUI 0.8.4 to SDL 2

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

temakonkin
Just popping in
Just popping in
Posts: 4
Joined: Mon Mar 23, 2015 07:54

Give example of connection of CEGUI 0.8.4 to SDL 2

Postby temakonkin » Mon Mar 23, 2015 07:56

Hi!
Give example of connection of CEGUI 0.8.4 to SDL 2 (C++)

Thanks!

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: Give example of connection of CEGUI 8.4 to SDL 2

Postby lucebac » Mon Mar 23, 2015 09:32


User avatar
georger
Just popping in
Just popping in
Posts: 6
Joined: Thu Aug 15, 2013 13:23

Re: Give example of connection of CEGUI 8.4 to SDL 2

Postby georger » Tue Mar 24, 2015 12:21

lucebac wrote:https://bitbucket.org/lucebac/cegui/src/ea8f8c814a4d5dbaa56344218659eb68ce173961/application_templates/SDL2.cpp?at=application-templates-devel

In line 215 the program tries to load application_templates.layout, which isn't shipped in datafiles/layouts/ in the source distribution.

SDL2.cpp

Code: Select all

Window* root = WindowManager::getSingleton().loadLayoutFromFile("application_templates.layout");


I found the example basic layout from the documentation of 0.8.5, copied and pasted it into datafiles/layouts/application_templates.layout, and tried it with the program - ran flawlessly. So, here it is for convenience:

datafiles/layouts/application_templates.layout

Code: Select all

<?xml version="1.0" ?>
<GUILayout version="4">
    <Window type="DefaultWindow" name="root">
        <Window type="TaharezLook/FrameWindow" name="testWindow">
            <Property name="Position" value="{ {0.25, 0}, {0.25, 0} }" />
            <Property name="Size" value="{ {0.5, 0}, {0.5, 0} }" />
            <Property name="Text" value="Hello World!" />
        </Window>
    </Window>
</GUILayout>

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Give example of connection of CEGUI 8.4 to SDL 2

Postby Ident » Tue Mar 24, 2015 12:28

georger wrote:
lucebac wrote:https://bitbucket.org/lucebac/cegui/src/ea8f8c814a4d5dbaa56344218659eb68ce173961/application_templates/SDL2.cpp?at=application-templates-devel

In line 215 the program tries to load application_templates.layout, which isn't shipped in datafiles/layouts/ in the source distribution.

Thanks for the note.
Lucebac created these awesome application template and it has not been finished yet, I guess he forgot to commit that file. I commented on the line of the code that loads this file, just like you said. Here is his PR which is based on the above linked repository:
https://bitbucket.org/cegui/cegui/pull- ... s-for/diff

You can directly comment on there in the code section if you find other issues or if you have improvements.
CrazyEddie: "I don't like GUIs"

temakonkin
Just popping in
Just popping in
Posts: 4
Joined: Mon Mar 23, 2015 07:54

Re: Give example of connection of CEGUI 0.8.4 to SDL 2

Postby temakonkin » Wed Mar 25, 2015 14:55

Hi!

When compiled produces such a bug

Code: Select all

fatal error: CEGUI/Config.h: No such file or directory


Code::Blocks IDE, GNU GCC compiller....

What do I do?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Give example of connection of CEGUI 0.8.4 to SDL 2

Postby Ident » Wed Mar 25, 2015 15:01

Follow forum guidelines first http://www.cegui.org.uk/phpBB2/viewtopi ... =10&t=3351
or I wont answer
CrazyEddie: "I don't like GUIs"

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: Give example of connection of CEGUI 0.8.4 to SDL 2

Postby lucebac » Wed Mar 25, 2015 15:16

You missed to set up CEGUI SDK properly.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 23 guests