Commit Graph

138 Commits (c00a8cf3c3a33a88c5a8aba152d06d9f483921a5)

Author SHA1 Message Date
Maikel de Vries aa892171fb update version to 8.0 in DefCore.txt, Scenario.txt and Version.txt 2018-01-28 13:18:46 +01:00
David Dormagen 6b797e300e inventory bar: stack count always falls back to contained object count
Related to #1970 and 5fc07df757
This replaces the very hacky implementation just for the dynamite with a more general solution (and e.g. also works with the grenade launcher).
2018-01-13 15:24:08 +01:00
Sven Eberhardt 5fc07df757 Fix dynamite stick display count within dynamite box in interaction menu. 2018-01-09 18:00:35 -08:00
David Dormagen 42b6e1f69c extra-slot display now shows object instead of definition (#1924)
Showing the definition means that objects can not modify their display in the extra-slot. E.g. the arrows would always show their "full" state. Now the arrow count is correctly displayed in the extra-slot.
2017-06-28 19:22:05 +02:00
Maikel de Vries 5e6cf4e7b8 show goal name in goal menu 2017-01-15 15:38:32 +01:00
Lukas Werling 68ddeb3bed Convert all text files in planet to UTF-8 2016-12-11 21:19:13 +01:00
Mark 202e1ed682 HUD modularity: Callback for controller ID
I think that the call GUI_Controller->GetControllerID() has more appeal, but it makes the code confusing maybe.
2016-11-26 11:10:35 +01:00
Mark b557719287 HUD modularity: Library for HUD controller
Extracted the basic functionality for HUDs from GUI_Controller to a library. This way, if you want to create a new HUD, you only have to include the library and all the desired components. Previously you had to copy the script from GUI_Controller, too. This holds of course only if you want to actually remove components from the HUD, and not just add to it.

Currently the GUI_Controller is referenced as the ID for the HUD, will change this to a callback.
2016-11-26 11:10:29 +01:00
Mark 84dd95df34 Goal controller: Player parameters for goal display functions
Allows goals with different symbols per player.
2016-10-09 11:34:13 +02:00
Mark 9fcd3ee13e Goal controller: Extracted functions
Made the variable names consistent between GoalSubMenu() and OnGoalUpdate();
Extracted the functions GetGoalSymbol() and GetGoalGraphics();
2016-10-09 11:26:47 +02:00
Mark b18a7b7a3f Goal controller: Readability
The change in call structure should not make that much of a difference in performance.
2016-10-09 11:18:10 +02:00
Mark 0d22f58b52 Goal controller: Get short description only once. 2016-10-09 11:13:12 +02:00
Mark 0732b7dc87 Goal controller: Code cleanup 2016-10-09 11:11:51 +02:00
Mark b235c5e9e4 Goal controller: Simplified code 2016-10-09 11:11:28 +02:00
Mark f52159b835 Goal controller: Variable definitions 2016-10-09 10:58:37 +02:00
Mark be207737bc Goal controller: Slight optimization
No need to call the function twice. This is trivial though, the call is not expensive usually.
2016-10-09 10:51:48 +02:00
Clonkonaut f37eda9508 Moved HUD proplist definitions to separate, overloadable functions.
See http://forum.openclonk.org/topic_show.pl?pid=32552#pid32552 for more information.
2016-10-06 01:47:45 +02:00
Sven Eberhardt 0cdad64934 Fix goal and rule displays (#1811) 2016-09-14 21:46:16 -04:00
Sven Eberhardt 4caa9ee217 Fix disappearing health bars after crew reactivation and savegame reload (#1629, #1740) 2016-08-28 22:13:08 -04:00
Sven Eberhardt 5db45c0f47 Merge branch 'master' into qteditor 2016-08-06 21:45:19 -04:00
Sven Eberhardt 693c0124b9 Update more goal icons for better editor size 2016-08-04 21:15:25 -04:00
Clonkonaut 2713462cd2 Show quick switch key above quick switch item slot in HUD.
This will prepare the quick switch system according to Maikel's suggestion (http://forum.openclonk.org/topic_show.pl?pid=31070). The highlighting method is open to discussion. Currently, font colour and style are similar to the interaction key above the action bar icon. But it is very well possible that this will look bad when the key name is very long.
2016-08-01 17:14:34 +02:00
Sven Eberhardt 36685a3119 Add HideInCreator=true to internal/helper/library definitions 2016-07-10 22:06:48 -04:00
David Dormagen a9ac0c85ab inventory bar: moved slot number to the top (#1639)
This separates the slot number visually from the item stack count.
2016-01-29 21:14:07 +01:00
Sven Eberhardt 4257b84f84 Fix HUD script errors when cursor does not include inventory control 2016-01-24 18:16:46 -05: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
Sven Eberhardt 3dad1c6d81 Turn MaxContentsCount and HandObjects into properties instead of callbacks (Possibly fixes #1553) 2016-01-10 10:41:34 -05:00
David Dormagen a3e4b620b9 reworked interactions (grabbing etc.)
The player interface is now similar to how picking up works. This should increase acceptance. Also it was pretty fucked up before. The action bar is gone.
The script logic is now outsourced into a new library similar to the other stuff.
Objects can overload the selector for the new interaction (see "call elevator case").

Additional issues hit and resolved when working on this:
Shifting a cursor did not cancel certain actions (and there was no callback for that). This is now solved by adding two new callbacks.

Issues hit and not resolved:
Certain interactions (calling an elevator case, flipping a construction) are in some control library. They should be in the respective objects (and shown via callbacks etc.). Meh.
The internal interface (declaring interactions etc) has a few places where proplists are just translated because the properties are called differently. This is also a fuckup (i.e. a.interaction_object = b.Object) where the properties should just have been called the same in all places from the beginning.
The name "Action Bar" is pretty misleading now as it is no bar. But that's not something visible to the players. todo: cleanup.
2016-01-02 13:02:45 +01:00
Sven Eberhardt ab47831ab5 Make GUI_Controller->ShowWealth() static and apply to players joining after the call. 2015-12-09 00:40:18 -05:00
Clonkonaut 6cd2faf582 Disabled wealth display by default (#1425).
Can be shown by using GUI_Controller->ShowWealth(). Did that for GoldRush but see bug #1477.
2015-12-05 12:42:52 +01:00
David Dormagen d21fb63a3b Library_Stackable: properly update stack count in inventory bar
Previously, using a javelin stack would not lower the displayed stack number in the inventory bar.
2015-11-22 11:37:26 +01:00
David Dormagen d7db8a9707 fixed dangling custom overlays
Custom overlays would only be closed when the object was changed. This was not apparent for the loam, because the new overlay would always completely obstruct the old one.
But with the dynamite box displaying the sticks, the old ones never disappeared.

Now the custom overlay is explicitely closed and the update is also done if the slot previously had a custom overlay and no has none.
2015-11-22 11:03:43 +01:00
David Dormagen e29028457e fixed count display of stackable objects
The count was displayed twice in certain situations: in the picture AND as a number.
Now the responsibility for displaying the count is solely on the menus' side. The objects only show an additional overlay when their count is infinite (to not display an arbitrary "50" there).
2015-11-10 17:32:38 +01:00
David Dormagen ad69cd9293 enabled objects to provide a custom overlay for the inventory bar and the interaction menu
This can e.g. be used for the water barrel to show the fill-level. Or by an adventure scenario to highlight quest items.
Or by third-party packs to do other cool stuff.
2015-11-07 21:20:08 +01:00
David Dormagen 58b633bea4 fixed some HUD items disappearing on GUI_Controller->Reset() (#1415)
This is a definition call. There is no valid "this". The call should go to the fresh object.
2015-10-27 18:44:37 +01:00
David Dormagen f68861b80e goal menu: update only certain properties of menu to not reset tags
The background would always be reset when the menu was updated.
2015-10-20 17:14:50 +02:00
David Dormagen 2f7a0b960c goal menu: do not have pointers to objects in the menu layout anymore (#1420)
This actually led to an infinite recursion in Mine Rescue when clicking on the goal. The goal menu would link to the goal itself which would link to the elevator -> case -> elevator -> case...
Now only layout stuff is in the layout proplists.

I noticed that with multiple goals one always gets a background. But I guess that had already been the case beforehand? Anyway, that's another issue.
2015-10-19 19:07:39 +02:00
Clonkonaut b9da09de4e Krakatoa: Show goal icon depending on difficulty setting. 2015-10-12 22:53:42 +02:00
Clonkonaut 4443298b6d Goal icons added to Krakatoa and Chine (#1142). 2015-10-12 22:30:11 +02:00
Clonkonaut e8ecdb0251 Fix interaction bar hotkeys. 2015-10-11 16:38:33 +02:00
Clonkonaut 9f7b2fc007 ActionBar: Show description for ACTIONTYPE_EXTRA. 2015-10-06 15:08:50 +02:00
Clonkonaut 9aee7ca973 GUI_Controll_CrewBar: Do not access crew_warnings as array if objects is deleted. 2015-10-05 13:33:36 +02:00
Sven Eberhardt acc14ec7c9 Don't show HUD in NO_OWNER viewports (#1414). 2015-10-03 20:49:17 -04:00
Clonkonaut bfd0bd035d Added magic energy support for 3rd party devs. 2015-09-30 10:20:20 +02:00
Clonkonaut 178e904fdd HUD redesign. Beware!
Added interaction icon to help knowing when interaction is possible.
Limited crew portraits and information to two clonks.
Added additional warnings texts for further clonks (crew count > 2).
Moved inventory from bottom to top.
2015-09-30 10:11:43 +02:00
David Dormagen 439cfac129 custom GUIs: do not break text when style flag NoCrop is set and set NoCrop for HP display 2015-09-25 15:01:24 +02:00
David Dormagen f4f9afa477 custom guis: for the Player property, distinguish between NO_OWNER and nil
NO_OWNER means the message will be visible for noone (can f.e. be used to hide a ui window). nil means the message won't have visibility restrictions. This is probably what the scripter expects.
Previously, a value of "nil" would have been read as 0. So not setting the Player property and setting it to nil would mean two different things.
2015-09-23 22:03:29 +02:00
Sven Eberhardt 5b981be93c HUD: Fix extra slot display in multiplayer. 2015-09-20 20:43:12 -04:00
Sven Eberhardt 5b6ba5d980 Fix nil pointer in inventory HUD when inventory slot count of active target is reduced. 2015-09-10 18:52:49 -04:00
Sven Eberhardt fe0b85870c Fix division by zero in HUD on undefined health and breath values. 2015-09-10 18:35:04 -04:00