Commit Graph

376 Commits (2abe4ac280dd0495bceee34cf94bab2c6d3d3230)

Author SHA1 Message Date
terkhen 9aef7b8c3d (svn r20118) -Add: Detect if the mouse has been hovering over the same point. 14 years ago
terkhen dd5bf70f20 (svn r20117) -Codechange: Use a Point struct to store double click position. 14 years ago
yexo 26be68ae98 (svn r20070) -Feature: when none of the open windows handles a keypress, try all toolbars for global hotkeys
Users that have run a version between r20056 and r20068 should delete their hotkeys.cfg to reset the terraform toolbar hotkeys to default
14 years ago
frosch 9e53f1e004 (svn r19933) -Fix [FS#3804]: Keep _current_company and _local_company in sync during GUI operation. 14 years ago
alberth 2224c9b515 (svn r19910) -Doc: Doxygen additions. 14 years ago
alberth 51e67a40e0 (svn r19909) -Doc: Typo fixes, small doxygen improvements. 14 years ago
alberth ef353f69ca (svn r19908) -Codechange: Use a boolean value to assign to a boolean variable. 14 years ago
alberth cf060d16ec (svn r19906) -Codechange: HandleMouseOver() never ends, so don't return an event handling state. 14 years ago
alberth ce0e1cbb3f (svn r19905) -Codechange: Use EventState for mouse handling routines. 14 years ago
alberth 113f3ef0eb (svn r19904) -Codechange: Make EventState usable outside Window context. 14 years ago
alberth fc82d9cd77 (svn r19903) -Codechange: Use SpecialMouseMode enum as type of _special_mouse_mode. 14 years ago
alberth ae560aeb8b (svn r19886) -Add [FS#3705]: Perform window callback during mouse dragging for the purpose of highlighting the destination (sbr). 14 years ago
frosch 68c1213efa (svn r19746) -Fix [FS#3675]: Do not recenter usually centered windows when resizing main window or changing language, if they have been moved/resized before. 14 years ago
frosch 7b30f34ecf (svn r19731) -Add: Spritepicker to sprite alignment tool. 14 years ago
rubidium e75e2648fc (svn r19706) -Add: support for the (NewGRF) debug box 14 years ago
rubidium bd629ad7c0 (svn r19563) -Fix [FS#3733] (r19558): OnResize wasn't called often enough so scrollbars were in some cases not properly updated causing division by zero 14 years ago
alberth 6934e6fe7d (svn r19558) -Fix [FS#3730]: Window::OnResize() was not always called while resizing a window. 14 years ago
rubidium 14d28c5e69 (svn r19250) -Fix [FS#3643]: with RTL languages clicking a horizontal scrollbar that could not scroll could cause a crash 15 years ago
rubidium 249acc9e4f (svn r19089) -Codechange: some minor coding style 15 years ago
rubidium 36298c1454 (svn r19002) -Fix [FS#1140]: [OSX] Problems with scrolling touchpad (Peter Thorson). I can/have not test(ed) it, it cannot break non OSX builds. 15 years ago
frosch 88019e64e1 (svn r18966) -Codechange: Remove Window::OnDoubleClick() in favour of a parameter for OnClick(). 15 years ago
peter1138 08a24fcc31 (svn r18933) -Codechange: Don't constantly redraw a window when moving it unless it actually moves. 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
frosch 70f96a3dbf (svn r18744) -Fix [FS#3487-ish]: Do not toggle the sticky- and shading-button twice per mouseclick when clicking fast. 15 years ago
rubidium de3cff9e1a (svn r18675) -Add [FS#3256]: function to remove focus from all widgets in a window 15 years ago
rubidium 2bb5e2de29 (svn r18620) -Fix: possible deadlock with SDL and changing the resolution in-game 15 years ago
alberth b30e56850c (svn r18607) -Fix (r18583): Preserve window width when shading. 15 years ago
alberth 3323d64f28 (svn r18606) -Codechange: Introduce several forms of zero-size stacked display planes. 15 years ago
alberth f55c3312b3 (svn r18587) -Codechange: Insert a shade selection widget in the widget tree when the window starts with a title bar with a shade box. 15 years ago
alberth ca66652005 (svn r18583) -Codechange: Add WWT_SHADEBOX widget and its functions (heavily based on code by erikjanp). 15 years ago
rubidium c03aadda08 (svn r18582) -Codechange: save 8 bytes from the Window class 15 years ago
alberth 5a083f183e (svn r18580) -Codechange: Use widget information only for setting scrollbar capacity. 15 years ago
alberth 20debea202 (svn r18579) -Codechange: Add orientation to scrollbars. 15 years ago
alberth 5187a5980b (svn r18345) -Codechange: Warn the window that it gets initialized, so it can do some work ahead. 15 years ago
alberth 01d4eba140 (svn r18335) -Codechange: Further reduction of nested_root NULL-ness checking. 15 years ago
alberth 45327a588b (svn r18334) -Codechange: No need to test a pointer after using it. 15 years ago
rubidium 5d38d06313 (svn r18331) -Fix [FS#3334]: news items would with some chat 'bars' not be displayed fully. Fix by erikjanp. 15 years ago
rubidium 293dfd7c3e (svn r18322) -Codechange: remove the WDP duplication; no need to tell the same twice. 15 years ago
rubidium b58b058e2b (svn r18321) -Fix [FS#3331]: make the toolbars also calculate their top location based on the main toolbar's height instead of hardcoding that 15 years ago
rubidium 6a367fda8a (svn r18320) -Codechange: make the terraform and transparency window not use absolute location but manually calculate based on toolbar size etc. 15 years ago
rubidium 8371be352b (svn r18273) -Codechange: do not require widget numbers for default widgets (close, sticky, resize buttons and the caption), except when you want to use SetStringParameter for the caption ofcourse. Also remove the requirement for some of the WDF flags; no need to test for both the flag whether a feature is used and whether the feature is in action. 15 years ago
rubidium 5c6cf4f8d2 (svn r18206) -Fix [FS#3322]: on could 'pan' on the viewports of other windows, like the industry view, too 15 years ago
alberth 777d5ce12e (svn r18201) -Codechange (r18092): No need anymore for initializing nested widgets for Widget* arrays. 15 years ago
rubidium 5f2ddfbc5a (svn r18152) -Codechange: remove the 'minimum window size' from the WindowDesc; it's determined from the (nested) widgets 15 years ago
rubidium abe1c6f3c7 (svn r18150) -Codechange: make the horizontal scrollbar scroll in the opposite direction with RTL 15 years ago
rubidium e438fc6a80 (svn r18130) -Codechange: initial steps into making the vehicle/group lists big font and RTL aware 15 years ago
rubidium 179b924173 (svn r18120) -Fix (r18119): sometimes ReInit didn't dirty the new window 15 years ago
rubidium e7dd53dffc (svn r18119) -Codechange/Fix: always call OnResize so the matrices/scrollbars are initialised without the need for duplicating the OnResize code 15 years ago
rubidium f6ec2fa5b9 (svn r18095) -Fix (r18093): a bit too much nested_array != NULL removal 15 years ago
rubidium 5fe405bad1 (svn r18093) -Fix: the mouseover handler could crash if there wasn't a widget under the mouse 15 years ago
rubidium aeb9f8e715 (svn r18092) -Codechange: remove support for the unnested widgets 15 years ago
alberth 8415a2238f (svn r18090) -Fix: Only allow raising of WWT_* nested widgets. 15 years ago
rubidium 884561f431 (svn r18088) -Codechange: remove CompareWidgetArrays 15 years ago
rubidium 3d2d7af88f (svn r18086) -Codechange: remove 'widget' from WindowDesc 15 years ago
alberth 94261ad01a (svn r18069) -Codechange: Initialize window flags at the same tme as the other fields instead of afterwards. 15 years ago
rubidium cbf4b80b86 (svn r18030) -Fix: screen jumped a bit for at least SDL and Allegro when right-click-dragging 15 years ago
alberth a2e6035f16 (svn r18013) -Codechange: Add possibility to change window size during ReInit(). 15 years ago
rubidium 618621e851 (svn r18003) -Cleanup: prune some unused functions from Window 15 years ago
alberth 0bc03c25f4 (svn r17997) -Codechange: Introduce functions for querying top and bottom of the main view. 15 years ago
alberth b500170ac2 (svn r17995) -Codechange: PreventHiding() is used in one file, make it static. 15 years ago
rubidium 4a970202a9 (svn r17947) -Codechange: make the statusbar, chat input and news window know of eachothers size so they don't get overlapped and don't get invisible (bottoms) of windows when a larger font is used 15 years ago
rubidium 86fd0c0bce (svn r17922) -Fix [FS#3291]: crash when closing NewGRF parameter window with no NewGRF selected 15 years ago
alberth 82e21df3a4 (svn r17915) -Codechange: Allow windows to compute their own initial position. 15 years ago
smatz a558159faa (svn r17869) -Codechange: don't create OnScroll() event for zero delta 15 years ago
rubidium ca0521f89f (svn r17853) -Codechange: remove the 'delta' parameter from OnResize; it was used in ways that aren't always wanted, causing bugs and the like. Also with nested widgets most reasons for handling OnResize have gone. 15 years ago
frosch 21fdc65ce4 (svn r17830) -Fix [FS#3276]: Some windows already need their window_number when setting up smallest size (e.g. for DParams). So assign it earlier in Window::InitializeData instead of dealing with each window separately. 15 years ago
rubidium 66721ffd36 (svn r17751) -Fix [FS#3253]: sometimes clicking on a for the user unfocused edit box would show the OSK (Zuu) 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium e9624fe0cc (svn r17682) -Codechange: remove erroneous space before some commas 15 years ago
rubidium 0032405093 (svn r17673) -Codechange: make InvalidateThisWindowData a function of the window class 15 years ago
alberth 116c77c342 (svn r17572) -Codechange: Use the Window::GetWidget() function to access nested widgets through the nested_array. 15 years ago
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 15 years ago
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 15 years ago
frosch 734edc178d (svn r17525) -Cleanup: Remove SetWindowDirty(), it is completely covered by other functions already. 15 years ago
alberth afe190a216 (svn r17504) -Codechange: un-inlining SetFocusedWidget() as it is not often used. 15 years ago
rubidium 5cb22df0f5 (svn r17375) -Codechange: remove last direct usage of scrollbar variables 15 years ago
rubidium 900aedf270 (svn r17374) -Codechange: make the town and vehicle GUIs use the scrollbar wrappers 15 years ago
rubidium b06e026f97 (svn r17365) -Codechange: introduce wrapper functions to update the position, capacity and count of scroll bars. This to (eventually) prevent the scrollbar overflowing outside of the window 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
alberth e6a1da11a3 (svn r17175) -Codechange: Only auto-raise push buttons. 15 years ago
smatz c5533ae470 (svn r17168) -Codechange: apply coding style to if and while statements 15 years ago
frosch 52f9b8ffbd (svn r17147) -Fix [FS#3048]: Keep vehicle news and viewports following vehicles, when autoreplacing/renewing them. 15 years ago
alberth 6a1af7f74f (svn r17024) -Codechange: Allow InitNested to be done in two parts. 15 years ago
alberth 9856cc9d0a (svn r16963) -Codechange: Added NWidgetViewport widget. 15 years ago
frosch 55e07d0606 (svn r16957) -Fix: Trigger the same window repositioning after changing font/language as it is done after resizing the main OpenTTD window. 15 years ago
alberth 8083d67780 (svn r16906) -Fix (r12939): Child windows of build toolbars were placed inconsistently. 15 years ago
alberth 1978c7dc87 (svn r16890) -Codechange: Allow raising and enabling/disabling of widgets even if they are not used. 15 years ago
alberth b6889daf8d (svn r16848) -Fix: Trying to reduce a nested widget window further than the smallest alowed size should not crash the game. 15 years ago
alberth 9be387761c (svn r16838) -Codechange: Fill Window::nested_array in SetupSmallestSize. 15 years ago
rubidium 463b96a746 (svn r16815) -Fix: reduce the toolbar's priority for handling keypresses from most important to least important, so e.g. the order windows' 'd' skips to the next order 15 years ago
alberth 9efd32d13c (svn r16798) -Fix [FS#3016]: Added several new widget distances for better widget size computations. 15 years ago
alberth 1d8e4a48b4 (svn r16779) -Fix: Take real smallest size of nested widgets into account for initial window position. 15 years ago
alberth 7f851505f9 (svn r16778) -Codechange: Split window initialization in a data part and a size/position part. 15 years ago
alberth e1a26058e9 (svn r16747) -Fix: Non-resized windows also need a post re-init SetDirty. 15 years ago
alberth d65c6cae54 (svn r16740) -Codechange: Self-sizing widgets in intro screen, town directory, and found town windows. 15 years ago
alberth 058bb5d6c3 (svn r16687) -Codechange: Perform re-initialization of windows with nested widgets after a language change. 15 years ago
alberth ec5db12adc (svn r16519) -Add: Prevent hiding of a window titlebar behind the status bar. 15 years ago
alberth 19ccf6912c (svn r16517) -Codechange: Switched intro-screen and town directory window to nested widget trees. 15 years ago
alberth b144a5451c (svn r16516) -Codechange: Added click and drag handling for nested widgets. 15 years ago
alberth 1a4934ef07 (svn r16515) -Codechange: Added scrollbar handling for nested widgets, and finding widgets by type or position in the tree. 15 years ago
alberth 5c9071fcff (svn r16514) -Codechange: Add widget flags, and drawing and invalidating. 15 years ago
alberth 1ba3755aa7 (svn r16513) -Codechange: Add nested widgets root and array to Window, and NWidgetBase::FillNestedArray() to fill the array. 15 years ago
alberth 333795bc70 (svn r16495) -Codechange: Renamed a few variables. 15 years ago
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 15 years ago
alberth 6c126cc5c8 (svn r16484) -Cleanup: Renamed widget variable to widget_index and introduced widget_type variable.
-Fix: Prevented out-of-bounds array access when not clicking at a widget.
15 years ago
alberth 101a6b3320 (svn r16467) -Codechange: Unduplicate setting of widget focus (with thanks to Smatz). 15 years ago
alberth bfaf610fff (svn r16466) -Codechange: Improved wording in comments. 15 years ago
alberth bfb8df3fb9 (svn r16465) -Codechange: Eliminated GetGloballyFocusedWidget(), it was used only once. 15 years ago
alberth 5eecf3e5cb (svn r16463) -Cleanup: Code style fixes. 15 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
alberth db7e24e211 (svn r16317) -Codechange: Generalized finding a widget by type. 15 years ago
rubidium 2664f2a2d9 (svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
15 years ago
alberth efde51e452 (svn r16226) -Codechange: Separating generation of a widget array from WindowDesc to the InitializeWidgetArrayFromNestedWidgets function. 15 years ago
rubidium 329cabab4f (svn r16088) -Codechange: merge HighLightStyle and ViewportHighlightMode as they are basically the same thing 15 years ago
alberth 9d2738b9c4 (svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback 15 years ago
yexo ed330197c4 (svn r15867) -Codechange: remove the assumption that the first widgets are the close box/title bar.
Most work already done by r15756.
15 years ago
alberth 12a31f3d5c (svn r15819) -Add: Nested widgets framework 15 years ago
alberth 2fe151bd92 (svn r15817) -Codechange: Make room for additional widget types (Rubidium) 15 years ago
rubidium 35e4dc0f4b (svn r15760) -Codechange [FS#2704]: support that the resize box is at the left side of the window too (based on work by Alberth) 16 years ago
rubidium 022a929e2d (svn r15756) -Codechange: remove the assumption that the second windget is always the title bar. Also replace a few magic numbers with a const. 16 years ago
smatz af293142fe (svn r15725) -Fix: centering on a vehicle didn't respect its z coordinate 16 years ago
rubidium f9def73be6 (svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth) 16 years ago
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 16 years ago
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 16 years ago
yexo 2b0b9a6367 (svn r15669) -Change: Key presses that are not handles by an input box are no longer marked as handled but given to other OnKeyPress handlers. This makes the global shortcuts like F1 work again when an input box is open. 16 years ago
belugas 3d05c31031 (svn r15627) -Documentation: Add two Doxygen strings (Alberth). 16 years ago
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
rubidium 90e2465d7d (svn r15427) -Codechange: give w->caption_color a more sensible name as it holds the owner of whatever is shown in the window 16 years ago
rubidium 861e9cefb3 (svn r15424) -Codechange: make it possible to have multiple windows with edit box open simultaniously (Zuu). 16 years ago
rubidium 9907742a0f (svn r15423) -Codechange: split widget related types to their own header and add a bit of type strictness. 16 years ago
rubidium ac7757324e (svn r15338) -Fix [FS#2598]: close all construction related windows whenever changing company. 16 years ago
peter1138 aad67b5736 (svn r15312) -Codechange: Handle closing of drop down menus when clicking in a window in a single place, instead of in the OnClick event for some windows. This standardises behaviour so that clicking anywhere in a window will close its drop down menu, which happened before for some windows but not all. In addition the dubious feature of hiding a drop down menu by opening the same menu has been removed. This only caused wasted CPU cycles as a whole new list was generated and then destroyed. Breathe. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
frosch 4780c73224 (svn r15065) -Change (r14919): Allow to select a new station location by ctrl-clicking while distant-join window is open. (PhilSophus) 16 years ago
rubidium c08f520acf (svn r14943) -Cleanup: remove some rogue spaces/replace some rogue tabs with spaces 16 years ago
rubidium c71862174a (svn r14905) -Fix (r14899): in some corner cases already freed memory could be read. 16 years ago
rubidium 84dee1e738 (svn r14899) -Feature: remove the window limit, but leave a configurable limit on the number of non-sticky non-vital windows.
-Fix [FS#2499]: crashes/misbehaviours when (almost) all windows are stickied.
16 years ago
rubidium 19edb3ccc3 (svn r14880) -Codechange: make it clear which way the FOR_ALL_WINDOWS goes (from back to front or vice versa) and make it iterate over the Window* instead of Window**. 16 years ago
rubidium 8c33893ffd (svn r14824) -Fix [FS#1725]: mouse events could be treated twice (illogict) 16 years ago
rubidium e5c1a7b5c3 (svn r14804) -Codechange: unify opening the OSK (Zuu) 16 years ago
rubidium 8ff93c2c14 (svn r14794) -Document: a few functions/variables (Alberth) 16 years ago
rubidium 1357b0a4c2 (svn r14789) -Feature: allow scrolling with the left mouse button pressed (if enabled). Primarily useful for systems with touch screen (aapo) 16 years ago
rubidium b3f2f40db7 (svn r14785) -Fix [FS#2132]: vehicle list for station gets closed when station view is closed even when the vehicle list is stickied. Other vehicle lists are not deleted when their 'opening' window gets closed so do the same with the station view. 16 years ago
rubidium 1599ade7ca (svn r14679) -Fix [FS#2431]: opening the OSK on the chatbox did disable map scrolling (with keyboard) until another window with editbox was opened and closed. Just "refcount" the open edit boxes instead of setting/clearing a bit when opening/closing a window. 16 years ago
rubidium a999bb3227 (svn r14466) -Doc: remove some obsolete parameters, fix a few parameter names in comments and add a little more doxygen documentation. 16 years ago
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
smatz 6987e6015a (svn r14395) -Fix [FS#2285]: crashes and GUI desyncs when order is deleted/modified while the timetable window is open
-Fix: close any dropdown and child windows in the Order and Timetable windows when selected order is deselected, deleted, ...
16 years ago
rubidium 6a931d67cd (svn r14390) -Codechange: replace magic constants with symbolic constants. 16 years ago
rubidium d0c1a989a4 (svn r14047) -Codechange: move chatmessage handling to the network directory as that's the only case chat messages are used. Furthermore remove any trace of chatmessages when compiling without network support. 16 years ago