Merge branch 'master' into jgrpp
Replace build and refit, and group collapse implementations Fix template creation build and refit # Conflicts: # Makefile.bundle.in # config.lib # src/animated_tile.cpp # src/blitter/32bpp_anim.hpp # src/blitter/32bpp_base.hpp # src/blitter/8bpp_base.hpp # src/blitter/null.hpp # src/build_vehicle_gui.cpp # src/command.cpp # src/command_func.h # src/console_gui.cpp # src/core/smallstack_type.hpp # src/date.cpp # src/debug.cpp # src/genworld_gui.cpp # src/ground_vehicle.hpp # src/group_gui.cpp # src/lang/korean.txt # src/linkgraph/linkgraph_gui.h # src/main_gui.cpp # src/misc_gui.cpp # src/network/core/game.h # src/network/core/packet.cpp # src/network/core/udp.cpp # src/network/core/udp.h # src/network/network_content.cpp # src/network/network_type.h # src/network/network_udp.cpp # src/newgrf_house.h # src/openttd.cpp # src/order_cmd.cpp # src/order_gui.cpp # src/os/unix/crashlog_unix.cpp # src/os/windows/crashlog_win.cpp # src/osk_gui.cpp # src/pathfinder/opf/opf_ship.cpp # src/rail_cmd.cpp # src/rail_gui.cpp # src/saveload/saveload.cpp # src/settings.cpp # src/settings_gui.cpp # src/smallmap_gui.h # src/station_base.h # src/station_cmd.cpp # src/table/gameopt_settings.ini # src/table/newgrf_debug_data.h # src/table/settings.ini # src/timetable_gui.cpp # src/toolbar_gui.cpp # src/train_gui.cpp # src/vehicle.cpp # src/vehicle_gui.cpp # src/vehiclelist.cpp # src/viewport.cpp # src/widgets/dropdown.cpp # src/window_gui.h
This commit is contained in:
@@ -277,6 +277,15 @@ struct ViewportData : ViewPort {
|
||||
|
||||
struct QueryString;
|
||||
|
||||
/* misc_gui.cpp */
|
||||
enum TooltipCloseCondition {
|
||||
TCC_RIGHT_CLICK,
|
||||
TCC_HOVER,
|
||||
TCC_NONE,
|
||||
TCC_HOVER_VIEWPORT,
|
||||
TCC_NEXT_LOOP,
|
||||
};
|
||||
|
||||
struct WindowBase {
|
||||
WindowBase *z_front; ///< The window in front of us in z-order.
|
||||
WindowBase *z_back; ///< The window behind us in z-order.
|
||||
@@ -324,7 +333,7 @@ protected:
|
||||
void InitializePositionSize(int x, int y, int min_width, int min_height);
|
||||
virtual void FindWindowPlacementAndResize(int def_width, int def_height);
|
||||
|
||||
SmallVector<int, 4> scheduled_invalidation_data; ///< Data of scheduled OnInvalidateData() calls.
|
||||
std::vector<int> scheduled_invalidation_data; ///< Data of scheduled OnInvalidateData() calls.
|
||||
|
||||
public:
|
||||
Window(WindowDesc *desc);
|
||||
@@ -677,12 +686,20 @@ public:
|
||||
virtual bool OnRightClick(Point pt, int widget) { return false; }
|
||||
|
||||
/**
|
||||
* The mouse is hovering over a widget in the window, perform an action for it, like opening a custom tooltip.
|
||||
* The mouse is hovering over a widget in the window, perform an action for it.
|
||||
* @param pt The point where the mouse is hovering.
|
||||
* @param widget The widget where the mouse is hovering.
|
||||
*/
|
||||
virtual void OnHover(Point pt, int widget) {}
|
||||
|
||||
/**
|
||||
* Event to display a custom tooltip.
|
||||
* @param pt The point where the mouse is located.
|
||||
* @param widget The widget where the mouse is located.
|
||||
* @return True if the event is handled, false if it is ignored.
|
||||
*/
|
||||
virtual bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) { return false; }
|
||||
|
||||
/**
|
||||
* An 'object' is being dragged at the provided position, highlight the target if possible.
|
||||
* @param pt The point inside the window that the mouse hovers over.
|
||||
@@ -918,15 +935,6 @@ Wcls *AllocateWindowDescFront(WindowDesc *desc, int window_number, bool return_e
|
||||
|
||||
void RelocateAllWindows(int neww, int newh);
|
||||
|
||||
/* misc_gui.cpp */
|
||||
enum TooltipCloseCondition {
|
||||
TCC_RIGHT_CLICK,
|
||||
TCC_LEFT_CLICK,
|
||||
TCC_HOVER,
|
||||
TCC_HOVER_VIEWPORT,
|
||||
TCC_NEXT_LOOP,
|
||||
};
|
||||
|
||||
void GuiShowTooltips(Window *parent, StringID str, uint paramcount = 0, const uint64 params[] = NULL, TooltipCloseCondition close_tooltip = TCC_HOVER);
|
||||
|
||||
/* widget.cpp */
|
||||
|
Reference in New Issue
Block a user