Public Member Functions | |
SignWindow (const WindowDesc *desc, const Sign *si) | |
void | UpdateSignEditWindow (const Sign *si) |
const Sign * | PrevNextSign (bool next) |
Returns a pointer to the (alphabetically) previous or next sign of the current sign. | |
virtual void | SetStringParameters (int widget) const |
Initialize string parameters for a widget. | |
virtual void | OnPaint () |
The window must be repainted. | |
virtual void | OnClick (Point pt, int widget, int click_count) |
A click with the left mouse button has been made on the window. | |
virtual EventState | OnKeyPress (uint16 key, uint16 keycode) |
A key has been pressed. | |
virtual void | OnMouseLoop () |
Called for every mouse loop run, which is at least once per (game) tick. | |
virtual void | OnOpenOSKWindow (int wid) |
Data Fields | |
SignID | cur_sign |
Definition at line 254 of file signs_gui.cpp.
virtual void SignWindow::OnClick | ( | Point | pt, | |
int | widget, | |||
int | click_count | |||
) | [inline, virtual] |
A click with the left mouse button has been made on the window.
pt | the point inside the window that has been clicked. | |
widget | the clicked widget. | |
click_count | Number of fast consecutive clicks at same position |
Reimplemented from Window.
Definition at line 331 of file signs_gui.cpp.
References Textbuf::buf, GUIList< T, F >::ForceRebuild(), GUIList< T, F >::NeedResort(), PrevNextSign(), and RenameSign().
virtual EventState SignWindow::OnKeyPress | ( | uint16 | key, | |
uint16 | keycode | |||
) | [inline, virtual] |
A key has been pressed.
key | the Unicode value of the key. | |
keycode | the untranslated key code including shift state. |
Reimplemented from Window.
Definition at line 366 of file signs_gui.cpp.
References Textbuf::buf, Window::ES_NOT_HANDLED, and RenameSign().
virtual void SignWindow::OnPaint | ( | ) | [inline, virtual] |
The window must be repainted.
Reimplemented from Window.
Definition at line 325 of file signs_gui.cpp.
References Window::DrawWidgets(), and Window::IsShaded().
const Sign* SignWindow::PrevNextSign | ( | bool | next | ) | [inline] |
Returns a pointer to the (alphabetically) previous or next sign of the current sign.
next | false if the previous sign is wanted, true if the next sign is wanted |
Definition at line 294 of file signs_gui.cpp.
References GUIList< T, F >::ForceRebuild(), SmallVector< T, S >::Length(), and GUIList< T, F >::NeedResort().
Referenced by OnClick().
virtual void SignWindow::SetStringParameters | ( | int | widget | ) | const [inline, virtual] |
Initialize string parameters for a widget.
Calls to this function are made during initialization to measure the size (that is as part of InitNested()), during drawing, and while re-initializing the window. Only for widgets that render text initializing is requested.
widget | Widget number. |
Reimplemented from Window.
Definition at line 316 of file signs_gui.cpp.
References SetDParam().