-
March 23rd, 2020, 16:44 #1
How do I get the applications window size (in pixel)?
Hey all!
I'd like to make a window that stretches over the complete screen, horizontally. I got it to where I can open my window, fix it to the top left by code, and resize it manually and/or via code. So far so good, but what I can't find, neither in the forums, nor the refdoc (which, btw., could use a search function, for us lazy people ^^), nor the dev guide, is how to find out the current resolution of the Fantasy Grounds window. I'm not talking about my own window, I mean the complete application window.
I need something like Screen.width in the Unity Engine.
I've been looking for the sidebar in CoreRPG, which scales horizontal, but I didn't find out how it does that.
-
March 23rd, 2020, 16:56 #2
Don't know. But the map resize to background/full does what you want right? So perhaps you can find it in there?
As for RefDoc search, use a Google Search with the site specified?
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
March 23rd, 2020, 17:07 #3
-
March 23rd, 2020, 17:20 #4
Or, to search the Wiki. From the new Wiki page (accessing from the Help menu at the top of the page) click the magnifying glass in the top left.
Then search for getsize maybe? And select the result for windowinstancePrivate Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
March 23rd, 2020, 21:11 #5
Got it. You basically put a panel stretching over your whole screen on the desktop, and put an empty class in there, which doesn't do any size or position control on itself. Make sure your panel has the <disabled /> tag, so it doesn't interfere with the rest of the interface.
Code:<root> <windowclass name="dev_console"> <frame>default_framed</frame> <nomove /> <placement> <size width="150" height="100" /> <nosave /> </placement> <sizelimits> <minimum width="100" height="25" /> <maximum width="10000" height="500" /> <dynamic /> </sizelimits> <sizelimits> <dynamic> <resize>both</resize> </dynamic> </sizelimits> </windowclass> <windowclass name="empty"> </windowclass> <panel name="desktopfullpanel" modes="host,client"> <anchored> <left /> <top /> <right /> <bottom /> </anchored> <class>empty</class> <disabled /> </panel> </root>
Code:function onInit() local dc =Interface.openWindow("dev_console", ""); Interface.onDesktopInit = onDesktopInit; end function onDesktopInit () local devCon = Interface.findWindow("dev_console", ""); local empty = Interface.findWindow("empty", ""); devCon.setPosition(0,0); devCon.setSize(empty.getSize (),25); end
-
October 17th, 2020, 08:10 #6
- Join Date
- Jan 2020
- Posts
- 222
I don't know if it's exact, but imagefullpanel is what I'm using. So:
local sizeX, sizeY = Interface.findWindow("imagefullpanel","").getSize( );
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks