Author Topic: [Axiom] AxiomGUI  (Read 11176 times)

0 Members and 1 Guest are viewing this topic.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
[Axiom] AxiomGUI
« on: September 03, 2012, 10:15:20 am »
Hi guys !

I'm working on an Axiom which provides widgets for your GUIs, like a button, an alert ...

For now, I only have 4 funcs :

Alert(title,text)Key :normalpdf(Draws a modal auto-sized message box with title and text
Button(outputAddr,X,Y,text)Key : normalcdf(draws a button at the given location with text drawn inside, and store X, Y, X+W and Y+H in respectively outputAddr, outputAddr+1, outputAddr+2 and outputAddr+3 in order to test it later with a mouse click or something.
ProgressBar(Y,P)Key : invNorm(draws a progress bar at (0,Y) and fill it at P percent.
GUIstackKey : geometcdf(custom var (for now $90D3), you can use it for your widgets

All of these commands are available in the distrib menu [2nd] [vars].

Here is the latest screeshot (I'll update it, the mouse is not part of the Axiom) :


Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #1 on: September 03, 2012, 10:18:52 am »
that very funny and could be useful  :D

great work  :thumbsup:
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxiomGUI
« Reply #2 on: September 03, 2012, 10:24:52 am »
Thanks :)

It's in active work, so I'll update it regularly.

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #3 on: September 03, 2012, 11:18:45 am »
That's a really cool axiom!

How about a text-box function which lets the user input text or numbers and displays it (if not to difficult)
TextBox(addr,X,Y,width,enable/mode)
The enable/mode is like an alpha-toggle; 0=doesn't respond to any key presses, 1=number input, 2=letter input
Auto-stop when the box is full and - of course - DEL as backspace.
Returns a number (when mode was 1) or a pointer to the string (when mode was 2)


Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxiomGUI
« Reply #4 on: September 03, 2012, 11:55:10 am »
How, that's way too difficult :/ I really don't know how to do an input in ASM.

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #5 on: September 03, 2012, 12:21:04 pm »
How, that's way too difficult :/ I really don't know how to do an input in ASM.

Oh, well... input has been a highly requested feature for a long time and it'll be awesome if someone finally makes that.
Here is my basic idea how it could work:
  • Get/Check for key presses
  • Use a LUT to determine what the corresponding character is; skip when key not legal
  • Enough space in the box? (index < width/4?)
  • Write the character/token to an array, increment the index
  • Print the character at cursor position, move cursor 4 pixels to the right
  • Case of "DEL":
    • Array index != 0?
    • Move cursor left 4 pixels, decrement index
    • Print 3 empty spaces at cursor position
  • Case of "ENTER":
    • Array index != 0?
    • Text-mode: Copy the #index bytes from the array to the address given.
    • Number-mode: subtract '0' from each digit, sum them up while multiplying with 10 (makes a number out of the digits) and write to the address given.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxiomGUI
« Reply #6 on: September 03, 2012, 12:24:51 pm »
Yeah, I know the method, but I don't see how to apply it :/ maybe I'll do it, but much later, since there are many widgets simpler to code (and mostly I still haven't done the mouse() command ;D )

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #7 on: September 03, 2012, 12:28:53 pm »
Yeah, I know the method, but I don't see how to apply it :/ maybe I'll do it, but much later, since there are many widgets simpler to code (and mostly I still haven't done the mouse() command ;D )
Ok, sure :)
If I knew how to make axioms I'd give it a try myself.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axiom] AxiomGUI
« Reply #8 on: September 03, 2012, 01:04:05 pm »
There's a how-to-do file in the Axe zip, it's called AxiomSDK.txt, it describes how to write an axiom :) I learned with it.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #9 on: September 03, 2012, 01:17:26 pm »
Wow. This could be very useful for my project :D
Sig wipe!

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #10 on: September 03, 2012, 01:21:19 pm »
There's a how-to-do file in the Axe zip, it's called AxiomSDK.txt, it describes how to write an axiom :) I learned with it.
I looked at it, but I think I'm not advanced enough in asm to fully understand it  :-\

Offline Ki1o

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 119
  • Rating: +5/-2
  • Doing my best...
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #11 on: September 03, 2012, 09:12:54 pm »
Ooo this looks nice! Also Yeong, I just realized your avatar is Andy from Advance Wars o.O

Offline neuronix

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 108
  • Rating: +0/-0
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #12 on: June 29, 2016, 10:44:31 am »
It is possible to download it? I don't see any link to download :(

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #13 on: June 29, 2016, 11:09:55 am »
Probably not. This is a pretty old topic and I don't see a download link. Matref doesn't really do calculator programming any more if I recall correctly. You can try sending him a private message here or attempt to catch him at Codewalrus. He doesn't really come around here these days.

Offline neuronix

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 108
  • Rating: +0/-0
    • View Profile
Re: [Axiom] AxiomGUI
« Reply #14 on: June 30, 2016, 10:12:47 am »
Thanks for your responce and sorry for my post  :-\