Commit Graph

156 Commits

Author SHA1 Message Date
Regalis
39ddd63e0c Removed references to GameMain from GUIListBox & GUITextBlock (-> launcher works again) 2017-05-02 23:39:09 +03:00
Regalis
f92c2df9f7 TextBoxes align text to the right and hide any overflowing text at the left if the width of the box is exceeded 2017-04-30 18:14:25 +03:00
Regalis
eddc33dc89 Smoothly scrolling listboxes, items in the boxes can be partially visible 2017-04-30 17:57:01 +03:00
Regalis
6397bc432e UI tweaks 2017-04-27 21:08:20 +03:00
Regalis
645df3fde6 Crew command menu and the info menu can't be open at the same time, UI layout tweaking again 2017-04-23 21:06:30 +03:00
Regalis
2cac176c87 More UI tweaking 2017-04-20 21:24:52 +03:00
Regalis
499284dc91 UI layout tweaks 2017-04-20 17:39:32 +03:00
Regalis
9a5777183f Separate sprites for horizontal and vertical scrollbars, style tweaking 2017-04-18 19:24:13 +03:00
Regalis
dc6ed7daf1 Separate component style for item UIs + option to select the style in the item config files, removed a bunch of hard-coded UI element color changes 2017-04-10 18:11:33 +03:00
Regalis
34f0ae39b6 - Sliced sprites are scaled instead of tiling (so they work properly even if the UI element is smaller than the sprite)
- Option to use separate sprites for different states of a GUIComponent (e.g. hovered/pressed button)
- Option to configure "child styles" for the individual elements of a GUIComponent (e.g. the background frame and the handle of a scroll bar)
2017-04-09 21:26:35 +03:00
Regalis
3844dd9dac GUIStyle logic changes: instead of having a predetermined GUIComponentStyle for each type of GUIComponent, any GUIComponent can use any style. The GUIComponent constructors take the name of the style as a parameter, and if no style is specified, the default style for the GUIComponent in question will be used. 2017-04-08 16:46:53 +03:00
Regalis
1fe6427c05 9-Sliced UI sprites & some new UI graphics 2017-04-07 22:22:07 +03:00
Regalis
00b7193b6b Minor optimizations: GUITextBlocks don't reposition and wrap the text when only the position of the text block changes (almost killed my laptop by spamming a bit too many messages to the debug console), less unnecessary floor raycasts 2017-04-06 21:58:19 +03:00
Regalis
0e5de469d3 Fixed infinite loop in WrapText if the line length is smaller than an individual character, text scale is taken into account in GUITextBlock wrapping 2017-03-27 21:08:14 +03:00
Regalis
885a8c610c Text scale in GUITextBlocks and ItemLabels can be changed, text wrapping fix (words that are too wide for one line shouldn't cause overflows anymore) 2017-03-22 23:22:54 +02:00
Regalis
b38512865d GUIListBoxes don't add children that aren't in the view to GUIUpdateList (-> can't scroll the listbox with the scroll wheel when the cursor is above/below the box) 2017-03-19 19:19:04 +02:00
Regalis
be72a04d90 Switched to the pro version of Code Bold 2017-03-09 20:04:33 +02:00
juanjp600
7c6032e3fc Removed GUITextBlock.caretAt
Just a leftover of something I tried to implement but never got around to finishing.
2017-03-07 13:56:12 -03:00
juanjp600
d6c292a2cc SharpFont + ScalableFont implementation
https://github.com/Robmaister/SharpFont

TODO: replace Code Bold.otf with the full version, fix any bugs, build on Linux, possibly move ToolBox string wrapping and limiting logic to ScalableFont class for better results.
2017-03-07 13:44:42 -03:00
Regalis
4c863cfdd7 Some extra error checking in GUIComponent and PhysicsBody syncing logic 2017-03-03 20:29:33 +02:00
juanjp600
ee16f0708b -try-catch blocks for GUIComponents fixedChildren lists
-player name and IP address in debug messages
-crash logs now output up to 15 messages
2017-03-03 15:14:18 -03:00
Regalis
9e16542b13 Replaced the arrows in server lobby buttons with images, made GUIImages rotatable (todo: make them align correctly when rotated/scaled), fixed the size of the sub save warning messagebox 2017-02-27 22:28:10 +02:00
Regalis
7aafdadae5 (Maybe?) fixed "collection was modified" exceptions in GUIComponent.AddToGUIUpdateList
http://undertowgames.com/forum/viewtopic.php?f=21&t=5915
Couldn't reproduce the exception and not sure why exactly it happens, but I think this should prevent it
2017-02-24 19:16:42 +02:00
Regalis
c29be7862b Disabled the splash screen in the Linux version (apparently video playback hasn't been implemented in DesktopGL) 2017-02-20 22:03:58 +02:00
Regalis
5871faa2dd Added a few new console commands: disablehud, lockx & locky (disables submarine movement on the respective axis), followsub (toggles whether the camera moves with the subs) 2017-02-13 16:23:28 +02:00
Regalis
b375422c4e "Undertow games" splashscreen 2017-02-05 18:41:49 +02:00
Regalis
5db3315bf3 The "check updates" tickbox in the launcher can be clicked again, nicer changelog formatting in the launcher, setting kb focus to the item searchbox in sub editor automatically 2016-12-14 19:53:06 +02:00
Regalis
d7ed27381f List of linkable subs in the editor is refreshed after saving a new sub 2016-12-14 17:00:09 +02:00
Regalis
a1d050d307 Keyboard focus is automatically removed from a GUIComponent if it's not in the GUIUpdateList 2016-12-12 13:29:41 +02:00
Regalis
0b03b78606 Entities that are behind other entities can be selected using a listbox that appears when hovering the cursor over them, itemcomponent GUIFrames aren't added to GUIUpdateList in sub editor (unless in character mode) 2016-11-29 17:30:13 +02:00
juanjp600
fac0c850a5 Changes to collider behavior
The collider now levitates above the ground, which makes small obstacles a non-issue. The raytest also helps the collider stick to staircases, so players don't jump off anymore.
Crouching now changes the collider to a smaller version, so now there is actual functionality to crouching.
I also removed the anchor from corpses of network players. I'm not entirely sure why this was done, but removing it doesn't seem to break anything.
2016-11-16 21:30:49 -03:00
juanjp600
d2c17274fe GUI elements now respect render order + some minor distance comparison optimization 2016-11-15 22:26:36 -03:00
Regalis
c2098f06f8 Removed a redundant DrawRectangle method & redundant sub visibility culling in GameScreen 2016-11-12 18:29:39 +02:00
juanjp600
0e9c20c666 Case-sensitivity checks on Windows
Should prevent "TigerThresher" from happening again.
2016-11-10 21:45:59 -03:00
Regalis
eb2c51c2f1 Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method) 2016-10-31 20:50:20 +02:00
Regalis
71d4df6300 Highlighting inventory slots when moving items around, red highlight if an item can't be placed in a slot 2016-10-12 16:18:32 +03:00
Regalis
d4e9116b0f Audio channel states visible in debug view + some sound fixes:
- a short "cooldown" after each footstep sound (prevents the sound playing multiple times during one footstep)
- water flow sounds are only played by one of the hulls a gap is between
- flow rate affects the range of the flow sound
2016-10-09 20:11:08 +03:00
Regalis
39c31b10f5 Fixed child rects not being updated when modifying GUIButton or GUITickBox rects 2016-10-09 14:17:22 +03:00
Regalis
3de4645357 Separated waypoint edit/update methods, fixed items/structures being immediately placed when selecting them in the editor, fixed GUIListBox children ovrlapping with the scrollbar 2016-10-08 19:46:56 +03:00
juanjp600
94895edbdb Fixes and minor enhancements for sub editor
- Zoom now works relative to the mouse's position rather than the center of the screen, much like Valve's Hammer Editor (or pulsegun's map editor shameless plug ;) )
- Rectangles now have line widths dependent on the camera zoom, not perfect but it's better than having lines disappear
- Fixed background resizing
- Fixed editor being completely broken because of no vsync, might still have a few bugs here and there
- Fixed selection rectangle not rendering at all when dragging from bottom right to top left
- Newline change in Item.cs
2016-10-06 21:15:01 -03:00
Regalis
8cac5b2ad2 Removed duplicate child update code from GUIListBox 2016-10-05 18:29:55 +03:00
juanjp600
14ae355f19 Merge remote-tracking branch 'refs/remotes/barotrauma/combat-mission'
Conflicts:
	Subsurface/Source/GUI/GUIListBox.cs
2016-10-04 22:30:29 -03:00
juanjp600
4874ad2ef8 Host can have subs spawn with more items
TODO: check if clients see the extra cargo, they probably don't
2016-10-04 22:28:13 -03:00
Regalis
9ca3b24585 Moved some more UI update logic from draw to update
todo: inventories (oh the horror)
2016-10-04 20:41:00 +03:00
Regalis
ffc6782025 Removed fixed timestep logic from GameScreen (redundant now because the logic is handled in GameMain) 2016-10-04 19:54:17 +03:00
Regalis
41289c098a Moved some UI element updates from draw to update 2016-10-04 18:28:56 +03:00
juanjp600
1187686449 Host can disable spawning of certain characters
GUITickBox might not work very well because of the override of Rect, might want to look into that later
2016-10-03 22:27:32 -03:00
juanjp600
e1296e4a8e Backported vsync changes from new-netcode, WIP hull visibility culling
The hull culling functions are there, they just aren't being used right now because there are some annoying bugs.
2016-10-02 22:24:31 -03:00
Regalis
cbce785078 - combined the "crew" and "hire" tabs in the SP lobby
- tooltips that show item descriptions in the store menu
- preventing tooltips from going outside the screen
- medical items can be bought, more expensive railgun/depthcharge shells
2016-09-29 18:59:58 +03:00
Regalis
790212a20b Merge branch 'walldamage' 2016-09-26 16:28:52 +03:00