Changeset - r21825:b4094ba952dc
[Not reviewed]
master
0 2 0
rubidium - 10 years ago 2014-10-06 19:16:29
rubidium@openttd.org
(svn r26971) -Fix: widget_data was sometimes uint16 and sometimes uint32; make it always be uint32
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -2107,7 +2107,7 @@ Dimension NWidgetLeaf::dropdown_dimensio
 
 * @param data   Data of the widget.
 
 * @param tip    Tooltip of the widget.
 
 */
 
NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data, StringID tip) : NWidgetCore(tp, colour, 1, 1, data, tip)
 
NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint32 data, StringID tip) : NWidgetCore(tp, colour, 1, 1, data, tip)
 
{
 
	assert(index >= 0 || tp == WWT_LABEL || tp == WWT_TEXT || tp == WWT_CAPTION || tp == WWT_RESIZEBOX || tp == WWT_SHADEBOX || tp == WWT_DEFSIZEBOX || tp == WWT_DEBUGBOX || tp == WWT_STICKYBOX || tp == WWT_CLOSEBOX);
 
	if (index >= 0) this->SetIndex(index);
src/widget_type.h
Show inline comments
 
@@ -769,7 +769,7 @@ private:
 
 */
 
class NWidgetLeaf : public NWidgetCore {
 
public:
 
	NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data, StringID tip);
 
	NWidgetLeaf(WidgetType tp, Colours colour, int index, uint32 data, StringID tip);
 

	
 
	/* virtual */ void SetupSmallestSize(Window *w, bool init_array);
 
	/* virtual */ void Draw(const Window *w);
 
@@ -856,7 +856,7 @@ static inline uint ComputeMaxSize(uint b
 
 * @ingroup NestedWidgetParts
 
 */
 
struct NWidgetPartDataTip {
 
	uint16 data;      ///< Data value of the widget.
 
	uint32 data;      ///< Data value of the widget.
 
	StringID tooltip; ///< Tooltip of the widget.
 
};
 

	
 
@@ -1011,7 +1011,7 @@ static inline NWidgetPart EndContainer()
 
 * @param tip  Tooltip of the widget.
 
 * @ingroup NestedWidgetParts
 
 */
 
static inline NWidgetPart SetDataTip(uint16 data, StringID tip)
 
static inline NWidgetPart SetDataTip(uint32 data, StringID tip)
 
{
 
	NWidgetPart part;
 

	
0 comments (0 inline, 0 general)