Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / WIN32 - library [FREE]

Author
Message
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 27th Apr 2012 16:36 Edited at: 22nd Sep 2012 17:21
Hey there!

I thought that you guys might want to take control of
win32 functions, such as creating buttons, edit boxes and so on.

- Combine AppGameKit with Win32 -

So, I've made that nifty library just for you

What does it look like?



What can you currently do with it?

- Create & manipulate buttons
- Create groups
- Create & manipulate check boxes
- Create & manipulate edit boxes
- Simplified displaying message boxes
- Open save & open dialog and get path from the output
- Manipulate window - Strip it completely from title bar and all / Set it to fullscreen / Change dimensions


What's yet to come?

- Radio buttons
- Dialog boxes
- Menu
- ?


Please note, that library is Tier 2 only

... because Tier 1 doesn't allow any plugins. For now hopefully.


Not wasting more of your time, here is how to set up the library


1. Put window_manipulation.cpp & window_manipulation.h next to template.cpp.
2. Open Core.cpp and inside it #include "window_manipulation.h"
3. Go to line 151 and under it paste following code:


4. Inside template.cpp #include "window_manipulation.h"

5. Inside window_manipulation.cpp change:



To RGB which you use for all the button's background. For example,
when your buttons are on blue background, set this to:


You're done!

Here are revelant up to date files:

window_manipulation.cpp <330 lines>


window_manipulation.h <34 lines>




Up to date tutorials are in the post below! Or either look at the documentation:

DOCUMENTATION






Have fun

Follow me on twitter! @MotionStruct
Motion Struct blog
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 27th Apr 2012 16:36 Edited at: 27th Apr 2012 16:48
-TUTORIAL 1- Basic usage


At first, I will describe here how to handle buttons.

We need to declare integer variable holding our button's ID.

We will use:



Which we declare under "using namespace AGK" inside template.cpp.

Then, we have to create the button in void app::Begin( void ). Here is how we do it:



Syntax for AddButton is:



We have to pass our window title every time we want to create a button / edit box or radio button or anything like that.

The button is almost functional now.

To make it 100% functional, add this inside app::Sync(void) function below:



Done! Everything's fully working now. Our button is click-able.


-TUTORIAL 2- Saving and Opening


This is another short tutorial telling you how to handle Save/Open dialogs.

To do this, use function



OR



They return selected path.

Example -



This will give tell you to open something. When you finally choose an item (you can pick .txt files or either select all files) path will store the... path.
What you do with it is up to you Same goes for SaveDialog();

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Apr 2012 16:57
That's a handy set of functions

kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 27th Apr 2012 16:59 Edited at: 27th Apr 2012 17:03
I hope so

Somebody might hopefully use it for his map editor to his game. (When he actually makes one himself)

Also, by placing EditBox you can avoid using AGK's default text input (Which to be honest is quite limited at the moment).

@EDIT

Added a screenshot.

polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 27th Apr 2012 17:45
Nice and handy,

Blackberry App Development & ZX Spectrum Game Development.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Apr 2012 18:04
FANTASTIC work!

★★★★★
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 27th Apr 2012 18:40
Thank you guys

It may take some time to add more features (As I have left the toughest ones on the end), but as soon as there will be interest in that library, I will try to develop them.

polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 27th Apr 2012 18:47
Now, can I have all those buttons, edit boxes, dropdowns, comboboxes etc for PB, :p lol

Blackberry App Development & ZX Spectrum Game Development.
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 27th Apr 2012 18:48 Edited at: 27th Apr 2012 18:52
Not really, as it uses Windows.h Which means, it works on Windows only.

I will probably create separate GUI soon enough, so don't be sad

polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 27th Apr 2012 19:07
Oooo, nice one then,

Blackberry App Development & ZX Spectrum Game Development.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Apr 2012 20:55
This is very GOOF even if it's Windows only!

This is PERFECT for building internal editors, etc...

GREAT work, looking forward to more functions!
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 27th Apr 2012 21:03 Edited at: 27th Apr 2012 21:03
I will hopefully add more functions, but not in the next 4 days (I'm on a trip). When I'm back, I'll either update this library or make my own GUI which then I'll publish... or both.

Well, I'll think for four days

Quote: "This is PERFECT for building internal editors, etc..."


This was my intention

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Apr 2012 21:18
Kamac, please use standard windows UI elements not custom ones, as they look much better!!!!
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 27th Apr 2012 21:19 Edited at: 27th Apr 2012 21:21
Sure they do, but I can't copy them over to my own GUI .

I wouldn't want to stop on making this library (as I need it myself too), but portable GUI, which'd also work on Mac/Android/iPad/Playbook would be great too.

Though, I guess this project has priority at the moment.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Apr 2012 21:22
to make it portable you will have to map the functions to the native UI of every platform. That would be the best option, but i know that its hard and time consuming to do
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 27th Apr 2012 21:22
Sure they do, but I can't copy them over to my own GUI .

I wouldn't want to stop on making this library (as I need it myself too), but portable GUI, which'd also work on Mac/Android/iPad/Playbook would be great too.

Though, I guess this project has priority at the moment.

george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 28th Apr 2012 09:26
Nice work kamac, thanks for sharing!
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 28th Apr 2012 09:29
You're welcome

As I mentioned before, I am off for four-day holiday and I probably won't be able to script there, so I can't give you updates in the next four days.

Login to post a reply

Server time is: 2024-05-04 16:56:51
Your offset time is: 2024-05-04 16:56:51