BuildSignalWindow Struct Reference

Inheritance diagram for BuildSignalWindow:

PickerWindowBase Window ZeroedMemoryAllocator

Public Member Functions

 BuildSignalWindow (const WindowDesc *desc, Window *parent)
virtual void OnPaint ()
 This window is currently being repainted.
virtual void OnClick (Point pt, int widget)
 A click with the left mouse button has been made on the window.

Private Member Functions

void DrawSignalSprite (byte widget_index, SpriteID image, int8 xrel, uint8 xsize)
 Draw dynamic a signal-sprite in a button in the signal GUI Draw the sprite +1px to the right and down if the button is lowered and change the sprite to sprite + 1 (red to green light).

Detailed Description

Definition at line 1371 of file rail_gui.cpp.


Member Function Documentation

void BuildSignalWindow::DrawSignalSprite ( byte  widget_index,
SpriteID  image,
int8  xrel,
uint8  xsize 
) [inline, private]

Draw dynamic a signal-sprite in a button in the signal GUI Draw the sprite +1px to the right and down if the button is lowered and change the sprite to sprite + 1 (red to green light).

Parameters:
widget_index index of this widget in the window
image the sprite to draw
xrel the relativ x value of the sprite in the grf
xsize the width of the sprite

Definition at line 1382 of file rail_gui.cpp.

References Widget::bottom, DrawSprite(), Window::IsWidgetLowered(), Widget::left, PAL_NONE, Widget::right, and Window::widget.

Referenced by OnPaint().

virtual void BuildSignalWindow::OnClick ( Point  pt,
int  widget 
) [inline, virtual]

A click with the left mouse button has been made on the window.

Parameters:
pt the point inside the window that has been clicked.
widget the clicked widget.

Reimplemented from Window.

Definition at line 1427 of file rail_gui.cpp.

References _convert_signal_button, _cur_signal_type, _cur_signal_variant, _settings_client, GUISettings::drag_signals_density, FindWindowById(), ClientSettings::gui, Window::RaiseWidget(), Window::SetDirty(), SetWindowDirty(), SIG_ELECTRIC, and SIG_SEMAPHORE.


The documentation for this struct was generated from the following file:
Generated on Sat Sep 6 20:15:59 2008 for openttd by  doxygen 1.4.7