Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Assets/Resources/hamburger_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions Assets/Resources/hamburger_button.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Assets/Scripts/Game/UserInterface/PauseOptionsDropdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class PauseOptionsDropdown : Panel
private readonly Rect upArrowRect = new Rect(0, 0, 9, 16);
private readonly Rect downArrowRect = new Rect(0, 136, 9, 16);
private readonly DFSize arrowsFullSize = new DFSize(9, 152);
private Texture2D arrowUpTexture;
private Texture2D arrowDownTexture;
private Texture2D closedMenuIcon;
private Texture2D openMenuIcon;

private List<ListBox.ListItem> listItems;
private List<Action> clickHandlers;
Expand All @@ -60,15 +60,15 @@ public PauseOptionsDropdown(IUserInterfaceManager _uiManager)

void Setup()
{
arrowUpTexture = Resources.Load<Texture2D>("chevron_up");
arrowDownTexture = Resources.Load<Texture2D>("chevron_down");
closedMenuIcon = Resources.Load<Texture2D>("hamburger_button");
openMenuIcon = Resources.Load<Texture2D>("hamburger_button");

// Drop down button
dropDownToggleButton = DaggerfallUI.AddButton(new Rect(0, 0, 7, 7), this);
dropDownToggleButton.BackgroundColor = new Color(0.2f, 0.2f, 0.2f, 0.5f);//0.5f);
dropDownToggleButton.OnMouseClick += DropdownButton_OnMouseClick;
dropDownToggleButton.Hotkey = DaggerfallShortcut.GetBinding(DaggerfallShortcut.Buttons.OptionsDropdown);
dropDownToggleButton.BackgroundTexture = arrowUpTexture;
dropDownToggleButton.BackgroundTexture = closedMenuIcon;

// Dropdown options panel
dropdownPanel = new Panel();
Expand Down Expand Up @@ -142,9 +142,9 @@ public void SetDropdownExpand(bool expand)
dropdownPanel.Enabled = expand;

if (dropdownPanel.Enabled)
dropDownToggleButton.BackgroundTexture = arrowDownTexture;
dropDownToggleButton.BackgroundTexture = openMenuIcon;
else
dropDownToggleButton.BackgroundTexture = arrowUpTexture;
dropDownToggleButton.BackgroundTexture = closedMenuIcon;

HideOverlappingHUDElements(expand);
}
Expand Down