UI : Tabs

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
Jackalo
Non-Subscriber
Posts: 23
Joined: Wed Jun 22, 2005 6:07 pm

UI : Tabs

Post by Jackalo » Sun Sep 18, 2005 2:25 pm

I'm on the final stages of miniAutofish, and decided to put in Tabs to keep the Config window as small as possible. The problem is that I've been researching TabControl for the past two hours and haven't been able to figure out how to set it up.

Is there any chance you could provide a demonstration XML file for TabControl?

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sun Sep 18, 2005 2:51 pm

The example in the wiki should actually be sufficient, all you have to do to it (besides tabs) is add the X,Y width and height, as long as a template is providing the rest.

http://www.lavishsoft.com/wiki/index.ph ... #Example_1

What isn't clear from the wiki page? Any chance you can come on IRC? Some of this stuff would be so much easier to help you with

Jackalo
Non-Subscriber
Posts: 23
Joined: Wed Jun 22, 2005 6:07 pm

Post by Jackalo » Sun Sep 18, 2005 3:01 pm

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<ISUI>
	<Window name='Tab Testbed'>
		<X>120</X>
		<Y>240</Y>
		<Width>280</Width>
		<Height>280</Height>
		<StorePosition>0</StorePosition>
		<TitleBar template='window.TitleBar'>
			<Children>
				<text Name='Title' template='window.TitleBar.title' />
				<button Name='Minimize' template='window.TitleBar.Minimize' />
				<commandbutton name='Custom Close Button' template='window.TitleBar.Close'>
					<Command>ui -unload "&filename;"</Command>
				</commandbutton>
			</Children>
		</TitleBar>
		<Children>
		<TabControl Name='my tab control'>
			<X>0</X>
			<Y>0</Y>
			<Width>100%</Width>
			<Height>15</Height>
			<Tabs>
				<Tab Name='My Tab'>
					<Button Name='My Button'>
					</Button>
					<text name='Tab1 Text'>
						<X>10</X>
						<Y>10</Y>
						<Width>120</Width>
						<Height>20</Height>
						<Text>This is Tab1</Text>
					</text>
				</Tab>
				<Tab Name='Second Tab'>
					<Button Name='My Button'>
					</Button>
					<text name='Tab2 Text'>
						<X>10</X>
						<Y>10</Y>
						<Width>120</Width>
						<Height>20</Height>
						<Text>This is Tab2</Text>
					</text>
				</Tab>
			</Tabs>
		</TabControl>
		</Children>
	</Window>
</ISUI>
Ok, I thought I had tried the placement of the X,Y,Width,Height under TabControl earlier, but I guess I hadn't. The above code works except for one visual defect, which is a white box in the bottom, left corner of the first tab.

Mysteryman
GamingTools Subscriber
Posts: 33
Joined: Sat Jul 09, 2005 1:21 pm

Post by Mysteryman » Fri Oct 14, 2005 4:27 pm

If you use the TabHeight property , it will stop the little box your seeing, also, set the height to something more then 15, or that will be the size of the frame ( so it appears anyway becuase input items don't work if they are below that mark ).


The trouble i have when done this way though, is the entire frame of the tab's are white'ish in color....

<TabControl name='My TabControl'>
<Width>100%</Width>
<Height>100%</Height>
<TabHeight>20</TabHeight>

<BackgroundColor>FF000033</BackgroundColor>
<Tabs>
<Tab name='General'>


</Tab>
<Tab name='Songs'>
</Tab>
</Tabs>
</TabControl>


I tried using backgroundcolor there, but it does no good. So I tried to set it down under the individual tabs..and it gives an error along the lines of

"Failed to create BackgroundColor child for Gernarl" ( or what ever "tab" i have it under.

Mysteryman
GamingTools Subscriber
Posts: 33
Joined: Sat Jul 09, 2005 1:21 pm

Post by Mysteryman » Fri Oct 14, 2005 5:07 pm

Bah, Can't edit my previous post to add the

Code: Select all

 blocks, sorry...

Any way, is there a way to prevent a click on a window from reaching though to the game? I'm playing L2 atm...and for instance, when i click on a check box in a window i make,    the check box fires, but it sends the click though to the game, and makes me run to the point where i clicked..

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Fri Oct 14, 2005 5:19 pm

If input bleeds through to the game, then this is a problem with Inner Space and the game's input systems. The best thing for you to do is try disabling some of the input systems in Inner Space. For example, turn off both Win32 keyboard and mouse, or both DirectInput keyboard and mouse. If one or the other causes Inner Space and the game to work perfectly together, let me know and I will fix the defaults. If nothing makes it work correctly, let me know that too, and I will try to determine what needs to be changed with Inner Space's input processing to solve the problem

Mysteryman
GamingTools Subscriber
Posts: 33
Joined: Sat Jul 09, 2005 1:21 pm

Post by Mysteryman » Fri Oct 14, 2005 6:19 pm

None of the above combo's work..


If i turn off Directx mouse/kb, no changes...

if i turn off win32 mouse/kb, i can't use the ~ to bring up the console anymore... So i'm guessing they are using win32 input's.


But even with only win32 kb on ( mouse / dxkb/dxmouse all off also ), when i click on my checkbox in my window, it works, but still bleeds though to the game as well..


The game is L2 by the way. If there is anything I can do to help diagnose , let me know and I'll be happy to . I have every compiler known to man here on this pc arleady, can run test code for ya or what ever. Let me know.

Post Reply