Posted: 6th Dec 2011 7:28
Hello,

Does the AppGameKit include commands to create standard OS UI controls? Menus, buttons, checkboxes, pop-up alerts, etc? Basically I'd like to be able to make more traditional "apps" in addition to games. Would be nice to use the same language for both.

If the answer is no, is a set of commands like this a priority for future versions?

I apologize if this has been asked before, but the search engine says "UI" is too short to search for, hehe.
Posted: 6th Dec 2011 14:04
No but you properly could make your own.
Posted: 6th Dec 2011 17:05
There is a "Message" command which pops up a messagebox but that's about it at the moment.

I doubt it's high on the agenda as AppGameKit is aimed at games. Traditionally game makers like to have their own GUI system which sets their game apart from other developers.

AGK is really easy to produce GUI's using sprites for backgrounds and buttons. I honestly think it's possible to produce the equivalent of a 'question message' dialogue in about 10 minutes... not going to prove it right now though...

Actually why not...
+ Code Snippet
rem
rem AGK Application
rem

rem Landscape App
SetDisplayAspect( 4.0/3.0 )

rem background
BG = createSprite(0)
setSpriteSize(BG,50,25)
setSpriteOffset(BG,25,12.5)
setSpritePositionByOffset(BG,50,50)
`yes button
YES = createSprite(0)
setSpriteSize(YES,15,8)
setSpriteColor(YES,0,0,0,255)
setSpriteOffset(YES,7.5,1)
setSpritePositionByOffset(YES,35,50)
`no button
NO = createSprite(0)
setSpriteSize(NO,15,8)
setSpriteColor(NO,0,0,0,255)
setSpriteOffset(NO,7.5,1)
setSpritePositionByOffset(NO,65,50)
`text
txt1 = createText("Did I make it?")
txt2 = createText("YES")
txt3 = createText("NO")
setTextSize(txt1,3)
setTextAlignment(txt1,1)
setTextPosition(txt1,50,40)
setTextColor(txt1,0,0,0,255)
setTextSize(txt2,3)
setTextAlignment(txt2,1)
setTextPosition(txt2,35,51)
setTextColor(txt2,255,255,255,255)
setTextSize(txt3,3)
setTextAlignment(txt3,1)
setTextPosition(txt3,65,51)
setTextColor(txt3,255,255,255,255)

rem A baxslash Did It!
do
    if getPointerPressed()=1
        hit = getSpriteHitTest(YES,getPointerX(),getPointerY())
        if hit>0
            message("Yeah baby!")
        endif
        hit = getSpriteHitTest(NO,getPointerX(),getPointerY())
        if hit>0
            message("Darn it!")
        endif
    endif
    
    Sync()
loop
Posted: 6th Dec 2011 17:17
Sorry to double post but I didn't want to loose my 11 minute evidence in the previous post

Didn't quite make it in 10 mins and no cheating...

I know it's a bit dull but it shows how easy it is
Posted: 8th Dec 2011 0:55
Such a GUI will probably come from an AppGameKit user's tool box who decides to turn it into a product and sell it through TGC. I think the majority feel our time is best spent under the hood tackling horrible technical issues on your behalf. The sprite system in AppGameKit has been designed to make the production of GUI gadgets as easy and flexible as possible, providing the building blocks from which you can create unique gadgets to make your apps look different from your competitors.
Posted: 8th Dec 2011 9:50
unless it's native iOS or Android GUI addon, a custom gui using sprites won't look so good in non-games apps.