tommysticks Posted January 3, 2017 Share Posted January 3, 2017 I'm trying to make a custom window open at the press of a button by dissecting existing files, but a lot of them have stacks of other files that are required due to extra tabs 'n shit. Anyone know of a custom window that has only 1 window and no tabs? So I can see what it looks like. I tried looking at the mod Admin Tools, which is currently what I'm using to acccomplish what I want done, but there are so many extra files in there due to all the tabs. I can't single it down to the bare minimum. Link to comment Share on other sites More sharing options...
RoboMat Posted January 3, 2017 Share Posted January 3, 2017 require('ISUI/ISPanel'); require('ISUI/ISRichTextPanel'); require('ISUI/ISCollapsableWindow'); UIStoryPanel = {}; function UIStoryPanel.new(title, text) title = title or 'test' text = text or 'Bacon ipsum dolor amet strip steak drumstick shankle jerky frankfurter short loin sausage. Short loin hamburger landjaeger turducken. Pork belly bresaola pork drumstick picanha. Rump capicola pork chop ball tip pork loin.' local self = {}; self.tut = ISRichTextPanel:new(0, 0, 500, 500); self.tut:initialise(); self.tut:setAnchorBottom(true); self.tut:setAnchorRight(true); self.moreinfo = self.tut:wrapInCollapsableWindow(); self.moreinfo:setX((getCore():getScreenWidth() * 0.5) - (self.tut.width * 0.5)); self.moreinfo:setY((getCore():getScreenHeight() * 0.5) - (self.tut.height * 0.5)); self.moreinfo:setTitle(title); self.moreinfo:addToUIManager(); self.tut:setWidth(self.moreinfo:getWidth()); self.tut:setHeight(self.moreinfo:getHeight() - 16); self.tut:setY(16); self.tut.autosetheight = false; self.tut.clip = true; self.tut:addScrollBars(); self.tut.textDirty = true; self.tut.text = text; self.tut:paginate(); return self; end This is from an old mod of mine and *should* create a simple text window. tommysticks 1 Link to comment Share on other sites More sharing options...
tommysticks Posted January 3, 2017 Author Share Posted January 3, 2017 1 minute ago, RoboMat said: This is from an old mod of mine and *should* create a simple text window. Thanks for quick response! I'll check it out. Link to comment Share on other sites More sharing options...
tommysticks Posted January 4, 2017 Author Share Posted January 4, 2017 20 hours ago, RoboMat said: Do or do not, there is no try. Yo man, this shit's probably pretty simple for you but just messin around with this I'm learning a lot. Thanks! +5 internets for you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now