# View for the tokenized topbar counter widget.
# Adapted from Black Ice's dynamic topbar; controller: common/scripted_guis/BI_dynamic_topbar.txt
guiTypes = {
	containerWindowType = {
		name = "BI_dynamic_topbar_container"
		position = { x = 0 y = 88 }

		buttonType = {
			name = "BI_add_dynamic_topbar"
			spriteType = "GFX_NV_btn_add"
			position = { x = 5 y = -3 }
			orientation = "UPPER_LEFT"
			pdx_tooltip = "TOPBAR_ADD_TOOLTIP"
		}

		containerWindowType = {
			name = "topbar_list_container"
			position = { x = 0 y = 1 }
			size = { width = 460 height = 320 }
			Orientation = upper_left

			gridboxtype = {
				name = "topbar_list"
				position = { x = 0 y = 0 }
				size = { width = 100 height = 26 }
				slotsize = { width = 104 height = 26 }

				max_slots_vertical = 1
				add_horizontal = no
			}
		}
	}

	# Rendered counter chip (entry of the topbar_list grid)
	containerWindowType = {
		name = "topbar_list_container"
		position = { x = 0 y = 1 }
		size = { width = 100 height = 26 }

		buttonType = {
			name = "BI_add_dynamic_topbar_gui"
			spriteType = "GFX_NV_btn_add"
			position = { x = 113 y = -3 }
			orientation = "UPPER_LEFT"
			pdx_tooltip = "TOPBAR_ADD_TOOLTIP"
		}
		buttonType = {
			name = "background_button"
			spriteType = "GFX_generic_box_smallest_100"
			position = { x = 10 y = -1 }
			orientation = "UPPER_LEFT"
			pdx_tooltip = "TOPBAR_ENTRY_TOOLTIP"
			pdx_tooltip_delayed = TOPBAR_ENTRY_DELAYED_TOOLTIP
		}
		iconType = {
			name = "background_button_highlight"
			spriteType = "GFX_selected_topbar_slot"
			position = { x = -3 y = -6 }
			orientation = "UPPER_LEFT"
			alwaystransparent = yes
		}
		instantTextBoxType = {
			name = "topbar_info_text"
			position = { x = 5 y = 1 }
			font = "hoi_20bs"
			text = "[GetSelectedTopbarInfoText]"
			format = right
			maxWidth = 100
			maxHeight = 24
			fixedsize = yes
			alwaystransparent = yes
		}
		iconType = {
			name = "topbar_icon"
			spriteType = "GFX_bice_button_24"
			position = { x = 12 y = 0 }
			alwaystransparent = yes
		}

		# Per-slot configuration panel
		containerWindowType = {
			name = "topbar_menu_panel"
			position = { x = 0 y = 35 }
			size = { width = 367 height = 470 }
			Orientation = upper_left

			iconType = {
				name = "topbar_menu_background"
				position = { x = -10 y = 3 }
				spriteType = "GFX_topbar_menu_bg"
				alwaystransparent = yes
			}
			instantTextBoxType = {
				name = "topbar_menu_header_text"
				position = { x = 15 y = 2 }
				font = "hoi_36header"
				text = "TOPBAR_MENU_HEADER"
				format = left
				maxWidth = 365
				maxHeight = 24
				alwaystransparent = yes
			}
			buttonType = {
				name = "options_exit_button"
				position = { x = 611 y = 6 }
				spriteType = "GFX_closebutton"
				pdx_tooltip = CLOSE
				shortcut = "ESCAPE"
				oversound = ui_menu_over
			}
			instantTextBoxType = {
				name = "shift_info"
				position = { x = 15 y = 28 }
				font = "hoi_18mbs"
				text = "TOPBAR_LIST_MENU_SHIFT_TOOLTIP"
				format = left
				maxWidth = 500
				maxHeight = 20
				alwaystransparent = yes
			}

			gridboxtype = {
				name = "topbar_menu"
				position = { x = 12 y = 50 }
				size = { width = 173 height = 23 }
				slotsize = { width = 140 height = 28 }

				max_slots_vertical = 50
				max_slots_horizontal = 3
			}
		}
	}

	# Entry of the per-slot configuration menu grid
	containerWindowType = {
		name = "topbar_menu_container"
		position = { x = 0 y = 0 }
		size = { width = 140 height = 28 }

		buttonType = {
			name = "list"
			spriteType = "GFX_generic_box_125"
			position = { x = 0 y = 0 }
			pdx_tooltip = "TOPBAR_LIST_MENU_TOOLTIP"
			pdx_tooltip_delayed = "TOPBAR_LIST_MENU_TOOLTIP_DELAYED"
		}
		instantTextBoxType = {
			name = "list_text"
			position = { x = 22 y = 4 }
			font = "hoi_18mbs"
			text = "[?topbar_menu_v.GetTokenLocalizedKey]"
			format = left
			maxWidth = 90
			maxHeight = 20
			fixedsize = yes
			alwaystransparent = yes
		}
		iconType = {
			name = "topbar_menu_icon"
			spriteType = "GFX_transparent_40_18"
			position = { x = 2 y = 4 }
			alwaystransparent = yes
		}
		iconType = {
			name = "topbar_menu_expand_icon"
			spriteType = "GFX_expand_button"
			position = { x = 104 y = 5 }
			alwaystransparent = yes
		}
	}
}
