The Tournament Director Forums

Main => Suggestions => Topic started by: spitebet on June 22, 2014, 07:58:10 AM

Title: simple mouse click
Post by: spitebet on June 22, 2014, 07:58:10 AM
Hi, it may seem silly (or maybe it's just me who can't figure out how to do this) but it would wonderful if we could start/pause the ongoing tournament from a mouse click.  I am the tournament director but I also play in the game.  I used to use Blind Valet before buying TTD3 and I'd use the mouse as my card guard; that was really practical, but now I must get up every time there may be a need for a pause. I cannot right-click to get to the drop down menu because everything appears way too small from where I may sit (different seat everytime, as you can guess).

Title: Re: simple mouse click
Post by: Corey Cooper on June 22, 2014, 09:41:53 AM
There are two ways to do this that I can think of.

(1) Add a button to the layout.  Edit the contents of a cell where you'd like to add the button, press the Insert Token button, and select tdButton.  For the "type" attribute, select "Clock", then press OK to insert the token.  You should get this:

<tdButton type="Clock">

This will insert a button that says "Pause/Unpause".  You can modify the text on the button if you like by setting the "text" attribute.  For example, to change it to say "Toggle Clock" you would change it to:

<tdButton type="Clock" text="Toggle Clock">

The button might be too small.  There are a few ways to change its size, but the easiest is probably to just set the font size to something larger:

<tdButton type="Clock" text="Toggle Clock" style="font-size: 24pt">

(2) Another way to do this, if you didn't want a button displayed on the screen, is to add the pause/unpause action to something already on the screen.  For example, you could make it so that clicking the clock itself will pause or unpause.  In the default layout, the clock cell HTML looks like this:


By inserting the <action> token, you can add an action to the clock.  You have to surround the clock in a container to which you can apply the action.  Change the HTML to this:

<div <action src="click" type="Clock">><clock></div>

Here the <clock> token is surrounded with a <div> element (which is an HTML element), and a click action is added to the <div>.  Note that a <div> will be as wide as possible, but only as tall as its contents.  So you'll have to click the clock itself, or to the left or right of the click within the cell.  Clicking above or below the clock won't work.  To see what I mean, change the HTML to this:

<div <action src="click" type="Clock"> style="background-color: red"><clock></div>

This gives the <div> element a red background.  You don't want to keep it this way, but this illustrates where you can click in order to toggle the clock.
Title: Re: simple mouse click
Post by: spitebet on July 04, 2014, 09:26:32 AM
Sry for the late reply - I've been away.

Yes, by all means, option 2 appeals to me.  Tried & Tested & Approved!  Thank you very much.  Now I can manage the game from my table seat!