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: Problems with the vBar  (Read 3863 times)

0 Members and 1 Guest are viewing this topic.

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
Problems with the vBar
« on: June 25, 2003, 07:52:41 PM »

Has I wrote in an old post I was triying to do an options menu like this


Well, the code is finished, and it works perfectly in projectman, but it does not work in the compiled version!!! In projectman, when the window opens, the buttons put himself in a position that represents the actual volume value that the registry sais, and when you keep pressed the left mouse button over the button of a vBar, you can drag it up and down, changing the volume while you listen a sound/music to test it, and the cursor ever stay inside the button until you release the left mouse button. But in the compiled version, when you click on the button, the only thing it do correctly is playing the music/sound! it does not move nor keep the cursors inside itself. And it doesn't catch the registry value for the volume. What's the problem? Here's the code for the button of the SFX Volume vBar (the code for the other buttons is almost equal):

[code]#include "scripts\base.inc"


var meters; //just to hold some values
var MoveButton; //if true, the button updates its position with the mouse position
self.Text = Game.GetGlobalSFXVolume(); //get the actual sfx volume value for the text of the
                                       //button
meters.ActVol = Game.GetGlobalSFXVolume(); //same for the variable
if (meters.ActVol >= 100) self.Text = "Max"; //stupid thingie
else if (meters.ActVol <= 0) self.Text = "Off";
self.Y = self.Y - meters.ActVol; //place the button at the position desired for the actual
                                 //volume value.

on "LeftClick"
{
   
    var parent = self.Parent; //reference to the window that holds the button
    MoveButton = true; //the button must update it's position
    Game.MouseY = parent.Y + self.Y + (self.Height / 2); //place the cursor in the (vertical)
                                                         //middle of the button  
    meters.MouseY = Game.MouseY; //update the mouse position info in the variable
    Game.PlaySound("interface\system\sfx.ogg",true); //play the test sound (it's good to hear
                                                     //something while you are increasing or
                                                     //decreasing the volume).
    while (MoveButton) //loop that updates the mouse position and the volume value
    {  
   
« Last Edit: June 25, 2003, 07:58:19 PM by McCoy »
Logged

Click here to sign my sig!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re:Problems with the vBar
« Reply #1 on: June 25, 2003, 10:32:36 PM »

Now that's weird. There should't be any difference between running the game from ProjectMan and running it standalone. Are you sure you are using the latest version of wme.exe when running the compiled game?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
Re:Problems with the vBar
« Reply #2 on: June 25, 2003, 11:12:11 PM »

Mhh... who wanna shoot me? I wanna die.  :-[ Yes, it was that, I was using the old version with the systemexclusive problem.

Earth eat me please!!! :-[



And the last agonic question: the SubtitlesSpeed value is not saved automatically in the registry, nope? I have to save it emanually using Game.RegWriteNumber() no?
Logged

Click here to sign my sig!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re:Problems with the vBar
« Reply #3 on: June 26, 2003, 09:05:09 AM »

And the last agonic question: the SubtitlesSpeed value is not saved automatically in the registry, nope? I have to save it emanually using Game.RegWriteNumber() no?
No, it's not saved in the registry, it's stored in the saved game...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.36 seconds with 23 queries.