mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Feature: Toolbar Menu (#268)
* Fix left flow not using uids * Mock Toolbar menu * Fix task list after core gui change * Allow show/hide override * Fix autofill permissions * Copy style from toolbar on change * Open and close automatically * Removed hacky prevent default * Fixed more core issues * Add reset button * Allow for custom draw order on join * Add methods to reorder ui flows * Impliment move buttons * Add locale * Add toolbar to player data * Better player data layout * Picked a suitable datastore id * Update locale for readme * Fix swaping left flow order * Fix datastore updates * Code cleanup * Fix incorrect top flow hashing on load * Fix loading of malformed data * Fixed loading state of left flows * Dont save default data * Dont open menu on join * Lint * Remove incorrect new index metamethod * Revert method used for move_toolbar_button * Fixed missing toolbar button * Fixed desync between visibilty and toggle state * Fix bad gui element path * Fixed enable state of toggle button * Change order of operations * Fix reset not showing top flow
This commit is contained in:
@@ -86,7 +86,7 @@ end)
|
||||
--- Set of elements that are used to make up a row of the player table
|
||||
-- @element add_player_base
|
||||
local add_player_base =
|
||||
Gui.element(function(definition, parent, player_data)
|
||||
Gui.element(function(_, parent, player_data)
|
||||
-- Add the button to open the action bar
|
||||
local toggle_action_bar_flow = parent.add{ type = 'flow', name = player_data.name }
|
||||
open_action_bar(toggle_action_bar_flow)
|
||||
@@ -100,7 +100,6 @@ Gui.element(function(definition, parent, player_data)
|
||||
}
|
||||
player_name.style.padding = {0, 2,0, 0}
|
||||
player_name.style.font_color = player_data.chat_color
|
||||
definition:triggers_events(player_name)
|
||||
|
||||
-- Add the time played label
|
||||
local alignment = Gui.alignment(parent, 'player-time-'..player_data.index)
|
||||
@@ -112,7 +111,7 @@ Gui.element(function(definition, parent, player_data)
|
||||
}
|
||||
time_label.style.padding = 0
|
||||
|
||||
return time_label
|
||||
return player_name
|
||||
end)
|
||||
:on_click(function(player, element, event)
|
||||
local selected_player_name = element.caption
|
||||
|
||||
Reference in New Issue
Block a user