rubidium
9a87e1e0ea
(svn r7356) -Codechange: replace 'for (i = 0, wi = w->widget; wi->type != WWT_LAST; i++, wi++)' type for loops with 'for (i = 0; i < w->window_count; i++) { wi = &w->widget[i];'-type for loops for better readability.
...
-Codechange: use IsWindowWidget(Disabled|Hidden) in favor of IsWidget(Disabled|Hidden).
18 years ago
peter1138
af017c198c
(svn r7310) -Codechange: Change scrolling dropdown box to use 1 scroll unit = 1 line
...
of text, instead of 1 row of pixels. This fixes behaviour of scrolling
with the scrollbar buttons and the mouse wheel.
18 years ago
Darkvater
53f954edd3
(svn r7206) -Codechange: Remove (some of) the magic needed for windows that could be invalid after
...
a call to DeleteWindow() somewhere else. Also do some cleanup with AllowWindowDescFront()
18 years ago
peter1138
ca8605ebc5
(svn r7086) -Featurette: Add additional positioning for long dropdown lists: first, try to fit the dropdown below the calling widget, as before; second, try to fit it wholly above the calling widget; and lastly, fit the list below the widget and add a scrollbar.
18 years ago
peter1138
5f4118c638
(svn r7058) -Codechange: Truncate text in window captions
18 years ago
Darkvater
1324835bc9
(svn r6927) -Codechange: No need to explicitly cast a boolean to a boolean and move draw_default
...
goto outside of switch statement.
18 years ago
Darkvater
1e69ac550d
(svn r6926) -Codechange: Rename WWT_4 to WWT_TEXTBTN_2 and WWT_6 to WWT_INSET (credits to peter1138
...
for the aptly found name)
-Codechange: Remove the explicit numbering from WindowWidgetTypes
18 years ago
Darkvater
d303ef94b3
(svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL is only plain panel,
...
WWT_IMGBTN must contain an image for drawing. Renamed WWT_PANEL_2 to WWT_IMGBTN_2
because that is what it is. Added WWT_PUSHBTN that is either just a pushable button,
or a textbutton, which text's drawn dynamically independent of widget.
18 years ago
belugas
67b88e7ed9
(svn r6661) Feature: Windows are not restricted to 32 widget items anymore.
...
The functions required to do so are to be found in window.h.
Rather then use the old deprecated disabled_state, hidden_state and click_state uint32 variables,
we now need to use accessors like SetWindowWidgetDisabledState, SetWindowWidgetHiddenState or SetWindowWidgetLoweredState.
This is the final commit for the merge of XTDwidget branch.
18 years ago
belugas
17eb65050b
(svn r6631) -Codechange: Use accessors for click_state.
...
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
18 years ago
belugas
1c56a5ae0f
(svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
18 years ago
belugas
f01e761f80
(svn r6423) -Codechange: Replace two magic numbers by appropriate enum/define value
18 years ago
Darkvater
56d06ba0a7
(svn r6379) -Codechange: cast 'remove babel' on widget's unkA and rename it to 'data'.
18 years ago
tron
b83a3f8726
(svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
...
All the struct holds is a simple colour gradient, so using a simple array with 8 entries is more clear
Also add the names of colour the gradients as enum
18 years ago
tron
96f9a0ad7b
(svn r6210) Remove FR_NOBORDER, because it is exclusivly used in conjunction with FR_TRANSPARENT
18 years ago
tron
17c610c0f4
(svn r6209) Move DrawFrameRect() out of gfx.[ch], because it uses data (_color_list) which the renderer shouldn't have know about
18 years ago
belugas
4c2abf1de5
(svn r6046) CodeChange : Rename WWT_5 Widget type to WWT_LABEL : a centered label
...
CodeChange : Move almost all fixed strings from ON_PAINT event to Widget array using WWT_LABEL.
Feature : All "Select Refit Cargo" are now centered, instead of been left aligned
18 years ago
peter1138
5c94fd7afa
(svn r4753) - Truncate text in dropdown lists to stop text overflowing.
19 years ago
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
peter1138
37c3cd2e5b
(svn r3349) Fix off-by-one error in drawing matrix widget, from r3181.
19 years ago
peter1138
ec274769b9
(svn r3302) - Fix: split drawing of text buttons and the closebox, so the closebox symbol can be centred.
19 years ago
peter1138
4191adb92c
(svn r3247) - Fix: "[ 1335580 ] sticky windows not sticky anymore"
...
Determine clicked status of sticky icon from window flags rather than the widget click state. This keeps the status in one place where it can't get out of sync.
19 years ago
peter1138
4d2c4c5d8a
(svn r3225) - Fix for "[ 1359165 ] Autoreplace problem with r3171 and later" -- Move the disabled/hidden bits to custom data in window struct.
19 years ago
tron
1b0091e0d2
(svn r3184) GB/SB
19 years ago
tron
f7abff5f96
(svn r3181) -Bracing
...
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
peter1138
6124ee0974
(svn r3178) - Codechange: move static _dropdown_* vars into the window custom data, giving var1 and var2 more meaningful names.
19 years ago
peter1138
59e885c2bf
(svn r3171) - Codechange: remove static _dropdown_disabled/_dropdown_hidden variables, as a window already contains this information.
19 years ago
tron
a21762980d
(svn r3134) Forgot to commit one file in r3133
19 years ago
tron
2cc2154ad2
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
...
nothing spectacular, just some stuff, which piled up
19 years ago
peter1138
9c2700b14c
(svn r2974) -Fix: Drag and drop selection on drop down boxes didn't select correct item when some items were hidden.
...
-Separate disabled and hidden masks in drop downs to support both hidden and disabled items.
19 years ago
Darkvater
8e6a911700
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
...
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
19 years ago
tron
0fe36a6900
(svn r2932) Give the strings consisting of an up/a down arrow symbolic names
19 years ago
celestar
04f4d8237b
(svn r2736) -Codechange: De-mystified GfxDrawFillRect a bit, and used enums from table/sprites.h. You can now change the number of bits used for sprites and switches in the SpriteSetup enum and the rest should work automagically. Can be used to increase the number of active sprites to 2^19 in case there are no colortables (recolor sprites) in any newgrf. We should possibly move the the colortables to an own list, but how to detect them in a newgrf.
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
e53c4db866
(svn r2664) Remove depedency on player.h from variables.h
19 years ago
ludde
a069876725
(svn r2573) Codechange: Removed WDF_RESTORE_DPARAM, it's not needed with the new string system.
...
Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
19 years ago
tron
1b4a0897b6
(svn r2535) Tabs
19 years ago
Darkvater
a014ef6340
(svn r2530) - Fix: [ 1219829 ] Mouse-wheel crashes OTTD. Widget detection failed to detect the most-right and most-bottom pixels of a widget. If scrollwheel is used on a not-found widget (such as the background of the toolbar), it will now fail correctly (glx)
19 years ago
hackykid
8607bbf06d
(svn r2444) - CodeChange: Add an enum for demagicifying the values of the 'flags' parameter of DrawFrameRect(). (_Abraxa_)
19 years ago
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
Darkvater
081ff24282
(svn r2161) - Fix: When resizing a window, the button is also visibly depressed
...
- CodeChange: Use images as arrows in the scenario-date scroller, looks better
- Feature: Clicked buttons with images/text now visibly depress their contents when pressed (eg it really seems like the button is moving)
- Fix: Fix sprite offsets of the arrow sprites in openttd.grf
20 years ago
tron
204d08140a
(svn r1867) Include tables/sprites.h only in files which need it
20 years ago
bjarni
518034d28d
(svn r1679) Fix: dropdown menus now returns the index of the string that was clicked even if a previous item is hidden
...
This bug was not triggered by the current code, but it's easier to code new features if you do not have to think about such limitations
like you can't hide an item in the middle of the list ;)
20 years ago
tron
e5cd6b6193
(svn r1596) Add some more statics
20 years ago
tron
8b7c1e94e1
(svn r1402) Trim trailing whitespace
20 years ago
darkvater
c4b682f996
(svn r1380) -Fix: missed widget fixes; thanks Jango and TestMan57
20 years ago
darkvater
4c5f6fe360
(svn r1379) -Fix: various GUI glitches. Added default sizes to various widgets. Sticky/Resize- and Scrollbar must be 11 pixels wide, Horizontal scrollbar 11 pixels high, caption must be 13 pixels. I hope I didn't forget any widgets, the game will assert for that so report them to me!
20 years ago
darkvater
4f496b8681
(svn r1369) -Feature(ish): Added sprites for up/down and left/right arrows. Anywhere where there are horizontal scrollers these are now left/right arrows
20 years ago
truelight
86fa7720f9
(svn r1368) -Fix: Disabled dropdown menu options are gray again (instead of blue)
...
(redid revision 1357)
20 years ago