5d2c9f2...bdbcef4
commit bdbcef41bfbc42beeb2d942e7db431b8ab627f1c Author: itchyOwl <lauri.harkanen@gmail.com> Date: Thu Mar 7 13:31:02 2019 +0200 Simplify the sprite related commands. commit 49c8e1cd01953ae31cff99bf35432ab887b45d62 Author: itchyOwl <lauri.harkanen@gmail.com> Date: Thu Mar 7 13:05:20 2019 +0200 Rename "Reload Texture" button as "Reload Sprite", because it actually reloads both the xml and the texture. Add the button text into the localization file. commit 84f58d9e0bb46f29412f936d569348e46227c9d5 Author: itchyOwl <lauri.harkanen@gmail.com> Date: Thu Mar 7 12:50:51 2019 +0200 Add the option to reload xml/texture/both for items when they are hovered over with the mouse. dry. commit 732084c044e6a2c220cee8d5c1d9b5e4ce05587d Author: itchyOwl <lauri.harkanen@gmail.com> Date: Thu Mar 7 12:48:49 2019 +0200 Fix the sprite name of the right hand in the assistant job gear. commit 30344369d7e87a17312cc839f195c36c77c4a3b2 Author: itchyOwl <lauri.harkanen@gmail.com> Date: Thu Mar 7 12:26:20 2019 +0200 Fix ReloadXML failing when multiple source elements are found. commit ddb6fb48b6e0789b18a1ea889dcdf408fcbb5b12 Author: itchyOwl <lauri.harkanen@gmail.com> Date: Thu Mar 7 11:47:13 2019 +0200 Fix damagemodifier multiplier not applied on particles if no sound is played. commit 41206013be41d240b12dad48f4ddaba9b072742b Author: itchyOwl <lauri.harkanen@gmail.com> Date: Thu Mar 7 11:46:22 2019 +0200 Fix engigear lower arm sprite name. commit 8ce938305206ca65aeb00515639e799d9f2fd526 Merge: e6166d2ef 61703e8af Author: itchyOwl <lauri.harkanen@gmail.com> Date: Wed Mar 6 18:53:36 2019 +0200 Merge branch 'dev' of https://github.com/Regalis11/Barotrauma into dev commit e6166d2ef24489bac6f217211849884013dbf4e6 Author: itchyOwl <lauri.harkanen@gmail.com> Date: Wed Mar 6 18:53:30 2019 +0200 Implement husk sprite overlays as wearables. Add new husk injector (wip). commit 367c4f5b3784c65c3c26807dd6c10e837960c6bb Author: itchyOwl <lauri.harkanen@gmail.com> Date: Wed Mar 6 18:52:15 2019 +0200 Add console commands for changing the gender and race of the character. commit 61703e8af274c8f5d9e05575ebaf13c9bde8855f Author: Iiro Enges <iiro@fakefish.fi> Date: Wed Mar 6 17:47:09 2019 +0200 Refined environment item scales and colors
This commit is contained in:
@@ -66,47 +66,6 @@ namespace Barotrauma
|
||||
CanBeFocused = false
|
||||
};
|
||||
|
||||
Point scrollButtonSize = new Point((int)(200 * GUI.Scale), (int)(30 * GUI.Scale));
|
||||
|
||||
crewArea = new GUIFrame(HUDLayoutSettings.ToRectTransform(HUDLayoutSettings.CrewArea, guiFrame.RectTransform), "", Color.Transparent)
|
||||
{
|
||||
CanBeFocused = false
|
||||
};
|
||||
toggleCrewButton = new GUIButton(new RectTransform(new Point((int)(30 * GUI.Scale), HUDLayoutSettings.CrewArea.Height), guiFrame.RectTransform)
|
||||
{ AbsoluteOffset = HUDLayoutSettings.CrewArea.Location },
|
||||
"", style: "UIToggleButton");
|
||||
toggleCrewButton.OnClicked += (GUIButton btn, object userdata) =>
|
||||
{
|
||||
toggleCrewAreaOpen = !toggleCrewAreaOpen;
|
||||
foreach (GUIComponent child in btn.Children)
|
||||
{
|
||||
child.SpriteEffects = toggleCrewAreaOpen ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
characterListBox = new GUIListBox(new RectTransform(new Point(100, (int)(crewArea.Rect.Height - scrollButtonSize.Y * 1.6f)), crewArea.RectTransform, Anchor.CenterLeft), false, Color.Transparent, null)
|
||||
{
|
||||
//Spacing = (int)(3 * GUI.Scale),
|
||||
ScrollBarEnabled = false,
|
||||
ScrollBarVisible = false,
|
||||
CanBeFocused = false
|
||||
};
|
||||
|
||||
scrollButtonUp = new GUIButton(new RectTransform(scrollButtonSize, crewArea.RectTransform, Anchor.TopLeft, Pivot.TopLeft), "", Alignment.Center, "GUIButtonVerticalArrow")
|
||||
{
|
||||
Visible = false,
|
||||
UserData = -1,
|
||||
OnClicked = ScrollCharacterList
|
||||
};
|
||||
scrollButtonDown = new GUIButton(new RectTransform(scrollButtonSize, crewArea.RectTransform, Anchor.BottomLeft, Pivot.BottomLeft), "", Alignment.Center, "GUIButtonVerticalArrow")
|
||||
{
|
||||
Visible = false,
|
||||
UserData = 1,
|
||||
OnClicked = ScrollCharacterList
|
||||
};
|
||||
scrollButtonDown.Children.ForEach(c => c.SpriteEffects = SpriteEffects.FlipVertically);
|
||||
|
||||
var characterInfo = new CharacterInfo(subElement);
|
||||
characterInfos.Add(characterInfo);
|
||||
foreach (XElement invElement in subElement.Elements())
|
||||
@@ -117,6 +76,49 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
var reports = Order.PrefabList.FindAll(o => o.TargetAllCharacters && o.SymbolSprite != null);
|
||||
reportButtonFrame = new GUILayoutGroup(new RectTransform(
|
||||
new Point((HUDLayoutSettings.CrewArea.Height - (int)((reports.Count - 1) * 5 * GUI.Scale)) / reports.Count, HUDLayoutSettings.CrewArea.Height), guiFrame.RectTransform))
|
||||
{
|
||||
AbsoluteSpacing = (int)(5 * GUI.Scale),
|
||||
UserData = "reportbuttons",
|
||||
CanBeFocused = false
|
||||
};
|
||||
|
||||
//report buttons
|
||||
foreach (Order order in reports)
|
||||
{
|
||||
if (!order.TargetAllCharacters || order.SymbolSprite == null) continue;
|
||||
var btn = new GUIButton(new RectTransform(new Point(reportButtonFrame.Rect.Width), reportButtonFrame.RectTransform), style: null)
|
||||
{
|
||||
OnClicked = (GUIButton button, object userData) =>
|
||||
{
|
||||
if (Character.Controlled == null || Character.Controlled.SpeechImpediment >= 100.0f) return false;
|
||||
SetCharacterOrder(null, order, null, Character.Controlled);
|
||||
return true;
|
||||
},
|
||||
UserData = order,
|
||||
ToolTip = order.Name
|
||||
};
|
||||
|
||||
new GUIFrame(new RectTransform(new Vector2(1.5f), btn.RectTransform, Anchor.Center), "OuterGlow")
|
||||
{
|
||||
Color = Color.Red * 0.8f,
|
||||
HoverColor = Color.Red * 1.0f,
|
||||
PressedColor = Color.Red * 0.6f,
|
||||
UserData = "highlighted",
|
||||
CanBeFocused = false,
|
||||
Visible = false
|
||||
};
|
||||
|
||||
var img = new GUIImage(new RectTransform(Vector2.One, btn.RectTransform), order.Prefab.SymbolSprite, scaleToFit: true)
|
||||
{
|
||||
Color = order.Color,
|
||||
HoverColor = Color.Lerp(order.Color, Color.White, 0.5f),
|
||||
ToolTip = order.Name
|
||||
};
|
||||
}
|
||||
|
||||
screenResolution = new Point(GameMain.GraphicsWidth, GameMain.GraphicsHeight);
|
||||
|
||||
prevUIScale = GUI.Scale;
|
||||
@@ -1308,6 +1310,14 @@ namespace Barotrauma
|
||||
|
||||
if (GameMain.NetworkMember != null) GameMain.Client.SelectCrewCharacter(character, previewPlayer);
|
||||
|
||||
/// <summary>
|
||||
/// Should report buttons be visible on the screen atm?
|
||||
/// </summary>
|
||||
private bool ReportButtonsVisible()
|
||||
{
|
||||
return CharacterHealth.OpenHealthWindow == null;
|
||||
}
|
||||
|
||||
private bool ReportButtonClicked(GUIButton button, object userData)
|
||||
{
|
||||
//order targeted to all characters
|
||||
|
||||
Reference in New Issue
Block a user