Exemplo n.º 1
0
        private static void OnItemSelect_posMenu_coords(UIMenu sender, UIMenuItem selectedItem, int index)
        {
            if (sender != posMenu_coords)
            {
                return;                           // We only want to detect changes from our menu.
            }
            // You can also detect the button by using index

            if (selectedItem == set_pos_coords_UP)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_pos_y_coords -= 5;
            }
            if (selectedItem == set_pos_coords_DOWN)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_pos_y_coords += 5;
            }
            if (selectedItem == set_pos_coords_RIGHT)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_pos_x_coords += 5;
            }
            if (selectedItem == set_pos_coords_LEFT)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_pos_x_coords -= 5;
            }
            RageShowMyLocationClass.SaveSettings();
        }
Exemplo n.º 2
0
        private static void OnListChange_font_size(UIMenu sender, UIMenuListItem list, int index)
        {
            if (sender != font_sizeMenu)
            {
                return;
            }

            if (list == font_size_steet_county_zone)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_font_size = list.IndexToItem(index);
            }
            if (list == font_size_heading)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_font_size_heading = list.IndexToItem(index);
            }
            if (list == font_size_time)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_font_size_time = list.IndexToItem(index);
            }
            if (list == font_size_speedlimit)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_font_size_sl = list.IndexToItem(index);
            }
            if (list == font_size_currspeed)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_font_size_cs = list.IndexToItem(index);
            }
            if (list == font_size_coords)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_font_size_coords = list.IndexToItem(index);
            }


            RageShowMyLocationClass.SaveSettings();
        }
Exemplo n.º 3
0
        private static void OnItemSelect_posMenu_street(UIMenu sender, UIMenuItem selectedItem, int index)
        {
            if (sender != posMenu_street)
            {
                return;                           // We only want to detect changes from our menu.
            }
            // You can also detect the button by using index

            if (selectedItem == set_pos_steet_county_zone_UP)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_pos_y -= 5;
            }
            if (selectedItem == set_pos_steet_county_zone_DOWN)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_pos_y += 5;
            }
            if (selectedItem == set_pos_steet_county_zone_RIGHT)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_pos_x += 5;
            }
            if (selectedItem == set_pos_steet_county_zone_LEFT)
            {
                RageShowMyLocation.RageShowMyLocationClass.option_pos_x -= 5;
            }

            RageShowMyLocationClass.SaveSettings();
        }
Exemplo n.º 4
0
 private static void OnCheckBoxBoolOptionsChange(UIMenu sender, UIMenuCheckboxItem checkbox, bool Checked)
 {
     if (sender != boolMenuOptions)
     {
         return;                            // We only want to detect changes from our menu.
     }
     if (checkbox == option_12hour_clock)
     {
         if (Checked)
         {
             RageShowMyLocationClass.option_12hourclock = 1;
         }
         else
         {
             RageShowMyLocationClass.option_12hourclock = 0;
         }
     }
     if (checkbox == option_box)
     {
         if (Checked)
         {
             RageShowMyLocationClass.option_rect_aroud_text = 1;
         }
         else
         {
             RageShowMyLocationClass.option_rect_aroud_text = 0;
         }
     }
     if (checkbox == option_coords)
     {
         if (Checked)
         {
             RageShowMyLocationClass.option_show_cords = 1;
         }
         else
         {
             RageShowMyLocationClass.option_show_cords = 0;
         }
     }
     if (checkbox == option_heading)
     {
         if (Checked)
         {
             RageShowMyLocationClass.option_show_heading = 1;
         }
         else
         {
             RageShowMyLocationClass.option_show_heading = 0;
         }
     }
     if (checkbox == option_metric)
     {
         if (Checked)
         {
             RageShowMyLocationClass.option_metric = 1;
         }
         else
         {
             RageShowMyLocationClass.option_metric = 0;
         }
     }
     if (checkbox == option_player_speed)
     {
         if (Checked)
         {
             RageShowMyLocationClass.option_show_player_speed = 1;
         }
         else
         {
             RageShowMyLocationClass.option_show_player_speed = 0;
         }
     }
     if (checkbox == option_time)
     {
         if (Checked)
         {
             RageShowMyLocationClass.option_show_time = 1;
         }
         else
         {
             RageShowMyLocationClass.option_show_time = 0;
         }
     }
     if (checkbox == option_zone)
     {
         if (Checked)
         {
             RageShowMyLocationClass.option_show_zone = 1;
         }
         else
         {
             RageShowMyLocationClass.option_show_zone = 0;
         }
     }
     RageShowMyLocationClass.SaveSettings();
 }