mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 04:06:39 +09:00
Fixed Admin gui not closing; Gui draw more consistent
This commit is contained in:
@@ -54,5 +54,5 @@ return setmetatable({
|
||||
if loaded_modules['ExpGamingCore.Group'] then Group = require('ExpGamingCore.Group') end
|
||||
end
|
||||
},{
|
||||
__call=function(self,...) self.get_player_info(...) end
|
||||
__call=function(self,...) return self.get_player_info(...) end
|
||||
})
|
||||
@@ -63,7 +63,7 @@ ThisModule.Gui = Gui.left{
|
||||
name='player-list',
|
||||
caption='entity/player',
|
||||
tooltip={'ExpGamingPlayer-playerList.tooltip'},
|
||||
draw=function(frame)
|
||||
draw=function(self,frame)
|
||||
frame.caption = ''
|
||||
local player_list = frame.add{
|
||||
name='scroll',
|
||||
@@ -125,6 +125,8 @@ script.on_event(defines.events.on_gui_click,function(event)
|
||||
-- must be a right click
|
||||
if event.button == defines.mouse_button_type.right then else return end
|
||||
local player_list = event.element.parent.parent.parent
|
||||
-- must be a valid player which is clicked
|
||||
if not Game.get_player(event.element.name) then return end
|
||||
-- hides the player list to show the info
|
||||
player_list.scroll.style.visible = false
|
||||
local flow = player_list.add{type='flow',direction='vertical'}
|
||||
|
||||
@@ -206,7 +206,7 @@ end)
|
||||
ThisModule.Gui = Gui.popup{
|
||||
name='polls',
|
||||
caption={'ExpGamingPlayer-polls.name'},
|
||||
draw=function(frame,data)
|
||||
draw=function(self,frame,data)
|
||||
frame.style.right_padding = 5
|
||||
frame.style.bottom_padding = 5
|
||||
local uuid = data.uuid
|
||||
@@ -225,7 +225,7 @@ ThisModule.Gui = Gui.popup{
|
||||
}:add_left{
|
||||
caption='utility/item_editor_icon',
|
||||
tooltip={'ExpGamingPlayer-polls.tooltip'},
|
||||
draw=function(frame)
|
||||
draw=function(self,frame)
|
||||
frame.caption={'ExpGamingPlayer-polls.name'}
|
||||
frame.add{
|
||||
type='label',
|
||||
|
||||
Reference in New Issue
Block a user