mirror of https://github.com/OpenTTD/OpenTTD
(svn r18579) -Codechange: Add orientation to scrollbars.
parent
cf2349ae10
commit
20debea202
|
@ -1190,7 +1190,7 @@ void Window::InitNested(const WindowDesc *desc, WindowNumber window_number)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Empty constructor, initialization has been moved to #InitNested() called from the constructor of the derived class. */
|
/** Empty constructor, initialization has been moved to #InitNested() called from the constructor of the derived class. */
|
||||||
Window::Window()
|
Window::Window() : hscroll(false), vscroll(true), vscroll2(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,10 +170,16 @@ enum WindowDefaultFlag {
|
||||||
*/
|
*/
|
||||||
class Scrollbar {
|
class Scrollbar {
|
||||||
private:
|
private:
|
||||||
uint16 count; ///< Number of elements in the list
|
const bool is_vertical; ///< Scrollbar has vertical orientation.
|
||||||
uint16 cap; ///< Number of visible elements of the scroll bar
|
uint16 count; ///< Number of elements in the list.
|
||||||
uint16 pos; ///< Index of first visible item of the list
|
uint16 cap; ///< Number of visible elements of the scroll bar.
|
||||||
|
uint16 pos; ///< Index of first visible item of the list.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Scrollbar(bool is_vertical) : is_vertical(is_vertical)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the number of elements in the list
|
* Gets the number of elements in the list
|
||||||
* @return the number of elements
|
* @return the number of elements
|
||||||
|
|
Loading…
Reference in New Issue