Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Space as a via XML

$
0
0

@antocreo wrote:

Hi all,
I am trying to pass the spacebar value as a char via xml with ofXML.
here is the OF code

if(settings.exists("//playButton")) {
        playKey = settings.getValue<char>("//playButton");
    } else {
        playKey = ' ';
    }

here is the XML code

<?xml version="1.0" encoding="UTF-8"?>
<settings>
<playButton>' '</playButton>
</settings>

things I tried already instead of ' ' (even if they don't make sense...)
& # 32; (without spaces between characters)
32
" "
GLFW_KEY_SPACE
one thing that works is using <int> 32 instead of <char>.
This will work but only with the space. As I want to have flexibility to choose any other character I'd like to stick to <char>
I am a bit stuck and I could really use some help on this.. maybe it's easy?

Cheers

Posts: 22

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles