Jump to content
View in the app

A better way to browse. Learn more.

Obsidian Forum Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Looking at how conversation textures are loaded:

private void LoadConversationSmallTexture()
{
	if (!string.IsNullOrEmpty(this.m_textureConversationSmallPath))
	{
		this.m_textureConversationSmall = Portrait.LoadTexture2DFromPath(this.m_textureConversationSmallPath, 76, 96);
	}
	this.NotifyChanged();
}
I'm not sure what happens when m_textureConversation[small|Large]Path is empty, but if it is empty, it would be preferable to fallback to m_texture[small|Large]Path, so that we can create large and small portraits without worrying about also creating large and small conversation portraits.

 

In other words:

private void LoadConversationSmallTexture()
{
	string texturePath = string.IsNullOrEmpty(this.m_textureConversationSmallPath) ? this.m_textureSmallPath : this.m_textureConversationSmallPath;
	this.m_textureConversationSmall = Portrait.LoadTexture2DFromPath(texturePath, 76, 96);
	this.NotifyChanged();
}

Edited by fireundubh

This is an unrelated note to your thread, but can you tell me what you are using to (I assume) decompile the code to take a look at behaviors? I'd like to take a look to see how specific things are being handled for modding purposes.

  • Author

This is an unrelated note to your thread, but can you tell me what you are using to (I assume) decompile the code to take a look at behaviors? I'd like to take a look to see how specific things are being handled for modding purposes.

dnSpy.

This is already the behavior, it's just implemented a little differently that you're expecting - Portrait.GetTexture returns the non-conversation portraits if conversation portraits aren't available.

  • Author

This is already the behavior, it's just implemented a little differently that you're expecting - Portrait.GetTexture returns the non-conversation portraits if conversation portraits aren't available.

 

Awesome! Thank you for the heads-up.

 

edit: I see it now!  :)

case Portrait.Style.ConversationLarge:
	return (!this.m_textureConversationLarge) ? this.m_textureLarge : this.m_textureConversationLarge;
case Portrait.Style.ConversationSmall:
	return (!this.m_textureConversationSmall) ? this.m_textureSmall : this.m_textureConversationSmall;

Edited by fireundubh

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.