Author Topic: Creating buttons in Layouts  (Read 2453 times)

Phaze

  • Sr. Member
  • ****
  • Posts: 346
    • View Profile
Creating buttons in Layouts
« on: February 10, 2007, 04:35:05 PM »
I noticed that there were a couple of Layouts with buttons that you can click to put addons rebuys and to bust people out. Segundo and Didray both had them on their layouts. I was wondering exactly how that was done. I don't want to keep explaining how to press X to the other players and I think that is a great addition. Can you use other kinds of buttons too, so that it will blend with background a bit better?

MooseWizard

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • Louisville Poker Society
Re: Creating buttons in Layouts
« Reply #1 on: February 14, 2007, 09:44:43 PM »
I created a toolbox called "Controls" and put the following in the HTML:

Code: [Select]
<nobr>
<tdbutton type="previousround" text="Round -" inheritFont="true">
&nbsp;
<tdbutton type="nextround" text="Round +" inheritFont="true">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<tdbutton type="addplayers" text="+ Player" inheritFont="true">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<tdbutton type="buyin" text="Buy-in" inheritFont="true">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<tdbutton type="bustout" text="Bust Out" inheritFont="true">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<tdbutton type="clock" text="Pause" inheritFont="true">

I then added the "Control" toolbox as the last row of my layout.

I can't remember where I found this, but it was probably somewhere on this site.  I'm sorry to whoever posted it originally, and that I'm not giving credit where credit is due.
The man, the myth, the moose!

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Creating buttons in Layouts
« Reply #2 on: February 15, 2007, 12:19:58 AM »
Here again is where i was an idiot for awhile.  I loved the button idea and started reading up on it and slowly adding them to my tourny layout.  Then one day i started looking around in TD and found an odd looking layout template called BlackAndGreenWithButtons.tlo

lol, guess what it is?  A sweet looking layout with 10 buttons across the bottom that will do most all you want to do durning a tourny.  So if you lazy like me, just use that layout and your set.

Phaze

  • Sr. Member
  • ****
  • Posts: 346
    • View Profile
Re: Creating buttons in Layouts
« Reply #3 on: February 15, 2007, 06:50:39 AM »
PPPanimal
Dude, I did the same thing exactly yesterday

Thanks MooseWizard, yeah I found the same thing as animal and looked at how it was done

Still I have a question about it... Say I create a graphic of a button that would blend in with my background picture better, how do I insert that instead... I imagine you would just HTML the image and what it does, but any ideas how to write it out properly?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5427
    • View Profile
Re: Creating buttons in Layouts
« Reply #4 on: February 15, 2007, 10:05:39 AM »
The <tdbutton> token has various attributes to control its look and feel.  If you use the "Insert Token" button on the Cell Properties dialog, you can select the tdbutton token and it will prompt you for the various attributes.  Fill those in and it will put the proper text describing the token into the HTML of the cell for you.

Here's a button that has one of the chip images instead of text:

<tdbutton type="nextround" image="C:\Program Files\The Tournament Director 2\images\chip_red.gif" inheritFont="false">

That will be a typical button (gray with a raised border, for example) with an image on it instead of text.  If you want to get rid of the "button" look, try this:

<tdbutton type="nextround" image="C:\Program Files\The Tournament Director 2\images\chip_red.gif" inheritFont="false" style="background-color: transparent; border: none">

Phaze

  • Sr. Member
  • ****
  • Posts: 346
    • View Profile
Re: Creating buttons in Layouts
« Reply #5 on: February 15, 2007, 07:20:04 PM »
Beauty, thanks!