Note that there are some explanatory texts on larger screens.

plurals
  1. POText autoscroll in c pebble sdk 2.0
    primarykey
    data
    text
    <p>I'm trying to autoscroll text in screen.(Like html horizontal marquee)I tried <a href="http://cboard.cprogramming.com/cplusplus-programming/65998-how-scroll-your-text.html" rel="nofollow">http://cboard.cprogramming.com/cplusplus-programming/65998-how-scroll-your-text.html</a> that but it isnt working. How can i do that with pebble sdk 2.0? Pebble Codes:</p> <pre><code>#include &lt;pebble.h&gt; static Window *window; static TextLayer *text_layer; static void select_click_handler(ClickRecognizerRef recognizer, void *context) { text_layer_set_text(text_layer, "Select"); } static void up_click_handler(ClickRecognizerRef recognizer, void *context) { text_layer_set_text(text_layer, "Up"); } static void down_click_handler(ClickRecognizerRef recognizer, void *context) { text_layer_set_text(text_layer, "Down"); } static void click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_SELECT, select_click_handler); window_single_click_subscribe(BUTTON_ID_UP, up_click_handler); window_single_click_subscribe(BUTTON_ID_DOWN, down_click_handler); } static void window_load(Window *window) { Layer *window_layer = window_get_root_layer(window); GRect bounds = layer_get_bounds(window_layer); text_layer = text_layer_create((GRect) { .origin = { 0, 72 }, .size = { bounds.size.w, 20 } }); text_layer_set_text(text_layer, "Press a button"); text_layer_set_text_alignment(text_layer, GTextAlignmentCenter); layer_add_child(window_layer, text_layer_get_layer(text_layer)); } static void window_unload(Window *window) { text_layer_destroy(text_layer); } static void init(void) { window = window_create(); window_set_click_config_provider(window, click_config_provider); window_set_window_handlers(window, (WindowHandlers) { .load = window_load, .unload = window_unload, }); const bool animated = true; window_stack_push(window, animated); text_layer = text_layer_create(GRect(0, 0, 144, 168)); text_layer_set_background_color(text_layer, GColorClear); text_layer_set_text_color(text_layer, GColorBlack); layer_add_child(window_get_root_layer(window), (Layer*) text_layer); text_layer_set_text(text_layer, "Aasasfnything you want, as long as it is in quotes!"); } static void deinit(void) { text_layer_destroy(text_layer); window_destroy(window); } int main(void) { init(); APP_LOG(APP_LOG_LEVEL_DEBUG, "Done initializing, pushed window: %p", window); app_event_loop(); deinit(); } </code></pre> <p>Online IDE for Pebble cloudpebble.net Thank You</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload