Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/effects.lua b/effects.lua
- index 2f00ee1..9e1bf0e 100644
- --- a/effects.lua
- +++ b/effects.lua
- @@ -54,6 +54,7 @@ end
- local language = Group:GetLanguage()
- Group.Alert = UI:Create( "BASE", nil, function( main )
- + main:UnregisterForGlobalScaling()
- main:SetSize( UI.SCREEN_W, UI.SCREEN_H )
- main:SetColor( 0, 0, 0, 0 )
- main:SetMouseVisible( false )
- @@ -1530,6 +1531,7 @@ end )
- function Group:CreateEffectMenu()
- self.Effects = UI:Create( "BASE", nil, function( main )
- + main:UnregisterForGlobalScaling()
- main:SetSize( 1200 - 2, 800 - 44 )
- main:SetPos( UI.SCREEN_W / 2 - 600, UI.SCREEN_H / 2 - 400 )
- main:SetWantsKeyEvents( true )
- diff --git a/group.lua b/group.lua
- index da4d248..b526212 100644
- --- a/group.lua
- +++ b/group.lua
- @@ -4,8 +4,9 @@ local table = table
- PartyVitals = UI:Create( "BASE", nil, function( main )
- main:SetMouseVisible( false )
- main:SetColor( 200, 200, 200, 0 )
- - main:SetSize( UI.SCREEN_W * 2, UI.SCREEN_H * 2 )
- - main:SetPos( Group.Settings.Pos.x - UI.SCREEN_W, Group.Settings.Pos.y - UI.SCREEN_H )
- + main:UnregisterForGlobalScaling()
- + main:SetSize( UI.SCREEN_W, UI.SCREEN_H )
- + main:SetPos( 0, 0 )
- main:SetWantsKeyEvents( true )
- main:EnableDragBase()
- @@ -687,8 +688,6 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- end )
- main.class = UI:Create( "BOX", main, function( ui )
- - ui:SetSize( 20, 20 )
- - ui:SetStretchMode( 1 )
- ui:SetSize( Group.Settings.class_icon_size, Group.Settings.class_icon_size )
- ui:SetColor( 0, 0, 0, 0 )
- ui:SetBlendMode( Turbine.UI.BlendMode.AlphaBlend )
- @@ -707,8 +706,6 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- end )
- main.leader = UI:Create( "BOX", main, function( ui )
- - ui:SetSize( 16, 16 )
- - ui:SetStretchMode( 1 )
- ui:SetSize( Group.Settings.leader_icon_size, Group.Settings.leader_icon_size )
- ui:SetColor( 0, 0, 0, 0 )
- ui:SetBackground( 0x410081C3 )
- @@ -842,7 +839,6 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- local settings = Group.Settings
- self:SetBackground( effect:GetIcon() )
- - self:SetStretchMode( 1 )
- self:SetSize( settings.effect_size, settings.effect_size )
- self:SetVisible( true )
- @@ -894,8 +890,6 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- ui:SetVisible( false )
- end ) ]]
- - ui:SetSize( 32, 32 )
- - ui:SetStretchMode( 1 )
- ui:SetSize( Group.Settings.effect_size, Group.Settings.effect_size )
- end )
- end
- @@ -945,14 +939,11 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- function main:PositionChanged()
- local settings = Group.Settings
- - self.class:SetStretchMode( 1 )
- self.class:SetSize( settings.class_icon_size, settings.class_icon_size )
- - self.leader:SetStretchMode( 1 )
- self.leader:SetSize( settings.leader_icon_size, settings.leader_icon_size )
- for i = 1, self.effect_count do
- - self.effect[ i ]:SetStretchMode( 1 )
- self.effect[ i ]:SetSize( settings.effect_size, settings.effect_size )
- end
- @@ -1291,7 +1282,6 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- local settings = Group.Settings
- self.special:SetBackground( effect:GetIcon() )
- - self.special:SetStretchMode( 1 )
- self.special:SetSize( settings.special_effect_size, settings.special_effect_size )
- self.special_text:SetText( self.special.duration )
- @@ -1704,7 +1694,7 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- function main:ReadyChanged( state )
- --Print( self.player_name .. " - " .. state )
- -
- +
- --[[ if not self.ready_init then
- self.ready_init = true
- @@ -1737,7 +1727,7 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- end
- end
- - if count == 1 then Print("---------1")
- + if count == 1 then Print("---------1")
- Group.Ready.Member[ name ].ui.ready:SetText( Group:Local( "Frame_Text_Ready" ) )
- Group.Ready.Member[ name ].ui.ready:SetForeColor( Color( 0, 255, 0 ) )
- @@ -1799,7 +1789,7 @@ UI:CreateTemplate( "BASE", "FRAME", function( template )
- end
- end
- - if count == 1 then Print("---------2")
- + if count == 1 then Print("---------2")
- Group.Ready.Member[ name ].ui.ready:SetText( Group:Local( "Frame_Text_Not_Ready" ) )
- Group.Ready.Member[ name ].ui.ready:SetForeColor( Color( 255, 0, 0 ) )
- @@ -2429,18 +2419,21 @@ function Group:RefreshLayout()
- local pos_x
- local pos_y
- + local offset_x = self.Settings.Pos.x - UI.SCREEN_W / 2
- + local offset_y = self.Settings.Pos.y - UI.SCREEN_H / 2
- +
- if self.Settings.horizontal_layout_direction == 1 then --Left
- - pos_x = w / 2 + self.Settings.vitals_x * ( x - 1 ) + self.Settings.vitals_external_spacing * ( x - 1 )
- + pos_x = w / 2 + offset_x + self.Settings.vitals_x * ( x - 1 ) + self.Settings.vitals_external_spacing * ( x - 1 )
- elseif self.Settings.horizontal_layout_direction == 2 then --Center
- - pos_x = w / 2 + self.Settings.vitals_x * ( x - 1 ) + self.Settings.vitals_external_spacing * ( x - 1 ) - ( self.Settings.vitals_x * row_size + self.Settings.vitals_external_spacing * ( row_size - 1 ) ) / 2
- + pos_x = w / 2 + offset_x + self.Settings.vitals_x * ( x - 1 ) + self.Settings.vitals_external_spacing * ( x - 1 ) - ( self.Settings.vitals_x * row_size + self.Settings.vitals_external_spacing * ( row_size - 1 ) ) / 2
- else --Right
- - pos_x = w / 2 - self.Settings.vitals_x * x - self.Settings.vitals_external_spacing * ( x - 1 )
- + pos_x = w / 2 + offset_x - self.Settings.vitals_x * x - self.Settings.vitals_external_spacing * ( x - 1 )
- end
- if self.Settings.vertical_layout_direction == 1 then --Top
- - pos_y = h / 2 + self.Settings.vitals_y * ( y - 1 ) + self.Settings.vitals_external_spacing * ( y - 1 )
- + pos_y = h / 2 + offset_y + self.Settings.vitals_y * ( y - 1 ) + self.Settings.vitals_external_spacing * ( y - 1 )
- else --Bottom
- - pos_y = h / 2 - self.Settings.vitals_y * y - self.Settings.vitals_external_spacing * ( y - 1 )
- + pos_y = h / 2 + offset_y - self.Settings.vitals_y * y - self.Settings.vitals_external_spacing * ( y - 1 )
- end
- if self.Settings.enable_unique_player_frame_pos then
- diff --git a/init.lua b/init.lua
- index 774cde0..8ea732a 100644
- --- a/init.lua
- +++ b/init.lua
- @@ -503,6 +503,7 @@ Group.ClassIcon = {
- Group.hidden = false
- Group.Notification = UI:Create( "BASE", nil, function( main )
- + main:UnregisterForGlobalScaling()
- main:SetSize( UI.SCREEN_W, UI.SCREEN_H )
- main:SetMouseVisible( false )
- main:SetZOrder( 300 )
- @@ -969,11 +970,34 @@ local status = 0
- control_miniraid = Turbine.UI.Control()
- function control_miniraid:Update()
- - if status == 1 then
- + if status == 0 then
- + Group:Remove()
- + if Player:GetParty() then
- + Group:Create()
- + elseif Group.Settings.show_vitals_out_of_group then
- + Group:Create( true )
- + end
- + elseif status == 1 then
- + if Group.PartyCount > 0 then
- + PartyVitals:SetVisible( true )
- +
- + if not Group.hidden then
- + if Group.Settings.hide_out_of_combat then
- + PartyVitals:SetVisible( Player:IsInCombat() )
- + else
- + PartyVitals:SetVisible( true )
- + end
- + end
- +
- + Group:RefreshLayout()
- + else
- + PartyVitals:SetVisible( false )
- + end
- +
- Turbine.PluginManager.UnloadScriptState( "MiniRaidReload" )
- elseif status > 1 then
- self:SetWantsUpdates( false )
- -
- +
- control_miniraid = nil
- end
- @@ -982,18 +1006,6 @@ end
- control_miniraid:SetWantsUpdates( true )
- -if Player:GetParty() then
- - Group:Create()
- -else
- - if Group.Settings.show_vitals_out_of_group then
- - Group:Create( true )
- - end
- -end
- -
- -if Group.Settings.hide_out_of_combat and not Player:IsInCombat() then
- - PartyVitals:SetVisible( false )
- -end
- -
- AddCallback( Player, "InCombatChanged", function()
- if Group.Settings.hide_out_of_combat and not Player:IsInCombat() then
- PartyVitals:SetVisible( false )
- diff --git a/settings.lua b/settings.lua
- index 027f94d..eec5eb4 100644
- --- a/settings.lua
- +++ b/settings.lua
- @@ -1,5 +1,6 @@
- function Group:CreateOptionMenu()
- self.Options = UI:Create( "BASE", nil, function( main )
- + main:UnregisterForGlobalScaling()
- main:SetSize( 1200 - 2, 800 - 44 )
- main:SetPos( UI.SCREEN_W / 2 - 600, UI.SCREEN_H / 2 - 400 )
- main:SetWantsKeyEvents( true )
- @@ -597,8 +598,6 @@ function Group:CreateOptionMenu()
- end )
- parent.class = UI:Create( "BOX", ui, function( ui, parent )
- - ui:SetSize( 20, 20 )
- - ui:SetStretchMode( 1 )
- ui:SetSize( settings.class_icon_size, settings.class_icon_size )
- ui:SetColor( 0, 0, 0, 0 )
- ui:SetBlendMode( Turbine.UI.BlendMode.AlphaBlend )
- @@ -616,8 +615,6 @@ function Group:CreateOptionMenu()
- end )
- parent.leader = UI:Create( "BOX", ui, function( ui, parent )
- - ui:SetSize( 16, 16 )
- - ui:SetStretchMode( 1 )
- ui:SetSize( settings.leader_icon_size, settings.leader_icon_size )
- ui:SetColor( 0, 0, 0, 0 )
- ui:SetBackground( 0x410081C3 )
- @@ -756,8 +753,6 @@ function Group:CreateOptionMenu()
- end
- end )
- - ui:SetSize( 32, 32 )
- - ui:SetStretchMode( 1 )
- ui:SetSize( settings.effect_size, settings.effect_size )
- end )
- end
- @@ -765,10 +760,8 @@ function Group:CreateOptionMenu()
- function ui:PositionChanged()
- local settings = Group.Settings
- - parent.class:SetStretchMode( 1 )
- parent.class:SetSize( settings.class_icon_size, settings.class_icon_size )
- - parent.leader:SetStretchMode( 1 )
- parent.leader:SetSize( settings.leader_icon_size, settings.leader_icon_size )
- end
- end )
- @@ -819,7 +812,6 @@ function Group:CreateOptionMenu()
- for x = 1, row_x do
- local offset_x, offset_y = self.effect[ count ].offset[ settings.Frame.Effect.anchor ]( x, y, w, h, settings.Frame.Effect.x, settings.Frame.Effect.y )
- - self.effect[ count ]:SetStretchMode( 1 )
- self.effect[ count ]:SetSize( settings.effect_size, settings.effect_size )
- self.effect[ count ]:SetPos( offset_x, offset_y )
- @@ -5628,11 +5620,9 @@ function Group:CreateOptionMenu()
- function ui:ValueChanged( value )
- Group.Settings.class_icon_size = value
- - main.Frame.class:SetStretchMode( 1 )
- - main.Frame.class:SetSize( value, value )
- + main.Frame.class:SetSize( value, value )
- for i = 1, #Group.Party do
- - Group.Party[ i ].class:SetStretchMode( 1 )
- Group.Party[ i ].class:SetSize( value, value )
- end
- @@ -5642,11 +5632,9 @@ function Group:CreateOptionMenu()
- function ui:SliderChanged( value )
- Group.Settings.class_icon_size = value
- - main.Frame.class:SetStretchMode( 1 )
- - main.Frame.class:SetSize( value, value )
- + main.Frame.class:SetSize( value, value )
- for i = 1, #Group.Party do
- - Group.Party[ i ].class:SetStretchMode( 1 )
- Group.Party[ i ].class:SetSize( value, value )
- end
- end
- @@ -5909,11 +5897,9 @@ function Group:CreateOptionMenu()
- function ui:ValueChanged( value )
- Group.Settings.leader_icon_size = value
- - main.Frame.leader:SetStretchMode( 1 )
- main.Frame.leader:SetSize( value, value )
- for i = 1, #Group.Party do
- - Group.Party[ i ].leader:SetStretchMode( 1 )
- Group.Party[ i ].leader:SetSize( value, value )
- end
- @@ -5923,11 +5909,9 @@ function Group:CreateOptionMenu()
- function ui:SliderChanged( value )
- Group.Settings.leader_icon_size = value
- - main.Frame.leader:SetStretchMode( 1 )
- main.Frame.leader:SetSize( value, value )
- for i = 1, #Group.Party do
- - Group.Party[ i ].leader:SetStretchMode( 1 )
- Group.Party[ i ].leader:SetSize( value, value )
- end
- end
- @@ -6891,7 +6875,6 @@ function Group:CreateOptionMenu()
- Group.Settings.effect_size = value
- for i = 1, #main.Frame.effect do
- - main.Frame.effect[ i ]:SetStretchMode( 1 )
- main.Frame.effect[ i ]:SetSize( value, value )
- end
- @@ -6899,7 +6882,6 @@ function Group:CreateOptionMenu()
- for i = 1, #Group.Party do
- for k = 1, Group.Party[ i ].effect_count do
- - Group.Party[ i ].effect[ k ]:SetStretchMode( 1 )
- Group.Party[ i ].effect[ k ]:SetSize( value, value )
- Group.Party[ i ]:EffectLayout()
- end
- @@ -6912,7 +6894,6 @@ function Group:CreateOptionMenu()
- Group.Settings.effect_size = value
- for i = 1, #main.Frame.effect do
- - main.Frame.effect[ i ]:SetStretchMode( 1 )
- main.Frame.effect[ i ]:SetSize( value, value )
- end
- @@ -6920,7 +6901,6 @@ function Group:CreateOptionMenu()
- for i = 1, #Group.Party do
- for k = 1, Group.Party[ i ].effect_count do
- - Group.Party[ i ].effect[ k ]:SetStretchMode( 1 )
- Group.Party[ i ].effect[ k ]:SetSize( value, value )
- Group.Party[ i ]:EffectLayout()
- end
- @@ -7307,7 +7287,6 @@ function Group:CreateOptionMenu()
- main.Frame.special:PositionChanged()
- for i = 1, #Group.Party do
- - Group.Party[ i ].special:SetStretchMode( 1 )
- Group.Party[ i ].special:SetSize( value, value )
- Group.Party[ i ].special:PositionChanged()
- end
- @@ -7322,7 +7301,6 @@ function Group:CreateOptionMenu()
- main.Frame.special:PositionChanged()
- for i = 1, #Group.Party do
- - Group.Party[ i ].special:SetStretchMode( 1 )
- Group.Party[ i ].special:SetSize( value, value )
- Group.Party[ i ].special:PositionChanged()
- end
- @@ -7981,19 +7959,19 @@ function Group:CreateOptionMenu()
- ui:SetValue( Group.Settings.Pos.x )
- main.layout_x = ui
- -
- +
- function ui:ValueChanged( value )
- Group.Settings.Pos.x = value
- -
- - PartyVitals:SetPos( Group.Settings.Pos.x - UI.SCREEN_W, Group.Settings.Pos.y - UI.SCREEN_H )
- -
- +
- + Group:RefreshLayout()
- +
- Turbine.PluginData.Save( Turbine.DataScope.Character, "MiniRaid_Settings", table.save( Group.Settings ) )
- end
- -
- +
- function ui:SliderChanged( value )
- Group.Settings.Pos.x = value
- -
- - PartyVitals:SetPos( Group.Settings.Pos.x - UI.SCREEN_W, Group.Settings.Pos.y - UI.SCREEN_H )
- +
- + Group:RefreshLayout()
- end
- function ui:Reset()
- @@ -8015,19 +7993,19 @@ function Group:CreateOptionMenu()
- ui:SetValue( Group.Settings.Pos.y )
- main.layout_y = ui
- -
- +
- function ui:ValueChanged( value )
- Group.Settings.Pos.y = value
- -
- - PartyVitals:SetPos( Group.Settings.Pos.x - UI.SCREEN_W, Group.Settings.Pos.y - UI.SCREEN_H )
- -
- +
- + Group:RefreshLayout()
- +
- Turbine.PluginData.Save( Turbine.DataScope.Character, "MiniRaid_Settings", table.save( Group.Settings ) )
- end
- -
- +
- function ui:SliderChanged( value )
- Group.Settings.Pos.y = value
- -
- - PartyVitals:SetPos( Group.Settings.Pos.x - UI.SCREEN_W, Group.Settings.Pos.y - UI.SCREEN_H )
- +
- + Group:RefreshLayout()
- end
- function ui:Reset()
- @@ -8271,7 +8249,13 @@ function Group:CreateOptionMenu()
- if Group.enable_layout_preview then
- Group.Party[ 1 ]:SetVisible( false )
- + else
- + Group.Party[ 1 ]:SetVisible( true )
- end
- +
- + PartyVitals:SetVisible( true )
- + elseif checked and Group.PartyCount > 0 then
- + PartyVitals:SetVisible( true )
- elseif not checked and Group.PartyCount == 1 then
- Group:Remove()
- end
- @@ -8564,32 +8548,24 @@ function Group:CreateOptionMenu()
- ui:SetBackground( "Darf/MiniRaid/Resources/exit.tga" )
- ui:SetBlendMode( Turbine.UI.BlendMode.AlphaBlend )
- ui:SetBackColorBlendMode( Turbine.UI.BlendMode.Multiply )
- - ui:SetSize( 32, 32 )
- - ui:SetStretchMode( 1 )
- ui:SetSize( 12, 12 )
- end )
- function ui:MouseEnter()
- self.icon:SetBackground( "Darf/MiniRaid/Resources/exit_hover.tga" )
- - self.icon:SetSize( 32, 32 )
- - self.icon:SetStretchMode( 1 )
- self.icon:SetSize( 12, 12 )
- end
- function ui:MouseLeave()
- self.icon:SetBackground( "Darf/MiniRaid/Resources/exit.tga" )
- - self.icon:SetSize( 32, 32 )
- - self.icon:SetStretchMode( 1 )
- self.icon:SetSize( 12, 12 )
- end
- function ui:MouseDown()
- self.icon:SetBackground( "Darf/MiniRaid/Resources/exit.tga" )
- - self.icon:SetSize( 32, 32 )
- - self.icon:SetStretchMode( 1 )
- self.icon:SetSize( 12, 12 )
- end
- @@ -8600,8 +8576,6 @@ function Group:CreateOptionMenu()
- self.icon:SetBackground( "Darf/MiniRaid/Resources/exit.tga" )
- - self.icon:SetSize( 32, 32 )
- - self.icon:SetStretchMode( 1 )
- self.icon:SetSize( 12, 12 )
- Group.Settings.force_option_menu = nil
Advertisement
Add Comment
Please, Sign In to add comment