Can I change shadow image depending on Database?

Help each other out

Can I change shadow image depending on Database?

Postby buymeapc on Sun May 21, 2006 11:35 pm

Basically, my games screen has six buttons on it - all that change the database for the category to display its games.

What I would like to do is when I change the database, say from Nintendo to Super Nintendo, and click on one of the games shown, the overlay that opens up shows a specific sized shadow behind the game box art depending on the box size/shape.

Ex. Nintendo would show a black (tall) rectangle "shadow" whereas Super Nintendo would show a black (wide) rectangle shadow and Gameboy would show a black (square) rectangle shadow, etc....all behind the box art.

Is this possible?
buymeapc
 
Posts: 59
Joined: Wed Mar 22, 2006 5:53 pm

Postby Colby on Mon May 22, 2006 1:27 am

yes, but what do you mean by shadow
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Re: Can I change shadow image depending on Database?

Postby dalanik on Mon May 22, 2006 7:55 am

Yes - if you use XScriptNG plugin ... :-)

you could save which DB you use into XLobby variable, then in script check this variable and display corresponding overlay (image) depending on the variable...

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby buymeapc on Mon May 22, 2006 1:40 pm

Colby wrote:yes, but what do you mean by shadow

Basically, an offset black square behind the box art - a drop shadow.

dalanik wrote:Yes - if you use XScriptNG plugin ... Smile

you could save which DB you use into XLobby variable, then in script check this variable and display corresponding overlay (image) depending on the variable...

Ok, let me see if I can understand this. When I click on a button, which currently has a "set database" command in it, it would also set a variable to the name of that particular DB. Then, some process wuld check what is inside that variable and display the "drop shadow" rectangle behind the box art.

How and where would I check to see what the variable has been set to?
buymeapc
 
Posts: 59
Joined: Wed Mar 22, 2006 5:53 pm

Postby dalanik on Mon May 22, 2006 7:36 pm

OK, you need the XSciptNG plugin. Then in events, make event that sets database and variable i.e. gamesdb. then you need overlays with images to display, and finaly script that will display these overlays.

create script with something like:

Code: Select all
Module Script

Public Sub Main()
   Dim Strvar As String
   Strvar = Xlobby.GetXlobbyVar("variable>gamesdb")

   Xlobby.ExecCommand("xlobby", "close overlay", "")
   Xlobby.ExecCommand("timer", "wait", "100")

   if( Strvar = "ataridb" ) Then
      Xlobby.ExecCommand("xlobby", "show overlay", "overlay-atari")
   else if ( Strvar = "mamedb" ) then
      Xlobby.ExecCommand("xlobby", "show overlay", "overlay-mame")
   else if ( Strvar = "segadb" ) then
      Xlobby.ExecCommand("xlobby", "show overlay", "overlay-sega")
   End if
End sub

End Module


and execute it through event in xlobby....
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby buymeapc on Tue May 23, 2006 3:28 pm

So, I'd have to call individual overlays? There's no way to call just a single image?

It's not a big deal, I'm just wondering...
buymeapc
 
Posts: 59
Joined: Wed Mar 22, 2006 5:53 pm

Postby dalanik on Tue May 23, 2006 5:54 pm

buymeapc wrote:So, I'd have to call individual overlays? There's no way to call just a single image?

It's not a big deal, I'm just wondering...


Actually - you could!

Just put ALL images one on top of each other - and make them hidden, then through script set only needed one visible!

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby buymeapc on Tue May 23, 2006 7:49 pm

I'm not fluent in either C# or VB.NET.

What references would I need?

Could I bother someone for a quick example? :oops:
buymeapc
 
Posts: 59
Joined: Wed Mar 22, 2006 5:53 pm

Postby dalanik on Tue May 23, 2006 9:53 pm

You don't need much VB knowledge - just use the Xlobby.ExecCommand command to run any XLobby command...

i.e. Xlobby.ExecCommand("xlobby", "button hide", "ID1") or Xlobby.ExecCommand("xlobby", "button show", "ID2")

hides button with ID ID1 and displays button with ID ID2
D,
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic