Is there any code that parses the Graphic Mode?

BlitzMax Forums/BlitzMax Programming/Is there any code that parses the Graphic Mode?

JoJo(Posted 2008) [#1]
Before I write my own parser, I wanted to know if anyone wrote a function that parses the GraphicModes() so that the Graphics can be set?

The GraphicModes returns a string of modes:
800x600x16, 60 hz
1024x768x16, 70 hz


Dabhand(Posted 2008) [#2]
Why do you need to parse it?

Print "Available graphics modes:"

For mode:TGraphicsMode=EachIn GraphicsModes()

	Print mode.width+","+mode.height+","+mode.depth+","+mode.hertz

Next


Its all split up anyway in a TGraphicsMode objects fields.

Dabz


JoJo(Posted 2008) [#3]

Why do you need to parse it?



Because when I list them in a combobox, I'm going to need to know what the user picked.


Gabriel(Posted 2008) [#4]
Because when I list them in a combobox, I'm going to need to know what the user picked.

That's what the GadgetObjectExtra is for. You put the object the entry relates to ( in this case a TGraphicsMode ) in there.


JoJo(Posted 2008) [#5]
Oh...

Thanks!