Page 1 of 3

Patch: Signal GUI (Lastest: r5435)

Posted: 23 Jun 2006 05:49
by Hazelrah
The Signal GUI adds a window which allows you to select most of the properties of a signal before you actually lay the signal down. The interface is fairly straightforward, but for completeness, I'll write a description.

1) The top two picture buttons allow the user to select between Electric signals or Semaphores

2) The signal density is the space between signals when using Auto Signals or Signal Auto-Completion

3) (Only if the Signal Auto-Completion patch is installed) A Button that enables/Disables Signal Auto-Completion

4) The combo (drop-down) box allows the user to switch between Normal Signals, Pre-signals, Exit-Signals, and Multi-signals. If PBS has been installed, Path Based Signals will also show up in this box.


It also adds one patch options, under the Construction Patches:

1) "Enable the Signal GUI"

Signal GUI is based on the code that Hackykid wrote more than a year ago which also included Signal Auto-Completion (original thread). I've seperated it from the Signal Auto-Completion patch since it is better to have small independent patches. But in fact it still makes a good companion patch for Signal Auto-Completion. You can find that here.

The Patch file and Windows executable can be at the bottom of the next post.

Please have fun with this patch and let me know if there is anything you'd like to change!

-Hazelrah

Posted: 23 Jun 2006 05:49
by Hazelrah
*NOTES ON COMPILING*
This patch can stand by itself, but it contains code that is dependant on other patches. If you have a patch listed below, please #define the appropriate variable.

Code: Select all

Hackykid's PBS           -> PBS_PATCH_INCLUDED
Signal Auto-Completion   -> AUTOCOMPLETION_PATCH_INCLUDED
Todo:
  • - Figure out why dropdown button clickstate isn't being saved
July 1st, 2006 (r5435):
  • - Small update to make compatible with new Signal Auto-completion patch
June 27th, 2006 (r5386):
  • - Added a Configuration option in the Construction Patches to disable to Signal GUI



June 23rd, 2006 (r5333):
[list]
- Seperated code from the Auto-complete code
- Fixed the character drawn on the dropdown button
- A few code clean ups here and there
- Shrunk the virtical window size by 8 pixels
- Auto-Completion button does not show up when Signal Auto-Completion patch is not installed.
- Define AUTOCOMPLETION_PATCH_INCLUDED for those who are using this patch in conjunction with the Signal Auto-completion patch
- Define PBS_PATCH_INCLUDED for those who are using this patch in conjunction with PBS
[/list]

Posted: 23 Jun 2006 05:49
by Hazelrah
And for everyone's convienence, I combined both the Signal GUI and the Signal Auto-Completion patches together for you down below. As an added bonus, I also added richk67's toolbar fix patch. When you use the patch, you still have to define the varible as stated in the second post of this topic above.

-Hazelrah

Posted: 27 Jun 2006 04:30
by Hazelrah
*New Version: r5386*

Added an option to turn the signal gui on and off.

I also looked into the starting position of the window. Unfortunatly it looks like the starting position of windows is entirely handled in the window code and there is no 'not hackish' way of doing it. I'll keep looking though since I find one of the most annoying features of the SigGUI is that it blocks the rail icons.

New SigGUI + AutoSignal version coming very soon.

-Hazelrah

Posted: 27 Jun 2006 04:35
by DaleStan
How does the landscaping toolbar do it?

Posted: 27 Jun 2006 05:22
by Hazelrah
Yeah, I actually did look at that myself. It doesn't use the toolbar child property (too lazy to look and figure out what that's properly called right now). Instead it is an independant window, with a static startup position. No mater how big or small the viewable window is, it will always start up a static amount of pixels from the left and top, even if that's not visible.

I'm not a big fan of that either. Tell me, do TTDPatch windows remember where they were closed?

-Hazelrah

Posted: 27 Jun 2006 09:15
by richk67
Hazelrah wrote:I also looked into the starting position of the window. Unfortunatly it looks like the starting position of windows is entirely handled in the window code and there is no 'not hackish' way of doing it. I'll keep looking though since I find one of the most annoying features of the SigGUI is that it blocks the rail icons.
Check out my toolbar fix patch in the MiniIN (r5234). You will see a line ready for the SigGUI patch ;)

Posted: 27 Jun 2006 11:10
by Hazelrah
I know we don't know each other very well but I could kiss you right about now! :P

And just to make it easier for other people not so development oriented to know what richk67 is talking about:

http://www.tt-forums.net/viewtopic.php?t=22054

-Hazelrah

(edit:removed very dumb question, and added forum link)

Posted: 27 Jun 2006 13:44
by richk67
Steady on ;)

The next one to fix is the BUILD_TREES popup, which overlaps its parent too.

Posted: 27 Jun 2006 17:13
by DaleStan
Hazelrah wrote:I'm not a big fan of that either. Tell me, do TTDPatch windows remember where they were closed?
I don't believe so. The map window remembers its size during runtime, but that is, I believe, as far as Patch's memory goes.
I usually find that the default location is close enough to where I want it to be.

Posted: 01 Jul 2006 05:49
by Hazelrah
*New Version: r5435*

Since I updated the Signal Auto-completion patch, I had to make a teeny tiny little change in this Signal GUI patch too. Nothing big, so I didn't bother to update the exectuable.

The bigger news is that I updated the integrated patch and executable, in the third post. It contains the new Signal Auto-completion patch along with this Signal GUI patch, and I also included richk67's Toolbar Fix patch for good measure. Have fun!

-Hazelrah

Posted: 06 May 2007 18:21
by BamBam
I rediffed the combination against trunk r9796.
Included are:
Signal GUI
Signal Auto Completion
ToolbarOverlapFix

Edit 19. June 2007: download removed, new one see my post below (page 2)

Posted: 06 May 2007 21:44
by CMircea
Good. Now we need PBS working with YAPF.

Posted: 06 May 2007 22:00
by TheJosh
This patch is the best. they had it in MiniIN

Posted: 10 May 2007 18:56
by tneo
Does this patch work with 0.5.1 as well?

Posted: 16 May 2007 10:20
by bobingabout
they had it all the way back in I2. this patch is amongst the really old patches, wtill alive, that didn't make it into the official game.

Posted: 16 May 2007 12:10
by DeletedUser21
A shame since it's a really handy thing to have. I mean, no more extra settings to be switched in the patches configuration menu every time you want to place extra signals at one go (or lesser signals), and handier switch between semaphores and light signals. :) I will add this patch into my current game.

Another thanks to BamBam the rediff master. :P

Posted: 16 May 2007 12:10
by tneo
Does anyone know whether or not it will make it to trunk. I know it had some minor bugs in MINI, but save so much time to signal tracks...

Posted: 16 May 2007 13:18
by boekabart
tneo wrote:Does anyone know whether or not it will make it to trunk. I know it had some minor bugs in MINI, but save so much time to signal tracks...
In it's current form, no. Big/combination patches are never accepted, and the devs usually don't have time to split them up again.
Someone will have to split it up again in (at least) 3 small patches, doing 1 feature each.
Those will have to comply with coding rules, be popular AND as bugfree as possible, in order to be considered for trunk.
Good luck with that, they all have my vote!

Posted: 16 May 2007 13:54
by bobingabout
i thought it was already split up so that autocomplete and the GUI were 2 seperate patches?