Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
koder

Вопрос: Как отобразить курсор при отображение Layout

Здравствуйте. Подскажите пожалуйста как я могу отобразить курсур при создании виджета и потом его убрать вместе с виджетом я пробывал через

ShowCursorWidget(true);

Ничего не работает. Может кто знает. Возможно в верстаке интерфейсов надо чето жмакнуть.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

1652553601_.png.8b7178f5a50d7aafe72417c74a220bf8.png

на скрине пример 2 функций, одна из которых при открытии меню срабатывает, вторая при закрытии.

Edited by 123new (see edit history)

Share this post


Link to post
Share on other sites



  • 0

Попозже проверю дам фидбек

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

@123new Хммм... Возможно я что-то не то делаю. Но я создал вот 2 функции 

void ShowCursor() 
	{
		GetGame().GetMission().PlayerControlDisable(INPUT_EXCLUDE_INVENTORY);
		GetGame().GetUIManager().ShowUICursor(true);
	}

	void HideCursor() 
	{
		GetGame().GetMission().PlayerControlEnable(true);
		GetGame().GetInput().ResetGameFocus();
		GetGame().GetUIManager().ShowUICursor(false);
		GetGame().GetUIManager().Back();
	}

Вызываю вот здесь 

private void LoadUI()
	{
		m_RootWidget = GetGame().GetWorkspace().CreateWidgets("UGHIMarket/gui/layouts/dmenu.layout");
		ShowCursor();
		
		if(m_RootWidget)
		{				
			m_RootWidget.Show(false);	
		}
		else
		{		
		}
	}

Меню открывается/закрывается, а курсор не появляется. В чем может быть проблема?

UPD: Все разобрался использовал 

GetGame().GetMission().PlayerControlDisable(INPUT_EXCLUDE_INVENTORY);
GetGame().GetUIManager().ShowUICursor( true );
GetGame().GetUIManager().ShowCursor(true);

 

Edited by koder
понял в чем дело (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.