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 Studio Chat / Making Wide Virtual Buttons makes the text too small.

Author
Message
PeteyM5
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 24th Aug 2021 14:06
I know text is auto-sized based on the height of the Virtual Buttons. Will this be fixed in future editions of AppGameKit? Will like to have wide buttons for the games I am trying to port over to APG Basic.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 24th Aug 2021 14:25
Meh!, Virtual buttons are flawed, they are pretty much a temporary solution for prototyping, beyond that they are useless.
Open Source plugins
Cl - DnD Plugin
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 24th Aug 2021 15:23 Edited at: 24th Aug 2021 15:32
I just did a search for APG Basic and got nothing .
I have used virtual joysticks on a few of my phone games and they're not bad although playing the same game on pc is easier to get a higher score .
live long and prosper
PeteyM5
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 24th Aug 2021 17:37
I figured out how to assign images to the buttons. Made them with Gimp with text on them. These work better. However Text on buttons is an issue that needs to be looked into for App Game Kit. I am porting some stuff from Dark Basic and Visual Basic.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 24th Aug 2021 19:15
I am sure I wrote a button lib, dam sure of it but a search of my threads says I never posted it .. your loss I guess

If your making an image in gimp and adding text to it, this is a sprite ... no?

The virtual joysticks are actually what lead me to AppGameKit, I kept seeing images and games with them in and eventually found out TGC had created the framework that had them ... I immediately purchased it... no regrets, well, not many.

Look I can fix this I am looking at the code right now (line 173 to 191 Wrapper.cpp)



This really is an easy fix, replace "m_pButtonSprite->GetHeight() / 4.0f" with a text size variable and add a function to set/get the button text size, job done Virtual Buttons fixed but although TGC made the core public they do not seem to eager to merge any code so ... I'll go through the motions and make a pull but don't hold your breath on it being merged.
Open Source plugins
Cl - DnD Plugin
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 24th Aug 2021 22:08 Edited at: 24th Aug 2021 22:56
Done and added to my PR ... for all the good that will do!



https://github.com/PartTimeCode/AGKTier2/commit/852baea0129aa84d09d449835924d9c6101fc98b


Edit: also added SetVirtualButtonTextColor
Open Source plugins
Cl - DnD Plugin

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 12:12:38
Your offset time is: 2024-03-29 12:12:38