Changeset - r17466:84f8357bd37f
[Not reviewed]
master
0 1 0
frosch - 13 years ago 2011-03-10 19:32:24
frosch@openttd.org
(svn r22231) -Feature(ette): [NewGRF] Make var 0x48 available in CB 0x15C.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/object_gui.cpp
Show inline comments
 
@@ -223,25 +223,25 @@ public:
 
					}
 
					_cur_dpi = old_dpi;
 
				}
 
				break;
 
			}
 

	
 
			case BOW_INFO: {
 
				const ObjectSpec *spec = ObjectClass::Get(_selected_object_class, _selected_object_index);
 
				if (spec == NULL) break;
 

	
 
				/* Get the extra message for the GUI */
 
				if (HasBit(spec->callback_mask, CBM_OBJ_FUND_MORE_TEXT)) {
 
					uint16 callback_res = GetObjectCallback(CBID_OBJECT_FUND_MORE_TEXT, 0, 0, spec, NULL, INVALID_TILE);
 
					uint16 callback_res = GetObjectCallback(CBID_OBJECT_FUND_MORE_TEXT, 0, 0, spec, NULL, INVALID_TILE, _selected_object_view);
 
					if (callback_res != CALLBACK_FAILED) {
 
						StringID message = GetGRFStringID(spec->grf_prop.grffile->grfid, 0xD000 + callback_res);
 
						if (message != STR_NULL && message != STR_UNDEFINED) {
 
							PrepareTextRefStackUsage(6);
 
							/* Use all the available space left from where we stand up to the
 
							 * end of the window. We ALSO enlarge the window if needed, so we
 
							 * can 'go' wild with the bottom of the window. */
 
							int y = DrawStringMultiLine(r.left, r.right, r.top, UINT16_MAX, message) - r.top;
 
							StopTextRefStackUsage();
 
							if (y > this->info_height) {
 
								BuildObjectWindow *bow = const_cast<BuildObjectWindow *>(this);
 
								bow->info_height = y + 2;
0 comments (0 inline, 0 general)