Настройки в игре

ZLOY,
На что влияет класс?
Код:
<root>
  <styles>
   <include src="file://{resources}/styles/custom_game/test2.css" />
  </styles>
  <scripts>
   <include src="file://{resources}/scripts/custom_game/test2.js" />
  </scripts>
  <Panel class="RadioButton"> <= Вот в этой строке
   <RadioButton checked="checked" group="Demo" id="Demo1" text="SOME TEXT" onactivate="onTest2Click('myArgument')" />
  </Panel>
</root>
И как его немного подвинуть? Так выписывает ошибку
Код:
.RadioButton
{
//	vertical-align: center;
//	horizontal-align: center;
	position: relative;
	top: 20px;
	left: -40px;

	background-color: none;
	flow-children: right;
//	padding: 4px 4px;
	color: white;

	transition-property: background-color, box-shadow, color, brightness;
	transition-duration: 0.25s;
	transition-timing-function: ease-in-out;
}
 
Последнее редактирование модератором:
ZLOY, Я сейчас очень долго сидел, разбирался, но:
f8d8f809ba9044b6b8a4d0e23e0518da.png

Если он берёт эти элементы с файла, который я заполнял своими CustomUIElement, то почему...
7d281f3e1ae94a0ea596e03355b5751b.png

Из этого файла, который я создал, не берутся мои кнопки?
 
Я нашёл, где нужно создать панель, но переместить её не смог. А также создать бекграунд и анимацию.
3100093986ad4017a17032a41ae06d96.png

team_select.css (мотай вниз)
Код:
.TeamSelect
{
  width: 100%;
  height: 100%;
}

#TeamSelectContainer
{
  width: 100%;
  height: 100%;
	flow-children: right;
  background-color: gradient( linear, 100% 0%, 100% 100%, from( #111111 ), color-stop( 0.01, #202327 ), color-stop( 0.2, #141619 ), to( #000000 ) );
}

#TeamsSelectEmptySpace
{
  width: fill-parent-flow(1);
}

#TeamsList
{
  width: 400px;
	height: 100%;
	flow-children: down;  
  padding-left: 16px;
	padding-right: 16px;
  margin-left: 16px;
  background-color: gradient( linear, 100% 0%, 100% 100%, from( #111111 ), color-stop( 0.01, #202327 ), color-stop( 0.2, #141619ff ), to( #000000dd ) );
  box-shadow: black -4px -4px 8px 8px;
  
	animation-name: TeamsListAppear;
	animation-duration: 0.75s;
}

@keyframes 'TeamsListAppear'
{
	0%
	{
		transform: translatex( 100% );
	}

	100%
	{
		transform: translatex( 0px );
	}
}
  
#TeamsListGroup 
{
  width: 100%;
  vertical-align: center;
  flow-children: down;  
}

#TeamListHeader
{
  width: 100%;
  flow-children: right;
	color: #323232;
//	border: 2px solid red;	
}

#TeamListHeaderLabel
{
	text-transform: uppercase;
  font-size: 22px;
	letter-spacing: 1px;
  color: #667273;
	//margin-top: 16px;
	margin-left: 8px;
}

#TeamListLockedIcon 
{
  width: 16px;
  height: 16px;
  vertical-align: center;
  margin-bottom: 4px;
  visibility: collapse;
  wash-color: #aa0000ee;
}

.teams_locked #TeamListLockedIcon 
{
  visibility: visible;
}

#TeamsListRoot
{
	width: 100%;
  flow-children: down;
  overflow: clip scroll;
}

#ShuffleTeamAssignmentButton
{  
  height: 32px;
  margin-top: 8px;
  margin-left: 6px;
  horizontal-align: left;
  flow-children: right;
  visibility: collapse;
}

.player_has_host_privileges #ShuffleTeamAssignmentButton
{
  visibility: visible;
}

#ShuffleTeamAssignmentButton Label
{
  font-size: 24px;
	text-transform: uppercase;
  margin-top: 2px;
  margin-right: 5px;
  color: #6e6f6f;
  vertical-align: center;
}

#ShuffleTeamAssignmentButton:hover Label
{
	color: white;
}

#ShuffleTeamAssignmentButton:active
{
	sound: "ui_team_select_shuffle";
}

#ShuffleTeamAssignmentButton Image
{
  width: 24px;
	height: 24px;
	wash-color: #888888;
  vertical-align: center;
}

#ShuffleTeamAssignmentButton:hover Image
{
	wash-color: white;
}

#GameAndPlayersRoot
{
  width: 400px;
  height: 100%;
  flow-children: down;
 	background-color: gradient( linear, 100% 0%, 100% 100%, from( #111111 ), color-stop( 0.01, #202327 ), color-stop( 0.2, #141619 ), to( #000000 ) );
  box-shadow: black -4px -4px 16px 16px;
}

#GameInfoPanel 
{
  margin: 16px;
  flow-children: down;
}

#GameModeNameLabel 
{
  font-size: 32px;
	text-transform: uppercase;
}

#MapInfoLabel
{
  color: #a9aaaa;
	text-transform: uppercase;
}

#StartGameCountdownTimer
{
	width: 96px;
	margin-top: 32px;
}

#TeamSelectTimer
{
	margin-top: 8px;
  font-size: 48px;
  color: #CCCCCC;
	horizontal-align: center;
}

#StartGameCountdownTimer.countdown_inactive #TeamSelectTimer 
{
  opacity: 0.0;
}

#TimerBg
{
	wash-color: #222222;
}

#TimerBg,
#TimerRing
{
	width: 70px;
	height: 70px;
	margin-top: 2px;
	horizontal-align: center;
  transition-property: opacity;
  transition-duration: 0.2s;
}

#TimerLabelBox 
{
	margin-top: 76px;
  height: 20px;
  width: 100%;
}

#TimerLabelAutoStart
{
  color: #a9aaaa;
  font-size: 16px;
	text-transform: uppercase;
	horizontal-align: center;
  visibility: collapse;
  transition-property: opacity;
  transition-duration: 0.2s;
}

#StartGameCountdownTimer.auto_start #TimerLabelAutoStart 
{
  visibility: visible;
}

#TimerLabelGameStart
{
  color: #a9aaaa;
  font-size: 16px;
	text-transform: uppercase;
	horizontal-align: center;
  visibility: collapse;
  transition-property: opacity;
  transition-duration: 0.2s;
}

#StartGameCountdownTimer.forced_start #TimerLabelGameStart 
{
  visibility: visible;
}


#StartGameCountdownTimer.countdown_inactive #TimerBg,
#StartGameCountdownTimer.countdown_inactive #TimerRing,
#StartGameCountdownTimer.countdown_inactive #TimerLabelAutoStart,
#StartGameCountdownTimer.countdown_inactive #TimerLabelGameStart,
{
  opacity: 0;
}


#UnassignedPlayerPanel
{
  width: 100%;
	height: fill-parent-flow (1);
  flow-children: down;
	margin-left: 16px;
	margin-right: 58px;
}

#UnassignedPlayersButton
{
  flow-children: down;
	height: fill-parent-flow (1);
	max-height: 80%;
	width: 100%;
	background-color: gradient( linear, 100% 0%, 100% 100%, from( #111111 ), color-stop( 0.00, #272b30 ), color-stop( 0.6, #181a1e ), to( #181a1e ) );
	box-shadow: inset #000000 0px 2px 6px 3px;
  border-bottom: 1px solid #404b4a11;
}

#UnassignedPlayersHeader
{
  horizontal-align: left;
	margin-top: 16px;
	margin-left: 16px;
}

#UnassignedPlayersHeader Label
{
  font-size: 20px;
	letter-spacing: 1px;
	color: #667273;
  text-transform: uppercase;

  transition-property: color;
	transition-duration: 0.2s;
}


#UnassignedPlayersButton:hover #UnassignedPlayersHeader Label
{
  font-size: 20px;
	letter-spacing: 1px;
	color: white;
}


#UnassignedPlayersDivider 
{	
  width: 100%;
	height: 2px;
  margin-left: 8px;
  margin-right: 8px;
	background-color: #49525555;
}

#UnassignedPlayersContainer
{
	width: 100%;
  flow-children: down;
  overflow: clip scroll;
	margin: 16px;
}

#AutoAssignButton
{
  height: 32px;
  margin-top: 8px;
  margin-right: 8px;
  vertical-align: top;
  horizontal-align: left;
  flow-children: right;
  visibility: collapse;
}

.player_has_host_privileges #AutoAssignButton
{
  visibility: visible;
}

#AutoAssignButton Label
{
  font-size: 24px;
	text-transform: uppercase;
  margin-top: 2px;
  margin-left: 5px;
  color: #6e6f6f;
  vertical-align: center;
}

.unassigned_players #AutoAssignButton:hover Label
{
	color: white;
}

.unassigned_players #AutoAssignButton:active 
{  
	sound: "ui_team_select_auto_assign";
}

#AutoAssignButton Image
{
  width: 24px;
	height: 24px;
	wash-color: #888888;
  vertical-align: center;
}

.unassigned_players #AutoAssignButton:hover Image
{
	wash-color: white;
}

#LockAndStartButton
{ 
  horizontal-align: right;
	background-color: gradient( linear, 0% 0%, 0% 100%, from( #2d4881cc ), to( #486ca9cc ) );
	box-shadow: fill #486ca922 -4px -4px 8px 8px;
	border-top: 1px solid #ffffff03;
	border-left: 1px solid #ffffff03; 
  visibility: collapse;
}


.unassigned_players #LockAndStartButton 
{
  background-color: gradient( linear, 0% 0%, 0% 100%, from( #14161a ), to( #23262b ) );
  box-shadow: fill #00000000 0px 0px 0px 0px;
  border-top: 1px solid #ffffff03;
  border-left: 1px solid #ffffff03;
}

#LockAndStartButton Label 
{
  transition-property: opacity;
  transition-duration: 0.2s;
}

.unassigned_players #LockAndStartButton Label 
{
  opacity: 0.1;
}

.player_has_host_privileges #LockAndStartButton
{
  visibility: visible;
}

.teams_locked #LockAndStartButton 
{  
  visibility: collapse;
}

.no_unassigned_players #LockAndStartButton:hover
{
	background-color: gradient( linear, 0% 0%, 0% 100%, from( #2d4881cc ), to( #84acff ) );
	box-shadow: fill #486ca966 -4px -4px 18px 8px;
}

.no_unassigned_players #LockAndStartButton:active
{
  sound: "ui_team_select_lock_and_start";
}

#CancelAndUnlockButton
{ 
  horizontal-align: right;
  //background-color: gradient( linear, 0% 0%, 0% 100%, from( #722217 ), to( #DD4A29 ) );
	//box-shadow: fill #DD4A2922 -4px -4px 8px 8px;
	//border-top: 1px solid #ffffff03;
	//border-left: 1px solid #ffffff03; 
  visibility: collapse;

  background-color: gradient( linear, 0% 0%, 0% 100%, from( #2c1b1b ), to( #482e2f ) );
  box-shadow: fill #552e2f00 -4px -4px 8px 9px;
	
	border-top: 1px solid #3d2929;
	border-right: 1px solid #372121;
	border-left: 1px solid #372121;
	border-bottom: 1px solid #2e1f21;
}

#CancelAndUnlockButton:hover
{
  background-color: gradient( linear, 0% 0%, 0% 100%, from( #492121 ), to( #9d4c4f ) );
	border-top: 1px solid #7d4141;
	border-right: 1px solid #7a3535;
	border-left: 1px solid #7a3535;
	border-bottom: 1px solid #2e1f21;
	box-shadow: fill #552e2f66 -4px -4px 8px 9px;
}

#CancelAndUnlockButton:active
{
	//sound: "ui_custom_lobby_quit";
  sound: "ui_team_select_cancel_and_lock";
}


.player_has_host_privileges.teams_locked #CancelAndUnlockButton
{
  visibility: visible;
}



.TeamSelectTeam
{
  width: 100%;
  margin: 6px;
	background-color: gradient( linear, 100% 0%, 100% 100%, from( #272b30 ), color-stop( 0.6, #181a1e ), to( #181a1e ) );
  
  //box-shadow: fill #44444430 -5px -5px 9px 9px;
  //border-top: 1px solid #ffffff10;
	//border-right: 1px solid #000000ff;
	//border-left: 1px solid #ffffff10;
	//border-bottom: 1px solid #000000ff;
}

.TeamSelectTeam.local_player_on_this_team
{
  box-shadow: fill #ffffff40 -3px -3px 3px 6px;
  //box-shadow: -3px -3px 12px 6px #FFFFFF88;
}

.TeamSelectTeam:hover
{  
  //background-color: #272b30dd;
}

#TeamBackgroundGradient
{
  width: 100%;
  height: 100%;
}

.teams_unlocked .TeamSelectTeam:hover #TeamBackgroundGradient
{  
  visibility: collapse;
}

#TeamBackgroundGradientHighlight 
{  
  width: 100%;
  height: 100%;
  visibility: collapse;
}

.teams_unlocked .TeamSelectTeam:hover #TeamBackgroundGradientHighlight
{
  visibility: visible;
}

#TeamGroup 
{
	background-color: transparent;
  width: 100%;
  padding: 4px;
  flow-children: down;
}

#TeamHeader
{
  width: 100%;
  flow-children: right;
}

#TeamNameLabel
{
	font-size: 20px;
	vertical-align: top;
	text-shadow: 2px 2px 2px black;
  	margin-left: 1px;
  margin-top: 1px;  
	text-transform: uppercase;
	white-space: nowrap;
	width: 100%;
}

#JoinTeamLabel
{
  color: #444444;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 20px;
  horizontal-align: right;
	vertical-align: center;
	margin-top: 4px;
	
	transition-property: color;
	transition-duration: 0.2s;
}

.teams_unlocked .TeamSelectTeam:hover #JoinTeamLabel
{
	color: white;
}

.TeamSelectTeam.team_is_full #JoinTeamLabel
{
  opacity: 0;
}

.TeamSelectTeam.local_player_on_this_team #JoinTeamLabel
{
  opacity: 0;
}

.TeamSelectTeam.local_player_is_ready #JoinTeamLabel
{
  opacity: 0;
}

#TeamPlayerDivider 
{
	width: 100%;
  margin: 2px;
	height: 1px;
	background-color: #49525555;
}

#PlayerList
{
  width: 100%;
  flow-children: down;
  width: 100%;
}

#player_root
{
	width: 100%;
}

.player_slot
{
  height: 32px;
  width: 100%;
  flow-children: right;
  margin-top: 2px;
}




.TeamSelectPlayer
{
  width: 100%;
  flow-children: right;
  vertical-align: middle;
  flow-children: right;
}

DOTAAvatarImage
{
  width: 32px;
  height: 32px;
  background-color: black;
	vertical-align:middle;
}

#PlayerIsHostPanel
{  
  background-image: url( "file://{images}/icon_star.png");
  background-repeat: no-repeat;
  background-size: contain;
  overflow: noclip;
  width: 24px;
  height: 24px;
  visibility: collapse;
  margin-top: 2px;
  margin-right: 4px;
  margin-left: 4px;
  visibility: collapse;
}

.TeamSelectPlayer.player_has_host_privileges #PlayerIsHostPanel
{
  visibility: visible;
}

#PlayerName
{
	color: white;
	vertical-align:middle;
  margin: 3px;
  text-shadow: 2px 2px 2px black;
  width: fill-parent-flow( 1 );
	white-space: nowrap;
}

#PlayerLeaveTeamButton 
{
	width: 24px;
	height: 24px;
	wash-color: #aa0000ee;
	
	background-image: url("file://{images}/control_icons/x_close.png");
	background-size: 24px 24px;
	background-repeat: no-repeat;
	background-position: 50% 50%;
	margin: 4px;
    
  visibility: collapse;
}

#PlayerLeaveTeamButton:hover
{
  wash-color: red;
}

.teams_unlocked .TeamSelectTeam .player_is_local #PlayerLeaveTeamButton
{
  visibility: visible;
}

.TeamSelectEmptySlot 
{
  flow-children: right;
}

.TeamSelectEmptySlot #PlayerName
{
	color: #454545;
	letter-spacing: 1px;
	font-size: 18px;
}

#EmptySlotIcon 
{	
  width: 32px;
	height: 32px;
  opacity: 0.7;
  background-image: url("file://{images}/custom_game/empty_slot_avatar.png");
  background-size: 32px 32px;
	background-repeat: no-repeat;
	background-position: 50% 50%;
}

// Здесь уже пошли мои панели
.SettingsList {
//	vertical-align: center;
//	horizontal-align: center;
	position: 12px 10px 0px;
}

#SettingsList
{
	position: 12px 10px 0px;
  width: 400px;
	height: 100%;
	flow-children: down;  
  padding-left: 16px;
	padding-right: 16px;
  margin-left: 16px;
  background-color: gradient( linear, 100% 0%, 100% 100%, from( #111111 ), color-stop( 0.01, #202327 ), color-stop( 0.2, #141619ff ), to( #000000dd ) );
  box-shadow: black -4px -4px 8px 8px;
  
	animation-name: TeamsListAppear;
	animation-duration: 0.75s;
}
635a0ba095684d00a8c2d25e53e03633.png

team_select.xml
Код:
<root>
	<styles>
		<include src="file://{resources}/styles/dotastyles.css" />
		<include src="file://{resources}/styles/play.css" />
		<include src="file://{resources}/styles/custom_game/team_select.css" />
		
		<include src="file://{resources}/styles/custom_game/settings_panel.css"/>
		<include src="file://{resources}/styles/custom_game/radiobutton1.css"/>
		<include src="file://{resources}/styles/custom_game/radiobutton2.css"/>
		<include src="file://{resources}/styles/custom_game/radiobutton3.css"/>
	</styles>
	<scripts>
		<include src="file://{resources}/scripts/custom_game/team_select.js" />
		
		<include src="file://{resources}/scripts/custom_game/test2.js"/>
	</scripts>
	<Panel hittest="false" class="TeamSelect">
		<Panel hittest="false" id="TeamSelectContainer" selectionpos="auto">`
			<!--Empty space to let the loading screen and chat be visible-->
			<Panel hittest="false" id="TeamsSelectEmptySpace" />

			<Panel hittest="false" id="SettingsList">
				<Panel class="RadioButton">
					<RadioButton checked="checked" group="Gamemode" id="Gamemode1" text="TEST MATCH" onactivate="onTest2Click('myArgument')"/>
				</Panel>
				<Panel class="RadioButton">
					<RadioButton group="Gamemode" id="Gamemode2" text="1V1 MATCH" onactivate="onTest2Click('myArgument')"/>
				</Panel>
				<Panel class="RadioButton">
					<RadioButton group="Gamemode" id="Gamemode3" text="NORMAL MATCH" onactivate="onTest2Click('myArgument')"/>
				</Panel>
			</Panel>
			
			<!--Teams List, left hand panel-->
			<Panel id="TeamsList" >
				<Panel id="TeamsListGroup" >
					<Panel id="TeamListHeader">
						<Label id="TeamListHeaderLabel" text="#custom_game_team_select" />
						<Image id="TeamListLockedIcon" src="file://{images}/control_icons/lock_small.png" />
					</Panel>
					<Panel id="TeamsListRoot" />
					<Button id="ShuffleTeamAssignmentButton" onactivate="OnShufflePlayersPressed()">
						<Label text="#custom_game_team_select_shuffle" />
						<Image src="file://{images}/control_icons/shuffle.psd" />
					</Button>
				</Panel>
			</Panel>

			<!--Game Info and Unassigned players, right hand panel-->
			<Panel id="GameAndPlayersRoot">
				
				<Panel id="GameInfoPanel" >
					
					<!--Game mode and map-->
					<Panel id="CustomGameModeName">
						<Label id="GameModeNameLabel" text="#addon_game_name" />
					</Panel>
					<Panel id="MapInfo">
						<Label id="MapInfoLabel" text="#LoadingScreenMapInfo" />
					</Panel>
					
					<!--Countdown timer-->
					<Panel id="StartGameCountdownTimer">
						<Image id="TimerBg" src="file://{images}/status_icons/timer_background.psd" />
						<Image id="TimerRing" src="file://{images}/status_icons/timer_ring.psd" />
						<Label id="TeamSelectTimer" text="#custom_game_team_select_timer" />
						<Panel id="TimerLabelBox" >
							<Label id="TimerLabelAutoStart" text="#custom_game_team_select_auto_start" />
							<Label id="TimerLabelGameStart" text="#custom_game_team_select_starting" />
						</Panel>
					</Panel>
					
				</Panel>

				<!--Unassigned players-->
				<Panel id="UnassignedPlayerPanel" >
					<Button id="UnassignedPlayersButton" onactivate="OnLeaveTeamPressed()">
						<Panel id="UnassignedPlayersHeader">
							<Label text="#custom_game_team_select_unassigned_players" />
						</Panel>
						<Panel id="UnassignedPlayersDivider" />
						<Panel id="UnassignedPlayersContainer" />
					</Button>		
				
					<Button id="AutoAssignButton" onactivate="OnAutoAssignPressed()">
						<Image src="file://{images}/control_icons/double_arrow_left.png" />
						<Label text="#custom_game_team_select_auto_assign" />
					</Button>
				</Panel>
				
				<!--Start and lock button-->
				<Button id="LockAndStartButton" class="PlayButton" onactivate="OnLockAndStartPressed()">
					<Label text="#custom_game_team_select_lock_start" />
				</Button>
				<Button id="CancelAndUnlockButton" class="PlayButton" onactivate="OnCancelAndUnlockPressed()">
					<Label text="#custom_game_team_select_cancel_unlock" />
				</Button>
				
			</Panel>
		</Panel>
	</Panel>
</root>
 
Последнее редактирование модератором:
В прилежащий css файл
Код:
#SettingsList
{
	background-color: #00FF0050;
}
 
CryDeS, Спасибо,
c2d4a1641e5f4ce783e90d46cf4c2043.png
 
Ух ты можешь мне подогнать?) я в панораме не силен, хоть посижу разберусь)
 
Se7eN, Я 3 часа мучился, чтоб понять примерно, как что где писать, потому что в xml, css вообще не разбираюсь, но если вижу пример, то на нём учусь)
Кодов там много, сложно будет всё скинуть сюда
 
На GitHub`e можно найти очень много примеров UI на Panorame.
 
Реклама: