Home | Reviews | GUIpedia | Forum | Fun500
jasonwoodland | Bison GUIBison, a Start of a GUI made when I was meant to be at footy day! :laugh:
I'm sure I learnt more at being home then school.:woohoo:
Anyway, Bison is a GUI becoming a reliable multitasking GUI!
At the states it's in now it has errors when loading the same program twice and constantly redrawing windows!
The download like will be up in a few hours or so!
Bison is also the first GUI of mine with 2 or more windows running at the same time!
All questions and ideas welcome! :)
PS: It's basically a Windowing Demo! | 2008-09-18 | 8:23 AM |
aguma | Re:Bison GUIYou took my advice, didn't you? lol | 2008-09-18 | 5:51 PM |
jasonwoodland | Re:Bison GUII used common sence, I knew your advice would help:cheer: | 2008-09-18 | 5:53 PM |
jasonwoodland | Re:Bison GUII have some trouble with the active window you know but I might get the hang of it, we'll see. If you have some abstract or unused ideas that would be great. | 2008-09-23 | 10:22 AM |
Todd | Re:Bison GUIWhat do you mean with the active window? What's wrong? You can't get it to do what you want? | 2008-09-23 | 11:18 AM |
Brandon | Re:Bison GUIHes a retard. | 2008-09-23 | 1:33 PM |
jasonwoodland | Re:Bison GUIRetard? I ain't nothin like a damn retard, no-one's a retard Brandon, seriously, you know? Help people yeah? But don't go talkin crap about others when it ain't nothing like them. What a way to behave. :angry:
Anyway, Todd, I have trouble with changing the window order, I have Window 0 to Window 400.
I thought that if I move every window back one and put the clicked one in the free space (Window 0) and redraw them backwards That would work I thought.
Aguma and Brandon said to have a variable called 'ActiveWindow' and when the window is clicked you put it in 'ActiveWindow' and then draw the 'ActiveWindow' last so it's on top. | 2008-09-23 | 6:44 PM |
Brandon | Re:Bison GUIwell i told you 8 times and you never figured it out. | 2008-09-23 | 7:30 PM |
aguma | Re:Bison GUIOne thing, do Window 1 to 20, not 0 to 400! Most people never open that many windows, and it wastes memory. | 2008-09-23 | 7:40 PM |
Brandon | Re:Bison GUIYeah Fun500 4 does 20 and youd never notice. | 2008-09-23 | 7:42 PM |
Todd | Re:Bison GUIHere's what I would use:
[code]
TYPE TWin
x AS INTEGER
y AS INTEGER
w AS INTEGER
h AS INTEGER
order AS INTEGER 'For the record, order starts at 1 (0 is none)
END TYPE
DIM SHARED tw(50) AS TWin
Active% = 0 ' Meaning no active window yet
SUB SucceedWin (id%)
' Brings window forward and pushes others back
ord% = tw(id%).order
FOR i = ord%-1 TO 1
tw(i).order = i
tw(i-1).order = i+1
SWAP tw(i), tw(i-1)
NEXT i
Active% = id%
END SUB
FUNCTION WindowCount%
FOR i = 0 TO 49
IF tw(i).order = 0 THEN
WindowCount% = i
' We don't need to add 1 (since we started at 0 and stop when we find a null window)
EXIT FOR
END IF
NEXT i
END FUNCTION
FUNCTION AddWindow% (x%, y%, w%, h%)
id% = WindowCount%
' WindowCount returns number of windows and starts at 0, so we have already added 1 to our index ID
tw(id%).x = x%
tw(id%).y = y%
tw(id%).w = w%
tw(id%).h = h%
tw(id%).order = id%+1
AddWindow% = id%
END FUNCTION
[/code]
I haven't tested it but it explains a lot of the windowing concepts. | 2008-09-23 | 7:56 PM |
jasonwoodland | Re:Bison GUIThanks guys, I'll try it out and see how it goes you know? :) | 2008-09-23 | 8:11 PM |
Todd | Re:Bison GUII just wrote it on the fly. It's not bullet-proof but it gives you an idea of how to make it work. | 2008-09-23 | 8:12 PM |
| Re:Bison GUIIn my current windowing system, the "redrawing part" only happens at the beginning. Windows are never redrawn unless another window was dragged over them. The window order is naturally occuring without the need to any variables. You should aim for something like that. | 2008-09-23 | 8:13 PM |
GUIs
2021 Brandon Cornell