Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Subtitle Problem..  (Read 2603 times)

0 Members and 1 Guest are viewing this topic.

fsk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 82
    • View Profile
    • My blog
Subtitle Problem..
« on: August 15, 2007, 11:35:01 AM »

Sorry, but i have a little problem.. ( Again!  ;D )

I made a subtitle button (Image) and a subtitle static control(Text) in a option.window..
When click on button my static control change name: "Off" and when click again change to "On"...

Now, i want a code to save my option ("On/Off") in my registry game and to change the subtitles options ("Game.Subtitles=true" or "Game.Subtitles=false")..

Somebody help me!!!

thankssssssssssssssssssssssssssss!!!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Subtitle Problem..
« Reply #1 on: August 15, 2007, 03:29:44 PM »

To save a value to registry, you could do something like this in the window script:

Code: WME Script
  1. on "OK" // providing your ok button is named "ok"
  2. {
  3.   Game.RegWriteNumber("Subtitles", Game.Subtitles);
  4. }
  5.  
  6. on "subtitles_button" // change to whatever your button is called
  7. {
  8.  
  9.   // and change button's text appropriately
  10. }
  11.  

And to load the previously stored value when the game starts, you'd add something like this to game.script:

Code: WME Script
  1. Game.Subtitles = Game.RegReadNumber("Subtitles", true);
  2.  
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

fsk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 82
    • View Profile
    • My blog
Re: Subtitle Problem..
« Reply #2 on: August 16, 2007, 08:09:03 AM »

thanksssssssssssss mnemonic!!!  ;)
Logged
 

Page created in 0.069 seconds with 22 queries.