Jump to content



Photo
- - - - -

Help Me With Addins


  • Please log in to reply
3 replies to this topic

#1 NT2005

NT2005

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 28 October 2009 - 09:47 PM

Good evening, I hope you can help me by get along with addins and c++. Her is my question:

void HelloWorldModule::Draw()
{
	// BeginDraw prevents screen updates until a matching EndDraw
	BeginDraw();

	// Clear the screen
	ClearScreen();
	
	// Draw window border
	DrawFrame();

	// Draw any children objects
	DrawChildren();

	// Draw "Hey" at relative window position (10,10)
	PegColor col;
	PegPoint p = {10,10};
	DrawTextR(p,"Hey",col,PegTextThing::GetBasicFont());

	// Matching EndDraw. If this is the outer layer EndDraw
	// then the screen will be updated.
	EndDraw();
}

This is from HelloWorld.
How can I draw a text, maybe after a buttonclick, later?

I don´t cant edit the window, only when I edit the Draw() sequence.

Edited by NT2005, 28 October 2009 - 09:49 PM.


#2 NT2005

NT2005

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 November 2009 - 10:22 AM

Hello,

I solved the problem with AddR(new PegPrompt(1, 1, "Text"));

But now my question is, how can I clear the screen?

ClearScreen(); seams to do nothing...

Edited by NT2005, 01 November 2009 - 10:22 AM.


#3 NT2005

NT2005

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 31 December 2009 - 02:02 PM

Bring
Up
My
Post

#4 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 03 January 2010 - 03:04 AM

I'm not sure at all as I never programmed a ClassPad, but do you need to update the screen after you clear it?

So:

ClearScreen(); // Clear the screen then right immediately update it
EndDraw(); // And here it is, now update the screen with a blank one





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users