Cower GUI
Community Forums/Showcase/Cower GUI
| ||
Gonna post work in progress shots of this as I go. Source at one point or another. Anyhow, first shot (5kb 800x600 PNG- that format is amazing): ![]() No exe's as per Mark's request. |
| ||
Yay, it's all fecky :) |
| ||
And it's got a weebl on it, it must be stable. Cos everybody knows weebl's wobble but they don't fall down :) |
| ||
Probably my two favorite pseudo-words at the moment. |
| ||
Have you been watching Father Ted of late? |
| ||
What is 'Father Ted'? Get on IRC you git. |
| ||
oh alright then. |
| ||
Why can't you post EXE's? |
| ||
Nice :) @Warren: I think he's referring to this (on the beta download page): marksibly Please do not distribute anything built with these beta versions. There will be no beta demo! |
| ||
Feck originates from father ted afaik, not IRC... |
| ||
![]() |
| ||
Slowly.![]() Skin in that shot is the WinXP skin. There's also a Steam skin (one that mimics the UI in Half-life 2). |
| ||
"There's also a Steam skin (one that mimics the UI in Half-life 2)." Does it take 2 1/2 hours to download and then not work when you get it ? :) feckin' steam. |
| ||
Why can't you post EXE's? The Windows and Linux versions of BlitzMax released are in beta stage yet, so you are not allowed to distribute what you do with them. Of course, you will be able to distribute the executables of these versions as soon as they are officialy released, as you can currently do with MacOSX binaries. |
| ||
The Windows and Linux versions of BlitzMax released are in beta stage yet, so you are not allowed to distribute what you do with them. Correction: You are, by all means, allowed to but it would be rude and impolite to not do the simple thing that Mark asked. Nothing's stopping people from distributing it (I couldn't even find a license, actually, but I'm not looking very hard). It's best to respect Mark's request at the moment, since there's something he likely does not want people to do with beta executables. Perhaps they're easily decompiled. Who knows. |
| ||
Maybe they are a god awful mess and Mark is ashamed of them =] |
| ||
Wouldn't be hard to believe. Anyways, got the list box in. Picture:![]() Small graphical problem 'cause I'm running in windowed mode. Seems to go along with that problem with the mouse position in windowed mode- it works fine in fullscreen. |
| ||
it's looking very good there, Noel.. :) |
| ||
Lookin good... Have fun with the text control without a GetKey() command. :) |
| ||
Just loop through KeyHit for keycode = 1 to 255 :). |
| ||
Hey Noel, I wrote a small GUI library that had radio buttons, checkboxes, text fields with scroll buttons, list boxes, and text labels. Want the source to add into yours? It's not really messed up or anything. It's pretty straightforward. |
| ||
I already wrote a GetKey() (technically it's cGetKey() and returns the character as a string, but it's private so outside of the GUI module it's inaccessible) function. Robert: It's not that simple. BlitzMax does use ASCII codes for KeyDown now (compare the values of its key codes to those of ASCII values and you'll see what I mean), but it's a bit more problematic than that 'cause I need all the 'other' characters as well (e.g., Shift+8 = *). So, now I have a function with two very large Select..End Select constructs. Diordna: Thanks but no thanks, last thing I need is to have the trouble of mixing two different coding styles. Anyhow, I've got all but one of those gadgets in now (that would be labels, since I figure it can wait, being a relatively simple gadget). |
| ||
Noel doesn't like using other people's code :) It's looking good btw Noel, a lot better than mine is/did :) |
| ||
Anyone wants to fiddle with the GUI, source so far. Download Technical crap If you want to add gadgets, you do so by extending the CGadget type and you implement the Draw(), Update(), and ToString() (in the case of CButton, returns "Button") methods. Create:CYourGadget() should be a static method that creates the gadget. At the end of Draw you call DrawChildren() and at the end of Update() you call UpdateChidlren(). This is done because any gadget- besides windows, and they could be extended to include this- can be parented to any other gadget. There are still no 'FreeGadget' or 'Dispose' methods as I'm not quite sure exactly how BlitzMax handles stuff like that- I have no idea if the Delete method does anything or if Release frees the integer handle or all the resources used by an object (not any objects it has references to though). |
| ||
found a bug: if you switch between the two example windows several times, the one with the list stops functioning (it cannot be dragged and does not respond to any input). |
| ||
Yeah, I've noticed that.. thought I'd fixed that... |
| ||
it seems to be that last window created that remains functional. (tested by creating more than two). *EDIT* it seems to be that each of them will accept movement (or focus) twice, then all but the last stop responding. |
| ||
And for even more weirdness, it seems to only happen when ALL of them have moved or received focus at least twice, otherwise you can move them about as many times as you want. |
| ||
Huh.. you're right. I bet this one'll end up giving me a headache until I find out it's some stupid mistake (can't be a typo though, thank god). |
| ||
Nope, forgot to reassign the link member. New version with the fix uploaded. Uses your test code, by the way, since I overwrote the test file with it. |
| ||
Noel, you can stop chewing the pills now, I deleted the original mod folder completely, replaced it with the new and rebuilt the module, it works now. However, another bug: the window does not gain focus if you click near the bottom (the no-click zone is same height as the title bar). |
| ||
a fix for the bug: in CWindow.Update(): Local HeightOffset, YOffset:Int If (Flags&CW_TITLEBAR) Then HeightOffset = 24 YOffset = -24 Else HeightOffset = 0 YOffset = 0 EndIf Over = MouseOver(X, Y+YOffset, Width, Height+HeightOffset) |
| ||
it's been bothering me, but there's also a bug where if a title bar is behind the bottom of a window, it brings that window forwards. solved it almost: add the following to type CWindow Method MouseIn() If Hidden Then Return False Local HeightOffset, YOffset, mOver:Int If (Flags&CW_TITLEBAR) Then HeightOffset = 24 YOffset = -24 Else HeightOffset = 0 YOffset = 0 EndIf mOver = MouseOver(X, Y+YOffset, Width, Height+HeightOffset) Return mOver End Method And the in CWindow.Update() change: If Self <> CGUI.ActiveWindow And IsVisible() And MH And Over If Self <> CGUI.ActiveWindow And IsVisible() And MH And Over And Not ( CWindow(CGUI.ActiveWindow).MouseIn() ) |
| ||
Good job Noel! Is the source downloadable somewhere? Can I be beta tester? |
| ||
look halfway up this thread for the download link. |
| ||
Dang, Pert, hyperactive today, are we? ;) I'll add your changes and update the archive. |
| ||
Are you sure you don't want my code that divides a long string up into individual spots in an array for use in drawing text boxes? It's easily pluggable, just swap some array names. |
| ||
No, thanks. Anyhow, picture using the current WinXP skin. ![]() Obviously I'm porting the Eniretu skin as well for use in this. |
| ||
looking good :) *thumbs up* |
| ||
We gonna get an os x skin? |
| ||
Working on it, slightly difficult seeing as how I don't own a Mac or OS X though. If there are any other skins you'd like for it, best to get the requests in now. |
| ||
Added close/minimize buttons, image boxes, rollouts, inlets (beveled areas), labels, and a new procedure for tiling image segments horizontally without seams (and with fractional segments). Gonna work on adding the scrollbars next, as I need them for a great deal of gadgets.![]() |
| ||
I would like to see classic 4/16 colour AmiOS skins ;] |
| ||
If you can get me a picture of one, that'd help. Just post it here or e-mail it to me- whatever works- if you find one. |
| ||
4 colour amigaOS |
| ||
High Colour |
| ||
Those images are horrible =] One is scaled down and the other is infested with nasty nasty scanlines... |
| ||
Yep, sounds like an amiga alright. (Salutes the sky.) |
| ||
You've SEEN the sky? |
| ||
Contrary to popular American belief, us Brits have lived above ground for a while now. |
| ||
What's a sky? One is scaled down and the other is infested with nasty nasty scanlines... scaled down? nothing has been altered, they are unadulterated screenshots. |
| ||
![]() ![]() ![]() I couldn't get the scroll arrows to show on the text boxes, but you can take them from the list box. |
| ||
Looking good so far Noel :) I really like the look of the OS X skin, it would be sweet if you could add something like that ^^^ |
| ||
Thanks, Diordna. If you can get pictures of the buttons being pressed and while the mouse is over them (the highlight mode) that'd help. Edit: Oh yeah, added tab pages, regions, and progress bars. Scroll bars and slider next. |
| ||
That blue one in the tab part is mostly what they look like when you hover over them or click them. |
| ||
scaled down? nothing has been altered, they are unadulterated screenshots. Have you even looked at them? =] |
| ||
There are no mouse-overs. The blue halo is the active control which is chosen by keyboard selection or by clicking on the control. As for the down position graphics, just darken them a bit. Whoops, looks like there are no scrollbars in that screenshot! ![]() |
| ||
Have you even looked at them? =] No, I took screenshots of them, ran photoshop, pasted them in, flattened the layers and saved then uploaded them without opening my eyes. |
| ||
Apparently. |
| ||
Thanks, Diordna. I've uploaded the latest source code, this includes the new tab strip/page control and progress bar, along with an Xml module (ported from old code of Blitztastic's that I butchered). Edit: New picture: ![]() |
| ||
Wow you work fast. |
| ||
Well I've had a week (well, a week starting tomorrow), so that's quite a bit of time to work on this. Anyhow, decided to try this on IRC: <NoelCower> "Wow you work fast." should i take that as a compliment, insult, or advisory to seek psychological help? <EarthQuake> =P <Mojo> all of the above <flaagan> A & C Had a lot of other.. er.. unrelated responses. But, anyways, gotta love IRC. And no, I wasn't serious about taking it as an insult ;) Edit: Oh, and to clear up any confusion: Yes, I am hyper-active. |
| ||
Those windows really need rounded edges, by the way =] Oh and my apologies to Perts. Was a case of IE being screwy with the pictures. |
| ||
By the way, Toby, is this what you wanted when you meant an AmiOS skin? |
| ||
IE? oh god... oh my holy... cheese... :| http://www.mozilla.org/products/firefox/ Or http://www.opera.com/ [Edit] Nice GUI btw, cower |
| ||
Looking very nice so far, I want to use it myself, but i'm wondering how you integrate it with the display Noel? I'm not using any of mark's rendering stuff, only BGLcreatecontext. Should this be compatible? Also, are there plans for an active texture gadget?(I.e true gl texture) for 3d displays using custom engines(i.e all of them) Oh one last question(Too many? :) ), open source/commercial/whatever come the finish? |
| ||
open source/commercial/whatever come the finish? See the Mozilla Public License 1.1 |
| ||
@Weasel:No. OS4 is a travesty =] But that is a nice screenshot. Bit like a simplified MUI. @BotBuilder:Shutup and go away with your Opera pushing filth! =] |
| ||
Cant get the modules compiling.... is there a way you can include the compiled modules with the zip? I really like the gui style. :) |
| ||
Bit like a simplified MUI. You left out 'and ugly'. |
| ||
BTW...where is the IRC channel? |
| ||
Diordna: irc.blitzed.org #blitzbasic and #blitzcoder Grisu: Unfortunately, no, I can't include the compiled modules. It would be a bit problematic and take more time to upload the files including the debug and release builds. Antony: Yar, too many questions. I'll answer them when I have time. |
| ||
![]() A skin made by Leiden (BlitzCoder goer). He's mostly been relying on me to see what it looks like when on the GUI. Anyhow, a cheat-sheet (of sorts) for anyone who wants to make skins: ![]() |
| ||
That's some nice rounded edges ya got happenning there =] |
| ||
Really nice. But how do you draw a portion of that skin image instead of the whole thing? |
| ||
Cower.Drawing module:Strict Module Cower.Drawing Import BRL.GLMax2D Import Pub.OpenGL Function DrawImageBlock(Img:TImage,X#,Y#,Width#,Height#,TX#,TY#,TWidth#,THeight#,Frame%=0) Local texEnabled:Int = glIsEnabled(GL_TEXTURE_2D) If texEnabled=0 Then glEnable(GL_TEXTURE_2D) Local onewidth:Float = 1.0/Img.Width Local oneheight:Float = 1.0/Img.Height Local UF:Float = TX * onewidth Local VF:Float = TY * oneheight Local UT:Float = (TX+TWidth) * onewidth Local VT:Float = (TY+THeight) * oneheight Local frm:TGLImageFrame = TGLImageFrame(Img.frames[frame]) glBindTexture(GL_TEXTURE_2D,frm.name) Local r,g,b,a:Float ' You could set your own colors, but I leave them at 1,1,1,1 GetColor r,g,b SetColor 255,255,255 a=GetAlpha() SetAlpha 1.0 glBegin GL_QUADS glTexCoord2f UF,VF glVertex2f x,y glTexCoord2f UT,VF glVertex2f x+width,y glTexCoord2f UT,VT glVertex2f x+width,y+height glTexCoord2f UF,VT glVertex2f x,y+height glEnd SetColor r,g,b SetAlpha a If texEnabled=0 Then glDisable(GL_TEXTURE_2D) End Function |
| ||
ooh, Open GL, my head hurts... Thanks for the tip though, I will keep it in a safe place until I can do something with it! |
| ||
Revival! Download ![]() New version includes: Sortof working textbox, 3D viewports, can now be used without calling Graphics() (but you still have to create a context and then tell the GUI the height and width of said context because there's no way in hell it's gonna know) |
| ||
Wow I forgot about this one. Nice :) I really like the cheme in the shot you just posted This is almost an excuse to buy Blitz Max in fact... Does the colour scheme go by what the current windows colour scheme is? That information can be accessed via Win32.dll I think... |
| ||
No, the GUI is skin based (three included in the archive- there was a Steam one but I canned it 'cause it just didn't work out). All gadgets have modifiable color values, so I suppose you could alter the colors by grabbing them via Windows. But this isn't Windows only, so I'm not going to put anything platform dependent in. |
| ||
This is almost an excuse to buy Blitz Max in fact... I was thinking the same thing ;c) |
| ||
Hey are you planning on making a canvas gadget also like they had in Blitz+ |
| ||
What the heck is a canvas? I never used BlitzPlus (for good reason.. the thing is a hack). |
| ||
After using Instant Pestering© I have decided that it -could- be possible, but I'm not gonna add it. The 3D viewport control should be enough to handle drawing- if not, use the ImageBox control. |
| ||
How are you going to do imagebox, being that Blitzmax has no setbuffer or anything unless I messed it somewhere in the modules... The canvas would be faster if done right than having to buffer to a image, unless the imagebox isn't a image... and a 3D Viewport sounds like something from Blitz3D.. anyways just trying ot get more info because i need a GUI for a level im making for my new 2d game |
| ||
How are you going to do imagebox You mean how am I -doing- the ImageBox control. I take an image and draw it. Simple as that. You wanna draw to an image, remake the GL texture after drawing to it. |
| ||
well done Noel... --Mike |
| ||
looking very good indeedy :) |
| ||
Latest archive updated. Added a standard blinking caret to the textbox, made the window shade effect slightly cooler, and probably fixed a few bugs that I don't remember. |
| ||
Very nice, Noel! Do you have any plans to make it app-able? That is, a true and proper native OS-compliant GUI thingy using native OS gui elements, etc? Hope so! In the mean time, this will do ;) Russell |
| ||
No plans to do that any time soon as then I'd be limited to what the OS can handle (and it wouldn't be hardware accelerated, and I know how slow GDI+ is from experience- double buffering is a pain with it too, as for xorg, I have no idea anymore). In any case, making CGUI work with an operating system or graphics server's window manager would prove to be more difficult than just starting from scratch at this point. |
| ||
New release available, same download. Fixed some problems with the textbox and made it work a little better, made the window shading animations optional (horizontal and vertical can be toggled now), and the height of title bars is changeable (and the close/minimize buttons scale with it.. not that pretty if you go above 24 though.. should be sorted out when I make skins completely customizeable via XML). Probably some more stuff I forgot about, too, but that's what I remember. |
| ||
Great system so far Noel, keep it up! Here is a skin I made for it called "Silk" Enjoy! ![]() ![]() |
| ||
Thanks, altitudems. I'll make sure to include it in future updates (and of course I'll credit you). Anyhow, this isn't particularly related to CGUI's development, but here's a new skin I made for it: ![]() It'll be included in the next release (I won't say when that'll be, since I don't want to have anyone holding me to it). |
| ||
Interesting skin, Noel. I like it. Oh and thanks for the credit. |
| ||
Noel, I think I might have found a simple bug/oversight in your code. The gadgets that use: glEnable(GL_SCISSOR_TEST)inside their "Draw" method don't ever call: glDisable(GL_SCISSOR_TEST)Unless I'm mistaken that means that any other graphics drawn afterwards, will not show up unless they fall inside the last glScissor boundaries, disable GL_SCISSOR_TEST,or define new glScissor boundaries. I discovered this issue as was adding gadgets after a ListBox or TextBox gadget. After drawing the list box, some gadgets did not show up. It's an easy fix, you may have already have fixed it. Just thought I'd point it out in case you didn't. Looking forward to the next release! |
| ||
I'll look at it, thanks, altitudems. |
| ||
hey ya, great lookin gui system, how ever it seems to refuse to compile, i've tried every poss. combi i can think of to get it work, if i do it from the command promt, it returns nothing at all. just to make sure i am doing this right, i drop the cower.mod folder into my pub.mod folder i try bmk makemods -r cower and no return error or success msg and even bmk makemods -a doesnt find it, however if i run a program i get error E:\blitzmax\bin\ld.exe: cannot find E:/blitzmax/mod/pub.mod/cower.mod/cower.a what have i done :D |
| ||
put the cower.mod folder in the mods folder, not the pub folder, recompile the modules and it should work. |
| ||
Cower.mod is its own module or namespace, wherein it contains its own sub-modules or classes (perhaps). Anyhow, cower.mod goes in the blitzmax/mods/ folder. |
| ||
module compiles well, but i when i try the test.bmx: Building test Executing:test.debug.exe Pushing attribs OpenGL Error 0502 Process complete |
| ||
hmmm... there was an older version of your test.bmx on my hardrive, which i hadn't tested yet, and it worked with the newest version of your module.. |
| ||
I wouldn't try to use this anymore, BRL pretty much made it so it's impossible to use OpenGL alongside GLMax2D, so it's probably best to just give up any hope of using this. |