Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: How make sound volume, gamma, resulation changer &... in option menu?  (Read 4260 times)

0 Members and 1 Guest are viewing this topic.

mmpn

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile

Hello All,

How can i make sound volume, gamma, resulation changer & ... in option menu page of my game?

And save this setting for next game starting, in registry or ...

Thank's.
Logged

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: How make sound volume, gamma, resulation changer &... in option menu?
« Reply #1 on: November 10, 2005, 01:46:41 AM »

Hiya,

Of course you can expand that menu, open other windows with controls, etc., but that's a wide topic.
I would recommend you to check the WME-Help for this in the chapter "Inside a game"->"User interface layer"->"Windows & controls".
It describes the files you can find in your project (or the WME-Demo) in the directory "data\interface\system".

If you have some more detailled problem about that, you are welcome to ask more about it.

But a note, you wrote:

How can i make sound volume, gamma, resulation changer & ... in option menu page of my game?
And save this setting for next game starting, in registry or ...

Remember - WME is not a 3D engine. There is no gamma adjusting, nor can you change the resolution in runtime (even if you could - the backgrounds are 2D, so you would have to create everything for every resolution! In general 2d/2.5d games decide for one fixed resolution).
You can change the sound volume though by using SetSoundVolume or SetMusicVolume, they should be called in the event handler you trigger from your slider, button or whatever you define in your options window. (see above).

You can also save those values in the registry if necessary - these fine methods do the whole job (you find them in the script reference about the game object as well):

RegWriteNumber - Writes a given number to the Windows Registry.
RegWriteString - Writes a given string to the Windows Registry.
RegReadNumber - Reads a numeric value from the Windows Registry.
RegReadString - Reads a string value from the Windows Registry.

Sorry for pointing to the docs all the time, but the question is just too general to confront you with a lot of source code... :)

Good luck!
Logged
Mooh!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: How make sound volume, gamma, resulation changer &... in option menu?
« Reply #2 on: November 10, 2005, 08:38:43 AM »

Also, you can see an example of settings dialog allowing you to change volume using sliders in Fred Demo by McCoy. The source code can be downloaded here: http://master.math.upatras.gr/~odnorf/dreams/?show=downloads
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mmpn

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
Re: How make sound volume, gamma, resulation changer &... in option menu?
« Reply #3 on: November 12, 2005, 07:31:43 AM »

Thank's for all...
Logged

Ennio

  • Lurker
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 40
    • View Profile
Re: How make sound volume, gamma, resulation changer &... in option menu?
« Reply #4 on: March 22, 2011, 02:28:26 PM »

Hi all,
I'm sorry for the up of this old topic, but it's exactly what I'm searching for, i need to make an option menu with some setting (like sound and music).
The link to the source code posted by mnemonic doesn't work anymore... can anyone help me?
Thank you!
Logged
 

Page created in 0.021 seconds with 24 queries.