[{"data":1,"prerenderedAt":209},["ShallowReactive",2],{"class-doc-/reference/2.0/gg_permissions/ggdialogcontexthelper":3,"navigation":137},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"_id":8,"navigation":6,"addon":5,"version":9,"brief_description":10,"description":11,"tutorials":7,"methods":12,"members":81,"signals":115,"constants":130,"inherits":131,"name":132,"title":132,"_source":133,"_file":134,"_stem":135,"_extension":136},"/reference/2.0/gg_permissions/ggdialogcontexthelper","gg_permissions",false,"","content:40.reference:2.0:gg_permissions:GGDialogContextHelper.xml","2.0","Helps manage user interfaces (dialogs) and access manager contexts.","UIs use context_ids when interacting with an inventory on behalf of an actor (character). Some UIs (i.e. inventory transfers) require multiple contexts -- one for each side. The GGDialogContextHelper is used to ensure the UI has all the context IDs it needs. If any contexts fail or are closed, the UI automatically closes.[br][br]To use:[br]- set the [member ui] to the root [Node] of your UI scene[br]- set the [member on_success] [Callable] to the callback closure that provides your UI scene with the context IDs returned by the [GGEntityAccessManager].[br]Then, use [method acquire_context] to acquire contexts for an [code]object[/code] on behalf of an [code]actor[/code].[br]Finally, use [code]await[/code] [method dialog.wait_for_contexts()] to wait for the contexts to have been acquired.",[13,25,29,34,37,41,45,49,53,65,72],{"description":14,"name":15,"public":16,"returnType":17,"params":18},"Opens a context with the [param entity_access_manager] on behalf of the [param actor].","acquire_context",true,"void",[19,22],{"name":20,"type":21},"entity_access_manager","GGEntityAccessManager",{"name":23,"type":24},"actor","Node",{"description":26,"name":27,"public":16,"returnType":17,"params":28},"Waits for all replies from the access manager to finish. This largely applies to the client waiting for responses from the server. If run on the server, and access manager policies are synchronous (the default), they've already been acquired.","wait_for_contexts",[],{"description":7,"name":30,"public":16,"returnType":31,"params":32},"get_context_id_for","int",[33],{"name":20,"type":21},{"description":7,"name":35,"public":6,"returnType":17,"params":36},"_on_closed",[],{"description":38,"name":39,"public":16,"returnType":17,"params":40},"Cancels any pending context requests and closes any contexts already received. Automatically closes the UI if necessary.","close",[],{"description":42,"name":43,"public":16,"returnType":17,"params":44},"Tells the [GGEntityAccessManager] to cancel any pending context requests for this helper.","cancel_pending",[],{"description":46,"name":47,"public":16,"returnType":17,"params":48},"Tells the [GGEntityAccessManager] to close all Context IDs for this helper.","close_contexts",[],{"description":7,"name":50,"public":6,"returnType":17,"params":51},"_on_entity_access_manager_exiting_tree",[52],{"name":20,"type":24},{"description":7,"name":54,"public":6,"returnType":17,"params":55},"_on_context_opened",[56,58,60,62,64],{"name":57,"type":31},"context_id",{"name":59,"type":24},"_actor",{"name":61,"type":31},"nonce",{"name":63,"type":31},"_remote_sender_id",{"name":20,"type":21},{"description":7,"name":66,"public":6,"returnType":17,"params":67},"_on_context_denied",[68,69,70,71],{"name":59,"type":24},{"name":61,"type":31},{"name":63,"type":31},{"name":20,"type":21},{"description":7,"name":73,"public":6,"returnType":17,"params":74},"_on_context_closed",[75,76,77,79,80],{"name":57,"type":31},{"name":59,"type":24},{"name":78,"type":31},"_nonce",{"name":63,"type":31},{"name":20,"type":21},[82,87,90,95,100,103,107,110,113],{"name":83,"description":84,"type":85,"setter":7,"getter":7,"default":86,"public":16},"pending","Pending context requests; maps [GGEntityAccessManager] -> nonce","Dictionary[GGEntityAccessManager, int]","{}",{"name":88,"description":89,"type":85,"setter":7,"getter":7,"default":86,"public":16},"context_ids","context IDs; maps [GGEntityAccessManager] -> context_id",{"name":91,"description":92,"type":93,"setter":7,"getter":7,"default":94,"public":16},"success","Indicates whether we're in a successful state.","bool","true",{"@deprecated":96,"name":97,"description":98,"type":99,"setter":7,"getter":7,"public":16},"Use the [signal acquired] signal instead.","on_success","Called when a context ID was received.","Callable",{"name":101,"description":102,"type":99,"setter":7,"getter":7,"public":16},"on_failure","Called when getting a context ID failed,",{"name":104,"description":105,"type":24,"setter":106,"getter":7,"public":16},"ui","Keep track of the UI. If it leaves the tree, we close the context.","@ui_setter",{"name":108,"type":109,"setter":7,"getter":7,"default":86,"public":6},"_queue","Dictionary[GGEntityAccessManager, Node]",{"name":111,"type":93,"setter":7,"getter":7,"default":112,"public":6},"_done","false",{"name":114,"type":93,"setter":7,"getter":7,"default":112,"public":6},"_closing",[116,120,126],{"description":117,"name":118,"params":119},"Emitted when the contexts are acquired","done",[],{"description":121,"name":122,"params":123},"Emitted when all queued contexts are acquired. TODO: Godot 4.4: context_ids: Dictionary[GGEntityAccessManager, int]","acquired",[124],{"name":88,"type":125},"Dictionary",{"description":127,"name":128,"params":129},"Emitted when the helper closed","destroyed",[],[],"RefCounted","GGDialogContextHelper","content","40.reference/2.0/gg_permissions/GGDialogContextHelper.xml","40.reference/2.0/gg_permissions/GGDialogContextHelper","xml",[138,147,174,194],{"title":139,"_path":140,"children":141},"Getting Started","/getting-started",[142,144],{"title":143,"_path":140},"Introduction",{"title":145,"_path":146},"Installation","/getting-started/installation",{"title":148,"_path":149,"children":150},"Concepts","/concepts",[151,153,156,159,162,165,168,171],{"title":152,"_path":149},"Overview",{"title":154,"_path":155},"Inventory","/concepts/inventory",{"title":157,"_path":158},"Interactions","/concepts/interaction",{"title":160,"_path":161},"Permissions","/concepts/permissions",{"title":163,"_path":164},"Multiplayer","/concepts/multiplayer",{"title":166,"_path":167},"User Interface","/concepts/user-interface",{"title":169,"_path":170},"Game Integration","/concepts/game-integration",{"title":172,"_path":173},"Crafting","/concepts/crafting",{"title":175,"_path":176,"children":177},"Demos","/demos",[178,180,183,186,188,191],{"title":179,"_path":176},"Inventory Tour",{"title":181,"_path":182},"Inventory UI Playground","/demos/inventory_ui",{"title":184,"_path":185},"Inventory Game UI","/demos/inventory_game_ui",{"title":172,"_path":187},"/demos/crafting",{"title":189,"_path":190},"Multiplayer Lobby","/demos/mp_lobby",{"title":192,"_path":193},"Sequencer (prototype)","/demos/sequencer",{"title":195,"_path":196,"children":197},"Guide","/guide",[198,200,203,206],{"title":199,"_path":196},"Architecture Deep Dive",{"title":201,"_path":202},"Design Principles","/guide/design-principles",{"title":204,"_path":205},"Changelog v2.x","/guide/changelog-v2",{"title":207,"_path":208},"Changelog v1.x","/guide/changelog",1743268971410]