Commit Graph

11 Commits (8950db9cb4aac564db980b0738380843ecc7f99d)

Author SHA1 Message Date
Nicolas Hake 8950db9cb4 Fix incorrect assignment instead of comparison in TutorialGuide 2018-07-23 10:45:52 +02:00
David Dormagen a7b674f662 tutorial guide: use full width for text when not showing buttons (related to #1612)
A little rant about why I 'hardcoded' the value 2.9em:
If you are using constants to specify some positions, please give the meaningful names so that other people can work with them. E.g. calling something "menu_height" and then using it to adjust the X position AND the Y position of a BUTTON probably means it's not the "menu_height"...
I believe that the current "dynamic layout" will terribly break if someone would e.g. decide that the menu should be one line higher (because hey, then everything else would also move).

The real solution is to rewrite the layout of the menu to be dynamic and use constants (because currently it isn't and doesn't, it just tries to.).
2016-01-19 20:39:39 +01:00
David Dormagen cd57e47493 script GUIs: fixed text clipping and scrolling (#1605, related to #1612)
Previously, text windows would just change their own size and leave cropping and scrolling to their parent. This made the code easier, but was apparently unintuitive for scripters.
Now text windows do not change their size but show a scrollbar themselves (unless GUI_FitChildren or GUI_NoCrop of course).

This implied some other changes, because now parents without a scroll bar need to clip, too. (Or the clipping needs to be moved to the child window. But then it would have to be made sure that menu decoration can still go out of the bounds.)
And this also needed some script fixes where scripters assumed the text windows would not scroll (and thus made them smaller than 1em).

related to https://git.openclonk.org/openclonk.git/commit/46ad28ea652fad34814a866f3b9c305aa7cc6faa
2016-01-18 21:39:54 +01:00
David Dormagen 46ad28ea65 tutorial guide: don't scroll portrait with text
..by putting the text into another subwindow. Might be good to "fix" (it's intended but possibly not wise) that in the engine, but not right now before the release, because it could introduce new bugs.
2016-01-12 23:17:49 +01:00
Maikel de Vries d94b2356b1 add function to tutorial guide to get the amount of messages it has 2016-01-10 20:54:03 +01:00
Maikel de Vries 30d45fcdc3 streamline tutorial guide script interface 2016-01-01 13:45:50 +01:00
Maikel de Vries 76427c0b82 fix tutorial guide message callbacks when guide is hidden 2015-12-20 09:14:13 +01:00
Maikel de Vries d16676a798 add button (G) to the tutorials to hide/show guide messages 2015-12-17 16:47:20 +01:00
Maikel de Vries a4ed4a9373 add option to tutorial guide to close on last message 2015-10-15 19:24:59 +02:00
Maikel de Vries 626765dd45 fix tutorial guide after HUD changes 2015-10-11 09:14:55 +02:00
Maikel de Vries 7cdf3e6d1f add tutorial guide 2015-09-13 13:38:55 +02:00