Jump to content

OMGzOMG

Members
  • Posts

    8
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by OMGzOMG

  1. 13 minutes ago, redsky9 said:

    I have made a bit of progress, where I was able to implement a quick and dirty way of resizing the window, but couldn't resize the other things needed for the window to look ok. It would take a few days more of diging in the code, but my C++/C# skills are more then dusty.

    I was thinking, someone already had the code neccessary to quickly add this.

    Yes, thanks for that. It took me about half way, but there are still issues with dinamicly resizing the window.

    to resize everything just use "size_percent_width" in xdat on everything inside the window

    Quote

    local int Width, Height;

        ParseInt(param, "Width", Width);
        ParseInt(param, "Height", Height);


        if(Width > 0 && Height > 0)
            me.SetWindowSize(Width, Height);

    https://imgur.com/KJVWOvc.jpg

  2. 1 hour ago, redsky9 said:

    I want a Window that can be resized based on the html sent from the server.

    For example sending the string "xWidth=200;xHeight=350" at the top of the htm would tell the client to open the NPC window with said proportions.

    Anyone have this implemented?

    I send it for u in another topic about extra window... its the same method

  3. you can send to all html windows, you just need to change the viewtype, but but the name of npcs window is "NPCDialogWnd".

    the function for you to understand how to send to another window:

    function HandleLoadHtmlFromString(string param)
    {
    	local string htmlString;
    	local int tmp;
    
    	ParseString(param, "HTMLString", htmlString);
    	ParseInt(param, "isExtra", tmp);
    
    	if(tmp != 1)
    	{
    		m_hHtmlViewer.LoadHtmlFromString(htmlString);
    		ShowNPCDialogWnd();
    
    	}else
    	{
    		m_ScriptExtra.HandleShowBoardPacket(param);
    	}
    }

     

    • Upvote 1
×
×
  • Create New...