Pretty text, beginning of choreo side
This commit is contained in:
parent
4ac46046e0
commit
2ce85a63d8
|
@ -19,6 +19,46 @@ end
|
||||||
local function QUICKNIL( self, w, h )
|
local function QUICKNIL( self, w, h )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local SIDE = {
|
||||||
|
["left_cheek_puffer"] = 1,
|
||||||
|
["left_cheek_raiser"] = 1,
|
||||||
|
["left_corner_depressor"] = 1,
|
||||||
|
["left_corner_puller"] = 1,
|
||||||
|
["left_lid_closer"] = 1,
|
||||||
|
["left_lid_droop"] = 1,
|
||||||
|
["left_lid_raiser"] = 1,
|
||||||
|
["left_lid_tightener"] = 1,
|
||||||
|
["left_upper_raiser"] = 1,
|
||||||
|
["left_outer_raiser"] = 1,
|
||||||
|
["left_inner_raiser"] = 1,
|
||||||
|
["left_mouth_drop"] = 1,
|
||||||
|
["left_dimpler"] = 1,
|
||||||
|
["left_funneler"] = 1,
|
||||||
|
["left_part"] = 1,
|
||||||
|
["left_puckerer"] = 1,
|
||||||
|
["left_stretcher"] = 1,
|
||||||
|
["left_lowerer"] = 1,
|
||||||
|
|
||||||
|
["right_cheek_puffer"] = 2,
|
||||||
|
["right_cheek_raiser"] = 2,
|
||||||
|
["right_corner_depressor"] = 2,
|
||||||
|
["right_corner_puller"] = 2,
|
||||||
|
["right_lid_closer"] = 2,
|
||||||
|
["right_lid_droop"] = 2,
|
||||||
|
["right_lid_raiser"] = 2,
|
||||||
|
["right_lid_tightener"] = 2,
|
||||||
|
["right_upper_raiser"] = 2,
|
||||||
|
["right_outer_raiser"] = 2,
|
||||||
|
["right_inner_raiser"] = 2,
|
||||||
|
["right_mouth_drop"] = 2,
|
||||||
|
["right_dimpler"] = 2,
|
||||||
|
["right_funneler"] = 2,
|
||||||
|
["right_part"] = 2,
|
||||||
|
["right_puckerer"] = 2,
|
||||||
|
["right_stretcher"] = 2,
|
||||||
|
["right_lowerer"] = 2,
|
||||||
|
}
|
||||||
|
|
||||||
local PRETTY = {
|
local PRETTY = {
|
||||||
["left_cheek_puffer"] = "Left Cheek Puffer",
|
["left_cheek_puffer"] = "Left Cheek Puffer",
|
||||||
["left_cheek_raiser"] = "Left Cheek Raiser",
|
["left_cheek_raiser"] = "Left Cheek Raiser",
|
||||||
|
@ -140,6 +180,7 @@ function OpenDeadeye()
|
||||||
SIDEDIV:SetBottomMin( 240 )
|
SIDEDIV:SetBottomMin( 240 )
|
||||||
SIDEDIV:SetTopHeight( 500 )
|
SIDEDIV:SetTopHeight( 500 )
|
||||||
|
|
||||||
|
do -- Model side (top)
|
||||||
local MODEL = SIDE_MODEL:Add( "DAdjustableModelPanel" )
|
local MODEL = SIDE_MODEL:Add( "DAdjustableModelPanel" )
|
||||||
MODEL:SetFOV( 30 )
|
MODEL:SetFOV( 30 )
|
||||||
MODEL:SetModel( "models/alyx.mdl" )
|
MODEL:SetModel( "models/alyx.mdl" )
|
||||||
|
@ -169,6 +210,7 @@ function OpenDeadeye()
|
||||||
PX, PY, PZ, AP, AY, AR = math.Round( PX ), math.Round( PY ), math.Round( PZ ), math.Round( AP ), math.Round( AY ), math.Round( AR )
|
PX, PY, PZ, AP, AY, AR = math.Round( PX ), math.Round( PY ), math.Round( PZ ), math.Round( AP ), math.Round( AY ), math.Round( AR )
|
||||||
draw.SimpleText( "pos: " .. PX .. " " .. PY .. " " .. PZ, "Trebuchet24", 8, 4, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
|
draw.SimpleText( "pos: " .. PX .. " " .. PY .. " " .. PZ, "Trebuchet24", 8, 4, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
|
||||||
draw.SimpleText( "ang: " .. AP .. " " .. AY .. " " .. AR, "Trebuchet24", 8, 4+24, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
|
draw.SimpleText( "ang: " .. AP .. " " .. AY .. " " .. AR, "Trebuchet24", 8, 4+24, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
|
||||||
|
draw.SimpleText( "fov: " .. math.Round( MODEL:GetFOV() ), "Trebuchet24", 8, 4+48, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
|
||||||
end
|
end
|
||||||
|
|
||||||
local MODELSETTINGS = SIDE_MODEL:Add( "DScrollPanel" )
|
local MODELSETTINGS = SIDE_MODEL:Add( "DScrollPanel" )
|
||||||
|
@ -182,7 +224,7 @@ function OpenDeadeye()
|
||||||
for i, v in SortedPairs( flexlist ) do
|
for i, v in SortedPairs( flexlist ) do
|
||||||
local id = MODEL.Entity:GetFlexIDByName( i )
|
local id = MODEL.Entity:GetFlexIDByName( i )
|
||||||
SLIDER = MODELSETTINGS:Add( "DNumSlider" )
|
SLIDER = MODELSETTINGS:Add( "DNumSlider" )
|
||||||
SLIDER:SetText( MODEL.Entity:GetFlexName( id ) )
|
SLIDER:SetText( PRETTY[ MODEL.Entity:GetFlexName( id ) ] or MODEL.Entity:GetFlexName( id ) )
|
||||||
local min, max = MODEL.Entity:GetFlexBounds( id )
|
local min, max = MODEL.Entity:GetFlexBounds( id )
|
||||||
SLIDER:SetMin( min )
|
SLIDER:SetMin( min )
|
||||||
SLIDER:SetMax( max )
|
SLIDER:SetMax( max )
|
||||||
|
@ -190,8 +232,6 @@ function OpenDeadeye()
|
||||||
SLIDER:Dock( TOP )
|
SLIDER:Dock( TOP )
|
||||||
SLIDER:DockMargin( 10, -5, 10, -5 )
|
SLIDER:DockMargin( 10, -5, 10, -5 )
|
||||||
|
|
||||||
print( MODEL.Entity:GetFlexName( id ) )
|
|
||||||
|
|
||||||
function SLIDER:OnValueChanged( val )
|
function SLIDER:OnValueChanged( val )
|
||||||
if !DEADEYE_MEM.Flex then DEADEYE_MEM.Flex = {} end
|
if !DEADEYE_MEM.Flex then DEADEYE_MEM.Flex = {} end
|
||||||
DEADEYE_MEM.Flex[ MODEL.Entity:GetFlexName( id ) ] = val
|
DEADEYE_MEM.Flex[ MODEL.Entity:GetFlexName( id ) ] = val
|
||||||
|
@ -211,7 +251,30 @@ function OpenDeadeye()
|
||||||
DIVIDER:SetDividerWidth( 8 )
|
DIVIDER:SetDividerWidth( 8 )
|
||||||
DIVIDER:SetLeftMin( 20 )
|
DIVIDER:SetLeftMin( 20 )
|
||||||
DIVIDER:SetRightMin( 240 )
|
DIVIDER:SetRightMin( 240 )
|
||||||
DIVIDER:SetLeftWidth( 1000 )
|
DIVIDER:SetLeftWidth( 800 )
|
||||||
|
end
|
||||||
|
|
||||||
|
do -- Choreo side (bottom)
|
||||||
|
local PLAY = SIDE_CHOREO:Add( "DButton" )
|
||||||
|
PLAY:SetPos( 4, 4 )
|
||||||
|
PLAY:SetSize( 80, 20 )
|
||||||
|
PLAY:SetText( "Play/Pause" )
|
||||||
|
PLAY.Paint = QUICKDIRT
|
||||||
|
|
||||||
|
local SPEED = SIDE_CHOREO:Add( "DNumSlider" )
|
||||||
|
SPEED:SetPos( 4+4+80, 4 )
|
||||||
|
SPEED:SetSize( 180, 20 )
|
||||||
|
SPEED:SetText( "Speed" )
|
||||||
|
SPEED.Label:SetWide( 0 )
|
||||||
|
function SPEED:PerformLayout()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
SPEED:SetMin( 0 )
|
||||||
|
SPEED:SetMax( 100 )
|
||||||
|
SPEED:SetValue( 100 )
|
||||||
|
SPEED:SetDecimals( 0 )
|
||||||
|
SPEED.Paint = QUICKDIRT
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue